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