Debian Codegraph @

arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2018 BayLibre SAS. All rights reserved.
4 */
5
6 /dts-v1/;
7
8 #include "meson-g12a.dtsi"
9 #include <dt-bindings/gpio/meson-g12a-gpio.h>
10 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
11
12 / {
13 compatible = "radxa,zero", "amlogic,g12a";
14 model = "Radxa Zero";
15
16 aliases {
17 serial0 = &uart_AO;
18 };
19
20 chosen {
21 stdout-path = "serial0:115200n8";
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x0 0x0 0x40000000>;
27 };
28
29 cvbs-connector {
30 status = "disabled";
31 compatible = "composite-video-connector";
32
33 port {
34 cvbs_connector_in: endpoint {
35 remote-endpoint = <&cvbs_vdac_out>;
36 };
37 };
38 };
39
40 hdmi-connector {
41 compatible = "hdmi-connector";
42 type = "a";
43
44 port {
45 hdmi_connector_in: endpoint {
46 remote-endpoint = <&hdmi_tx_tmds_out>;
47 };
48 };
49 };
50
51 emmc_pwrseq: emmc-pwrseq {
52 compatible = "mmc-pwrseq-emmc";
53 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
54 };
55
56 sdio_pwrseq: sdio-pwrseq {
57 compatible = "mmc-pwrseq-simple";
58 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
59 clocks = <&wifi32k>;
60 clock-names = "ext_clock";
61 };
62
63 ao_5v: regulator-ao-5v {
64 compatible = "regulator-fixed";
65 regulator-name = "AO_5V";
66 regulator-min-microvolt = <5000000>;
67 regulator-max-microvolt = <5000000>;
68 regulator-always-on;
69 };
70
71 vcc_1v8: regulator-vcc-1v8 {
72 compatible = "regulator-fixed";
73 regulator-name = "VCC_1V8";
74 regulator-min-microvolt = <1800000>;
75 regulator-max-microvolt = <1800000>;
76 vin-supply = <&vcc_3v3>;
77 regulator-always-on;
78 };
79
80 vcc_3v3: regulator-vcc-3v3 {
81 compatible = "regulator-fixed";
82 regulator-name = "VCC_3V3";
83 regulator-min-microvolt = <3300000>;
84 regulator-max-microvolt = <3300000>;
85 vin-supply = <&vddao_3v3>;
86 regulator-always-on;
87 };
88
89 hdmi_pw: regulator-hdmi-pw {
90 compatible = "regulator-fixed";
91 regulator-name = "HDMI_PW";
92 regulator-min-microvolt = <5000000>;
93 regulator-max-microvolt = <5000000>;
94 vin-supply = <&ao_5v>;
95 regulator-always-on;
96 };
97
98 vddao_1v8: regulator-vddao-1v8 {
99 compatible = "regulator-fixed";
100 regulator-name = "VDDAO_1V8";
101 regulator-min-microvolt = <1800000>;
102 regulator-max-microvolt = <1800000>;
103 vin-supply = <&vddao_3v3>;
104 regulator-always-on;
105 };
106
107 vddao_3v3: regulator-vddao-3v3 {
108 compatible = "regulator-fixed";
109 regulator-name = "VDDAO_3V3";
110 regulator-min-microvolt = <3300000>;
111 regulator-max-microvolt = <3300000>;
112 vin-supply = <&ao_5v>;
113 regulator-always-on;
114 };
115
116 vddcpu: regulator-vddcpu {
117 compatible = "pwm-regulator";
118
119 regulator-name = "VDDCPU";
120 regulator-min-microvolt = <721000>;
121 regulator-max-microvolt = <1022000>;
122
123 vin-supply = <&ao_5v>;
124
125 pwms = <&pwm_AO_cd 1 1250 0>;
126 pwm-dutycycle-range = <100 0>;
127
128 regulator-boot-on;
129 regulator-always-on;
130 };
131
132 sound {
133 compatible = "amlogic,axg-sound-card";
134 model = "RADXA-ZERO";
135 audio-aux-devs = <&tdmout_b>;
136 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
137 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
138 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
139 "TDM_B Playback", "TDMOUT_B OUT";
140
141 clocks = <&clkc CLKID_MPLL2>,
142 <&clkc CLKID_MPLL0>,
143 <&clkc CLKID_MPLL1>;
144
145 assigned-clocks = <&clkc CLKID_MPLL2>,
146 <&clkc CLKID_MPLL0>,
147 <&clkc CLKID_MPLL1>;
148 assigned-clock-rates = <294912000>,
149 <270950400>,
150 <393216000>;
151
152 dai-link-0 {
153 sound-dai = <&frddr_a>;
154 };
155
156 dai-link-1 {
157 sound-dai = <&frddr_b>;
158 };
159
160 dai-link-2 {
161 sound-dai = <&frddr_c>;
162 };
163
164 /* 8ch hdmi interface */
165 dai-link-3 {
166 sound-dai = <&tdmif_b>;
167 dai-format = "i2s";
168 dai-tdm-slot-tx-mask-0 = <1 1>;
169 dai-tdm-slot-tx-mask-1 = <1 1>;
170 dai-tdm-slot-tx-mask-2 = <1 1>;
171 dai-tdm-slot-tx-mask-3 = <1 1>;
172 mclk-fs = <256>;
173
174 codec {
175 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
176 };
177 };
178
179 dai-link-4 {
180 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
181
182 codec {
183 sound-dai = <&hdmi_tx>;
184 };
185 };
186 };
187
188 wifi32k: wifi32k {
189 compatible = "pwm-clock";
190 #clock-cells = <0>;
191 clock-frequency = <32768>;
192 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
193 };
194 };
195
196 &arb {
197 status = "okay";
198 };
199
200 &cec_AO {
201 pinctrl-0 = <&cec_ao_a_h_pins>;
202 pinctrl-names = "default";
203 status = "disabled";
204 hdmi-phandle = <&hdmi_tx>;
205 };
206
207 &cecb_AO {
208 pinctrl-0 = <&cec_ao_b_h_pins>;
209 pinctrl-names = "default";
210 status = "okay";
211 hdmi-phandle = <&hdmi_tx>;
212 };
213
214 &clkc_audio {
215 status = "okay";
216 };
217
218 &cpu0 {
219 cpu-supply = <&vddcpu>;
220 };
221
222 &cpu1 {
223 cpu-supply = <&vddcpu>;
224 };
225
226 &cpu2 {
227 cpu-supply = <&vddcpu>;
228 };
229
230 &cpu3 {
231 cpu-supply = <&vddcpu>;
232 };
233
234 &cvbs_vdac_port {
235 cvbs_vdac_out: endpoint {
236 remote-endpoint = <&cvbs_connector_in>;
237 };
238 };
239
240 &frddr_a {
241 status = "okay";
242 };
243
244 &frddr_b {
245 status = "okay";
246 };
247
248 &frddr_c {
249 status = "okay";
250 };
251
252 &hdmi_tx {
253 status = "okay";
254 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
255 pinctrl-names = "default";
256 hdmi-supply = <&hdmi_pw>;
257 };
258
259 &hdmi_tx_tmds_port {
260 hdmi_tx_tmds_out: endpoint {
261 remote-endpoint = <&hdmi_connector_in>;
262 };
263 };
264
265 &ir {
266 status = "disabled";
267 pinctrl-0 = <&remote_input_ao_pins>;
268 pinctrl-names = "default";
269 };
270
271 &pwm_AO_cd {
272 pinctrl-0 = <&pwm_ao_d_e_pins>;
273 pinctrl-names = "default";
274 status = "okay";
275 };
276
277 &pwm_ef {
278 status = "okay";
279 pinctrl-0 = <&pwm_e_pins>;
280 pinctrl-names = "default";
281 };
282
283 &saradc {
284 status = "okay";
285 vref-supply = <&vddao_1v8>;
286 };
287
288 /* SDIO */
289 &sd_emmc_a {
290 status = "okay";
291 pinctrl-0 = <&sdio_pins>;
292 pinctrl-1 = <&sdio_clk_gate_pins>;
293 pinctrl-names = "default", "clk-gate";
294 #address-cells = <1>;
295 #size-cells = <0>;
296
297 bus-width = <4>;
298 cap-sd-highspeed;
299 sd-uhs-sdr50;
300 max-frequency = <100000000>;
301
302 non-removable;
303 disable-wp;
304
305 /* WiFi firmware requires power to be kept while in suspend */
306 keep-power-in-suspend;
307
308 mmc-pwrseq = <&sdio_pwrseq>;
309
310 vmmc-supply = <&vddao_3v3>;
311 vqmmc-supply = <&vddao_1v8>;
312
313 brcmf: wifi@1 {
314 reg = <1>;
315 compatible = "brcm,bcm4329-fmac";
316 };
317 };
318
319 /* SD card */
320 &sd_emmc_b {
321 status = "okay";
322 pinctrl-0 = <&sdcard_c_pins>;
323 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
324 pinctrl-names = "default", "clk-gate";
325
326 bus-width = <4>;
327 cap-sd-highspeed;
328 max-frequency = <100000000>;
329 disable-wp;
330
331 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
332 vmmc-supply = <&vddao_3v3>;
333 vqmmc-supply = <&vddao_3v3>;
334 };
335
336 /* eMMC */
337 &sd_emmc_c {
338 status = "okay";
339 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
340 pinctrl-1 = <&emmc_clk_gate_pins>;
341 pinctrl-names = "default", "clk-gate";
342
343 bus-width = <8>;
344 cap-mmc-highspeed;
345 mmc-ddr-1_8v;
346 mmc-hs200-1_8v;
347 max-frequency = <200000000>;
348 disable-wp;
349
350 mmc-pwrseq = <&emmc_pwrseq>;
351 vmmc-supply = <&vcc_3v3>;
352 vqmmc-supply = <&vcc_1v8>;
353 };
354
355 &tdmif_b {
356 status = "okay";
357 };
358
359 &tdmout_b {
360 status = "okay";
361 };
362
363 &tohdmitx {
364 status = "okay";
365 };
366
367 &uart_A {
368 status = "okay";
369 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
370 pinctrl-names = "default";
371 uart-has-rtscts;
372
373 bluetooth {
374 compatible = "brcm,bcm43438-bt";
375 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
376 max-speed = <2000000>;
377 clocks = <&wifi32k>;
378 clock-names = "lpo";
379 };
380 };
381
382 &uart_AO {
383 status = "okay";
384 pinctrl-0 = <&uart_ao_a_pins>;
385 pinctrl-names = "default";
386 };
387
388 &usb {
389 status = "okay";
390 };