blob: a23252efc685205432e78ff1087e9771e40ef750 [file] [log] [blame]
Tom Rini8b0c8a12018-05-06 18:27:01 -04001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
Neil Armstrong514ad812017-11-27 10:16:19 +01002/*
3 * Copyright (c) 2017 BayLibre, SAS.
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 * Author: Jerome Brunet <jbrunet@baylibre.com>
Neil Armstrong514ad812017-11-27 10:16:19 +01006 */
7
8/dts-v1/;
9
10#include <dt-bindings/input/input.h>
11
12#include "meson-gxl-s905x.dtsi"
13
14/ {
15 compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
Loic Devulderc0379032018-11-27 17:41:18 +010016 model = "Libre Computer Board AML-S905X-CC";
Neil Armstrong514ad812017-11-27 10:16:19 +010017
18 aliases {
19 serial0 = &uart_AO;
Neil Armstrong8e8aec22018-06-05 10:10:44 +020020 ethernet0 = &ethmac;
Neil Armstrong514ad812017-11-27 10:16:19 +010021 };
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
Neil Armstrong5d54d1b2018-04-11 17:40:40 +020075 hdmi_5v: regulator-hdmi-5v {
76 compatible = "regulator-fixed";
77
78 regulator-name = "HDMI_5V";
79 regulator-min-microvolt = <5000000>;
80 regulator-max-microvolt = <5000000>;
81
82 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
83 enable-active-high;
84 regulator-always-on;
85 };
86
Neil Armstrong514ad812017-11-27 10:16:19 +010087 vcc_3v3: regulator-vcc_3v3 {
88 compatible = "regulator-fixed";
89 regulator-name = "VCC_3V3";
90 regulator-min-microvolt = <3300000>;
91 regulator-max-microvolt = <3300000>;
92 };
93
94 vcc_card: regulator-vcc-card {
95 compatible = "regulator-gpio";
96
97 regulator-name = "VCC_CARD";
98 regulator-min-microvolt = <1800000>;
99 regulator-max-microvolt = <3300000>;
100
101 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
102 gpios-states = <0>;
103
104 states = <3300000 0>,
105 <1800000 1>;
Neil Armstrong5d54d1b2018-04-11 17:40:40 +0200106
107 regulator-settling-time-up-us = <200>;
108 regulator-settling-time-down-us = <50000>;
Neil Armstrong514ad812017-11-27 10:16:19 +0100109 };
110
Neil Armstrong5d54d1b2018-04-11 17:40:40 +0200111 vddio_ao18: regulator-vddio_ao18 {
112 compatible = "regulator-fixed";
113 regulator-name = "VDDIO_AO18";
114 regulator-min-microvolt = <1800000>;
115 regulator-max-microvolt = <1800000>;
116 };
117
Neil Armstrong514ad812017-11-27 10:16:19 +0100118 vddio_boot: regulator-vddio_boot {
119 compatible = "regulator-fixed";
120 regulator-name = "VDDIO_BOOT";
121 regulator-min-microvolt = <3300000>;
122 regulator-max-microvolt = <3300000>;
123 };
124};
125
Neil Armstrong5d54d1b2018-04-11 17:40:40 +0200126&cec_AO {
127 status = "okay";
128 pinctrl-0 = <&ao_cec_pins>;
129 pinctrl-names = "default";
130 hdmi-phandle = <&hdmi_tx>;
131};
132
Neil Armstrong514ad812017-11-27 10:16:19 +0100133&cvbs_vdac_port {
134 cvbs_vdac_out: endpoint {
135 remote-endpoint = <&cvbs_connector_in>;
136 };
137};
138
139&ethmac {
140 status = "okay";
141};
142
Neil Armstrong5d54d1b2018-04-11 17:40:40 +0200143&internal_phy {
144 pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
145 pinctrl-names = "default";
146};
147
Neil Armstrong514ad812017-11-27 10:16:19 +0100148&ir {
149 status = "okay";
150 pinctrl-0 = <&remote_input_ao_pins>;
151 pinctrl-names = "default";
152};
153
154&hdmi_tx {
155 status = "okay";
156 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
157 pinctrl-names = "default";
Neil Armstrong7ae6f6e2018-11-06 09:30:14 +0100158 hdmi-supply = <&hdmi_5v>;
Neil Armstrong514ad812017-11-27 10:16:19 +0100159};
160
161&hdmi_tx_tmds_port {
162 hdmi_tx_tmds_out: endpoint {
163 remote-endpoint = <&hdmi_connector_in>;
164 };
165};
166
Neil Armstrong5d54d1b2018-04-11 17:40:40 +0200167&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
Neil Armstrong514ad812017-11-27 10:16:19 +0100229/* SD card */
230&sd_emmc_b {
231 status = "okay";
232 pinctrl-0 = <&sdcard_pins>;
Neil Armstrong5d54d1b2018-04-11 17:40:40 +0200233 pinctrl-1 = <&sdcard_clk_gate_pins>;
234 pinctrl-names = "default", "clk-gate";
Neil Armstrong514ad812017-11-27 10:16:19 +0100235
236 bus-width = <4>;
237 cap-sd-highspeed;
238 max-frequency = <100000000>;
239 disable-wp;
240
241 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
242 cd-inverted;
243
244 vmmc-supply = <&vcc_3v3>;
245 vqmmc-supply = <&vcc_card>;
246};
247
248/* eMMC */
249&sd_emmc_c {
250 status = "okay";
Neil Armstrong5d54d1b2018-04-11 17:40:40 +0200251 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
252 pinctrl-1 = <&emmc_clk_gate_pins>;
253 pinctrl-names = "default", "clk-gate";
Neil Armstrong514ad812017-11-27 10:16:19 +0100254
255 bus-width = <8>;
256 cap-mmc-highspeed;
Neil Armstrong5d54d1b2018-04-11 17:40:40 +0200257 mmc-ddr-3_3v;
Neil Armstrong514ad812017-11-27 10:16:19 +0100258 max-frequency = <50000000>;
259 non-removable;
260 disable-wp;
261
262 mmc-pwrseq = <&emmc_pwrseq>;
263 vmmc-supply = <&vcc_3v3>;
264 vqmmc-supply = <&vddio_boot>;
265};
266
267&uart_AO {
268 status = "okay";
269 pinctrl-0 = <&uart_ao_a_pins>;
270 pinctrl-names = "default";
271};
Neil Armstrong8e8aec22018-06-05 10:10:44 +0200272
273&usb0 {
274 status = "okay";
275};
276
277&usb2_phy0 {
278 /*
279 * even though the schematics don't show it:
280 * HDMI_5V is also used as supply for the USB VBUS.
281 */
282 phy-supply = <&hdmi_5v>;
283};