cf9fe06ad0c21a9b50ca9eea6a1f791ba618f0db
[openwrt/staging/pepe2k.git] /
1 From c8ec73b05a95d9f0969ae0f28dd8799a54fcdfc7 Mon Sep 17 00:00:00 2001
2 From: Tianling Shen <cnsztl@gmail.com>
3 Date: Sat, 18 Mar 2023 16:37:41 +0800
4 Subject: [PATCH] arm64: dts: rockchip: create common dtsi for NanoPi R5 series
5
6 Create common dtsi for the FriendlyElec NanoPi R5 series.
7
8 Signed-off-by: Tianling Shen <cnsztl@gmail.com>
9 Link: https://lore.kernel.org/r/20230318083745.6181-2-cnsztl@gmail.com
10 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
11 ---
12 .../boot/dts/rockchip/rk3568-nanopi-r5s.dts | 575 +----------------
13 .../boot/dts/rockchip/rk3568-nanopi-r5s.dtsi | 596 ++++++++++++++++++
14 2 files changed, 597 insertions(+), 574 deletions(-)
15 create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
16
17 --- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
18 +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
19 @@ -7,12 +7,7 @@
20 */
21
22 /dts-v1/;
23 -#include <dt-bindings/gpio/gpio.h>
24 -#include <dt-bindings/input/input.h>
25 -#include <dt-bindings/leds/common.h>
26 -#include <dt-bindings/pinctrl/rockchip.h>
27 -#include <dt-bindings/soc/rockchip,vop2.h>
28 -#include "rk3568.dtsi"
29 +#include "rk3568-nanopi-r5s.dtsi"
30
31 / {
32 model = "FriendlyElec NanoPi R5S";
33 @@ -20,23 +15,6 @@
34
35 aliases {
36 ethernet0 = &gmac0;
37 - mmc0 = &sdmmc0;
38 - mmc1 = &sdhci;
39 - };
40 -
41 - chosen: chosen {
42 - stdout-path = "serial2:1500000n8";
43 - };
44 -
45 - hdmi-con {
46 - compatible = "hdmi-connector";
47 - type = "a";
48 -
49 - port {
50 - hdmi_con_in: endpoint {
51 - remote-endpoint = <&hdmi_out_con>;
52 - };
53 - };
54 };
55
56 gpio-leds {
57 @@ -71,130 +49,6 @@
58 gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
59 };
60 };
61 -
62 - vdd_usbc: vdd-usbc-regulator {
63 - compatible = "regulator-fixed";
64 - regulator-name = "vdd_usbc";
65 - regulator-always-on;
66 - regulator-boot-on;
67 - regulator-min-microvolt = <5000000>;
68 - regulator-max-microvolt = <5000000>;
69 - };
70 -
71 - vcc3v3_sys: vcc3v3-sys-regulator {
72 - compatible = "regulator-fixed";
73 - regulator-name = "vcc3v3_sys";
74 - regulator-always-on;
75 - regulator-boot-on;
76 - regulator-min-microvolt = <3300000>;
77 - regulator-max-microvolt = <3300000>;
78 - vin-supply = <&vdd_usbc>;
79 - };
80 -
81 - vcc5v0_sys: vcc5v0-sys-regulator {
82 - compatible = "regulator-fixed";
83 - regulator-name = "vcc5v0_sys";
84 - regulator-always-on;
85 - regulator-boot-on;
86 - regulator-min-microvolt = <5000000>;
87 - regulator-max-microvolt = <5000000>;
88 - vin-supply = <&vdd_usbc>;
89 - };
90 -
91 - vcc3v3_pcie: vcc3v3-pcie-regulator {
92 - compatible = "regulator-fixed";
93 - regulator-name = "vcc3v3_pcie";
94 - regulator-min-microvolt = <3300000>;
95 - regulator-max-microvolt = <3300000>;
96 - enable-active-high;
97 - gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
98 - startup-delay-us = <200000>;
99 - vin-supply = <&vcc5v0_sys>;
100 - };
101 -
102 - vcc5v0_usb: vcc5v0-usb-regulator {
103 - compatible = "regulator-fixed";
104 - regulator-name = "vcc5v0_usb";
105 - regulator-always-on;
106 - regulator-boot-on;
107 - regulator-min-microvolt = <5000000>;
108 - regulator-max-microvolt = <5000000>;
109 - vin-supply = <&vdd_usbc>;
110 - };
111 -
112 - vcc5v0_usb_host: vcc5v0-usb-host-regulator {
113 - compatible = "regulator-fixed";
114 - enable-active-high;
115 - gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
116 - pinctrl-names = "default";
117 - pinctrl-0 = <&vcc5v0_usb_host_en>;
118 - regulator-name = "vcc5v0_usb_host";
119 - regulator-always-on;
120 - regulator-boot-on;
121 - regulator-min-microvolt = <5000000>;
122 - regulator-max-microvolt = <5000000>;
123 - vin-supply = <&vcc5v0_usb>;
124 - };
125 -
126 - vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
127 - compatible = "regulator-fixed";
128 - enable-active-high;
129 - gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
130 - pinctrl-names = "default";
131 - pinctrl-0 = <&vcc5v0_usb_otg_en>;
132 - regulator-name = "vcc5v0_usb_otg";
133 - regulator-min-microvolt = <5000000>;
134 - regulator-max-microvolt = <5000000>;
135 - vin-supply = <&vcc5v0_usb>;
136 - };
137 -
138 - pcie30_avdd0v9: pcie30-avdd0v9-regulator {
139 - compatible = "regulator-fixed";
140 - regulator-name = "pcie30_avdd0v9";
141 - regulator-always-on;
142 - regulator-boot-on;
143 - regulator-min-microvolt = <900000>;
144 - regulator-max-microvolt = <900000>;
145 - vin-supply = <&vcc3v3_sys>;
146 - };
147 -
148 - pcie30_avdd1v8: pcie30-avdd1v8-regulator {
149 - compatible = "regulator-fixed";
150 - regulator-name = "pcie30_avdd1v8";
151 - regulator-always-on;
152 - regulator-boot-on;
153 - regulator-min-microvolt = <1800000>;
154 - regulator-max-microvolt = <1800000>;
155 - vin-supply = <&vcc3v3_sys>;
156 - };
157 -};
158 -
159 -&combphy0 {
160 - status = "okay";
161 -};
162 -
163 -&combphy1 {
164 - status = "okay";
165 -};
166 -
167 -&combphy2 {
168 - status = "okay";
169 -};
170 -
171 -&cpu0 {
172 - cpu-supply = <&vdd_cpu>;
173 -};
174 -
175 -&cpu1 {
176 - cpu-supply = <&vdd_cpu>;
177 -};
178 -
179 -&cpu2 {
180 - cpu-supply = <&vdd_cpu>;
181 -};
182 -
183 -&cpu3 {
184 - cpu-supply = <&vdd_cpu>;
185 };
186
187 &gmac0 {
188 @@ -219,292 +73,6 @@
189 status = "okay";
190 };
191
192 -&gpu {
193 - mali-supply = <&vdd_gpu>;
194 - status = "okay";
195 -};
196 -
197 -&hdmi {
198 - avdd-0v9-supply = <&vdda0v9_image>;
199 - avdd-1v8-supply = <&vcca1v8_image>;
200 - status = "okay";
201 -};
202 -
203 -&hdmi_in {
204 - hdmi_in_vp0: endpoint {
205 - remote-endpoint = <&vp0_out_hdmi>;
206 - };
207 -};
208 -
209 -&hdmi_out {
210 - hdmi_out_con: endpoint {
211 - remote-endpoint = <&hdmi_con_in>;
212 - };
213 -};
214 -
215 -&hdmi_sound {
216 - status = "okay";
217 -};
218 -
219 -&i2c0 {
220 - status = "okay";
221 -
222 - vdd_cpu: regulator@1c {
223 - compatible = "tcs,tcs4525";
224 - reg = <0x1c>;
225 - fcs,suspend-voltage-selector = <1>;
226 - regulator-name = "vdd_cpu";
227 - regulator-always-on;
228 - regulator-boot-on;
229 - regulator-min-microvolt = <800000>;
230 - regulator-max-microvolt = <1150000>;
231 - regulator-ramp-delay = <2300>;
232 - vin-supply = <&vcc5v0_sys>;
233 -
234 - regulator-state-mem {
235 - regulator-off-in-suspend;
236 - };
237 - };
238 -
239 - rk809: pmic@20 {
240 - compatible = "rockchip,rk809";
241 - reg = <0x20>;
242 - interrupt-parent = <&gpio0>;
243 - interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
244 - #clock-cells = <1>;
245 - pinctrl-names = "default";
246 - pinctrl-0 = <&pmic_int>;
247 - rockchip,system-power-controller;
248 - vcc1-supply = <&vcc3v3_sys>;
249 - vcc2-supply = <&vcc3v3_sys>;
250 - vcc3-supply = <&vcc3v3_sys>;
251 - vcc4-supply = <&vcc3v3_sys>;
252 - vcc5-supply = <&vcc3v3_sys>;
253 - vcc6-supply = <&vcc3v3_sys>;
254 - vcc7-supply = <&vcc3v3_sys>;
255 - vcc8-supply = <&vcc3v3_sys>;
256 - vcc9-supply = <&vcc3v3_sys>;
257 - wakeup-source;
258 -
259 - regulators {
260 - vdd_logic: DCDC_REG1 {
261 - regulator-name = "vdd_logic";
262 - regulator-always-on;
263 - regulator-boot-on;
264 - regulator-init-microvolt = <900000>;
265 - regulator-initial-mode = <0x2>;
266 - regulator-min-microvolt = <500000>;
267 - regulator-max-microvolt = <1350000>;
268 - regulator-ramp-delay = <6001>;
269 -
270 - regulator-state-mem {
271 - regulator-off-in-suspend;
272 - };
273 - };
274 -
275 - vdd_gpu: DCDC_REG2 {
276 - regulator-name = "vdd_gpu";
277 - regulator-always-on;
278 - regulator-init-microvolt = <900000>;
279 - regulator-initial-mode = <0x2>;
280 - regulator-min-microvolt = <500000>;
281 - regulator-max-microvolt = <1350000>;
282 - regulator-ramp-delay = <6001>;
283 -
284 - regulator-state-mem {
285 - regulator-off-in-suspend;
286 - };
287 - };
288 -
289 - vcc_ddr: DCDC_REG3 {
290 - regulator-name = "vcc_ddr";
291 - regulator-always-on;
292 - regulator-boot-on;
293 - regulator-initial-mode = <0x2>;
294 -
295 - regulator-state-mem {
296 - regulator-on-in-suspend;
297 - };
298 - };
299 -
300 - vdd_npu: DCDC_REG4 {
301 - regulator-name = "vdd_npu";
302 - regulator-init-microvolt = <900000>;
303 - regulator-initial-mode = <0x2>;
304 - regulator-min-microvolt = <500000>;
305 - regulator-max-microvolt = <1350000>;
306 - regulator-ramp-delay = <6001>;
307 -
308 - regulator-state-mem {
309 - regulator-off-in-suspend;
310 - };
311 - };
312 -
313 - vcc_1v8: DCDC_REG5 {
314 - regulator-name = "vcc_1v8";
315 - regulator-always-on;
316 - regulator-boot-on;
317 - regulator-min-microvolt = <1800000>;
318 - regulator-max-microvolt = <1800000>;
319 -
320 - regulator-state-mem {
321 - regulator-off-in-suspend;
322 - };
323 - };
324 -
325 - vdda0v9_image: LDO_REG1 {
326 - regulator-name = "vdda0v9_image";
327 - regulator-min-microvolt = <950000>;
328 - regulator-max-microvolt = <950000>;
329 -
330 - regulator-state-mem {
331 - regulator-off-in-suspend;
332 - };
333 - };
334 -
335 - vdda_0v9: LDO_REG2 {
336 - regulator-name = "vdda_0v9";
337 - regulator-always-on;
338 - regulator-boot-on;
339 - regulator-min-microvolt = <900000>;
340 - regulator-max-microvolt = <900000>;
341 -
342 - regulator-state-mem {
343 - regulator-off-in-suspend;
344 - };
345 - };
346 -
347 - vdda0v9_pmu: LDO_REG3 {
348 - regulator-name = "vdda0v9_pmu";
349 - regulator-always-on;
350 - regulator-boot-on;
351 - regulator-min-microvolt = <900000>;
352 - regulator-max-microvolt = <900000>;
353 -
354 - regulator-state-mem {
355 - regulator-on-in-suspend;
356 - regulator-suspend-microvolt = <900000>;
357 - };
358 - };
359 -
360 - vccio_acodec: LDO_REG4 {
361 - regulator-name = "vccio_acodec";
362 - regulator-always-on;
363 - regulator-min-microvolt = <3300000>;
364 - regulator-max-microvolt = <3300000>;
365 -
366 - regulator-state-mem {
367 - regulator-off-in-suspend;
368 - };
369 - };
370 -
371 - vccio_sd: LDO_REG5 {
372 - regulator-name = "vccio_sd";
373 - regulator-min-microvolt = <1800000>;
374 - regulator-max-microvolt = <3300000>;
375 -
376 - regulator-state-mem {
377 - regulator-off-in-suspend;
378 - };
379 - };
380 -
381 - vcc3v3_pmu: LDO_REG6 {
382 - regulator-name = "vcc3v3_pmu";
383 - regulator-always-on;
384 - regulator-boot-on;
385 - regulator-min-microvolt = <3300000>;
386 - regulator-max-microvolt = <3300000>;
387 -
388 - regulator-state-mem {
389 - regulator-on-in-suspend;
390 - regulator-suspend-microvolt = <3300000>;
391 - };
392 - };
393 -
394 - vcca_1v8: LDO_REG7 {
395 - regulator-name = "vcca_1v8";
396 - regulator-always-on;
397 - regulator-boot-on;
398 - regulator-min-microvolt = <1800000>;
399 - regulator-max-microvolt = <1800000>;
400 -
401 - regulator-state-mem {
402 - regulator-off-in-suspend;
403 - };
404 - };
405 -
406 - vcca1v8_pmu: LDO_REG8 {
407 - regulator-name = "vcca1v8_pmu";
408 - regulator-always-on;
409 - regulator-boot-on;
410 - regulator-min-microvolt = <1800000>;
411 - regulator-max-microvolt = <1800000>;
412 -
413 - regulator-state-mem {
414 - regulator-on-in-suspend;
415 - regulator-suspend-microvolt = <1800000>;
416 - };
417 - };
418 -
419 - vcca1v8_image: LDO_REG9 {
420 - regulator-name = "vcca1v8_image";
421 - regulator-min-microvolt = <1800000>;
422 - regulator-max-microvolt = <1800000>;
423 -
424 - regulator-state-mem {
425 - regulator-off-in-suspend;
426 - };
427 - };
428 -
429 - vcc_3v3: SWITCH_REG1 {
430 - regulator-name = "vcc_3v3";
431 - regulator-always-on;
432 - regulator-boot-on;
433 -
434 - regulator-state-mem {
435 - regulator-off-in-suspend;
436 - };
437 - };
438 -
439 - vcc3v3_sd: SWITCH_REG2 {
440 - regulator-name = "vcc3v3_sd";
441 - regulator-always-on;
442 - regulator-boot-on;
443 -
444 - regulator-state-mem {
445 - regulator-off-in-suspend;
446 - };
447 - };
448 - };
449 -
450 - };
451 -};
452 -
453 -&i2c5 {
454 - status = "okay";
455 -
456 - hym8563: rtc@51 {
457 - compatible = "haoyu,hym8563";
458 - reg = <0x51>;
459 - interrupt-parent = <&gpio0>;
460 - interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
461 - #clock-cells = <0>;
462 - clock-output-names = "rtcic_32kout";
463 - pinctrl-names = "default";
464 - pinctrl-0 = <&hym8563_int>;
465 - wakeup-source;
466 - };
467 -};
468 -
469 -&i2s0_8ch {
470 - status = "okay";
471 -};
472 -
473 -&i2s1_8ch {
474 - rockchip,trcm-sync-tx-only;
475 - status = "okay";
476 -};
477 -
478 &mdio0 {
479 rgmii_phy0: ethernet-phy@1 {
480 compatible = "ethernet-phy-ieee802.3-c22";
481 @@ -568,146 +136,5 @@
482 rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
483 };
484 };
485 -
486 - hym8563 {
487 - hym8563_int: hym8563-int {
488 - rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
489 - };
490 - };
491 -
492 - pmic {
493 - pmic_int: pmic-int {
494 - rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
495 - };
496 - };
497 -
498 - usb {
499 - vcc5v0_usb_host_en: vcc5v0-usb-host-en {
500 - rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
501 - };
502 -
503 - vcc5v0_usb_otg_en: vcc5v0-usb-otg-en {
504 - rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
505 - };
506 - };
507 -};
508 -
509 -&pmu_io_domains {
510 - pmuio1-supply = <&vcc3v3_pmu>;
511 - pmuio2-supply = <&vcc3v3_pmu>;
512 - vccio1-supply = <&vccio_acodec>;
513 - vccio3-supply = <&vccio_sd>;
514 - vccio4-supply = <&vcc_1v8>;
515 - vccio5-supply = <&vcc_3v3>;
516 - vccio6-supply = <&vcc_1v8>;
517 - vccio7-supply = <&vcc_3v3>;
518 - status = "okay";
519 -};
520 -
521 -&saradc {
522 - vref-supply = <&vcca_1v8>;
523 - status = "okay";
524 -};
525 -
526 -&sdhci {
527 - bus-width = <8>;
528 - max-frequency = <200000000>;
529 - non-removable;
530 - pinctrl-names = "default";
531 - pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
532 - status = "okay";
533 -};
534 -
535 -&sdmmc0 {
536 - max-frequency = <150000000>;
537 - no-sdio;
538 - no-mmc;
539 - bus-width = <4>;
540 - cap-mmc-highspeed;
541 - cap-sd-highspeed;
542 - disable-wp;
543 - vmmc-supply = <&vcc3v3_sd>;
544 - vqmmc-supply = <&vccio_sd>;
545 - pinctrl-names = "default";
546 - pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
547 - status = "okay";
548 -};
549 -
550 -&tsadc {
551 - rockchip,hw-tshut-mode = <1>;
552 - rockchip,hw-tshut-polarity = <0>;
553 - status = "okay";
554 -};
555 -
556 -&uart2 {
557 - status = "okay";
558 -};
559 -
560 -&usb_host0_ehci {
561 - status = "okay";
562 -};
563 -
564 -&usb_host0_ohci {
565 - status = "okay";
566 -};
567 -
568 -&usb_host0_xhci {
569 - extcon = <&usb2phy0>;
570 - dr_mode = "host";
571 - status = "okay";
572 -};
573 -
574 -&usb_host1_ehci {
575 - status = "okay";
576 -};
577 -
578 -&usb_host1_ohci {
579 - status = "okay";
580 };
581
582 -&usb_host1_xhci {
583 - status = "okay";
584 -};
585 -
586 -&usb2phy0 {
587 - status = "okay";
588 -};
589 -
590 -&usb2phy0_host {
591 - phy-supply = <&vcc5v0_usb_host>;
592 - status = "okay";
593 -};
594 -
595 -&usb2phy0_otg {
596 - status = "okay";
597 -};
598 -
599 -&usb2phy1 {
600 - status = "okay";
601 -};
602 -
603 -&usb2phy1_host {
604 - phy-supply = <&vcc5v0_usb_otg>;
605 - status = "okay";
606 -};
607 -
608 -&usb2phy1_otg {
609 - status = "okay";
610 -};
611 -
612 -&vop {
613 - assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
614 - assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
615 - status = "okay";
616 -};
617 -
618 -&vop_mmu {
619 - status = "okay";
620 -};
621 -
622 -&vp0 {
623 - vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
624 - reg = <ROCKCHIP_VOP2_EP_HDMI0>;
625 - remote-endpoint = <&hdmi_in_vp0>;
626 - };
627 -};
628 --- /dev/null
629 +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
630 @@ -0,0 +1,596 @@
631 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
632 +/*
633 + * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd.
634 + * (http://www.friendlyelec.com)
635 + *
636 + * Copyright (c) 2023 Tianling Shen <cnsztl@gmail.com>
637 + */
638 +
639 +/dts-v1/;
640 +#include <dt-bindings/gpio/gpio.h>
641 +#include <dt-bindings/input/input.h>
642 +#include <dt-bindings/leds/common.h>
643 +#include <dt-bindings/pinctrl/rockchip.h>
644 +#include <dt-bindings/soc/rockchip,vop2.h>
645 +#include "rk3568.dtsi"
646 +
647 +/ {
648 + aliases {
649 + mmc0 = &sdmmc0;
650 + mmc1 = &sdhci;
651 + };
652 +
653 + chosen: chosen {
654 + stdout-path = "serial2:1500000n8";
655 + };
656 +
657 + hdmi-con {
658 + compatible = "hdmi-connector";
659 + type = "a";
660 +
661 + port {
662 + hdmi_con_in: endpoint {
663 + remote-endpoint = <&hdmi_out_con>;
664 + };
665 + };
666 + };
667 +
668 + vdd_usbc: vdd-usbc-regulator {
669 + compatible = "regulator-fixed";
670 + regulator-name = "vdd_usbc";
671 + regulator-always-on;
672 + regulator-boot-on;
673 + regulator-min-microvolt = <5000000>;
674 + regulator-max-microvolt = <5000000>;
675 + };
676 +
677 + vcc3v3_sys: vcc3v3-sys-regulator {
678 + compatible = "regulator-fixed";
679 + regulator-name = "vcc3v3_sys";
680 + regulator-always-on;
681 + regulator-boot-on;
682 + regulator-min-microvolt = <3300000>;
683 + regulator-max-microvolt = <3300000>;
684 + vin-supply = <&vdd_usbc>;
685 + };
686 +
687 + vcc5v0_sys: vcc5v0-sys-regulator {
688 + compatible = "regulator-fixed";
689 + regulator-name = "vcc5v0_sys";
690 + regulator-always-on;
691 + regulator-boot-on;
692 + regulator-min-microvolt = <5000000>;
693 + regulator-max-microvolt = <5000000>;
694 + vin-supply = <&vdd_usbc>;
695 + };
696 +
697 + vcc3v3_pcie: vcc3v3-pcie-regulator {
698 + compatible = "regulator-fixed";
699 + regulator-name = "vcc3v3_pcie";
700 + regulator-min-microvolt = <3300000>;
701 + regulator-max-microvolt = <3300000>;
702 + enable-active-high;
703 + gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
704 + startup-delay-us = <200000>;
705 + vin-supply = <&vcc5v0_sys>;
706 + };
707 +
708 + vcc5v0_usb: vcc5v0-usb-regulator {
709 + compatible = "regulator-fixed";
710 + regulator-name = "vcc5v0_usb";
711 + regulator-always-on;
712 + regulator-boot-on;
713 + regulator-min-microvolt = <5000000>;
714 + regulator-max-microvolt = <5000000>;
715 + vin-supply = <&vdd_usbc>;
716 + };
717 +
718 + vcc5v0_usb_host: vcc5v0-usb-host-regulator {
719 + compatible = "regulator-fixed";
720 + enable-active-high;
721 + gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
722 + pinctrl-names = "default";
723 + pinctrl-0 = <&vcc5v0_usb_host_en>;
724 + regulator-name = "vcc5v0_usb_host";
725 + regulator-always-on;
726 + regulator-boot-on;
727 + regulator-min-microvolt = <5000000>;
728 + regulator-max-microvolt = <5000000>;
729 + vin-supply = <&vcc5v0_usb>;
730 + };
731 +
732 + vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
733 + compatible = "regulator-fixed";
734 + enable-active-high;
735 + gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
736 + pinctrl-names = "default";
737 + pinctrl-0 = <&vcc5v0_usb_otg_en>;
738 + regulator-name = "vcc5v0_usb_otg";
739 + regulator-min-microvolt = <5000000>;
740 + regulator-max-microvolt = <5000000>;
741 + vin-supply = <&vcc5v0_usb>;
742 + };
743 +
744 + pcie30_avdd0v9: pcie30-avdd0v9-regulator {
745 + compatible = "regulator-fixed";
746 + regulator-name = "pcie30_avdd0v9";
747 + regulator-always-on;
748 + regulator-boot-on;
749 + regulator-min-microvolt = <900000>;
750 + regulator-max-microvolt = <900000>;
751 + vin-supply = <&vcc3v3_sys>;
752 + };
753 +
754 + pcie30_avdd1v8: pcie30-avdd1v8-regulator {
755 + compatible = "regulator-fixed";
756 + regulator-name = "pcie30_avdd1v8";
757 + regulator-always-on;
758 + regulator-boot-on;
759 + regulator-min-microvolt = <1800000>;
760 + regulator-max-microvolt = <1800000>;
761 + vin-supply = <&vcc3v3_sys>;
762 + };
763 +};
764 +
765 +&combphy0 {
766 + status = "okay";
767 +};
768 +
769 +&combphy1 {
770 + status = "okay";
771 +};
772 +
773 +&combphy2 {
774 + status = "okay";
775 +};
776 +
777 +&cpu0 {
778 + cpu-supply = <&vdd_cpu>;
779 +};
780 +
781 +&cpu1 {
782 + cpu-supply = <&vdd_cpu>;
783 +};
784 +
785 +&cpu2 {
786 + cpu-supply = <&vdd_cpu>;
787 +};
788 +
789 +&cpu3 {
790 + cpu-supply = <&vdd_cpu>;
791 +};
792 +
793 +&gpu {
794 + mali-supply = <&vdd_gpu>;
795 + status = "okay";
796 +};
797 +
798 +&hdmi {
799 + avdd-0v9-supply = <&vdda0v9_image>;
800 + avdd-1v8-supply = <&vcca1v8_image>;
801 + status = "okay";
802 +};
803 +
804 +&hdmi_in {
805 + hdmi_in_vp0: endpoint {
806 + remote-endpoint = <&vp0_out_hdmi>;
807 + };
808 +};
809 +
810 +&hdmi_out {
811 + hdmi_out_con: endpoint {
812 + remote-endpoint = <&hdmi_con_in>;
813 + };
814 +};
815 +
816 +&hdmi_sound {
817 + status = "okay";
818 +};
819 +
820 +&i2c0 {
821 + status = "okay";
822 +
823 + vdd_cpu: regulator@1c {
824 + compatible = "tcs,tcs4525";
825 + reg = <0x1c>;
826 + fcs,suspend-voltage-selector = <1>;
827 + regulator-name = "vdd_cpu";
828 + regulator-always-on;
829 + regulator-boot-on;
830 + regulator-min-microvolt = <800000>;
831 + regulator-max-microvolt = <1150000>;
832 + regulator-ramp-delay = <2300>;
833 + vin-supply = <&vcc5v0_sys>;
834 +
835 + regulator-state-mem {
836 + regulator-off-in-suspend;
837 + };
838 + };
839 +
840 + rk809: pmic@20 {
841 + compatible = "rockchip,rk809";
842 + reg = <0x20>;
843 + interrupt-parent = <&gpio0>;
844 + interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
845 + #clock-cells = <1>;
846 + pinctrl-names = "default";
847 + pinctrl-0 = <&pmic_int>;
848 + rockchip,system-power-controller;
849 + vcc1-supply = <&vcc3v3_sys>;
850 + vcc2-supply = <&vcc3v3_sys>;
851 + vcc3-supply = <&vcc3v3_sys>;
852 + vcc4-supply = <&vcc3v3_sys>;
853 + vcc5-supply = <&vcc3v3_sys>;
854 + vcc6-supply = <&vcc3v3_sys>;
855 + vcc7-supply = <&vcc3v3_sys>;
856 + vcc8-supply = <&vcc3v3_sys>;
857 + vcc9-supply = <&vcc3v3_sys>;
858 + wakeup-source;
859 +
860 + regulators {
861 + vdd_logic: DCDC_REG1 {
862 + regulator-name = "vdd_logic";
863 + regulator-always-on;
864 + regulator-boot-on;
865 + regulator-init-microvolt = <900000>;
866 + regulator-initial-mode = <0x2>;
867 + regulator-min-microvolt = <500000>;
868 + regulator-max-microvolt = <1350000>;
869 + regulator-ramp-delay = <6001>;
870 +
871 + regulator-state-mem {
872 + regulator-off-in-suspend;
873 + };
874 + };
875 +
876 + vdd_gpu: DCDC_REG2 {
877 + regulator-name = "vdd_gpu";
878 + regulator-always-on;
879 + regulator-init-microvolt = <900000>;
880 + regulator-initial-mode = <0x2>;
881 + regulator-min-microvolt = <500000>;
882 + regulator-max-microvolt = <1350000>;
883 + regulator-ramp-delay = <6001>;
884 +
885 + regulator-state-mem {
886 + regulator-off-in-suspend;
887 + };
888 + };
889 +
890 + vcc_ddr: DCDC_REG3 {
891 + regulator-name = "vcc_ddr";
892 + regulator-always-on;
893 + regulator-boot-on;
894 + regulator-initial-mode = <0x2>;
895 +
896 + regulator-state-mem {
897 + regulator-on-in-suspend;
898 + };
899 + };
900 +
901 + vdd_npu: DCDC_REG4 {
902 + regulator-name = "vdd_npu";
903 + regulator-init-microvolt = <900000>;
904 + regulator-initial-mode = <0x2>;
905 + regulator-min-microvolt = <500000>;
906 + regulator-max-microvolt = <1350000>;
907 + regulator-ramp-delay = <6001>;
908 +
909 + regulator-state-mem {
910 + regulator-off-in-suspend;
911 + };
912 + };
913 +
914 + vcc_1v8: DCDC_REG5 {
915 + regulator-name = "vcc_1v8";
916 + regulator-always-on;
917 + regulator-boot-on;
918 + regulator-min-microvolt = <1800000>;
919 + regulator-max-microvolt = <1800000>;
920 +
921 + regulator-state-mem {
922 + regulator-off-in-suspend;
923 + };
924 + };
925 +
926 + vdda0v9_image: LDO_REG1 {
927 + regulator-name = "vdda0v9_image";
928 + regulator-min-microvolt = <950000>;
929 + regulator-max-microvolt = <950000>;
930 +
931 + regulator-state-mem {
932 + regulator-off-in-suspend;
933 + };
934 + };
935 +
936 + vdda_0v9: LDO_REG2 {
937 + regulator-name = "vdda_0v9";
938 + regulator-always-on;
939 + regulator-boot-on;
940 + regulator-min-microvolt = <900000>;
941 + regulator-max-microvolt = <900000>;
942 +
943 + regulator-state-mem {
944 + regulator-off-in-suspend;
945 + };
946 + };
947 +
948 + vdda0v9_pmu: LDO_REG3 {
949 + regulator-name = "vdda0v9_pmu";
950 + regulator-always-on;
951 + regulator-boot-on;
952 + regulator-min-microvolt = <900000>;
953 + regulator-max-microvolt = <900000>;
954 +
955 + regulator-state-mem {
956 + regulator-on-in-suspend;
957 + regulator-suspend-microvolt = <900000>;
958 + };
959 + };
960 +
961 + vccio_acodec: LDO_REG4 {
962 + regulator-name = "vccio_acodec";
963 + regulator-always-on;
964 + regulator-min-microvolt = <3300000>;
965 + regulator-max-microvolt = <3300000>;
966 +
967 + regulator-state-mem {
968 + regulator-off-in-suspend;
969 + };
970 + };
971 +
972 + vccio_sd: LDO_REG5 {
973 + regulator-name = "vccio_sd";
974 + regulator-min-microvolt = <1800000>;
975 + regulator-max-microvolt = <3300000>;
976 +
977 + regulator-state-mem {
978 + regulator-off-in-suspend;
979 + };
980 + };
981 +
982 + vcc3v3_pmu: LDO_REG6 {
983 + regulator-name = "vcc3v3_pmu";
984 + regulator-always-on;
985 + regulator-boot-on;
986 + regulator-min-microvolt = <3300000>;
987 + regulator-max-microvolt = <3300000>;
988 +
989 + regulator-state-mem {
990 + regulator-on-in-suspend;
991 + regulator-suspend-microvolt = <3300000>;
992 + };
993 + };
994 +
995 + vcca_1v8: LDO_REG7 {
996 + regulator-name = "vcca_1v8";
997 + regulator-always-on;
998 + regulator-boot-on;
999 + regulator-min-microvolt = <1800000>;
1000 + regulator-max-microvolt = <1800000>;
1001 +
1002 + regulator-state-mem {
1003 + regulator-off-in-suspend;
1004 + };
1005 + };
1006 +
1007 + vcca1v8_pmu: LDO_REG8 {
1008 + regulator-name = "vcca1v8_pmu";
1009 + regulator-always-on;
1010 + regulator-boot-on;
1011 + regulator-min-microvolt = <1800000>;
1012 + regulator-max-microvolt = <1800000>;
1013 +
1014 + regulator-state-mem {
1015 + regulator-on-in-suspend;
1016 + regulator-suspend-microvolt = <1800000>;
1017 + };
1018 + };
1019 +
1020 + vcca1v8_image: LDO_REG9 {
1021 + regulator-name = "vcca1v8_image";
1022 + regulator-min-microvolt = <1800000>;
1023 + regulator-max-microvolt = <1800000>;
1024 +
1025 + regulator-state-mem {
1026 + regulator-off-in-suspend;
1027 + };
1028 + };
1029 +
1030 + vcc_3v3: SWITCH_REG1 {
1031 + regulator-name = "vcc_3v3";
1032 + regulator-always-on;
1033 + regulator-boot-on;
1034 +
1035 + regulator-state-mem {
1036 + regulator-off-in-suspend;
1037 + };
1038 + };
1039 +
1040 + vcc3v3_sd: SWITCH_REG2 {
1041 + regulator-name = "vcc3v3_sd";
1042 + regulator-always-on;
1043 + regulator-boot-on;
1044 +
1045 + regulator-state-mem {
1046 + regulator-off-in-suspend;
1047 + };
1048 + };
1049 + };
1050 +
1051 + };
1052 +};
1053 +
1054 +&i2c5 {
1055 + status = "okay";
1056 +
1057 + hym8563: rtc@51 {
1058 + compatible = "haoyu,hym8563";
1059 + reg = <0x51>;
1060 + interrupt-parent = <&gpio0>;
1061 + interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
1062 + #clock-cells = <0>;
1063 + clock-output-names = "rtcic_32kout";
1064 + pinctrl-names = "default";
1065 + pinctrl-0 = <&hym8563_int>;
1066 + wakeup-source;
1067 + };
1068 +};
1069 +
1070 +&i2s0_8ch {
1071 + status = "okay";
1072 +};
1073 +
1074 +&i2s1_8ch {
1075 + rockchip,trcm-sync-tx-only;
1076 + status = "okay";
1077 +};
1078 +
1079 +&pcie30phy {
1080 + data-lanes = <1 2>;
1081 + status = "okay";
1082 +};
1083 +
1084 +&pinctrl {
1085 + hym8563 {
1086 + hym8563_int: hym8563-int {
1087 + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
1088 + };
1089 + };
1090 +
1091 + pmic {
1092 + pmic_int: pmic-int {
1093 + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
1094 + };
1095 + };
1096 +
1097 + usb {
1098 + vcc5v0_usb_host_en: vcc5v0-usb-host-en {
1099 + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
1100 + };
1101 +
1102 + vcc5v0_usb_otg_en: vcc5v0-usb-otg-en {
1103 + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
1104 + };
1105 + };
1106 +};
1107 +
1108 +&pmu_io_domains {
1109 + pmuio1-supply = <&vcc3v3_pmu>;
1110 + pmuio2-supply = <&vcc3v3_pmu>;
1111 + vccio1-supply = <&vccio_acodec>;
1112 + vccio3-supply = <&vccio_sd>;
1113 + vccio4-supply = <&vcc_1v8>;
1114 + vccio5-supply = <&vcc_3v3>;
1115 + vccio6-supply = <&vcc_1v8>;
1116 + vccio7-supply = <&vcc_3v3>;
1117 + status = "okay";
1118 +};
1119 +
1120 +&saradc {
1121 + vref-supply = <&vcca_1v8>;
1122 + status = "okay";
1123 +};
1124 +
1125 +&sdhci {
1126 + bus-width = <8>;
1127 + max-frequency = <200000000>;
1128 + non-removable;
1129 + pinctrl-names = "default";
1130 + pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
1131 + status = "okay";
1132 +};
1133 +
1134 +&sdmmc0 {
1135 + max-frequency = <150000000>;
1136 + no-sdio;
1137 + no-mmc;
1138 + bus-width = <4>;
1139 + cap-mmc-highspeed;
1140 + cap-sd-highspeed;
1141 + disable-wp;
1142 + vmmc-supply = <&vcc3v3_sd>;
1143 + vqmmc-supply = <&vccio_sd>;
1144 + pinctrl-names = "default";
1145 + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
1146 + status = "okay";
1147 +};
1148 +
1149 +&tsadc {
1150 + rockchip,hw-tshut-mode = <1>;
1151 + rockchip,hw-tshut-polarity = <0>;
1152 + status = "okay";
1153 +};
1154 +
1155 +&uart2 {
1156 + status = "okay";
1157 +};
1158 +
1159 +&usb_host0_ehci {
1160 + status = "okay";
1161 +};
1162 +
1163 +&usb_host0_ohci {
1164 + status = "okay";
1165 +};
1166 +
1167 +&usb_host0_xhci {
1168 + extcon = <&usb2phy0>;
1169 + dr_mode = "host";
1170 + status = "okay";
1171 +};
1172 +
1173 +&usb_host1_ehci {
1174 + status = "okay";
1175 +};
1176 +
1177 +&usb_host1_ohci {
1178 + status = "okay";
1179 +};
1180 +
1181 +&usb_host1_xhci {
1182 + status = "okay";
1183 +};
1184 +
1185 +&usb2phy0 {
1186 + status = "okay";
1187 +};
1188 +
1189 +&usb2phy0_host {
1190 + phy-supply = <&vcc5v0_usb_host>;
1191 + status = "okay";
1192 +};
1193 +
1194 +&usb2phy0_otg {
1195 + status = "okay";
1196 +};
1197 +
1198 +&usb2phy1 {
1199 + status = "okay";
1200 +};
1201 +
1202 +&usb2phy1_host {
1203 + phy-supply = <&vcc5v0_usb_otg>;
1204 + status = "okay";
1205 +};
1206 +
1207 +&usb2phy1_otg {
1208 + status = "okay";
1209 +};
1210 +
1211 +&vop {
1212 + assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
1213 + assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
1214 + status = "okay";
1215 +};
1216 +
1217 +&vop_mmu {
1218 + status = "okay";
1219 +};
1220 +
1221 +&vp0 {
1222 + vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
1223 + reg = <ROCKCHIP_VOP2_EP_HDMI0>;
1224 + remote-endpoint = <&hdmi_in_vp0>;
1225 + };
1226 +};