blob: a2f2baa4ea91ca189708014f13e22cf08cebc0bc [file] [log] [blame]
Akash Gajjara01866a2023-02-14 20:48:40 +05301// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2023 Akash Gajjar <gajjar04akash@gmail.com>
5 */
6
7/dts-v1/;
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/pinctrl/rockchip.h>
10#include "rk3568.dtsi"
11
12/ {
13 model = "Radxa ROCK3 Model A";
14 compatible = "radxa,rock3a", "rockchip,rk3568";
15
16 chosen: chosen {
17 stdout-path = "serial2:1500000n8";
18 };
19
20 gmac1_clkin: external-gmac1-clock {
21 compatible = "fixed-clock";
22 clock-frequency = <125000000>;
23 clock-output-names = "gmac1_clkin";
24 #clock-cells = <0>;
25 };
26
27 vcc12v_dcin: vcc12v-dcin-regulator {
28 compatible = "regulator-fixed";
29 regulator-name = "vcc12v_dcin";
30 regulator-always-on;
31 regulator-boot-on;
32 regulator-min-microvolt = <12000000>;
33 regulator-max-microvolt = <12000000>;
34 };
35
36 vcc3v3_sys: vcc3v3-sys-regulator {
37 compatible = "regulator-fixed";
38 regulator-name = "vcc3v3_sys";
39 regulator-always-on;
40 regulator-boot-on;
41 regulator-min-microvolt = <3300000>;
42 regulator-max-microvolt = <3300000>;
43 vin-supply = <&vcc12v_dcin>;
44 };
45
46 vcc5v0_sys: vcc5v0-sys-regulator {
47 compatible = "regulator-fixed";
48 regulator-name = "vcc5v0_sys";
49 regulator-always-on;
50 regulator-boot-on;
51 regulator-min-microvolt = <5000000>;
52 regulator-max-microvolt = <5000000>;
53 vin-supply = <&vcc12v_dcin>;
54 };
55
56 vcc5v0_usb: vcc5v0-usb-regulator {
57 compatible = "regulator-fixed";
58 regulator-name = "vcc5v0_usb";
59 regulator-always-on;
60 regulator-boot-on;
61 regulator-min-microvolt = <5000000>;
62 regulator-max-microvolt = <5000000>;
63 vin-supply = <&vcc12v_dcin>;
64 };
65
66 vcc5v0_usb_host: vcc5v0-usb-host-regulator {
67 compatible = "regulator-fixed";
68 enable-active-high;
69 gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
70 pinctrl-names = "default";
71 pinctrl-0 = <&vcc5v0_usb_host_en>;
72 regulator-name = "vcc5v0_usb_host";
73 regulator-min-microvolt = <5000000>;
74 regulator-max-microvolt = <5000000>;
75 vin-supply = <&vcc5v0_usb>;
76 };
77
78 vcc5v0_usb_hub: vcc5v0-usb-hub-regulator {
79 compatible = "regulator-fixed";
80 enable-active-high;
81 gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
82 pinctrl-names = "default";
83 pinctrl-0 = <&vcc5v0_usb_hub_en>;
84 regulator-name = "vcc5v0_usb_hub";
85 regulator-always-on;
86 vin-supply = <&vcc5v0_usb>;
87 };
88
89 vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
90 compatible = "regulator-fixed";
91 enable-active-high;
92 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
93 pinctrl-names = "default";
94 regulator-name = "vcc5v0_usb_otg";
95 regulator-min-microvolt = <5000000>;
96 regulator-max-microvolt = <5000000>;
97 vin-supply = <&vcc5v0_usb>;
98 };
99
100 vcc_cam: vcc-cam-regulator {
101 compatible = "regulator-fixed";
102 enable-active-high;
103 gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
104 pinctrl-names = "default";
105 pinctrl-0 = <&vcc_cam_en>;
106 regulator-name = "vcc_cam";
107 regulator-min-microvolt = <3300000>;
108 regulator-max-microvolt = <3300000>;
109 vin-supply = <&vcc3v3_sys>;
110
111 regulator-state-mem {
112 regulator-off-in-suspend;
113 };
114 };
115
116 vcc_mipi: vcc-mipi-regulator {
117 compatible = "regulator-fixed";
118 enable-active-high;
119 gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
120 pinctrl-names = "default";
121 pinctrl-0 = <&vcc_mipi_en>;
122 regulator-name = "vcc_mipi";
123 regulator-min-microvolt = <3300000>;
124 regulator-max-microvolt = <3300000>;
125 vin-supply = <&vcc3v3_sys>;
126
127 regulator-state-mem {
128 regulator-off-in-suspend;
129 };
130 };
131};
132
133&combphy0 {
134 status = "okay";
135};
136
137&combphy1 {
138 status = "okay";
139};
140
141&combphy2 {
142 status = "okay";
143};
144
145&cpu0 {
146 cpu-supply = <&vdd_cpu>;
147};
148
149&cpu1 {
150 cpu-supply = <&vdd_cpu>;
151};
152
153&cpu2 {
154 cpu-supply = <&vdd_cpu>;
155};
156
157&cpu3 {
158 cpu-supply = <&vdd_cpu>;
159};
160
161&gmac1 {
162 assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
163 assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
164 clock_in_out = "input";
165 phy-handle = <&rgmii_phy1>;
166 phy-mode = "rgmii-id";
167 pinctrl-names = "default";
168 status = "okay";
169};
170
171&i2c0 {
172 status = "okay";
173
174 vdd_cpu: regulator@1c {
175 compatible = "tcs,tcs4525";
176 reg = <0x1c>;
177 fcs,suspend-voltage-selector = <1>;
178 regulator-name = "vdd_cpu";
179 regulator-always-on;
180 regulator-boot-on;
181 regulator-min-microvolt = <800000>;
182 regulator-max-microvolt = <1150000>;
183 regulator-ramp-delay = <2300>;
184 vin-supply = <&vcc5v0_sys>;
185
186 regulator-state-mem {
187 regulator-off-in-suspend;
188 };
189 };
190
191 rk809: pmic@20 {
192 compatible = "rockchip,rk809";
193 reg = <0x20>;
194 interrupt-parent = <&gpio0>;
195 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
196 assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
197 assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
198 #clock-cells = <1>;
199 clock-names = "mclk";
200 clocks = <&cru I2S1_MCLKOUT_TX>;
201 pinctrl-names = "default";
202 pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
203 rockchip,system-power-controller;
204 #sound-dai-cells = <0>;
205 vcc1-supply = <&vcc3v3_sys>;
206 vcc2-supply = <&vcc3v3_sys>;
207 vcc3-supply = <&vcc3v3_sys>;
208 vcc4-supply = <&vcc3v3_sys>;
209 vcc5-supply = <&vcc3v3_sys>;
210 vcc6-supply = <&vcc3v3_sys>;
211 vcc7-supply = <&vcc3v3_sys>;
212 vcc8-supply = <&vcc3v3_sys>;
213 vcc9-supply = <&vcc3v3_sys>;
214 wakeup-source;
215
216 regulators {
217 vdd_logic: DCDC_REG1 {
218 regulator-name = "vdd_logic";
219 regulator-always-on;
220 regulator-boot-on;
221 regulator-init-microvolt = <900000>;
222 regulator-initial-mode = <0x2>;
223 regulator-min-microvolt = <500000>;
224 regulator-max-microvolt = <1350000>;
225 regulator-ramp-delay = <6001>;
226
227 regulator-state-mem {
228 regulator-off-in-suspend;
229 };
230 };
231
232 vdd_gpu: DCDC_REG2 {
233 regulator-name = "vdd_gpu";
234 regulator-always-on;
235 regulator-init-microvolt = <900000>;
236 regulator-initial-mode = <0x2>;
237 regulator-min-microvolt = <500000>;
238 regulator-max-microvolt = <1350000>;
239 regulator-ramp-delay = <6001>;
240
241 regulator-state-mem {
242 regulator-off-in-suspend;
243 };
244 };
245
246 vcc_ddr: DCDC_REG3 {
247 regulator-name = "vcc_ddr";
248 regulator-always-on;
249 regulator-boot-on;
250 regulator-initial-mode = <0x2>;
251
252 regulator-state-mem {
253 regulator-on-in-suspend;
254 };
255 };
256
257 vdd_npu: DCDC_REG4 {
258 regulator-name = "vdd_npu";
259 regulator-init-microvolt = <900000>;
260 regulator-initial-mode = <0x2>;
261 regulator-min-microvolt = <500000>;
262 regulator-max-microvolt = <1350000>;
263 regulator-ramp-delay = <6001>;
264
265 regulator-state-mem {
266 regulator-off-in-suspend;
267 };
268 };
269
270 vcc_1v8: DCDC_REG5 {
271 regulator-name = "vcc_1v8";
272 regulator-always-on;
273 regulator-boot-on;
274 regulator-min-microvolt = <1800000>;
275 regulator-max-microvolt = <1800000>;
276
277 regulator-state-mem {
278 regulator-off-in-suspend;
279 };
280 };
281
282 vdda0v9_image: LDO_REG1 {
283 regulator-name = "vdda0v9_image";
284 regulator-min-microvolt = <900000>;
285 regulator-max-microvolt = <900000>;
286
287 regulator-state-mem {
288 regulator-off-in-suspend;
289 };
290 };
291
292 vdda_0v9: LDO_REG2 {
293 regulator-name = "vdda_0v9";
294 regulator-always-on;
295 regulator-boot-on;
296 regulator-min-microvolt = <900000>;
297 regulator-max-microvolt = <900000>;
298
299 regulator-state-mem {
300 regulator-off-in-suspend;
301 };
302 };
303
304 vdda0v9_pmu: LDO_REG3 {
305 regulator-name = "vdda0v9_pmu";
306 regulator-always-on;
307 regulator-boot-on;
308 regulator-min-microvolt = <900000>;
309 regulator-max-microvolt = <900000>;
310
311 regulator-state-mem {
312 regulator-on-in-suspend;
313 regulator-suspend-microvolt = <900000>;
314 };
315 };
316
317 vccio_acodec: LDO_REG4 {
318 regulator-name = "vccio_acodec";
319 regulator-always-on;
320 regulator-min-microvolt = <3300000>;
321 regulator-max-microvolt = <3300000>;
322
323 regulator-state-mem {
324 regulator-off-in-suspend;
325 };
326 };
327
328 vccio_sd: LDO_REG5 {
329 regulator-name = "vccio_sd";
330 regulator-min-microvolt = <1800000>;
331 regulator-max-microvolt = <3300000>;
332
333 regulator-state-mem {
334 regulator-off-in-suspend;
335 };
336 };
337
338 vcc3v3_pmu: LDO_REG6 {
339 regulator-name = "vcc3v3_pmu";
340 regulator-always-on;
341 regulator-boot-on;
342 regulator-min-microvolt = <3300000>;
343 regulator-max-microvolt = <3300000>;
344
345 regulator-state-mem {
346 regulator-on-in-suspend;
347 regulator-suspend-microvolt = <3300000>;
348 };
349 };
350
351 vcca_1v8: LDO_REG7 {
352 regulator-name = "vcca_1v8";
353 regulator-always-on;
354 regulator-boot-on;
355 regulator-min-microvolt = <1800000>;
356 regulator-max-microvolt = <1800000>;
357
358 regulator-state-mem {
359 regulator-off-in-suspend;
360 };
361 };
362
363 vcca1v8_pmu: LDO_REG8 {
364 regulator-name = "vcca1v8_pmu";
365 regulator-always-on;
366 regulator-boot-on;
367 regulator-min-microvolt = <1800000>;
368 regulator-max-microvolt = <1800000>;
369
370 regulator-state-mem {
371 regulator-on-in-suspend;
372 regulator-suspend-microvolt = <1800000>;
373 };
374 };
375
376 vcca1v8_image: LDO_REG9 {
377 regulator-name = "vcca1v8_image";
378 regulator-min-microvolt = <1800000>;
379 regulator-max-microvolt = <1800000>;
380
381 regulator-state-mem {
382 regulator-off-in-suspend;
383 };
384 };
385
386 vcc_3v3: SWITCH_REG1 {
387 regulator-name = "vcc_3v3";
388 regulator-always-on;
389 regulator-boot-on;
390
391 regulator-state-mem {
392 regulator-off-in-suspend;
393 };
394 };
395
396 vcc3v3_sd: SWITCH_REG2 {
397 regulator-name = "vcc3v3_sd";
398
399 regulator-state-mem {
400 regulator-off-in-suspend;
401 };
402 };
403 };
404
405 codec {
406 mic-in-differential;
407 };
408 };
409};
410
411&i2c3 {
412 pinctrl-names = "default";
413 pinctrl-0 = <&i2c3m1_xfer>;
414 status = "disabled";
415};
416
417&i2c4 {
418 pinctrl-names = "default";
419 pinctrl-0 = <&i2c4m1_xfer>;
420 status = "disabled";
421};
422
423&i2c5 {
424 status = "okay";
425
426 hym8563: rtc@51 {
427 compatible = "haoyu,hym8563";
428 reg = <0x51>;
429 interrupt-parent = <&gpio0>;
430 interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
431 #clock-cells = <0>;
432 clock-output-names = "rtcic_32kout";
433 pinctrl-names = "default";
434 pinctrl-0 = <&hym8563_int>;
435 wakeup-source;
436 };
437};
438
439&i2s0_8ch {
440 status = "okay";
441};
442
443&i2s1_8ch {
444 rockchip,trcm-sync-tx-only;
445 status = "okay";
446};
447
448&mdio1 {
449 rgmii_phy1: ethernet-phy@0 {
450 compatible = "ethernet-phy-ieee802.3-c22";
451 reg = <0x0>;
452 pinctrl-names = "default";
453 pinctrl-0 = <&eth_phy_rst>;
454 reset-assert-us = <20000>;
455 reset-deassert-us = <100000>;
456 reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
457 };
458};
459
460&pinctrl {
461 cam {
462 vcc_cam_en: vcc_cam_en {
463 rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
464 };
465 };
466
467 display {
468 vcc_mipi_en: vcc_mipi_en {
469 rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
470 };
471 };
472
473 ethernet {
474 eth_phy_rst: eth_phy_rst {
475 rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
476 };
477 };
478
479 hym8563 {
480 hym8563_int: hym8563-int {
481 rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
482 };
483 };
484
485 leds {
486 led_user_en: led_user_en {
487 rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
488 };
489 };
490
491 pcie {
492 pcie_enable_h: pcie-enable-h {
493 rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
494 };
495
496 pcie_reset_h: pcie-reset-h {
497 rockchip,pins = <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
498 };
499 };
500
501 pmic {
502 pmic_int: pmic_int {
503 rockchip,pins =
504 <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
505 };
506 };
507
508 usb {
509 vcc5v0_usb_host_en: vcc5v0_usb_host_en {
510 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
511 };
512 vcc5v0_usb_hub_en: vcc5v0_usb_hub_en {
513 rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
514 };
515 vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
516 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
517 };
518 };
519
520 bt {
521 bt_enable: bt-enable {
522 rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
523 };
524
525 bt_host_wake: bt-host-wake {
526 rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
527 };
528
529 bt_wake: bt-wake {
530 rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
531 };
532 };
533
534 sdio-pwrseq {
535 wifi_enable: wifi-enable {
536 rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
537 };
538 };
539};
540
541&pmu_io_domains {
542 pmuio1-supply = <&vcc3v3_pmu>;
543 pmuio2-supply = <&vcc3v3_pmu>;
544 vccio1-supply = <&vccio_acodec>;
545 vccio2-supply = <&vcc_1v8>;
546 vccio3-supply = <&vccio_sd>;
547 vccio4-supply = <&vcc_1v8>;
548 vccio5-supply = <&vcc_3v3>;
549 vccio6-supply = <&vcc_1v8>;
550 vccio7-supply = <&vcc_3v3>;
551 status = "okay";
552};
553
554&uart2 {
555 status = "okay";
556};
557
558&usb_host0_ehci {
559 status = "okay";
560};
561
562&usb_host0_ohci {
563 status = "okay";
564};
565
566&usb_host0_xhci {
567 extcon = <&usb2phy0>;
568 status = "okay";
569};
570
571&usb_host1_ehci {
572 status = "okay";
573};
574
575&usb_host1_ohci {
576 status = "okay";
577};
578
579&usb_host1_xhci {
580 status = "okay";
581};
582
583&usb2phy0 {
584 status = "okay";
585};
586
587&usb2phy0_host {
588 phy-supply = <&vcc5v0_usb_host>;
589 status = "okay";
590};
591
592&usb2phy0_otg {
593 phy-supply = <&vcc5v0_usb_otg>;
594 status = "okay";
595};
596
597&usb2phy1 {
598 status = "okay";
599};
600
601&usb2phy1_host {
602 phy-supply = <&vcc5v0_usb_host>;
603 status = "okay";
604};
605
606&usb2phy1_otg {
607 phy-supply = <&vcc5v0_usb_host>;
608 status = "okay";
609};