rockchip: backport dts changes for Radxa ROCK 5A
authorFUKAUMI Naoki <[email protected]>
Tue, 2 Sep 2025 02:42:43 +0000 (02:42 +0000)
committerHauke Mehrtens <[email protected]>
Sun, 7 Sep 2025 12:29:39 +0000 (14:29 +0200)
Backport dts changes up to Linux v6.17 for Radxa ROCK 5A.

Use power(green) LED instead of heartbeat(blue) LED.

Signed-off-by: FUKAUMI Naoki <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19867
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/rockchip/patches-6.12/001-01-v6.13-arm64-dts-rockchip-add-and-enable-gpu-node-for-Radxa.patch [new file with mode: 0644]
target/linux/rockchip/patches-6.12/001-02-v6.13-arm64-dts-rockchip-Enable-HDMI0-on-rock-5a.patch [new file with mode: 0644]
target/linux/rockchip/patches-6.12/001-03-v6.13-arm64-dts-rockchip-sort-rk3588s-rock5a-properly-in-M.patch [new file with mode: 0644]
target/linux/rockchip/patches-6.12/001-04-v6.13-arm64-dts-rockchip-adapt-regulator-nodenames-to-pref.patch [new file with mode: 0644]
target/linux/rockchip/patches-6.12/001-05-v6.15-arm64-dts-rockchip-Fix-label-name-of-hdptxphy-for-RK.patch [new file with mode: 0644]
target/linux/rockchip/patches-6.12/001-06-v6.15-arm64-dts-rockchip-Add-GPU-power-domain-regulator-de.patch [new file with mode: 0644]
target/linux/rockchip/patches-6.12/116-arm64-dts-rockchip-Update-LED-properties-for-Radxa-Ro.patch
target/linux/rockchip/patches-6.12/117-arm64-dts-rockchip-lower-mmc-speed-for-Radxa-Rock-5A.patch

diff --git a/target/linux/rockchip/patches-6.12/001-01-v6.13-arm64-dts-rockchip-add-and-enable-gpu-node-for-Radxa.patch b/target/linux/rockchip/patches-6.12/001-01-v6.13-arm64-dts-rockchip-add-and-enable-gpu-node-for-Radxa.patch
new file mode 100644 (file)
index 0000000..55cec3d
--- /dev/null
@@ -0,0 +1,25 @@
+From a98053d098c4ad91a45a3a55604d9574dfc6ffdb Mon Sep 17 00:00:00 2001
+From: FUKAUMI Naoki <[email protected]>
+Date: Sat, 19 Oct 2024 02:50:08 +0000
+Subject: arm64: dts: rockchip: add and enable gpu node for Radxa ROCK 5A
+
+add gpu node to make it usable on Radxa ROCK 5A.
+
+Signed-off-by: FUKAUMI Naoki <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+Signed-off-by: Heiko Stuebner <[email protected]>
+
+--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+@@ -166,6 +166,11 @@
+       cpu-supply = <&vdd_cpu_lit_s0>;
+ };
++&gpu {
++      mali-supply = <&vdd_gpu_s0>;
++      status = "okay";
++};
++
+ &i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0m2_xfer>;
diff --git a/target/linux/rockchip/patches-6.12/001-02-v6.13-arm64-dts-rockchip-Enable-HDMI0-on-rock-5a.patch b/target/linux/rockchip/patches-6.12/001-02-v6.13-arm64-dts-rockchip-Enable-HDMI0-on-rock-5a.patch
new file mode 100644 (file)
index 0000000..c305197
--- /dev/null
@@ -0,0 +1,90 @@
+From f57a8daf6bbd8e71f16693ad6d8421cb881c7fe0 Mon Sep 17 00:00:00 2001
+From: Cristian Ciocaltea <[email protected]>
+Date: Tue, 22 Oct 2024 19:04:42 +0300
+Subject: arm64: dts: rockchip: Enable HDMI0 on rock-5a
+
+Add the necessary DT changes to enable HDMI0 on Radxa ROCK 5A.
+
+Signed-off-by: Cristian Ciocaltea <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+Signed-off-by: Heiko Stuebner <[email protected]>
+
+--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+@@ -5,6 +5,7 @@
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/leds/common.h>
+ #include <dt-bindings/pinctrl/rockchip.h>
++#include <dt-bindings/soc/rockchip,vop2.h>
+ #include "rk3588s.dtsi"
+ / {
+@@ -35,6 +36,17 @@
+               stdout-path = "serial2:1500000n8";
+       };
++      hdmi0-con {
++              compatible = "hdmi-connector";
++              type = "d";
++
++              port {
++                      hdmi0_con_in: endpoint {
++                              remote-endpoint = <&hdmi0_out_con>;
++                      };
++              };
++      };
++
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+@@ -301,6 +313,31 @@
+       status = "okay";
+ };
++&hdmi0 {
++      pinctrl-names = "default";
++      pinctrl-0 = <&hdmim0_tx0_cec
++                   &hdmim1_tx0_hpd
++                   &hdmim0_tx0_scl
++                   &hdmim0_tx0_sda>;
++      status = "okay";
++};
++
++&hdmi0_in {
++      hdmi0_in_vp0: endpoint {
++              remote-endpoint = <&vp0_out_hdmi0>;
++      };
++};
++
++&hdmi0_out {
++      hdmi0_out_con: endpoint {
++              remote-endpoint = <&hdmi0_con_in>;
++      };
++};
++
++&hdptxphy_hdmi0 {
++      status = "okay";
++};
++
+ &mdio1 {
+       rgmii_phy1: ethernet-phy@1 {
+               /* RTL8211F */
+@@ -793,3 +830,18 @@
+ &usb_host2_xhci {
+       status = "okay";
+ };
++
++&vop_mmu {
++      status = "okay";
++};
++
++&vop {
++      status = "okay";
++};
++
++&vp0 {
++      vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
++              reg = <ROCKCHIP_VOP2_EP_HDMI0>;
++              remote-endpoint = <&hdmi0_in_vp0>;
++      };
++};
diff --git a/target/linux/rockchip/patches-6.12/001-03-v6.13-arm64-dts-rockchip-sort-rk3588s-rock5a-properly-in-M.patch b/target/linux/rockchip/patches-6.12/001-03-v6.13-arm64-dts-rockchip-sort-rk3588s-rock5a-properly-in-M.patch
new file mode 100644 (file)
index 0000000..3cab321
--- /dev/null
@@ -0,0 +1,21 @@
+From 9f3360b42bb5b0c99073827a3dd81d2568b2a4ed Mon Sep 17 00:00:00 2001
+From: FUKAUMI Naoki <[email protected]>
+Date: Mon, 28 Oct 2024 07:23:44 +0000
+Subject: arm64: dts: rockchip: sort rk3588s-rock5a properly in Makefile
+
+sort target dtb files properly in Makefile for rockchip.
+
+Signed-off-by: FUKAUMI Naoki <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+Signed-off-by: Heiko Stuebner <[email protected]>
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -151,6 +151,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-i
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6s.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6c.dtb
+-dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-odroid-m2.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
diff --git a/target/linux/rockchip/patches-6.12/001-04-v6.13-arm64-dts-rockchip-adapt-regulator-nodenames-to-pref.patch b/target/linux/rockchip/patches-6.12/001-04-v6.13-arm64-dts-rockchip-adapt-regulator-nodenames-to-pref.patch
new file mode 100644 (file)
index 0000000..d485ebf
--- /dev/null
@@ -0,0 +1,72 @@
+From 5c96e63301978f4657c9082c55a066763c8db7b1 Mon Sep 17 00:00:00 2001
+From: Johan Jonker <[email protected]>
+Date: Sat, 5 Oct 2024 22:40:12 +0200
+Subject: arm64: dts: rockchip: adapt regulator nodenames to preferred form
+
+The preferred nodename for fixed-regulators has changed to
+pattern: '^regulator(-[0-9]+v[0-9]+|-[0-9a-z-]+)?$'
+
+Fix all Rockchip DT regulator nodenames.
+
+Signed-off-by: Johan Jonker <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+[adapted rebased on top of a number of other changes and included
+ neu6a-wifi + wolfvision-pf5-io-expander overlays]
+Signed-off-by: Heiko Stuebner <[email protected]>
+
+--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+@@ -68,7 +68,7 @@
+               #cooling-cells = <2>;
+       };
+-      vcc12v_dcin: vcc12v-dcin-regulator {
++      vcc12v_dcin: regulator-vcc12v-dcin {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc12v_dcin";
+               regulator-always-on;
+@@ -77,7 +77,7 @@
+               regulator-max-microvolt = <12000000>;
+       };
+-      vcc3v3_wf: vcc3v3-wf-regulator {
++      vcc3v3_wf: regulator-vcc3v3-wf {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3_wf";
+               regulator-min-microvolt = <3300000>;
+@@ -89,7 +89,7 @@
+               vin-supply = <&vcc5v0_sys>;
+       };
+-      vcc5v0_host: vcc5v0-host-regulator {
++      vcc5v0_host: regulator-vcc5v0-host {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc5v0_host";
+               regulator-boot-on;
+@@ -103,7 +103,7 @@
+               vin-supply = <&vcc5v0_sys>;
+       };
+-      vcc5v0_sys: vcc5v0-sys-regulator {
++      vcc5v0_sys: regulator-vcc5v0-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc5v0_sys";
+               regulator-always-on;
+@@ -113,7 +113,7 @@
+               vin-supply = <&vcc12v_dcin>;
+       };
+-      vcc_5v0: vcc-5v0-regulator {
++      vcc_5v0: regulator-vcc-5v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_5v0";
+               regulator-min-microvolt = <5000000>;
+@@ -127,7 +127,7 @@
+               vin-supply = <&vcc5v0_sys>;
+       };
+-      vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
++      vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_1v1_nldo_s3";
+               regulator-always-on;
diff --git a/target/linux/rockchip/patches-6.12/001-05-v6.15-arm64-dts-rockchip-Fix-label-name-of-hdptxphy-for-RK.patch b/target/linux/rockchip/patches-6.12/001-05-v6.15-arm64-dts-rockchip-Fix-label-name-of-hdptxphy-for-RK.patch
new file mode 100644 (file)
index 0000000..0e30195
--- /dev/null
@@ -0,0 +1,26 @@
+From 2efdb041019fd6c58abefba3eb6fdc4d659e576c Mon Sep 17 00:00:00 2001
+From: Damon Ding <[email protected]>
+Date: Thu, 6 Feb 2025 11:03:30 +0800
+Subject: arm64: dts: rockchip: Fix label name of hdptxphy for RK3588
+
+The hdptxphy is a combo transmit-PHY for HDMI2.1 TMDS Link, FRL Link, DP
+and eDP Link. Therefore, it is better to name it hdptxphy0 other than
+hdptxphy_hdmi0, which will be referenced by both hdmi0 and edp0 nodes.
+
+Signed-off-by: Damon Ding <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+[added armsom-sige7, where hdmi-support was added recently and also
+ the hdptxphy0-as-dclk source I just added]
+Signed-off-by: Heiko Stuebner <[email protected]>
+
+--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+@@ -334,7 +334,7 @@
+       };
+ };
+-&hdptxphy_hdmi0 {
++&hdptxphy0 {
+       status = "okay";
+ };
diff --git a/target/linux/rockchip/patches-6.12/001-06-v6.15-arm64-dts-rockchip-Add-GPU-power-domain-regulator-de.patch b/target/linux/rockchip/patches-6.12/001-06-v6.15-arm64-dts-rockchip-Add-GPU-power-domain-regulator-de.patch
new file mode 100644 (file)
index 0000000..c11bc86
--- /dev/null
@@ -0,0 +1,48 @@
+From f94500eb7328b35f3d0927635b1aba26c85ea4b0 Mon Sep 17 00:00:00 2001
+From: Sebastian Reichel <[email protected]>
+Date: Thu, 20 Feb 2025 19:58:11 +0100
+Subject: arm64: dts: rockchip: Add GPU power domain regulator dependency for
+ RK3588
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Enabling the GPU power domain requires that the GPU regulator is
+enabled. The regulator is enabled at boot time, but gets disabled
+automatically when there are no users.
+
+This means the system might run into a failure state hanging the
+whole system for the following use cases:
+
+ * if the GPU driver is being probed late (e.g. build as a
+   module and firmware is not in initramfs), the regulator
+   might already have been disabled. In that case the power
+   domain is enabled before the regulator.
+ * unbinding the GPU driver will disable the PM domain and
+   the regulator. When the driver is bound again, the PM
+   domain will be enabled before the regulator and error
+   appears.
+
+Avoid this by adding an explicit regulator dependency to the
+power domain.
+
+Tested-by: Heiko Stuebner <[email protected]>
+Reported-by: Adrián Martínez Larumbe <[email protected]>
+Tested-by: Adrian Larumbe <[email protected]> # On Rock 5B
+Signed-off-by: Sebastian Reichel <[email protected]>
+Link: https://lore.kernel.org/r/20250220-rk3588-gpu-pwr-domain-regulator-v6-8-a4f9c24e5b81@kernel.org
+Signed-off-by: Heiko Stuebner <[email protected]>
+
+--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+@@ -359,6 +359,10 @@
+       status = "okay";
+ };
++&pd_gpu {
++      domain-supply = <&vdd_gpu_s0>;
++};
++
+ &pinctrl {
+       leds {
+               io_led: io-led {
index c018f5f0ee33b51a3f64e0df63a1d72e2b495537..009c72992ce477f64945d5d415acb417e9010867 100644 (file)
@@ -11,24 +11,32 @@ Signed-off-by: Tianling Shen <[email protected]>
 
 --- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
 +++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
-@@ -15,6 +15,11 @@
+@@ -16,6 +16,10 @@
                ethernet0 = &gmac1;
                mmc0 = &sdhci;
                mmc1 = &sdmmc;
-+
-+              led-boot = &status_led;
-+              led-failsafe = &status_led;
-+              led-running = &status_led;
-+              led-upgrade = &status_led;
++              led-boot = &led_green;
++              led-failsafe = &led_green;
++              led-running = &led_green;
++              led-upgrade = &led_green;
        };
  
        analog-sound {
-@@ -40,11 +45,10 @@
+@@ -50,13 +54,19 @@
+       leds {
+               compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&io_led>;
+-              pinctrl-0 = <&io_led>;
++              pinctrl-0 = <&leds>;
++
++              led_green: led-0 {
++                      color = <LED_COLOR_ID_GREEN>;
++                      default-state = "on";
++                      function = LED_FUNCTION_POWER;
++                      gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
++              };
  
--              io-led {
-+              status_led: io-led {
+               io-led {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
@@ -36,3 +44,15 @@ Signed-off-by: Tianling Shen <[email protected]>
                };
        };
  
+@@ -365,8 +375,9 @@
+ &pinctrl {
+       leds {
+-              io_led: io-led {
+-                      rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
++              leds: leds {
++                      rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>,
++                                      <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
index c6fc2b21eb4020bec3df3f2f231cb24bf6c09a2f..46bb494e41ce2321921c4828aa37190deb56c002 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Tianling Shen <[email protected]>
 
 --- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
 +++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
-@@ -387,7 +387,7 @@
+@@ -440,7 +440,7 @@
        max-frequency = <150000000>;
        no-sdio;
        no-mmc;