blob: d8838dde0f0f456b9816cb4981956fb997ee2f5e [file] [log] [blame]
Neil Armstrongb7be1442019-02-12 15:02:59 +01001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 BayLibre SAS. All rights reserved.
4 */
5
6/dts-v1/;
7
8#include "meson-g12a.dtsi"
Jerome Brunet2297c332019-03-18 11:04:52 +01009#include <dt-bindings/gpio/gpio.h>
Neil Armstrongd1c023a2019-03-25 11:14:50 +010010#include <dt-bindings/input/input.h>
Jerome Brunet2297c332019-03-18 11:04:52 +010011#include <dt-bindings/gpio/meson-g12a-gpio.h>
Jerome Brunet64c10552019-05-24 16:03:18 +020012#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
Neil Armstrongb7be1442019-02-12 15:02:59 +010013
14/ {
15 compatible = "seirobotics,sei510", "amlogic,g12a";
16 model = "SEI Robotics SEI510";
17
Neil Armstrongd1c023a2019-03-25 11:14:50 +010018 adc_keys {
19 compatible = "adc-keys";
20 io-channels = <&saradc 0>;
21 io-channel-names = "buttons";
22 keyup-threshold-microvolt = <1800000>;
23
24 button-onoff {
25 label = "On/Off";
26 linux,code = <KEY_POWER>;
27 press-threshold-microvolt = <1700000>;
28 };
29 };
30
Jerome Brunet73429cf2019-05-10 17:53:26 +020031 aliases {
32 serial0 = &uart_AO;
Jerome Bruneta1abafb2019-05-20 15:14:01 +020033 ethernet0 = &ethmac;
Jerome Brunet2297c332019-03-18 11:04:52 +010034 };
35
Jerome Brunet64c10552019-05-24 16:03:18 +020036 mono_dac: audio-codec-0 {
Maxime Jourdanb06c8c6e2019-05-24 16:03:17 +020037 compatible = "maxim,max98357a";
38 #sound-dai-cells = <0>;
39 sound-name-prefix = "U16";
40 sdmode-gpios = <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>;
41 };
42
Jerome Brunet64c10552019-05-24 16:03:18 +020043 dmics: audio-codec-1 {
44 #sound-dai-cells = <0>;
45 compatible = "dmic-codec";
46 num-channels = <2>;
47 wakeup-delay-ms = <50>;
48 status = "okay";
49 sound-name-prefix = "MIC";
50 };
51
Neil Armstrongb7be1442019-02-12 15:02:59 +010052 chosen {
53 stdout-path = "serial0:115200n8";
54 };
55
Neil Armstrong912a3392019-04-08 11:31:38 +020056 cvbs-connector {
57 compatible = "composite-video-connector";
58
59 port {
60 cvbs_connector_in: endpoint {
61 remote-endpoint = <&cvbs_vdac_out>;
62 };
63 };
64 };
65
Jerome Brunet5a2ea2f2019-05-14 11:16:11 +020066 emmc_pwrseq: emmc-pwrseq {
67 compatible = "mmc-pwrseq-emmc";
68 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
69 };
70
Neil Armstrong912a3392019-04-08 11:31:38 +020071 hdmi-connector {
72 compatible = "hdmi-connector";
73 type = "a";
74
75 port {
76 hdmi_connector_in: endpoint {
77 remote-endpoint = <&hdmi_tx_tmds_out>;
78 };
79 };
80 };
81
Neil Armstrongb7be1442019-02-12 15:02:59 +010082 memory@0 {
83 device_type = "memory";
84 reg = <0x0 0x0 0x0 0x40000000>;
85 };
86
Jerome Brunet73429cf2019-05-10 17:53:26 +020087 ao_5v: regulator-ao_5v {
88 compatible = "regulator-fixed";
89 regulator-name = "AO_5V";
90 regulator-min-microvolt = <5000000>;
91 regulator-max-microvolt = <5000000>;
92 vin-supply = <&dc_in>;
93 regulator-always-on;
94 };
95
96 dc_in: regulator-dc_in {
97 compatible = "regulator-fixed";
98 regulator-name = "DC_IN";
99 regulator-min-microvolt = <5000000>;
100 regulator-max-microvolt = <5000000>;
101 regulator-always-on;
102 };
103
104 emmc_1v8: regulator-emmc_1v8 {
105 compatible = "regulator-fixed";
106 regulator-name = "EMMC_1V8";
107 regulator-min-microvolt = <1800000>;
108 regulator-max-microvolt = <1800000>;
109 vin-supply = <&vddao_3v3>;
110 regulator-always-on;
Neil Armstrongb7be1442019-02-12 15:02:59 +0100111 };
Jerome Brunet2297c332019-03-18 11:04:52 +0100112
113 vddao_3v3: regulator-vddao_3v3 {
114 compatible = "regulator-fixed";
115 regulator-name = "VDDAO_3V3";
116 regulator-min-microvolt = <3300000>;
117 regulator-max-microvolt = <3300000>;
118 vin-supply = <&dc_in>;
119 regulator-always-on;
120 };
121
122 vddao_3v3_t: regultor-vddao_3v3_t {
123 compatible = "regulator-fixed";
124 regulator-name = "VDDAO_3V3_T";
125 regulator-min-microvolt = <3300000>;
126 regulator-max-microvolt = <3300000>;
127 vin-supply = <&vddao_3v3>;
128 gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
129 enable-active-high;
130 };
131
Neil Armstronge9bc0762019-07-29 15:26:20 +0200132 vddcpu: regulator-vddcpu {
133 /*
134 * SY8120B1ABC DC/DC Regulator.
135 */
136 compatible = "pwm-regulator";
137
138 regulator-name = "VDDCPU";
139 regulator-min-microvolt = <721000>;
140 regulator-max-microvolt = <1022000>;
141
Anand Moon08567512021-09-19 20:29:09 +0000142 pwm-supply = <&dc_in>;
Neil Armstronge9bc0762019-07-29 15:26:20 +0200143
144 pwms = <&pwm_AO_cd 1 1250 0>;
145 pwm-dutycycle-range = <100 0>;
146
147 regulator-boot-on;
148 regulator-always-on;
149 };
150
Jerome Brunet2297c332019-03-18 11:04:52 +0100151 vddio_ao1v8: regulator-vddio_ao1v8 {
152 compatible = "regulator-fixed";
153 regulator-name = "VDDIO_AO1V8";
154 regulator-min-microvolt = <1800000>;
155 regulator-max-microvolt = <1800000>;
156 vin-supply = <&vddao_3v3>;
157 regulator-always-on;
158 };
Jerome Brunet73429cf2019-05-10 17:53:26 +0200159
160 reserved-memory {
161 /* TEE Reserved Memory */
162 bl32_reserved: bl32@5000000 {
163 reg = <0x0 0x05300000 0x0 0x2000000>;
164 no-map;
165 };
166 };
Neil Armstrong5f57a092019-06-07 16:47:35 +0200167
168 sdio_pwrseq: sdio-pwrseq {
169 compatible = "mmc-pwrseq-simple";
170 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
171 clocks = <&wifi32k>;
172 clock-names = "ext_clock";
173 };
174
175 wifi32k: wifi32k {
176 compatible = "pwm-clock";
177 #clock-cells = <0>;
178 clock-frequency = <32768>;
179 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
180 };
Jerome Brunet64c10552019-05-24 16:03:18 +0200181
182 sound {
183 compatible = "amlogic,axg-sound-card";
Christian Hewitt933b80e2021-01-01 06:37:37 +0000184 model = "SEI510";
Jerome Brunet64c10552019-05-24 16:03:18 +0200185 audio-aux-devs = <&tdmout_a>, <&tdmout_b>,
186 <&tdmin_a>, <&tdmin_b>;
187 audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
188 "TDMOUT_A IN 1", "FRDDR_B OUT 0",
189 "TDMOUT_A IN 2", "FRDDR_C OUT 0",
190 "TDM_A Playback", "TDMOUT_A OUT",
191 "TDMOUT_B IN 0", "FRDDR_A OUT 1",
192 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
193 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
194 "TDM_B Playback", "TDMOUT_B OUT",
195 "TODDR_A IN 4", "PDM Capture",
196 "TODDR_B IN 4", "PDM Capture",
197 "TODDR_C IN 4", "PDM Capture",
198 "TDMIN_A IN 0", "TDM_A Capture",
199 "TDMIN_A IN 3", "TDM_A Loopback",
200 "TDMIN_B IN 0", "TDM_A Capture",
201 "TDMIN_B IN 3", "TDM_A Loopback",
202 "TDMIN_A IN 1", "TDM_B Capture",
203 "TDMIN_A IN 4", "TDM_B Loopback",
204 "TDMIN_B IN 1", "TDM_B Capture",
205 "TDMIN_B IN 4", "TDM_B Loopback",
206 "TODDR_A IN 0", "TDMIN_A OUT",
207 "TODDR_B IN 0", "TDMIN_A OUT",
208 "TODDR_C IN 0", "TDMIN_A OUT",
209 "TODDR_A IN 1", "TDMIN_B OUT",
210 "TODDR_B IN 1", "TDMIN_B OUT",
211 "TODDR_C IN 1", "TDMIN_B OUT";
212
213 assigned-clocks = <&clkc CLKID_MPLL2>,
214 <&clkc CLKID_MPLL0>,
215 <&clkc CLKID_MPLL1>;
216 assigned-clock-parents = <0>, <0>, <0>;
217 assigned-clock-rates = <294912000>,
218 <270950400>,
219 <393216000>;
220 status = "okay";
221
222 dai-link-0 {
223 sound-dai = <&frddr_a>;
224 };
225
226 dai-link-1 {
227 sound-dai = <&frddr_b>;
228 };
229
230 dai-link-2 {
231 sound-dai = <&frddr_c>;
232 };
233
234 dai-link-3 {
235 sound-dai = <&toddr_a>;
236 };
237
238 dai-link-4 {
239 sound-dai = <&toddr_b>;
240 };
241
242 dai-link-5 {
243 sound-dai = <&toddr_c>;
244 };
245
246 /* internal speaker interface */
247 dai-link-6 {
248 sound-dai = <&tdmif_a>;
249 dai-format = "i2s";
250 dai-tdm-slot-tx-mask-0 = <1 1>;
251 mclk-fs = <256>;
252
253 codec-0 {
254 sound-dai = <&mono_dac>;
255 };
256
257 codec-1 {
258 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
259 };
260 };
261
262 /* 8ch hdmi interface */
263 dai-link-7 {
264 sound-dai = <&tdmif_b>;
265 dai-format = "i2s";
266 dai-tdm-slot-tx-mask-0 = <1 1>;
267 dai-tdm-slot-tx-mask-1 = <1 1>;
268 dai-tdm-slot-tx-mask-2 = <1 1>;
269 dai-tdm-slot-tx-mask-3 = <1 1>;
270 mclk-fs = <256>;
271
Jerome Brunet65b41842020-02-24 16:08:12 +0100272 codec {
Jerome Brunet64c10552019-05-24 16:03:18 +0200273 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
274 };
275 };
276
277 /* internal digital mics */
278 dai-link-8 {
279 sound-dai = <&pdm>;
280
281 codec {
282 sound-dai = <&dmics>;
283 };
284 };
285
286 /* hdmi glue */
287 dai-link-9 {
288 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
289
290 codec {
291 sound-dai = <&hdmi_tx>;
292 };
293 };
294 };
295};
296
297&arb {
298 status = "okay";
Neil Armstrongd1c023a2019-03-25 11:14:50 +0100299};
Jerome Brunet2297c332019-03-18 11:04:52 +0100300
Neil Armstrong912a3392019-04-08 11:31:38 +0200301&cec_AO {
302 pinctrl-0 = <&cec_ao_a_h_pins>;
303 pinctrl-names = "default";
304 status = "disabled";
305 hdmi-phandle = <&hdmi_tx>;
306};
307
308&cecb_AO {
309 pinctrl-0 = <&cec_ao_b_h_pins>;
310 pinctrl-names = "default";
311 status = "okay";
312 hdmi-phandle = <&hdmi_tx>;
313};
314
Jerome Brunet64c10552019-05-24 16:03:18 +0200315&clkc_audio {
316 status = "okay";
317};
318
Neil Armstronge9bc0762019-07-29 15:26:20 +0200319&cpu0 {
320 cpu-supply = <&vddcpu>;
321 operating-points-v2 = <&cpu_opp_table>;
322 clocks = <&clkc CLKID_CPU_CLK>;
323 clock-latency = <50000>;
324};
325
326&cpu1 {
327 cpu-supply = <&vddcpu>;
328 operating-points-v2 = <&cpu_opp_table>;
329 clocks = <&clkc CLKID_CPU_CLK>;
330 clock-latency = <50000>;
331};
332
333&cpu2 {
334 cpu-supply = <&vddcpu>;
335 operating-points-v2 = <&cpu_opp_table>;
336 clocks = <&clkc CLKID_CPU_CLK>;
337 clock-latency = <50000>;
338};
339
340&cpu3 {
341 cpu-supply = <&vddcpu>;
342 operating-points-v2 = <&cpu_opp_table>;
343 clocks = <&clkc CLKID_CPU_CLK>;
344 clock-latency = <50000>;
345};
346
Neil Armstrong912a3392019-04-08 11:31:38 +0200347&cvbs_vdac_port {
348 cvbs_vdac_out: endpoint {
349 remote-endpoint = <&cvbs_connector_in>;
350 };
351};
352
Jerome Bruneta1abafb2019-05-20 15:14:01 +0200353&ethmac {
354 status = "okay";
355 phy-handle = <&internal_ephy>;
356 phy-mode = "rmii";
357};
358
Jerome Brunet64c10552019-05-24 16:03:18 +0200359&frddr_a {
360 status = "okay";
361};
362
363&frddr_b {
364 status = "okay";
365};
366
367&frddr_c {
368 status = "okay";
369};
370
Jerome Brunet73429cf2019-05-10 17:53:26 +0200371&hdmi_tx {
372 status = "okay";
373 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
374 pinctrl-names = "default";
375};
376
377&hdmi_tx_tmds_port {
378 hdmi_tx_tmds_out: endpoint {
379 remote-endpoint = <&hdmi_connector_in>;
380 };
381};
382
Jerome Brunet32232312019-05-14 12:12:37 +0200383&i2c3 {
384 status = "okay";
385 pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
386 pinctrl-names = "default";
387};
388
Neil Armstrong54f374d2019-07-01 13:57:24 +0200389&ir {
390 status = "okay";
391 pinctrl-0 = <&remote_input_ao_pins>;
392 pinctrl-names = "default";
393};
394
Neil Armstronge9bc0762019-07-29 15:26:20 +0200395&pwm_AO_cd {
396 pinctrl-0 = <&pwm_ao_d_e_pins>;
397 pinctrl-names = "default";
398 clocks = <&xtal>;
399 clock-names = "clkin1";
400 status = "okay";
401};
402
Neil Armstrong5f57a092019-06-07 16:47:35 +0200403&pwm_ef {
404 status = "okay";
405 pinctrl-0 = <&pwm_e_pins>;
406 pinctrl-names = "default";
407 clocks = <&xtal>;
408 clock-names = "clkin0";
409};
410
Jerome Brunet64c10552019-05-24 16:03:18 +0200411&pdm {
412 pinctrl-0 = <&pdm_din0_z_pins>, <&pdm_din1_z_pins>,
413 <&pdm_din2_z_pins>, <&pdm_din3_z_pins>,
414 <&pdm_dclk_z_pins>;
415 pinctrl-names = "default";
416 status = "okay";
417};
418
Neil Armstrongd1c023a2019-03-25 11:14:50 +0100419&saradc {
420 status = "okay";
421 vref-supply = <&vddio_ao1v8>;
422};
423
Neil Armstrong5f57a092019-06-07 16:47:35 +0200424/* SDIO */
425&sd_emmc_a {
426 status = "okay";
427 pinctrl-0 = <&sdio_pins>;
428 pinctrl-1 = <&sdio_clk_gate_pins>;
429 pinctrl-names = "default", "clk-gate";
430 #address-cells = <1>;
431 #size-cells = <0>;
432
433 bus-width = <4>;
434 cap-sd-highspeed;
435 sd-uhs-sdr50;
436 max-frequency = <100000000>;
437
438 non-removable;
439 disable-wp;
440
Neil Armstrong11ad4df2019-08-29 17:23:28 +0200441 /* WiFi firmware requires power to be kept while in suspend */
442 keep-power-in-suspend;
443
Neil Armstrong5f57a092019-06-07 16:47:35 +0200444 mmc-pwrseq = <&sdio_pwrseq>;
445
446 vmmc-supply = <&vddao_3v3>;
447 vqmmc-supply = <&vddio_ao1v8>;
448
449 brcmf: wifi@1 {
450 reg = <1>;
451 compatible = "brcm,bcm4329-fmac";
452 };
453};
454
Jerome Brunet5a2ea2f2019-05-14 11:16:11 +0200455/* SD card */
456&sd_emmc_b {
457 status = "okay";
458 pinctrl-0 = <&sdcard_c_pins>;
459 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
460 pinctrl-names = "default", "clk-gate";
461
462 bus-width = <4>;
463 cap-sd-highspeed;
464 max-frequency = <50000000>;
465 disable-wp;
466
467 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
468 vmmc-supply = <&vddao_3v3>;
469 vqmmc-supply = <&vddao_3v3>;
470};
471
472/* eMMC */
473&sd_emmc_c {
474 status = "okay";
Neil Armstrong4d2cb372020-03-13 10:07:10 +0100475 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
Jerome Brunet5a2ea2f2019-05-14 11:16:11 +0200476 pinctrl-1 = <&emmc_clk_gate_pins>;
477 pinctrl-names = "default", "clk-gate";
478
479 bus-width = <8>;
480 cap-mmc-highspeed;
481 mmc-ddr-1_8v;
482 mmc-hs200-1_8v;
483 max-frequency = <200000000>;
484 non-removable;
485 disable-wp;
486
487 mmc-pwrseq = <&emmc_pwrseq>;
488 vmmc-supply = <&vddao_3v3>;
489 vqmmc-supply = <&emmc_1v8>;
490};
491
Jerome Brunet64c10552019-05-24 16:03:18 +0200492&tdmif_a {
493 pinctrl-0 = <&tdm_a_dout0_pins>, <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>;
494 pinctrl-names = "default";
495 status = "okay";
496
497 assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD0>,
498 <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD0>;
499 assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
500 <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
501 assigned-clock-rates = <0>, <0>;
502};
503
504&tdmif_b {
505 status = "okay";
506};
507
508&tdmin_a {
509 status = "okay";
510};
511
512&tdmin_b {
513 status = "okay";
514};
515
516&tdmout_a {
517 status = "okay";
518};
519
520&tdmout_b {
521 status = "okay";
522};
523
524&toddr_a {
525 status = "okay";
526};
527
528&toddr_b {
529 status = "okay";
530};
531
532&toddr_c {
533 status = "okay";
534};
535
536&tohdmitx {
537 status = "okay";
538};
539
Neil Armstrongd1c023a2019-03-25 11:14:50 +0100540&uart_A {
541 status = "okay";
542 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
543 pinctrl-names = "default";
544 uart-has-rtscts;
545
546 bluetooth {
547 compatible = "brcm,bcm43438-bt";
548 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
Neil Armstrongdff60012019-06-07 16:36:17 +0200549 max-speed = <2000000>;
Neil Armstrongfaf438e2019-06-07 16:36:15 +0200550 clocks = <&wifi32k>;
551 clock-names = "lpo";
Jerome Brunetd272c532019-05-16 09:13:55 +0200552 vbat-supply = <&vddao_3v3>;
553 vddio-supply = <&vddio_ao1v8>;
Neil Armstrongd1c023a2019-03-25 11:14:50 +0100554 };
Neil Armstrongb7be1442019-02-12 15:02:59 +0100555};
556
557&uart_AO {
558 status = "okay";
Neil Armstrong51d215c2019-03-18 11:04:49 +0100559 pinctrl-0 = <&uart_ao_a_pins>;
560 pinctrl-names = "default";
Neil Armstrongb7be1442019-02-12 15:02:59 +0100561};
Neil Armstrong41cc4552019-03-25 11:14:51 +0100562
563&usb {
564 status = "okay";
565 dr_mode = "host";
566};