Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3576-luckfox-core3576.dtsi

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2024 Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2025 John Clark <[email protected]>
5 */
6
7 /dts-v1/;
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/leds/common.h>
11 #include <dt-bindings/pinctrl/rockchip.h>
12 #include <dt-bindings/soc/rockchip,vop2.h>
13 #include "rk3576.dtsi"
14
15 / {
16 model = "Luckfox Core3576 Module";
17 compatible = "luckfox,core3576","rockchip,rk3576";
18
19 aliases {
20 mmc0 = &sdhci;
21 };
22
23 chosen {
24 stdout-path = "serial0:1500000n8";
25 };
26
27 hdmi-con {
28 compatible = "hdmi-connector";
29 hdmi-pwr-supply = <&vcc_5v0_hdmi>;
30 type = "a";
31
32 port {
33 hdmi_con_in: endpoint {
34 remote-endpoint = <&hdmi_out_con>;
35 };
36 };
37 };
38
39 vbus_5v0_typec: regulator-vbus-5v0-typec {
40 compatible = "regulator-fixed";
41 enable-active-high;
42 gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
43 pinctrl-names = "default";
44 pinctrl-0 = <&usb_otg0_pwr_en>;
45 regulator-min-microvolt = <5000000>;
46 regulator-max-microvolt = <5000000>;
47 regulator-name = "vbus5v0_typec";
48 vin-supply = <&vcc_5v0_device>;
49
50 regulator-state-mem {
51 regulator-off-in-suspend;
52 };
53 };
54
55 vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
56 compatible = "regulator-fixed";
57 regulator-always-on;
58 regulator-boot-on;
59 regulator-min-microvolt = <1100000>;
60 regulator-max-microvolt = <1100000>;
61 regulator-name = "vcc_1v1_nldo_s3";
62 vin-supply = <&vcc_5v0_sys>;
63
64 regulator-state-mem {
65 regulator-on-in-suspend;
66 };
67 };
68
69 vcc_2v0_pldo_s3: regulator-vcc-2v0-pldo-s3 {
70 compatible = "regulator-fixed";
71 regulator-always-on;
72 regulator-boot-on;
73 regulator-min-microvolt = <2000000>;
74 regulator-max-microvolt = <2000000>;
75 regulator-name = "vcc_2v0_pldo_s3";
76 vin-supply = <&vcc_5v0_sys>;
77
78 regulator-state-mem {
79 regulator-on-in-suspend;
80 };
81 };
82
83 vcc_3v3_pcie: regulator-vcc-3v3-pcie {
84 compatible = "regulator-fixed";
85 enable-active-high;
86 gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
87 pinctrl-names = "default";
88 pinctrl-0 = <&pcie_pwr_en>;
89 regulator-min-microvolt = <3300000>;
90 regulator-max-microvolt = <3300000>;
91 regulator-name = "vcc_3v3_pcie";
92 startup-delay-us = <1000>;
93 vin-supply = <&vcc_5v0_sys>;
94
95 regulator-state-mem {
96 regulator-off-in-suspend;
97 };
98 };
99
100 vcc_3v3_rtc_s5: regulator-vcc-3v3-rtc-s5 {
101 compatible = "regulator-fixed";
102 regulator-always-on;
103 regulator-boot-on;
104 regulator-min-microvolt = <3300000>;
105 regulator-max-microvolt = <3300000>;
106 regulator-name = "vcc_3v3_rtc_s5";
107 vin-supply = <&vcc_5v0_sys>;
108
109 regulator-state-mem {
110 regulator-on-in-suspend;
111 };
112 };
113
114 vcc_5v0_dcin: regulator-vcc-5v0-dcin {
115 compatible = "regulator-fixed";
116 regulator-always-on;
117 regulator-boot-on;
118 regulator-min-microvolt = <5000000>;
119 regulator-max-microvolt = <5000000>;
120 regulator-name = "vcc_5v0_dcin";
121
122 regulator-state-mem {
123 regulator-on-in-suspend;
124 };
125 };
126
127 vcc_5v0_device: regulator-vcc-5v0-device {
128 compatible = "regulator-fixed";
129 regulator-always-on;
130 regulator-boot-on;
131 regulator-min-microvolt = <5000000>;
132 regulator-max-microvolt = <5000000>;
133 regulator-name = "vcc_5v0_device";
134 vin-supply = <&vcc_5v0_dcin>;
135
136 regulator-state-mem {
137 regulator-off-in-suspend;
138 };
139 };
140
141 vcc_5v0_hdmi: regulator-vcc-5v0-hdmi {
142 compatible = "regulator-fixed";
143 enable-active-high;
144 gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
145 pinctrl-names = "default";
146 pinctrl-0 = <&hdmi_con_en>;
147 regulator-min-microvolt = <5000000>;
148 regulator-max-microvolt = <5000000>;
149 regulator-name = "vcc_5v0_hdmi";
150 vin-supply = <&vcc_5v0_sys>;
151
152 regulator-state-mem {
153 regulator-off-in-suspend;
154 };
155 };
156
157 vcc_5v0_host: regulator-vcc-5v0-host {
158 compatible = "regulator-fixed";
159 enable-active-high;
160 gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
161 pinctrl-names = "default";
162 pinctrl-0 = <&usb_host_pwr_en>;
163 regulator-min-microvolt = <5000000>;
164 regulator-max-microvolt = <5000000>;
165 regulator-name = "vcc_5v0_host";
166 vin-supply = <&vcc_5v0_device>;
167
168 regulator-state-mem {
169 regulator-off-in-suspend;
170 };
171 };
172
173 vcc_5v0_sys: regulator-vcc-5v0-sys {
174 compatible = "regulator-fixed";
175 regulator-always-on;
176 regulator-boot-on;
177 regulator-min-microvolt = <5000000>;
178 regulator-max-microvolt = <5000000>;
179 regulator-name = "vcc_5v0_sys";
180 vin-supply = <&vcc_5v0_dcin>;
181
182 regulator-state-mem {
183 regulator-on-in-suspend;
184 };
185 };
186 };
187
188 &combphy0_ps {
189 status = "okay";
190 };
191
192 &combphy1_psu {
193 status = "okay";
194 };
195
196 &cpu_b0 {
197 cpu-supply = <&vdd_cpu_big_s0>;
198 };
199
200 &cpu_b1 {
201 cpu-supply = <&vdd_cpu_big_s0>;
202 };
203
204 &cpu_b2 {
205 cpu-supply = <&vdd_cpu_big_s0>;
206 };
207
208 &cpu_b3 {
209 cpu-supply = <&vdd_cpu_big_s0>;
210 };
211
212 &cpu_l0 {
213 cpu-supply = <&vdd_cpu_lit_s0>;
214 };
215
216 &cpu_l1 {
217 cpu-supply = <&vdd_cpu_lit_s0>;
218 };
219
220 &cpu_l2 {
221 cpu-supply = <&vdd_cpu_lit_s0>;
222 };
223
224 &cpu_l3 {
225 cpu-supply = <&vdd_cpu_lit_s0>;
226 };
227
228 &gpu {
229 mali-supply = <&vdd_gpu_s0>;
230 status = "okay";
231 };
232
233 &hdmi {
234 status = "okay";
235 };
236
237 &hdmi_in {
238 hdmi_in_vp0: endpoint {
239 remote-endpoint = <&vp0_out_hdmi>;
240 };
241 };
242
243 &hdmi_out {
244 hdmi_out_con: endpoint {
245 remote-endpoint = <&hdmi_con_in>;
246 };
247 };
248
249 &hdmi_sound {
250 status = "okay";
251 };
252
253 &hdptxphy {
254 status = "okay";
255 };
256
257 &i2c1 {
258 status = "okay";
259
260 pmic@23 {
261 compatible = "rockchip,rk806";
262 reg = <0x23>;
263 #gpio-cells = <2>;
264 gpio-controller;
265 interrupt-parent = <&gpio0>;
266 interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
267 pinctrl-names = "default";
268 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
269 <&rk806_dvs2_null>, <&rk806_dvs3_null>;
270 system-power-controller;
271
272 vcc1-supply = <&vcc_5v0_sys>;
273 vcc2-supply = <&vcc_5v0_sys>;
274 vcc3-supply = <&vcc_5v0_sys>;
275 vcc4-supply = <&vcc_5v0_sys>;
276 vcc5-supply = <&vcc_5v0_sys>;
277 vcc6-supply = <&vcc_5v0_sys>;
278 vcc7-supply = <&vcc_5v0_sys>;
279 vcc8-supply = <&vcc_5v0_sys>;
280 vcc9-supply = <&vcc_5v0_sys>;
281 vcc10-supply = <&vcc_5v0_sys>;
282 vcc11-supply = <&vcc_2v0_pldo_s3>;
283 vcc12-supply = <&vcc_5v0_sys>;
284 vcc13-supply = <&vcc_1v1_nldo_s3>;
285 vcc14-supply = <&vcc_1v1_nldo_s3>;
286 vcca-supply = <&vcc_5v0_sys>;
287
288 rk806_dvs1_null: dvs1-null-pins {
289 pins = "gpio_pwrctrl2";
290 function = "pin_fun0";
291 };
292
293 rk806_dvs2_null: dvs2-null-pins {
294 pins = "gpio_pwrctrl2";
295 function = "pin_fun0";
296 };
297
298 rk806_dvs3_null: dvs3-null-pins {
299 pins = "gpio_pwrctrl3";
300 function = "pin_fun0";
301 };
302
303 rk806_dvs1_slp: dvs1-slp-pins {
304 pins = "gpio_pwrctrl1";
305 function = "pin_fun1";
306 };
307
308 rk806_dvs1_pwrdn: dvs1-pwrdn-pins {
309 pins = "gpio_pwrctrl1";
310 function = "pin_fun2";
311 };
312
313 rk806_dvs1_rst: dvs1-rst-pins {
314 pins = "gpio_pwrctrl1";
315 function = "pin_fun3";
316 };
317
318 rk806_dvs2_slp: dvs2-slp-pins {
319 pins = "gpio_pwrctrl2";
320 function = "pin_fun1";
321 };
322
323 rk806_dvs2_pwrdn: dvs2-pwrdn-pins {
324 pins = "gpio_pwrctrl2";
325 function = "pin_fun2";
326 };
327
328 rk806_dvs2_rst: dvs2-rst-pins {
329 pins = "gpio_pwrctrl2";
330 function = "pin_fun3";
331 };
332
333 rk806_dvs2_dvs: dvs2-dvs-pins {
334 pins = "gpio_pwrctrl2";
335 function = "pin_fun4";
336 };
337
338 rk806_dvs2_gpio: dvs2-gpio-pins {
339 pins = "gpio_pwrctrl2";
340 function = "pin_fun5";
341 };
342
343
344 rk806_dvs3_slp: dvs3-slp-pins {
345 pins = "gpio_pwrctrl3";
346 function = "pin_fun1";
347 };
348
349 rk806_dvs3_pwrdn: dvs3-pwrdn-pins {
350 pins = "gpio_pwrctrl3";
351 function = "pin_fun2";
352 };
353
354 rk806_dvs3_rst: dvs3-rst-pins {
355 pins = "gpio_pwrctrl3";
356 function = "pin_fun3";
357 };
358
359 rk806_dvs3_dvs: dvs3-dvs-pins {
360 pins = "gpio_pwrctrl3";
361 function = "pin_fun4";
362 };
363
364 rk806_dvs3_gpio: dvs3-gpio-pins {
365 pins = "gpio_pwrctrl3";
366 function = "pin_fun5";
367 };
368
369 regulators {
370 vdd_cpu_big_s0: dcdc-reg1 {
371 regulator-always-on;
372 regulator-boot-on;
373 regulator-min-microvolt = <550000>;
374 regulator-max-microvolt = <950000>;
375 regulator-ramp-delay = <12500>;
376 regulator-name = "vdd_cpu_big_s0";
377 regulator-enable-ramp-delay = <400>;
378
379 regulator-state-mem {
380 regulator-off-in-suspend;
381 };
382 };
383
384 vdd_npu_s0: dcdc-reg2 {
385 regulator-boot-on;
386 regulator-min-microvolt = <550000>;
387 regulator-max-microvolt = <950000>;
388 regulator-ramp-delay = <12500>;
389 regulator-name = "vdd_npu_s0";
390 regulator-enable-ramp-delay = <400>;
391
392 regulator-state-mem {
393 regulator-off-in-suspend;
394 };
395 };
396
397 vdd_cpu_lit_s0: dcdc-reg3 {
398 regulator-always-on;
399 regulator-boot-on;
400 regulator-min-microvolt = <550000>;
401 regulator-max-microvolt = <950000>;
402 regulator-ramp-delay = <12500>;
403 regulator-name = "vdd_cpu_lit_s0";
404
405 regulator-state-mem {
406 regulator-off-in-suspend;
407 regulator-suspend-microvolt = <750000>;
408 };
409 };
410
411 vcc_3v3_s3: dcdc-reg4 {
412 regulator-always-on;
413 regulator-boot-on;
414 regulator-min-microvolt = <3300000>;
415 regulator-max-microvolt = <3300000>;
416 regulator-name = "vcc_3v3_s3";
417
418 regulator-state-mem {
419 regulator-on-in-suspend;
420 regulator-suspend-microvolt = <3300000>;
421 };
422 };
423
424 vdd_gpu_s0: dcdc-reg5 {
425 regulator-boot-on;
426 regulator-min-microvolt = <550000>;
427 regulator-max-microvolt = <900000>;
428 regulator-ramp-delay = <12500>;
429 regulator-name = "vdd_gpu_s0";
430 regulator-enable-ramp-delay = <400>;
431
432 regulator-state-mem {
433 regulator-off-in-suspend;
434 regulator-suspend-microvolt = <850000>;
435 };
436 };
437
438 vddq_ddr_s0: dcdc-reg6 {
439 regulator-always-on;
440 regulator-boot-on;
441 regulator-name = "vddq_ddr_s0";
442
443 regulator-state-mem {
444 regulator-off-in-suspend;
445 };
446 };
447
448 vdd_logic_s0: dcdc-reg7 {
449 regulator-always-on;
450 regulator-boot-on;
451 regulator-min-microvolt = <550000>;
452 regulator-max-microvolt = <800000>;
453 regulator-name = "vdd_logic_s0";
454
455 regulator-state-mem {
456 regulator-off-in-suspend;
457 };
458 };
459
460 vcc_1v8_s3: dcdc-reg8 {
461 regulator-always-on;
462 regulator-boot-on;
463 regulator-min-microvolt = <1800000>;
464 regulator-max-microvolt = <1800000>;
465 regulator-name = "vcc_1v8_s3";
466
467 regulator-state-mem {
468 regulator-on-in-suspend;
469 regulator-suspend-microvolt = <1800000>;
470 };
471 };
472
473 vdd2_ddr_s3: dcdc-reg9 {
474 regulator-always-on;
475 regulator-boot-on;
476 regulator-name = "vdd2_ddr_s3";
477
478 regulator-state-mem {
479 regulator-on-in-suspend;
480 };
481 };
482
483 vdd_ddr_s0: dcdc-reg10 {
484 regulator-always-on;
485 regulator-boot-on;
486 regulator-min-microvolt = <550000>;
487 regulator-max-microvolt = <1200000>;
488 regulator-name = "vdd_ddr_s0";
489
490 regulator-state-mem {
491 regulator-off-in-suspend;
492 };
493 };
494
495 vcca_1v8_s0: pldo-reg1 {
496 regulator-always-on;
497 regulator-boot-on;
498 regulator-min-microvolt = <1800000>;
499 regulator-max-microvolt = <1800000>;
500 regulator-name = "vcca_1v8_s0";
501
502 regulator-state-mem {
503 regulator-off-in-suspend;
504 };
505 };
506
507 vcca1v8_pldo2_s0: pldo-reg2 {
508 regulator-always-on;
509 regulator-boot-on;
510 regulator-min-microvolt = <1800000>;
511 regulator-max-microvolt = <1800000>;
512 regulator-name = "vcca1v8_pldo2_s0";
513
514 regulator-state-mem {
515 regulator-off-in-suspend;
516 };
517 };
518
519 vdda_1v2_s0: pldo-reg3 {
520 regulator-always-on;
521 regulator-boot-on;
522 regulator-min-microvolt = <1200000>;
523 regulator-max-microvolt = <1200000>;
524 regulator-name = "vdda_1v2_s0";
525
526 regulator-state-mem {
527 regulator-off-in-suspend;
528 };
529 };
530
531 vcca_3v3_s0: pldo-reg4 {
532 regulator-always-on;
533 regulator-boot-on;
534 regulator-min-microvolt = <3300000>;
535 regulator-max-microvolt = <3300000>;
536 regulator-name = "vcca_3v3_s0";
537
538 regulator-state-mem {
539 regulator-off-in-suspend;
540 };
541 };
542
543 vccio_sd_s0: pldo-reg5 {
544 regulator-always-on;
545 regulator-boot-on;
546 regulator-min-microvolt = <1800000>;
547 regulator-max-microvolt = <3300000>;
548 regulator-name = "vccio_sd_s0";
549
550 regulator-state-mem {
551 regulator-off-in-suspend;
552 };
553 };
554
555 vcca1v8_pldo6_s3: pldo-reg6 {
556 regulator-always-on;
557 regulator-boot-on;
558 regulator-min-microvolt = <1800000>;
559 regulator-max-microvolt = <1800000>;
560 regulator-name = "vcca1v8_pldo6_s3";
561
562 regulator-state-mem {
563 regulator-on-in-suspend;
564 regulator-suspend-microvolt = <1800000>;
565 };
566 };
567
568 vdd_0v75_s3: nldo-reg1 {
569 regulator-always-on;
570 regulator-boot-on;
571 regulator-min-microvolt = <750000>;
572 regulator-max-microvolt = <750000>;
573 regulator-name = "vdd_0v75_s3";
574
575 regulator-state-mem {
576 regulator-on-in-suspend;
577 regulator-suspend-microvolt = <750000>;
578 };
579 };
580
581 vdda_ddr_pll_s0: nldo-reg2 {
582 regulator-always-on;
583 regulator-boot-on;
584 regulator-min-microvolt = <850000>;
585 regulator-max-microvolt = <850000>;
586 regulator-name = "vdda_ddr_pll_s0";
587
588 regulator-state-mem {
589 regulator-off-in-suspend;
590 };
591 };
592
593 vdda0v75_hdmi_s0: nldo-reg3 {
594 regulator-always-on;
595 regulator-boot-on;
596 regulator-min-microvolt = <837500>;
597 regulator-max-microvolt = <837500>;
598 regulator-name = "vdda0v75_hdmi_s0";
599
600 regulator-state-mem {
601 regulator-off-in-suspend;
602 };
603 };
604
605 vdda_0v85_s0: nldo-reg4 {
606 regulator-always-on;
607 regulator-boot-on;
608 regulator-min-microvolt = <850000>;
609 regulator-max-microvolt = <850000>;
610 regulator-name = "vdda_0v85_s0";
611
612 regulator-state-mem {
613 regulator-off-in-suspend;
614 };
615 };
616
617 vdda_0v75_s0: nldo-reg5 {
618 regulator-always-on;
619 regulator-boot-on;
620 regulator-min-microvolt = <750000>;
621 regulator-max-microvolt = <750000>;
622 regulator-name = "vdda_0v75_s0";
623
624 regulator-state-mem {
625 regulator-off-in-suspend;
626 };
627 };
628 };
629 };
630 };
631
632 &i2c2 {
633 status = "okay";
634
635 hym8563: rtc@51 {
636 compatible = "haoyu,hym8563";
637 reg = <0x51>;
638 #clock-cells = <0>;
639 clock-output-names = "hym8563";
640 interrupt-parent = <&gpio0>;
641 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
642 pinctrl-names = "default";
643 pinctrl-0 = <&hym8563_int>;
644 wakeup-source;
645 };
646 };
647
648 &pcie0 {
649 pinctrl-names = "default";
650 pinctrl-0 = <&pcie_reset>;
651 reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
652 vpcie3v3-supply = <&vcc_3v3_pcie>;
653 status = "okay";
654 };
655
656 &pinctrl {
657 hdmi {
658 hdmi_con_en: hdmi-con-en {
659 rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
660 };
661 };
662
663 hym8563 {
664 hym8563_int: hym8563-int {
665 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
666 };
667 };
668
669 pcie {
670 pcie_pwr_en: pcie-pwr-en {
671 rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
672 };
673
674 pcie_reset: pcie-reset {
675 rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
676 };
677 };
678
679 usb {
680 usb_host_pwr_en: usb-host-pwr-en {
681 rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
682 };
683
684 usb_otg0_pwr_en: usb-otg0-pwr-en {
685 rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
686 };
687
688 usbc0_int: usbc0-int {
689 rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
690 };
691 };
692 };
693
694 &rng {
695 status = "okay";
696 };
697
698 &sai6 {
699 status = "okay";
700 };
701
702 &saradc {
703 vref-supply = <&vcca_1v8_s0>;
704 status = "okay";
705 };
706
707 &sdhci {
708 bus-width = <8>;
709 full-pwr-cycle-in-suspend;
710 mmc-hs400-1_8v;
711 mmc-hs400-enhanced-strobe;
712 no-sd;
713 no-sdio;
714 non-removable;
715 vmmc-supply = <&vcc_3v3_s3>;
716 vqmmc-supply = <&vccio_sd_s0>;
717 status = "okay";
718 };
719
720 &uart0 {
721 status = "okay";
722 };
723
724 &uart4 {
725 pinctrl-names = "default";
726 pinctrl-0 = <&uart4m1_xfer &uart4m1_ctsn>;
727 status = "okay";
728 };
729
730 &u2phy1 {
731 status = "okay";
732 };
733
734 &u2phy1_otg {
735 phy-supply = <&vcc_5v0_host>;
736 status = "okay";
737 };
738
739 &usb_drd1_dwc3 {
740 dr_mode = "host";
741 status = "okay";
742 };
743
744 &vop {
745 status = "okay";
746 };
747
748 &vop_mmu {
749 status = "okay";
750 };
751
752 &vp0 {
753 vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
754 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
755 remote-endpoint = <&hdmi_in_vp0>;
756 };
757 };