1 From a0fb7eca9c099867596cbd1a44cc740882bdcbbe Mon Sep 17 00:00:00 2001
2 From: Stephen Chen <stephen@radxa.com>
3 Date: Tue, 18 Feb 2025 11:04:19 -0500
4 Subject: [PATCH] arm64: dts: rockchip: Add Radxa ROCK 4D device tree
6 The Radxa ROCK 4D board is based on the Rockchip rk3576 SoC.
8 The device tree adds support for basic devices:
15 It has 4 USB ports but only 3 are usable as the top left one is used
18 It has a USB-C port that is only used for powering the board.
20 Signed-off-by: Stephen Chen <stephen@radxa.com>
21 Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
22 Link: https://lore.kernel.org/r/20250218160714.140709-3-detlev.casanova@collabora.com
23 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
25 arch/arm64/boot/dts/rockchip/Makefile | 1 +
26 .../boot/dts/rockchip/rk3576-rock-4d.dts | 689 ++++++++++++++++++
27 2 files changed, 690 insertions(+)
28 create mode 100644 arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
30 --- a/arch/arm64/boot/dts/rockchip/Makefile
31 +++ b/arch/arm64/boot/dts/rockchip/Makefile
32 @@ -125,6 +125,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-ro
33 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5.dtb
34 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-display-vz.dtbo
35 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-io-expander.dtbo
36 +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-rock-4d.dtb
37 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3582-radxa-e52c.dtb
38 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-sige7.dtb
39 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-coolpi-cm5-evb.dtb
41 +++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
43 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
45 + * Copyright (c) 2024 Radxa Computer (Shenzhen) Co., Ltd.
50 +#include <dt-bindings/gpio/gpio.h>
51 +#include <dt-bindings/leds/common.h>
52 +#include <dt-bindings/pinctrl/rockchip.h>
53 +#include <dt-bindings/pwm/pwm.h>
54 +#include <dt-bindings/soc/rockchip,vop2.h>
55 +#include <dt-bindings/usb/pd.h>
56 +#include "rk3576.dtsi"
59 + model = "Radxa ROCK 4D";
60 + compatible = "radxa,rock-4d", "rockchip,rk3576";
68 + stdout-path = "serial0:1500000n8";
72 + compatible = "gpio-leds";
73 + pinctrl-names = "default";
74 + pinctrl-0 = <&led_rgb_g &led_rgb_r>;
77 + color = <LED_COLOR_ID_GREEN>;
78 + function = LED_FUNCTION_STATUS;
79 + gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
80 + linux,default-trigger = "default-on";
84 + color = <LED_COLOR_ID_BLUE>;
85 + function = LED_FUNCTION_HEARTBEAT;
86 + gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
87 + linux,default-trigger = "heartbeat";
91 + vcc_12v0_dcin: regulator-vcc-12v0-dcin {
92 + compatible = "regulator-fixed";
93 + regulator-always-on;
95 + regulator-min-microvolt = <12000000>;
96 + regulator-max-microvolt = <12000000>;
97 + regulator-name = "vcc_12v0_dcin";
100 + vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
101 + compatible = "regulator-fixed";
102 + regulator-always-on;
104 + regulator-min-microvolt = <1100000>;
105 + regulator-max-microvolt = <1100000>;
106 + regulator-name = "vcc_1v1_nldo_s3";
107 + vin-supply = <&vcc_5v0_sys>;
110 + vcc_1v2_ufs_vccq_s0: regulator-vcc-1v2-ufs-vccq-s0 {
111 + compatible = "regulator-fixed";
112 + regulator-always-on;
114 + regulator-min-microvolt = <1200000>;
115 + regulator-max-microvolt = <1200000>;
116 + regulator-name = "vcc_1v2_ufs_vccq_s0";
117 + vin-supply = <&vcc_5v0_sys>;
120 + vcc_1v8_s0: regulator-vcc-1v8-s0 {
121 + compatible = "regulator-fixed";
122 + regulator-always-on;
124 + regulator-min-microvolt = <1800000>;
125 + regulator-max-microvolt = <1800000>;
126 + regulator-name = "vcc_1v8_s0";
127 + vin-supply = <&vcc_1v8_s3>;
130 + vcc_1v8_ufs_vccq2_s0: regulator-vcc-1v8-ufs-vccq2-s0 {
131 + compatible = "regulator-fixed";
132 + regulator-always-on;
134 + regulator-min-microvolt = <1800000>;
135 + regulator-max-microvolt = <1800000>;
136 + regulator-name = "vcc_1v8_ufs_vccq2_s0";
137 + vin-supply = <&vcc_1v8_s3>;
140 + vcc_2v0_pldo_s3: regulator-vcc-2v0-pldo-s3 {
141 + compatible = "regulator-fixed";
142 + regulator-always-on;
144 + regulator-min-microvolt = <2000000>;
145 + regulator-max-microvolt = <2000000>;
146 + regulator-name = "vcc_2v0_pldo_s3";
147 + vin-supply = <&vcc_5v0_sys>;
150 + vcc_3v3_pcie: regulator-vcc-3v3-pcie {
151 + compatible = "regulator-fixed";
152 + enable-active-high;
153 + gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
154 + pinctrl-names = "default";
155 + pinctrl-0 = <&pcie_pwren>;
156 + regulator-min-microvolt = <3300000>;
157 + regulator-max-microvolt = <3300000>;
158 + regulator-name = "vcc_3v3_pcie";
159 + startup-delay-us = <5000>;
160 + vin-supply = <&vcc_5v0_sys>;
163 + vcc_3v3_rtc_s5: regulator-vcc-3v3-rtc-s5 {
164 + compatible = "regulator-fixed";
165 + regulator-always-on;
167 + regulator-min-microvolt = <3300000>;
168 + regulator-max-microvolt = <3300000>;
169 + regulator-name = "vcc_3v3_rtc_s5";
170 + vin-supply = <&vcc_5v0_sys>;
173 + vcc_3v3_s0: regulator-vcc-3v3-s0 {
174 + compatible = "regulator-fixed";
175 + regulator-always-on;
177 + regulator-min-microvolt = <3300000>;
178 + regulator-max-microvolt = <3300000>;
179 + regulator-name = "vcc_3v3_s0";
180 + vin-supply = <&vcc_3v3_s3>;
183 + vcc_3v3_ufs_s0: regulator-vcc-ufs-s0 {
184 + compatible = "regulator-fixed";
185 + regulator-always-on;
187 + regulator-min-microvolt = <3300000>;
188 + regulator-max-microvolt = <3300000>;
189 + regulator-name = "vcc_3v3_ufs_s0";
190 + vin-supply = <&vcc_5v0_sys>;
193 + vcc_5v0_device: regulator-vcc-5v0-device {
194 + compatible = "regulator-fixed";
195 + regulator-always-on;
197 + regulator-min-microvolt = <5000000>;
198 + regulator-max-microvolt = <5000000>;
199 + regulator-name = "vcc_5v0_device";
200 + vin-supply = <&vcc_12v0_dcin>;
203 + vcc_5v0_host: regulator-vcc-5v0-host {
204 + compatible = "regulator-fixed";
205 + enable-active-high;
206 + gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
207 + pinctrl-names = "default";
208 + pinctrl-0 = <&usb_host_pwren>;
209 + regulator-always-on;
211 + regulator-min-microvolt = <5000000>;
212 + regulator-max-microvolt = <5000000>;
213 + regulator-name = "vcc5v0_host";
214 + vin-supply = <&vcc_5v0_device>;
217 + vcc_5v0_sys: regulator-vcc-5v0-sys {
218 + compatible = "regulator-fixed";
219 + regulator-always-on;
221 + regulator-min-microvolt = <5000000>;
222 + regulator-max-microvolt = <5000000>;
223 + regulator-name = "vcc_5v0_sys";
224 + vin-supply = <&vcc_12v0_dcin>;
233 + cpu-supply = <&vdd_cpu_big_s0>;
237 + cpu-supply = <&vdd_cpu_big_s0>;
241 + cpu-supply = <&vdd_cpu_big_s0>;
245 + cpu-supply = <&vdd_cpu_big_s0>;
249 + cpu-supply = <&vdd_cpu_lit_s0>;
253 + cpu-supply = <&vdd_cpu_lit_s0>;
257 + cpu-supply = <&vdd_cpu_lit_s0>;
261 + cpu-supply = <&vdd_cpu_lit_s0>;
265 + clock_in_out = "output";
266 + phy-handle = <&rgmii_phy0>;
267 + phy-mode = "rgmii-id";
268 + pinctrl-names = "default";
269 + pinctrl-0 = <ð0m0_miim
274 + ðm0_clk0_25m_out>;
279 + mali-supply = <&vdd_gpu_s0>;
287 + compatible = "rockchip,rk806";
291 + interrupt-parent = <&gpio0>;
292 + interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
293 + pinctrl-names = "default";
294 + pinctrl-0 = <&pmic_pins
298 + system-power-controller;
299 + vcc1-supply = <&vcc_5v0_sys>;
300 + vcc2-supply = <&vcc_5v0_sys>;
301 + vcc3-supply = <&vcc_5v0_sys>;
302 + vcc4-supply = <&vcc_5v0_sys>;
303 + vcc5-supply = <&vcc_5v0_sys>;
304 + vcc6-supply = <&vcc_5v0_sys>;
305 + vcc7-supply = <&vcc_5v0_sys>;
306 + vcc8-supply = <&vcc_5v0_sys>;
307 + vcc9-supply = <&vcc_5v0_sys>;
308 + vcc10-supply = <&vcc_5v0_sys>;
309 + vcc11-supply = <&vcc_2v0_pldo_s3>;
310 + vcc12-supply = <&vcc_5v0_sys>;
311 + vcc13-supply = <&vcc_1v1_nldo_s3>;
312 + vcc14-supply = <&vcc_1v1_nldo_s3>;
313 + vcca-supply = <&vcc_5v0_sys>;
315 + rk806_dvs1_null: dvs1-null-pins {
316 + pins = "gpio_pwrctrl1";
317 + function = "pin_fun0";
320 + rk806_dvs1_pwrdn: dvs1-pwrdn-pins {
321 + pins = "gpio_pwrctrl1";
322 + function = "pin_fun2";
325 + rk806_dvs1_rst: dvs1-rst-pins {
326 + pins = "gpio_pwrctrl1";
327 + function = "pin_fun3";
330 + rk806_dvs1_slp: dvs1-slp-pins {
331 + pins = "gpio_pwrctrl1";
332 + function = "pin_fun1";
335 + rk806_dvs2_dvs: dvs2-dvs-pins {
336 + pins = "gpio_pwrctrl2";
337 + function = "pin_fun4";
340 + rk806_dvs2_gpio: dvs2-gpio-pins {
341 + pins = "gpio_pwrctrl2";
342 + function = "pin_fun5";
345 + rk806_dvs2_null: dvs2-null-pins {
346 + pins = "gpio_pwrctrl2";
347 + function = "pin_fun0";
350 + rk806_dvs2_pwrdn: dvs2-pwrdn-pins {
351 + pins = "gpio_pwrctrl2";
352 + function = "pin_fun2";
355 + rk806_dvs2_rst: dvs2-rst-pins {
356 + pins = "gpio_pwrctrl2";
357 + function = "pin_fun3";
360 + rk806_dvs2_slp: dvs2-slp-pins {
361 + pins = "gpio_pwrctrl2";
362 + function = "pin_fun1";
365 + rk806_dvs3_dvs: dvs3-dvs-pins {
366 + pins = "gpio_pwrctrl3";
367 + function = "pin_fun4";
370 + rk806_dvs3_gpio: dvs3-gpio-pins {
371 + pins = "gpio_pwrctrl3";
372 + function = "pin_fun5";
375 + rk806_dvs3_null: dvs3-null-pins {
376 + pins = "gpio_pwrctrl3";
377 + function = "pin_fun0";
380 + rk806_dvs3_pwrdn: dvs3-pwrdn-pins {
381 + pins = "gpio_pwrctrl3";
382 + function = "pin_fun2";
385 + rk806_dvs3_rst: dvs3-rst-pins {
386 + pins = "gpio_pwrctrl3";
387 + function = "pin_fun3";
390 + rk806_dvs3_slp: dvs3-slp-pins {
391 + pins = "gpio_pwrctrl3";
392 + function = "pin_fun1";
396 + vdd_cpu_big_s0: dcdc-reg1 {
397 + regulator-always-on;
399 + regulator-enable-ramp-delay = <400>;
400 + regulator-min-microvolt = <550000>;
401 + regulator-max-microvolt = <950000>;
402 + regulator-name = "vdd_cpu_big_s0";
403 + regulator-ramp-delay = <12500>;
404 + regulator-state-mem {
405 + regulator-off-in-suspend;
409 + vdd_npu_s0: dcdc-reg2 {
411 + regulator-enable-ramp-delay = <400>;
412 + regulator-min-microvolt = <550000>;
413 + regulator-max-microvolt = <950000>;
414 + regulator-name = "vdd_npu_s0";
415 + regulator-ramp-delay = <12500>;
416 + regulator-state-mem {
417 + regulator-off-in-suspend;
421 + vdd_cpu_lit_s0: dcdc-reg3 {
422 + regulator-always-on;
424 + regulator-min-microvolt = <550000>;
425 + regulator-max-microvolt = <950000>;
426 + regulator-name = "vdd_cpu_lit_s0";
427 + regulator-ramp-delay = <12500>;
428 + regulator-state-mem {
429 + regulator-off-in-suspend;
430 + regulator-suspend-microvolt = <750000>;
434 + vcc_3v3_s3: dcdc-reg4 {
435 + regulator-always-on;
437 + regulator-min-microvolt = <3300000>;
438 + regulator-max-microvolt = <3300000>;
439 + regulator-name = "vcc_3v3_s3";
440 + regulator-state-mem {
441 + regulator-on-in-suspend;
442 + regulator-suspend-microvolt = <3300000>;
446 + vdd_gpu_s0: dcdc-reg5 {
448 + regulator-enable-ramp-delay = <400>;
449 + regulator-min-microvolt = <550000>;
450 + regulator-max-microvolt = <900000>;
451 + regulator-name = "vdd_gpu_s0";
452 + regulator-ramp-delay = <12500>;
453 + regulator-state-mem {
454 + regulator-off-in-suspend;
455 + regulator-suspend-microvolt = <850000>;
459 + vddq_ddr_s0: dcdc-reg6 {
460 + regulator-always-on;
462 + regulator-name = "vddq_ddr_s0";
463 + regulator-state-mem {
464 + regulator-off-in-suspend;
468 + vdd_logic_s0: dcdc-reg7 {
469 + regulator-always-on;
471 + regulator-min-microvolt = <550000>;
472 + regulator-max-microvolt = <800000>;
473 + regulator-name = "vdd_logic_s0";
474 + regulator-state-mem {
475 + regulator-off-in-suspend;
479 + vcc_1v8_s3: dcdc-reg8 {
480 + regulator-always-on;
482 + regulator-min-microvolt = <1800000>;
483 + regulator-max-microvolt = <1800000>;
484 + regulator-name = "vcc_1v8_s3";
485 + regulator-state-mem {
486 + regulator-on-in-suspend;
487 + regulator-suspend-microvolt = <1800000>;
491 + vdd2_ddr_s3: dcdc-reg9 {
492 + regulator-always-on;
494 + regulator-name = "vdd2_ddr_s3";
495 + regulator-state-mem {
496 + regulator-on-in-suspend;
500 + vdd_ddr_s0: dcdc-reg10 {
501 + regulator-always-on;
503 + regulator-min-microvolt = <550000>;
504 + regulator-max-microvolt = <1200000>;
505 + regulator-name = "vdd_ddr_s0";
506 + regulator-state-mem {
507 + regulator-off-in-suspend;
511 + vcca_1v8_s0: pldo-reg1 {
512 + regulator-always-on;
514 + regulator-min-microvolt = <1800000>;
515 + regulator-max-microvolt = <1800000>;
516 + regulator-name = "vcca_1v8_s0";
517 + regulator-state-mem {
518 + regulator-off-in-suspend;
522 + vcca1v8_pldo2_s0: pldo-reg2 {
523 + regulator-always-on;
525 + regulator-min-microvolt = <1800000>;
526 + regulator-max-microvolt = <1800000>;
527 + regulator-name = "vcca1v8_pldo2_s0";
528 + regulator-state-mem {
529 + regulator-off-in-suspend;
533 + vdda_1v2_s0: pldo-reg3 {
534 + regulator-always-on;
536 + regulator-min-microvolt = <1200000>;
537 + regulator-max-microvolt = <1200000>;
538 + regulator-name = "vdda_1v2_s0";
539 + regulator-state-mem {
540 + regulator-off-in-suspend;
544 + vcca_3v3_s0: pldo-reg4 {
545 + regulator-always-on;
547 + regulator-min-microvolt = <3300000>;
548 + regulator-max-microvolt = <3300000>;
549 + regulator-name = "vcca_3v3_s0";
550 + regulator-state-mem {
551 + regulator-off-in-suspend;
555 + vccio_sd_s0: pldo-reg5 {
556 + regulator-always-on;
558 + regulator-min-microvolt = <1800000>;
559 + regulator-max-microvolt = <3300000>;
560 + regulator-name = "vccio_sd_s0";
561 + regulator-state-mem {
562 + regulator-off-in-suspend;
566 + vcca1v8_pldo6_s3: pldo-reg6 {
567 + regulator-always-on;
569 + regulator-min-microvolt = <1800000>;
570 + regulator-max-microvolt = <1800000>;
571 + regulator-name = "vcca1v8_pldo6_s3";
572 + regulator-state-mem {
573 + regulator-on-in-suspend;
574 + regulator-suspend-microvolt = <1800000>;
578 + vdd_0v75_s3: nldo-reg1 {
579 + regulator-always-on;
581 + regulator-min-microvolt = <750000>;
582 + regulator-max-microvolt = <750000>;
583 + regulator-name = "vdd_0v75_s3";
584 + regulator-state-mem {
585 + regulator-on-in-suspend;
586 + regulator-suspend-microvolt = <750000>;
590 + vdda_ddr_pll_s0: nldo-reg2 {
591 + regulator-always-on;
593 + regulator-min-microvolt = <850000>;
594 + regulator-max-microvolt = <850000>;
595 + regulator-name = "vdda_ddr_pll_s0";
596 + regulator-state-mem {
597 + regulator-off-in-suspend;
601 + vdda0v75_hdmi_s0: nldo-reg3 {
602 + regulator-always-on;
604 + regulator-min-microvolt = <837500>;
605 + regulator-max-microvolt = <837500>;
606 + regulator-name = "vdda0v75_hdmi_s0";
607 + regulator-state-mem {
608 + regulator-off-in-suspend;
612 + vdda_0v85_s0: nldo-reg4 {
613 + regulator-always-on;
615 + regulator-min-microvolt = <850000>;
616 + regulator-max-microvolt = <850000>;
617 + regulator-name = "vdda_0v85_s0";
618 + regulator-state-mem {
619 + regulator-off-in-suspend;
623 + vdda_0v75_s0: nldo-reg5 {
624 + regulator-always-on;
626 + regulator-min-microvolt = <750000>;
627 + regulator-max-microvolt = <750000>;
628 + regulator-name = "vdda_0v75_s0";
629 + regulator-state-mem {
630 + regulator-off-in-suspend;
641 + compatible = "haoyu,hym8563";
643 + #clock-cells = <0>;
644 + clock-output-names = "hym8563";
645 + interrupt-parent = <&gpio0>;
646 + interrupts = <RK_PA0 IRQ_TYPE_LEVEL_LOW>;
647 + pinctrl-names = "default";
648 + pinctrl-0 = <&hym8563_int>;
654 + rgmii_phy0: ethernet-phy@1 {
655 + compatible = "ethernet-phy-ieee802.3-c22";
657 + clocks = <&cru REFCLKO25M_GMAC0_OUT>;
658 + pinctrl-names = "default";
659 + pinctrl-0 = <&rtl8211f_rst>;
660 + reset-assert-us = <20000>;
661 + reset-deassert-us = <100000>;
662 + reset-gpio = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
668 + hym8563_int: hym8563-int {
669 + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
674 + led_rgb_g: led-green-en {
675 + rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
677 + led_rgb_r: led-red-en {
678 + rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
683 + rtl8211f_rst: rtl8211f-rst {
684 + rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
689 + pcie_pwren: pcie-pwren {
690 + rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
695 + usb_host_pwren: usb-host-pwren {
696 + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
706 + max-frequency = <200000000>;
710 + vmmc-supply = <&vcc_3v3_s3>;
711 + vqmmc-supply = <&vccio_sd_s0>;
724 + pinctrl-0 = <&uart0m0_xfer>;