a011d51fec2442ce6277a38d779f110137e8414e
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / amlogic / meson-gxl-s905x-libretech-cc.dts
1 /*
2  * Copyright (c) 2017 BayLibre, SAS.
3  * Author: Neil Armstrong <narmstrong@baylibre.com>
4  * Author: Jerome Brunet <jbrunet@baylibre.com>
5  *
6  * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
7  */
8
9 /dts-v1/;
10
11 #include <dt-bindings/input/input.h>
12
13 #include "meson-gxl-s905x.dtsi"
14
15 / {
16         compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
17         model = "Libre Technology CC";
18
19         aliases {
20                 serial0 = &uart_AO;
21                 ethernet0 = &ethmac;
22         };
23
24         chosen {
25                 stdout-path = "serial0:115200n8";
26         };
27
28         cvbs-connector {
29                 compatible = "composite-video-connector";
30
31                 port {
32                         cvbs_connector_in: endpoint {
33                                 remote-endpoint = <&cvbs_vdac_out>;
34                         };
35                 };
36         };
37
38         emmc_pwrseq: emmc-pwrseq {
39                 compatible = "mmc-pwrseq-emmc";
40                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
41         };
42
43         hdmi-connector {
44                 compatible = "hdmi-connector";
45                 type = "a";
46
47                 port {
48                         hdmi_connector_in: endpoint {
49                                 remote-endpoint = <&hdmi_tx_tmds_out>;
50                         };
51                 };
52         };
53
54         leds {
55                 compatible = "gpio-leds";
56
57                 system {
58                         label = "librecomputer:system-status";
59                         gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
60                         default-state = "on";
61                         panic-indicator;
62                 };
63
64                 blue {
65                         label = "librecomputer:blue";
66                         gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
67                         linux,default-trigger = "heartbeat";
68                 };
69         };
70
71         memory@0 {
72                 device_type = "memory";
73                 reg = <0x0 0x0 0x0 0x80000000>;
74         };
75
76         hdmi_5v: regulator-hdmi-5v {
77                 compatible = "regulator-fixed";
78
79                 regulator-name = "HDMI_5V";
80                 regulator-min-microvolt = <5000000>;
81                 regulator-max-microvolt = <5000000>;
82
83                 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
84                 enable-active-high;
85                 regulator-always-on;
86         };
87
88         vcc_3v3: regulator-vcc_3v3 {
89                 compatible = "regulator-fixed";
90                 regulator-name = "VCC_3V3";
91                 regulator-min-microvolt = <3300000>;
92                 regulator-max-microvolt = <3300000>;
93         };
94
95         vcc_card: regulator-vcc-card {
96                 compatible = "regulator-gpio";
97
98                 regulator-name = "VCC_CARD";
99                 regulator-min-microvolt = <1800000>;
100                 regulator-max-microvolt = <3300000>;
101
102                 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
103                 gpios-states = <0>;
104
105                 states = <3300000 0>,
106                          <1800000 1>;
107
108                 regulator-settling-time-up-us = <200>;
109                 regulator-settling-time-down-us = <50000>;
110         };
111
112         vddio_ao18: regulator-vddio_ao18 {
113                 compatible = "regulator-fixed";
114                 regulator-name = "VDDIO_AO18";
115                 regulator-min-microvolt = <1800000>;
116                 regulator-max-microvolt = <1800000>;
117         };
118
119         vddio_boot: regulator-vddio_boot {
120                 compatible = "regulator-fixed";
121                 regulator-name = "VDDIO_BOOT";
122                 regulator-min-microvolt = <3300000>;
123                 regulator-max-microvolt = <3300000>;
124         };
125 };
126
127 &cec_AO {
128         status = "okay";
129         pinctrl-0 = <&ao_cec_pins>;
130         pinctrl-names = "default";
131         hdmi-phandle = <&hdmi_tx>;
132 };
133
134 &cvbs_vdac_port {
135         cvbs_vdac_out: endpoint {
136                 remote-endpoint = <&cvbs_connector_in>;
137         };
138 };
139
140 &ethmac {
141         status = "okay";
142 };
143
144 &internal_phy {
145         pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
146         pinctrl-names = "default";
147 };
148
149 &ir {
150         status = "okay";
151         pinctrl-0 = <&remote_input_ao_pins>;
152         pinctrl-names = "default";
153 };
154
155 &hdmi_tx {
156         status = "okay";
157         pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
158         pinctrl-names = "default";
159 };
160
161 &hdmi_tx_tmds_port {
162         hdmi_tx_tmds_out: endpoint {
163                 remote-endpoint = <&hdmi_connector_in>;
164         };
165 };
166
167 &pinctrl_aobus {
168         gpio-line-names = "UART TX",
169                           "UART RX",
170                           "Blue LED",
171                           "SDCard Voltage Switch",
172                           "7J1 Header Pin5",
173                           "7J1 Header Pin3",
174                           "7J1 Header Pin12",
175                           "IR In",
176                           "9J3 Switch HDMI CEC/7J1 Header Pin11",
177                           "7J1 Header Pin13",
178                           /* GPIO_TEST_N */
179                           "7J1 Header Pin15";
180 };
181
182 &pinctrl_periphs {
183         gpio-line-names = /* Bank GPIOZ */
184                           "", "", "", "", "", "", "",
185                           "", "", "", "", "", "", "",
186                           "Eth Link LED", "Eth Activity LED",
187                           /* Bank GPIOH */
188                           "HDMI HPD", "HDMI SDA", "HDMI SCL",
189                           "HDMI_5V_EN", "9J1 Header Pin2",
190                           "Analog Audio Mute",
191                           "2J3 Header Pin6",
192                           "2J3 Header Pin5",
193                           "2J3 Header Pin4",
194                           "2J3 Header Pin3",
195                           /* Bank BOOT */
196                           "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3",
197                           "eMMC D4", "eMMC D5", "eMMC D6", "eMMC D7",
198                           "eMMC Clk", "eMMC Reset", "eMMC CMD",
199                           "ALT BOOT MODE", "", "", "", "eMMC Data Strobe",
200                           /* Bank CARD */
201                           "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD",
202                           "SDCard D3", "SDCard D2", "SDCard Det",
203                           /* Bank GPIODV */
204                           "", "", "", "", "", "", "", "", "", "", "", "",
205                           "", "", "", "", "", "", "", "", "", "", "", "",
206                           "Green LED", "VCCK Enable",
207                           "7J1 Header Pin27", "7J1 Header Pin28",
208                           "VCCK Regulator", "VDDEE Regulator",
209                           /* Bank GPIOX */
210                           "7J1 Header Pin22", "7J1 Header Pin26",
211                           "7J1 Header Pin36", "7J1 Header Pin38",
212                           "7J1 Header Pin40", "7J1 Header Pin37",
213                           "7J1 Header Pin33", "7J1 Header Pin35",
214                           "7J1 Header Pin19", "7J1 Header Pin21",
215                           "7J1 Header Pin24", "7J1 Header Pin23",
216                           "7J1 Header Pin8", "7J1 Header Pin10",
217                           "7J1 Header Pin16", "7J1 Header Pin18",
218                           "7J1 Header Pin32", "7J1 Header Pin29",
219                           "7J1 Header Pin31",
220                           /* Bank GPIOCLK */
221                           "7J1 Header Pin7", "";
222 };
223
224 &saradc {
225         status = "okay";
226         vref-supply = <&vddio_ao18>;
227 };
228
229 /* SD card */
230 &sd_emmc_b {
231         status = "okay";
232         pinctrl-0 = <&sdcard_pins>;
233         pinctrl-1 = <&sdcard_clk_gate_pins>;
234         pinctrl-names = "default", "clk-gate";
235
236         bus-width = <4>;
237         cap-sd-highspeed;
238         sd-uhs-sdr12;
239         sd-uhs-sdr25;
240         sd-uhs-sdr50;
241         max-frequency = <100000000>;
242         disable-wp;
243
244         cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
245         cd-inverted;
246
247         vmmc-supply = <&vcc_3v3>;
248         vqmmc-supply = <&vcc_card>;
249 };
250
251 /* eMMC */
252 &sd_emmc_c {
253         status = "okay";
254         pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
255         pinctrl-1 = <&emmc_clk_gate_pins>;
256         pinctrl-names = "default", "clk-gate";
257
258         bus-width = <8>;
259         cap-mmc-highspeed;
260         mmc-ddr-3_3v;
261         max-frequency = <50000000>;
262         non-removable;
263         disable-wp;
264
265         mmc-pwrseq = <&emmc_pwrseq>;
266         vmmc-supply = <&vcc_3v3>;
267         vqmmc-supply = <&vddio_boot>;
268 };
269
270 &uart_AO {
271         status = "okay";
272         pinctrl-0 = <&uart_ao_a_pins>;
273         pinctrl-names = "default";
274 };