Debian Codegraph @

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2020 BayLibre, SAS.
4 * Author: Jerome Brunet <[email protected]>
5 */
6
7 /dts-v1/;
8
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
11 #include <dt-bindings/sound/meson-aiu.h>
12
13 #include "meson-gxl-s905x.dtsi"
14
15 / {
16 compatible = "libretech,aml-s905x-cc-v2", "amlogic,s905x",
17 "amlogic,meson-gxl";
18 model = "Libre Computer AML-S905X-CC V2";
19
20 aliases {
21 serial0 = &uart_AO;
22 ethernet0 = &ethmac;
23 spi0 = &spifc;
24 };
25
26 chosen {
27 stdout-path = "serial0:115200n8";
28 };
29
30 emmc_pwrseq: emmc-pwrseq {
31 compatible = "mmc-pwrseq-emmc";
32 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
33 };
34
35 hdmi-connector {
36 compatible = "hdmi-connector";
37 type = "a";
38
39 port {
40 hdmi_connector_in: endpoint {
41 remote-endpoint = <&hdmi_tx_tmds_out>;
42 };
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 led-blue {
50 color = <LED_COLOR_ID_BLUE>;
51 function = LED_FUNCTION_STATUS;
52 gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
53 linux,default-trigger = "heartbeat";
54 panic-indicator;
55 };
56
57 led-green {
58 color = <LED_COLOR_ID_GREEN>;
59 function = LED_FUNCTION_DISK_ACTIVITY;
60 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
61 linux,default-trigger = "disk-activity";
62 };
63 };
64
65 memory@0 {
66 device_type = "memory";
67 reg = <0x0 0x0 0x0 0x80000000>;
68 };
69
70 ao_5v: regulator-ao-5v {
71 compatible = "regulator-fixed";
72 regulator-name = "AO_5V";
73 regulator-min-microvolt = <5000000>;
74 regulator-max-microvolt = <5000000>;
75 vin-supply = <&dc_in>;
76 regulator-always-on;
77 };
78
79 dc_in: regulator-dc-in {
80 compatible = "regulator-fixed";
81 regulator-name = "DC_IN";
82 regulator-min-microvolt = <5000000>;
83 regulator-max-microvolt = <5000000>;
84 regulator-always-on;
85 };
86
87 vcck: regulator-vcck {
88 compatible = "regulator-fixed";
89 regulator-name = "VCCK";
90 regulator-min-microvolt = <3300000>;
91 regulator-max-microvolt = <3300000>;
92 vin-supply = <&ao_5v>;
93 regulator-always-on;
94 };
95
96 vcc_card: regulator-vcc-card {
97 compatible = "regulator-fixed";
98 regulator-name = "VCC_CARD";
99 regulator-min-microvolt = <3300000>;
100 regulator-max-microvolt = <3300000>;
101 vin-supply = <&vddio_ao3v3>;
102
103 gpio = <&gpio GPIOCLK_1 GPIO_ACTIVE_HIGH>;
104 enable-active-high;
105 };
106
107 vcc5v: regulator-vcc5v {
108 compatible = "regulator-fixed";
109 regulator-name = "VCC5V";
110 regulator-min-microvolt = <5000000>;
111 regulator-max-microvolt = <5000000>;
112 vin-supply = <&ao_5v>;
113
114 gpio = <&gpio GPIOH_3 GPIO_OPEN_DRAIN>;
115 };
116
117 vddio_ao3v3: regulator-vddio-ao3v3 {
118 compatible = "regulator-fixed";
119 regulator-name = "VDDIO_AO3V3";
120 regulator-min-microvolt = <3300000>;
121 regulator-max-microvolt = <3300000>;
122 vin-supply = <&ao_5v>;
123 regulator-always-on;
124 };
125
126 vddio_card: regulator-vddio-card {
127 compatible = "regulator-gpio";
128 regulator-name = "VDDIO_CARD";
129 regulator-min-microvolt = <1800000>;
130 regulator-max-microvolt = <3300000>;
131
132 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
133 gpios-states = <0>;
134
135 states = <3300000 0>,
136 <1800000 1>;
137
138 regulator-settling-time-up-us = <200>;
139 regulator-settling-time-down-us = <50000>;
140 };
141
142 vddio_ao18: regulator-vddio-ao18 {
143 compatible = "regulator-fixed";
144 regulator-name = "VDDIO_AO18";
145 regulator-min-microvolt = <1800000>;
146 regulator-max-microvolt = <1800000>;
147 vin-supply = <&vddio_ao3v3>;
148 regulator-always-on;
149 };
150
151 vcc_1v8: regulator-vcc-1v8 {
152 compatible = "regulator-fixed";
153 regulator-name = "VCC 1V8";
154 regulator-min-microvolt = <1800000>;
155 regulator-max-microvolt = <1800000>;
156 vin-supply = <&vddio_ao3v3>;
157 regulator-always-on;
158 };
159
160 sound {
161 compatible = "amlogic,gx-sound-card";
162 model = "LIBRETECH-CC-V2";
163 clocks = <&clkc CLKID_MPLL0>,
164 <&clkc CLKID_MPLL1>,
165 <&clkc CLKID_MPLL2>;
166
167 assigned-clocks = <&clkc CLKID_MPLL0>,
168 <&clkc CLKID_MPLL1>,
169 <&clkc CLKID_MPLL2>;
170 assigned-clock-rates = <294912000>,
171 <270950400>,
172 <393216000>;
173
174 dai-link-0 {
175 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
176 };
177
178 dai-link-1 {
179 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
180 dai-format = "i2s";
181 mclk-fs = <256>;
182
183 codec-0 {
184 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
185 };
186 };
187
188 dai-link-2 {
189 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
190
191 codec-0 {
192 sound-dai = <&hdmi_tx>;
193 };
194 };
195 };
196 };
197
198 &aiu {
199 status = "okay";
200 };
201
202 &cec_AO {
203 status = "okay";
204 pinctrl-0 = <&ao_cec_pins>;
205 pinctrl-names = "default";
206 hdmi-phandle = <&hdmi_tx>;
207 };
208
209 &ethmac {
210 status = "okay";
211 };
212
213 &internal_phy {
214 pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
215 pinctrl-names = "default";
216 };
217
218 &ir {
219 status = "okay";
220 pinctrl-0 = <&remote_input_ao_pins>;
221 pinctrl-names = "default";
222 };
223
224 &hdmi_tx {
225 status = "okay";
226 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
227 hdmi-supply = <&vcc5v>;
228 pinctrl-names = "default";
229 };
230
231 &hdmi_tx_tmds_port {
232 hdmi_tx_tmds_out: endpoint {
233 remote-endpoint = <&hdmi_connector_in>;
234 };
235 };
236
237 &saradc {
238 status = "okay";
239 vref-supply = <&vddio_ao18>;
240 };
241
242 /* SD card */
243 &sd_emmc_b {
244 pinctrl-0 = <&sdcard_pins>;
245 pinctrl-1 = <&sdcard_clk_gate_pins>;
246 pinctrl-names = "default", "clk-gate";
247
248 bus-width = <4>;
249 cap-sd-highspeed;
250 sd-uhs-sdr12;
251 sd-uhs-sdr25;
252 sd-uhs-sdr50;
253 sd-uhs-ddr50;
254 max-frequency = <100000000>;
255 disable-wp;
256
257 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
258
259 vmmc-supply = <&vcc_card>;
260 vqmmc-supply = <&vddio_card>;
261
262 status = "okay";
263 };
264
265 /* eMMC */
266 &sd_emmc_c {
267 pinctrl-0 = <&emmc_pins>;
268 pinctrl-1 = <&emmc_clk_gate_pins>;
269 pinctrl-names = "default", "clk-gate";
270
271 bus-width = <8>;
272 cap-mmc-highspeed;
273 mmc-hs200-1_8v;
274 max-frequency = <200000000>;
275 disable-wp;
276
277 mmc-pwrseq = <&emmc_pwrseq>;
278 vmmc-supply = <&vddio_ao3v3>;
279 vqmmc-supply = <&vcc_1v8>;
280
281 status = "okay";
282 };
283
284 &spifc {
285 status = "okay";
286 pinctrl-0 = <&nor_pins>;
287 pinctrl-names = "default";
288
289 nor_4u1: flash@0 {
290 #address-cells = <1>;
291 #size-cells = <1>;
292 compatible = "jedec,spi-nor";
293 reg = <0>;
294 spi-max-frequency = <3000000>;
295 };
296 };
297
298 &uart_AO {
299 status = "okay";
300 pinctrl-0 = <&uart_ao_a_pins>;
301 pinctrl-names = "default";
302 };
303
304 &usb {
305 status = "okay";
306 dr_mode = "host";
307 };
308
309 &usb2_phy0 {
310 phy-supply = <&vcc5v>;
311 };
312
313 &usb2_phy1 {
314 phy-supply = <&vcc5v>;
315 };