[openwrt/openwrt] rockchip: add Radxa E20C support

LEDE Commits lede-commits at lists.infradead.org
Sat Nov 15 11:26:15 PST 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/da08958a307713e6390160c44cbc352532bceca9

commit da08958a307713e6390160c44cbc352532bceca9
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Sat Oct 11 17:04:08 2025 +0800

    rockchip: add Radxa E20C support
    
    Hardware
    --------
    RockChip RK3528 ARM64 (4 cores)
    1/2/4GB LPDDR4 RAM
    2x 1000 Base-T
    3x LEDs (LAN / SYS / WAN)
    1x User button
    0/8/16/32/64GB eMMC on-board
    Micro-SD Slot
    USB 2.0 Port
    USB Type-C 5V2A Power
    
    Installation
    ------------
    Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
    internal eMMC using dd.
    
    Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
    Link: https://github.com/openwrt/openwrt/pull/20375
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../rockchip/armv8/base-files/etc/board.d/01_leds  |   3 +-
 .../armv8/base-files/etc/board.d/02_network        |   1 +
 .../etc/hotplug.d/net/40-net-smp-affinity          |   1 +
 target/linux/rockchip/image/armv8.mk               |  15 +++
 target/linux/rockchip/image/default.bootscript     |   2 +
 ...3-arm64-dts-rockchip-Add-Radxa-e20c-board.patch |  55 ++++++++++
 ...-rockchip-Add-uart0-pinctrl-to-Radxa-E20C.patch |  27 +++++
 ...-dts-rockchip-Add-leds-node-to-Radxa-E20C.patch |  81 ++++++++++++++
 ...ts-rockchip-Add-user-button-to-Radxa-E20C.patch |  60 +++++++++++
 ...rockchip-Add-maskrom-button-to-Radxa-E20C.patch |  89 +++++++++++++++
 ...ockchip-Enable-onboard-eMMC-on-Radxa-E20C.patch |  47 ++++++++
 ...ockchip-Add-onboard-EEPROM-for-Radxa-E20C.patch |  39 +++++++
 ...rockchip-Enable-regulators-for-Radxa-E20C.patch | 119 +++++++++++++++++++++
 ...ip-Enable-SD-card-interface-on-Radxa-E20C.patch |  75 +++++++++++++
 ...kchip-Enable-Ethernet-controller-on-Radxa.patch |  74 +++++++++++++
 ...hip-move-rk3528-i2c-uart-aliases-to-board.patch |  61 +++++++++++
 ...m64-dts-rockchip-Enable-GPU-on-Radxa-E20C.patch |  28 +++++
 ...chip-Enable-eMMC-HS200-mode-on-Radxa-E20C.patch |  28 +++++
 ...chip-Enable-PCIe-controller-on-Radxa-E20C.patch |  44 ++++++++
 ...chip-Update-LED-properties-for-Radxa-E20C.patch |  40 +++++++
 ...ckchip-Enable-USB-2-0-ports-on-Radxa-E20C.patch |  83 ++++++++++++++
 21 files changed, 971 insertions(+), 1 deletion(-)

diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
index cb7b7f5ec8..6b3d62d31f 100644
--- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
+++ b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
@@ -35,7 +35,8 @@ friendlyarm,nanopi-r6s)
 	ucidef_set_led_netdev "lan1" "LAN1" "green:lan-1" "eth2"
 	ucidef_set_led_netdev "lan2" "LAN2" "green:lan-2" "eth0"
 	;;
-friendlyarm,nanopi-r76s)
+friendlyarm,nanopi-r76s|\
+radxa,e20c)
 	ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
 	ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
 	;;
diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
index 9f8ca98bda..f5796bb8b1 100644
--- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
+++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
@@ -24,6 +24,7 @@ rockchip_setup_interfaces()
 	friendlyarm,nanopi-r5c|\
 	friendlyarm,nanopi-r76s|\
 	lunzn,fastrhino-r66s|\
+	radxa,e20c|\
 	radxa,e25|\
 	radxa,rock-3b)
 		ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
diff --git a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
index 86fd721c81..e758605ca7 100644
--- a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
+++ b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
@@ -34,6 +34,7 @@ friendlyarm,nanopi-r3s|\
 friendlyarm,nanopi-r5c|\
 linkease,easepi-r1|\
 lunzn,fastrhino-r66s|\
+radxa,e20c|\
 radxa,e25|\
 sinovoip,rk3568-bpi-r2pro)
 	set_interface_core 2 "eth0"
diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk
index 83b5951249..8e31bbfd15 100644
--- a/target/linux/rockchip/image/armv8.mk
+++ b/target/linux/rockchip/image/armv8.mk
@@ -17,6 +17,11 @@ define Device/rk3399
   KERNEL_LOADADDR := 0x03200000
 endef
 
+define Device/rk3528
+  SOC := rk3528
+  KERNEL_LOADADDR := 0x03000000
+endef
+
 define Device/rk3566
   SOC := rk3566
   KERNEL_LOADADDR := 0x03000000
@@ -216,6 +221,16 @@ define Device/radxa_cm3-io
 endef
 TARGET_DEVICES += radxa_cm3-io
 
+define Device/radxa_e20c
+  $(Device/rk3528)
+  DEVICE_VENDOR := Radxa
+  DEVICE_MODEL := E20C
+  DEVICE_DTS := rk3528-radxa-e20c
+  UBOOT_DEVICE_NAME := radxa-e20c-rk3528
+  DEVICE_PACKAGES := kmod-r8169
+endef
+TARGET_DEVICES += radxa_e20c
+
 define Device/radxa_e25
   $(Device/rk3568)
   DEVICE_VENDOR := Radxa
diff --git a/target/linux/rockchip/image/default.bootscript b/target/linux/rockchip/image/default.bootscript
index 0d825483c7..98dd32356b 100644
--- a/target/linux/rockchip/image/default.bootscript
+++ b/target/linux/rockchip/image/default.bootscript
@@ -10,6 +10,8 @@ elif test $stdout = 'serial at ff130000' ;
 then serial_addr=',0xff130000'; serial_port='ttyS2';
 elif test $stdout = 'serial at ff1a0000' ;
 then serial_addr=',0xff1a0000'; serial_port='ttyS2';
+elif test $stdout = 'serial at ff9f0000' ;
+then serial_addr=',0xff9f0000'; serial_port='ttyS0';
 fi;
 
 setenv bootargs "console=${serial_port},1500000 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait";
diff --git a/target/linux/rockchip/patches-6.12/071-01-v6.13-arm64-dts-rockchip-Add-Radxa-e20c-board.patch b/target/linux/rockchip/patches-6.12/071-01-v6.13-arm64-dts-rockchip-Add-Radxa-e20c-board.patch
new file mode 100644
index 0000000000..50cb1a8a80
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-01-v6.13-arm64-dts-rockchip-Add-Radxa-e20c-board.patch
@@ -0,0 +1,55 @@
+From 05910d497f903ea44d794de7155d0a3eeceb60e9 Mon Sep 17 00:00:00 2001
+From: Yao Zi <ziyao at disroot.org>
+Date: Thu, 29 Aug 2024 09:27:05 +0000
+Subject: [PATCH] arm64: dts: rockchip: Add Radxa e20c board
+
+Add board-level device tree for Radxa e20c board[1]. This basic
+implementation supports boot into a kernel with only UART console.
+Other features will be added later.
+
+[1]: https://docs.radxa.com/en/e/e20c
+
+Signed-off-by: Yao Zi <ziyao at disroot.org>
+Link: https://lore.kernel.org/r/20240829092705.6241-5-ziyao@disroot.org
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile         |  1 +
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 22 +++++++++++++++++++
+ 2 files changed, 23 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -76,6 +76,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-ro
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3528-radxa-e20c.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg-arc-d.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg-arc-s.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353p.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -0,0 +1,22 @@
++// SPDX-License-Identifier: GPL-2.0+
++/*
++ * Copyright (c) 2020 Rockchip Electronics Co., Ltd
++ * Copyright (c) 2024 Radxa Limited
++ * Copyright (c) 2024 Yao Zi <ziyao at disroot.org>
++ */
++
++/dts-v1/;
++#include "rk3528.dtsi"
++
++/ {
++	model = "Radxa E20C";
++	compatible = "radxa,e20c", "rockchip,rk3528";
++
++	chosen {
++		stdout-path = "serial0:1500000n8";
++	};
++};
++
++&uart0 {
++	status = "okay";
++};
diff --git a/target/linux/rockchip/patches-6.12/071-02-v6.15-arm64-dts-rockchip-Add-uart0-pinctrl-to-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-02-v6.15-arm64-dts-rockchip-Add-uart0-pinctrl-to-Radxa-E20C.patch
new file mode 100644
index 0000000000..689ce24bdc
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-02-v6.15-arm64-dts-rockchip-Add-uart0-pinctrl-to-Radxa-E20C.patch
@@ -0,0 +1,27 @@
+From 0d2312f0d3e4ce74af0977c1519a07dfc71a82ac Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Fri, 28 Feb 2025 06:40:11 +0000
+Subject: [PATCH] arm64: dts: rockchip: Add uart0 pinctrl to Radxa E20C
+
+Radxa E20C route UART0 M0 pins (GPIO4_C7 and GPIO4_D0) to the onboard
+CH340B for debug console use.
+
+Add pinctrl for UART0 M0 pins used for serial console.
+
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250228064024.3200000-6-jonas@kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -18,5 +18,7 @@
+ };
+ 
+ &uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0m0_xfer>;
+ 	status = "okay";
+ };
diff --git a/target/linux/rockchip/patches-6.12/071-03-v6.15-arm64-dts-rockchip-Add-leds-node-to-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-03-v6.15-arm64-dts-rockchip-Add-leds-node-to-Radxa-E20C.patch
new file mode 100644
index 0000000000..c6a3c6417f
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-03-v6.15-arm64-dts-rockchip-Add-leds-node-to-Radxa-E20C.patch
@@ -0,0 +1,81 @@
+From 6a709e003492e9878d5f1357be0b2e1162e1e6a6 Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Tue, 4 Mar 2025 20:16:34 +0000
+Subject: [PATCH] arm64: dts: rockchip: Add leds node to Radxa E20C
+
+Radxa E20C has three gpio controlled leds (sys, wan and lan).
+
+Add led nodes and set default trigger to heartbeat for the sys led and
+netdev for the lan and wan leds.
+
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250304201642.831218-2-jonas@kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 48 +++++++++++++++++++
+ 1 file changed, 48 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -6,6 +6,8 @@
+  */
+ 
+ /dts-v1/;
++
++#include <dt-bindings/leds/common.h>
+ #include "rk3528.dtsi"
+ 
+ / {
+@@ -15,6 +17,52 @@
+ 	chosen {
+ 		stdout-path = "serial0:1500000n8";
+ 	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&lan_led_g>, <&sys_led_g>, <&wan_led_g>;
++
++		led-lan {
++			color = <LED_COLOR_ID_GREEN>;
++			default-state = "off";
++			function = LED_FUNCTION_LAN;
++			gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "netdev";
++		};
++
++		led-sys {
++			color = <LED_COLOR_ID_GREEN>;
++			default-state = "on";
++			function = LED_FUNCTION_HEARTBEAT;
++			gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "heartbeat";
++		};
++
++		led-wan {
++			color = <LED_COLOR_ID_GREEN>;
++			default-state = "off";
++			function = LED_FUNCTION_WAN;
++			gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "netdev";
++		};
++	};
++};
++
++&pinctrl {
++	leds {
++		lan_led_g: lan-led-g {
++			rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		sys_led_g: sys-led-g {
++			rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		wan_led_g: wan-led-g {
++			rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
+ };
+ 
+ &uart0 {
diff --git a/target/linux/rockchip/patches-6.12/071-04-v6.15-arm64-dts-rockchip-Add-user-button-to-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-04-v6.15-arm64-dts-rockchip-Add-user-button-to-Radxa-E20C.patch
new file mode 100644
index 0000000000..436fbdb7ef
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-04-v6.15-arm64-dts-rockchip-Add-user-button-to-Radxa-E20C.patch
@@ -0,0 +1,60 @@
+From ad8afc8813567994164f2720189c819da8c22b99 Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Tue, 4 Mar 2025 20:16:35 +0000
+Subject: [PATCH] arm64: dts: rockchip: Add user button to Radxa E20C
+
+Radxa E20C has two buttons, one SARADC maskrom button and one GPIO user
+button.
+
+Add support for the user button using a gpio-keys node.
+
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250304201642.831218-3-jonas@kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 20 +++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -7,6 +7,7 @@
+ 
+ /dts-v1/;
+ 
++#include <dt-bindings/input/input.h>
+ #include <dt-bindings/leds/common.h>
+ #include "rk3528.dtsi"
+ 
+@@ -18,6 +19,19 @@
+ 		stdout-path = "serial0:1500000n8";
+ 	};
+ 
++	gpio-keys {
++		compatible = "gpio-keys";
++		pinctrl-names = "default";
++		pinctrl-0 = <&user_key>;
++
++		button-user {
++			gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
++			label = "USER";
++			linux,code = <BTN_1>;
++			wakeup-source;
++		};
++	};
++
+ 	leds {
+ 		compatible = "gpio-leds";
+ 		pinctrl-names = "default";
+@@ -50,6 +64,12 @@
+ };
+ 
+ &pinctrl {
++	gpio-keys {
++		user_key: user-key {
++			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
++		};
++	};
++
+ 	leds {
+ 		lan_led_g: lan-led-g {
+ 			rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
diff --git a/target/linux/rockchip/patches-6.12/071-05-v6.15-arm64-dts-rockchip-Add-maskrom-button-to-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-05-v6.15-arm64-dts-rockchip-Add-maskrom-button-to-Radxa-E20C.patch
new file mode 100644
index 0000000000..9873f4ee66
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-05-v6.15-arm64-dts-rockchip-Add-maskrom-button-to-Radxa-E20C.patch
@@ -0,0 +1,89 @@
+From 3a2819ee9c71d1c6388e456cc4eb042914d15d7e Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Tue, 4 Mar 2025 20:16:37 +0000
+Subject: [PATCH] arm64: dts: rockchip: Add maskrom button to Radxa E20C
+
+Radxa E20C has two buttons, one SARADC maskrom button and one GPIO user
+button.
+
+Add support for the maskrom button using a adc-keys node, also add the
+regulators used by SARADC controller.
+
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250304201642.831218-5-jonas@kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 48 +++++++++++++++++++
+ 1 file changed, 48 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -19,6 +19,20 @@
+ 		stdout-path = "serial0:1500000n8";
+ 	};
+ 
++	adc-keys {
++		compatible = "adc-keys";
++		io-channels = <&saradc 0>;
++		io-channel-names = "buttons";
++		keyup-threshold-microvolt = <1800000>;
++		poll-interval = <100>;
++
++		button-maskrom {
++			label = "MASKROM";
++			linux,code = <KEY_SETUP>;
++			press-threshold-microvolt = <0>;
++		};
++	};
++
+ 	gpio-keys {
+ 		compatible = "gpio-keys";
+ 		pinctrl-names = "default";
+@@ -61,6 +75,35 @@
+ 			linux,default-trigger = "netdev";
+ 		};
+ 	};
++
++	vcc_1v8: regulator-1v8-vcc {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc_1v8";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <1800000>;
++		regulator-max-microvolt = <1800000>;
++		vin-supply = <&vcc_3v3>;
++	};
++
++	vcc_3v3: regulator-3v3-vcc {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc_3v3";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++
++	vcc5v0_sys: regulator-5v0-vcc-sys {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc5v0_sys";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++	};
+ };
+ 
+ &pinctrl {
+@@ -85,6 +128,11 @@
+ 	};
+ };
+ 
++&saradc {
++	vref-supply = <&vcc_1v8>;
++	status = "okay";
++};
++
+ &uart0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&uart0m0_xfer>;
diff --git a/target/linux/rockchip/patches-6.12/071-06-v6.15-arm64-dts-rockchip-Enable-onboard-eMMC-on-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-06-v6.15-arm64-dts-rockchip-Enable-onboard-eMMC-on-Radxa-E20C.patch
new file mode 100644
index 0000000000..aec94a8342
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-06-v6.15-arm64-dts-rockchip-Enable-onboard-eMMC-on-Radxa-E20C.patch
@@ -0,0 +1,47 @@
+From 3a01b5f14a8ae2d45aea5aeed30001ac1655de86 Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Wed, 5 Mar 2025 21:41:04 +0000
+Subject: [PATCH] arm64: dts: rockchip: Enable onboard eMMC on Radxa E20C
+
+The Radxa E20C may come with an onboard eMMC (8GB / 16GB / 32GB / 64GB).
+
+Enable support for the onboard eMMC on Radxa E20C.
+
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250305214108.1327208-4-jonas@kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -15,6 +15,10 @@
+ 	model = "Radxa E20C";
+ 	compatible = "radxa,e20c", "rockchip,rk3528";
+ 
++	aliases {
++		mmc0 = &sdhci;
++	};
++
+ 	chosen {
+ 		stdout-path = "serial0:1500000n8";
+ 	};
+@@ -133,6 +137,17 @@
+ 	status = "okay";
+ };
+ 
++&sdhci {
++	bus-width = <8>;
++	cap-mmc-highspeed;
++	no-sd;
++	no-sdio;
++	non-removable;
++	vmmc-supply = <&vcc_3v3>;
++	vqmmc-supply = <&vcc_1v8>;
++	status = "okay";
++};
++
+ &uart0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&uart0m0_xfer>;
diff --git a/target/linux/rockchip/patches-6.12/071-07-v6.16-arm64-dts-rockchip-Add-onboard-EEPROM-for-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-07-v6.16-arm64-dts-rockchip-Add-onboard-EEPROM-for-Radxa-E20C.patch
new file mode 100644
index 0000000000..eb1bfb6cf1
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-07-v6.16-arm64-dts-rockchip-Add-onboard-EEPROM-for-Radxa-E20C.patch
@@ -0,0 +1,39 @@
+From 101fe8b5627c68b3f2f941266e26ac355131e2fe Mon Sep 17 00:00:00 2001
+From: Yao Zi <ziyao at disroot.org>
+Date: Thu, 17 Apr 2025 12:01:19 +0000
+Subject: [PATCH] arm64: dts: rockchip: Add onboard EEPROM for Radxa E20C
+
+Radxa E20C ships an onboard I2C EEPROM for storing production
+information. Enable it in devicetree.
+
+Signed-off-by: Yao Zi <ziyao at disroot.org>
+Reviewed-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250417120118.17610-6-ziyao@disroot.org
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -110,6 +110,20 @@
+ 	};
+ };
+ 
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1m0_xfer>;
++	status = "okay";
++
++	eeprom at 50 {
++		compatible = "belling,bl24c16a", "atmel,24c16";
++		reg = <0x50>;
++		pagesize = <16>;
++		read-only;
++		vcc-supply = <&vcc_3v3>;
++	};
++};
++
+ &pinctrl {
+ 	gpio-keys {
+ 		user_key: user-key {
diff --git a/target/linux/rockchip/patches-6.12/071-08-v6.16-arm64-dts-rockchip-Enable-regulators-for-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-08-v6.16-arm64-dts-rockchip-Enable-regulators-for-Radxa-E20C.patch
new file mode 100644
index 0000000000..b335f4cba2
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-08-v6.16-arm64-dts-rockchip-Enable-regulators-for-Radxa-E20C.patch
@@ -0,0 +1,119 @@
+From c6599944af5a09029259ff8c533d22754f2b1ba4 Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus at jmu.edu.cn>
+Date: Tue, 1 Apr 2025 20:00:20 +0800
+Subject: [PATCH] arm64: dts: rockchip: Enable regulators for Radxa E20C
+
+Enable pwm and fixed regulators for Radxa E20C. The pwm regulator is
+used to power the CPU and GPU. Note that the LPDDR4 voltage is 1.1V.
+
+Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
+Reviewed-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250401120020.976343-3-amadeus@jmu.edu.cn
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 73 +++++++++++++++++++
+ 1 file changed, 73 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -9,6 +9,7 @@
+ 
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/leds/common.h>
++#include <dt-bindings/pwm/pwm.h>
+ #include "rk3528.dtsi"
+ 
+ / {
+@@ -80,6 +81,26 @@
+ 		};
+ 	};
+ 
++	vdd_0v9: regulator-0v9-vdd {
++		compatible = "regulator-fixed";
++		regulator-name = "vdd_0v9";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <900000>;
++		regulator-max-microvolt = <900000>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++
++	vcc_ddr: regulator-1v1-vcc-ddr {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc_ddr";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <1100000>;
++		regulator-max-microvolt = <1100000>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++
+ 	vcc_1v8: regulator-1v8-vcc {
+ 		compatible = "regulator-fixed";
+ 		regulator-name = "vcc_1v8";
+@@ -108,6 +129,46 @@
+ 		regulator-min-microvolt = <5000000>;
+ 		regulator-max-microvolt = <5000000>;
+ 	};
++
++	vdd_arm: regulator-vdd-arm {
++		compatible = "pwm-regulator";
++		pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
++		pwm-supply = <&vcc5v0_sys>;
++		regulator-name = "vdd_arm";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <746000>;
++		regulator-max-microvolt = <1201000>;
++		regulator-settling-time-up-us = <250>;
++	};
++
++	vdd_logic: regulator-vdd-logic {
++		compatible = "pwm-regulator";
++		pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>;
++		pwm-supply = <&vcc5v0_sys>;
++		regulator-name = "vdd_logic";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <705000>;
++		regulator-max-microvolt = <1006000>;
++		regulator-settling-time-up-us = <250>;
++	};
++};
++
++&cpu0 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu1 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu2 {
++	cpu-supply = <&vdd_arm>;
++};
++
++&cpu3 {
++	cpu-supply = <&vdd_arm>;
+ };
+ 
+ &i2c1 {
+@@ -146,6 +207,18 @@
+ 	};
+ };
+ 
++&pwm1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm1m0_pins>;
++	status = "okay";
++};
++
++&pwm2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm2m0_pins>;
++	status = "okay";
++};
++
+ &saradc {
+ 	vref-supply = <&vcc_1v8>;
+ 	status = "okay";
diff --git a/target/linux/rockchip/patches-6.12/071-09-v6.16-arm64-dts-rockchip-Enable-SD-card-interface-on-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-09-v6.16-arm64-dts-rockchip-Enable-SD-card-interface-on-Radxa-E20C.patch
new file mode 100644
index 0000000000..482cdf5560
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-09-v6.16-arm64-dts-rockchip-Enable-SD-card-interface-on-Radxa-E20C.patch
@@ -0,0 +1,75 @@
+From a2130d9123b23d74a717f52240fa3cb92bf8113c Mon Sep 17 00:00:00 2001
+From: Yao Zi <ziyao at disroot.org>
+Date: Thu, 8 May 2025 23:48:30 +0000
+Subject: [PATCH] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
+
+SD-card is available on Radxa E20C board.
+
+Signed-off-by: Yao Zi <ziyao at disroot.org>
+Reviewed-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250508234829.27111-4-ziyao@disroot.org
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 30 +++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -18,6 +18,7 @@
+ 
+ 	aliases {
+ 		mmc0 = &sdhci;
++		mmc1 = &sdmmc;
+ 	};
+ 
+ 	chosen {
+@@ -130,6 +131,18 @@
+ 		regulator-max-microvolt = <5000000>;
+ 	};
+ 
++	vccio_sd: regulator-vccio-sd {
++		compatible = "regulator-gpio";
++		gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&sdmmc_vol_ctrl_h>;
++		regulator-name = "vccio_sd";
++		regulator-min-microvolt = <1800000>;
++		regulator-max-microvolt = <3300000>;
++		states = <1800000 0x0>, <3300000 0x1>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++
+ 	vdd_arm: regulator-vdd-arm {
+ 		compatible = "pwm-regulator";
+ 		pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
+@@ -205,6 +218,12 @@
+ 			rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
+ 		};
+ 	};
++
++	sdmmc {
++		sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
++			rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
+ };
+ 
+ &pwm1 {
+@@ -235,6 +254,17 @@
+ 	status = "okay";
+ };
+ 
++&sdmmc {
++	bus-width = <4>;
++	cap-mmc-highspeed;
++	cap-sd-highspeed;
++	disable-wp;
++	sd-uhs-sdr104;
++	vmmc-supply = <&vcc_3v3>;
++	vqmmc-supply = <&vccio_sd>;
++	status = "okay";
++};
++
+ &uart0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&uart0m0_xfer>;
diff --git a/target/linux/rockchip/patches-6.12/071-10-v6.16-arm64-dts-rockchip-Enable-Ethernet-controller-on-Radxa.patch b/target/linux/rockchip/patches-6.12/071-10-v6.16-arm64-dts-rockchip-Enable-Ethernet-controller-on-Radxa.patch
new file mode 100644
index 0000000000..635d759275
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-10-v6.16-arm64-dts-rockchip-Enable-Ethernet-controller-on-Radxa.patch
@@ -0,0 +1,74 @@
+From 10b9ef4a514b25dea6eac24f25e3027866526800 Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Fri, 9 May 2025 20:23:58 +0000
+Subject: [PATCH] arm64: dts: rockchip: Enable Ethernet controller on Radxa
+ E20C
+
+The Radxa E20C has two GbE ports, LAN and WAN. The LAN port is provided
+using a GMAC controller and a YT8531C PHY and the WAN port is provided
+by an RTL8111H PCIe Ethernet controller.
+
+Enable support for the LAN port on Radxa E20C.
+
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Tested-by: Yao Zi <ziyao at disroot.org>
+Link: https://lore.kernel.org/r/20250509202402.260038-3-jonas@kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 30 +++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -17,6 +17,7 @@
+ 	compatible = "radxa,e20c", "rockchip,rk3528";
+ 
+ 	aliases {
++		ethernet0 = &gmac1;
+ 		mmc0 = &sdhci;
+ 		mmc1 = &sdmmc;
+ 	};
+@@ -184,6 +185,17 @@
+ 	cpu-supply = <&vdd_arm>;
+ };
+ 
++&gmac1 {
++	clock_in_out = "output";
++	phy-handle = <&rgmii_phy>;
++	phy-mode = "rgmii-id";
++	phy-supply = <&vcc_3v3>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&rgmii_miim>, <&rgmii_tx_bus2>, <&rgmii_rx_bus2>,
++		    <&rgmii_rgmii_clk>, <&rgmii_rgmii_bus>;
++	status = "okay";
++};
++
+ &i2c1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c1m0_xfer>;
+@@ -198,7 +210,25 @@
+ 	};
+ };
+ 
++&mdio1 {
++	rgmii_phy: ethernet-phy at 1 {
++		compatible = "ethernet-phy-ieee802.3-c22";
++		reg = <0x1>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&gmac1_rstn_l>;
++		reset-assert-us = <20000>;
++		reset-deassert-us = <100000>;
++		reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
++	};
++};
++
+ &pinctrl {
++	ethernet {
++		gmac1_rstn_l: gmac1-rstn-l {
++			rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
+ 	gpio-keys {
+ 		user_key: user-key {
+ 			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
diff --git a/target/linux/rockchip/patches-6.12/071-11-v6.16-arm64-dts-rockchip-move-rk3528-i2c-uart-aliases-to-board.patch b/target/linux/rockchip/patches-6.12/071-11-v6.16-arm64-dts-rockchip-move-rk3528-i2c-uart-aliases-to-board.patch
new file mode 100644
index 0000000000..a71781bbaa
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-11-v6.16-arm64-dts-rockchip-move-rk3528-i2c-uart-aliases-to-board.patch
@@ -0,0 +1,61 @@
+From 34d2730fbbddfdffd656d36a13f8fdb886a3b5e1 Mon Sep 17 00:00:00 2001
+From: Heiko Stuebner <heiko at sntech.de>
+Date: Sun, 11 May 2025 00:01:06 +0200
+Subject: [PATCH] arm64: dts: rockchip: move rk3528 i2c+uart aliases to board
+ files
+
+Even though they will be the same for all boards, i2c and uart aliases
+are supposed to live in the individual board files, to not create
+aliases for disabled nodes.
+
+So move the newly added aliases for rk3528 over to the Radxa E20C board,
+which is the only rk3528 board right now.
+
+Fixes: d3a05f490d04 ("arm64: dts: rockchip: Add I2C controllers for RK3528")
+Suggested-by: Arnd Bergmann <arnd at arndb.de>
+Reviewed-by: Yao Zi <ziyao at disroot.org>
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+Link: https://lore.kernel.org/r/20250510220106.2108414-1-heiko@sntech.de
+---
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts      |  2 ++
+ arch/arm64/boot/dts/rockchip/rk3528.dtsi         | 16 ----------------
+ 2 files changed, 2 insertions(+), 16 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -18,8 +18,10 @@
+ 
+ 	aliases {
+ 		ethernet0 = &gmac1;
++		i2c1 = &i2c1;
+ 		mmc0 = &sdhci;
+ 		mmc1 = &sdmmc;
++		serial0 = &uart0;
+ 	};
+ 
+ 	chosen {
+--- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
+@@ -26,22 +26,6 @@
+ 		gpio2 = &gpio2;
+ 		gpio3 = &gpio3;
+ 		gpio4 = &gpio4;
+-		i2c0 = &i2c0;
+-		i2c1 = &i2c1;
+-		i2c2 = &i2c2;
+-		i2c3 = &i2c3;
+-		i2c4 = &i2c4;
+-		i2c5 = &i2c5;
+-		i2c6 = &i2c6;
+-		i2c7 = &i2c7;
+-		serial0 = &uart0;
+-		serial1 = &uart1;
+-		serial2 = &uart2;
+-		serial3 = &uart3;
+-		serial4 = &uart4;
+-		serial5 = &uart5;
+-		serial6 = &uart6;
+-		serial7 = &uart7;
+ 	};
+ 
+ 	cpus {
diff --git a/target/linux/rockchip/patches-6.12/071-12-v6.17-arm64-dts-rockchip-Enable-GPU-on-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-12-v6.17-arm64-dts-rockchip-Enable-GPU-on-Radxa-E20C.patch
new file mode 100644
index 0000000000..788f583354
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-12-v6.17-arm64-dts-rockchip-Enable-GPU-on-Radxa-E20C.patch
@@ -0,0 +1,28 @@
+From f4db84780427270dd20ec0e7079b0ae26dc88dd3 Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Sun, 18 May 2025 22:54:13 +0000
+Subject: [PATCH] arm64: dts: rockchip: Enable GPU on Radxa E20C
+
+Enable the Mali-450 MP2 GPU on the Radxa E20C.
+
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250518225418.682182-4-jonas@kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -198,6 +198,11 @@
+ 	status = "okay";
+ };
+ 
++&gpu {
++	mali-supply = <&vdd_logic>;
++	status = "okay";
++};
++
+ &i2c1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c1m0_xfer>;
diff --git a/target/linux/rockchip/patches-6.12/071-13-v6.17-arm64-dts-rockchip-Enable-eMMC-HS200-mode-on-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-13-v6.17-arm64-dts-rockchip-Enable-eMMC-HS200-mode-on-Radxa-E20C.patch
new file mode 100644
index 0000000000..f5bd9e64f9
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-13-v6.17-arm64-dts-rockchip-Enable-eMMC-HS200-mode-on-Radxa-E20C.patch
@@ -0,0 +1,28 @@
+From 6e3071f4e03997ca0e4388ca61aa06df2802dcd1 Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Sat, 21 Jun 2025 16:58:30 +0000
+Subject: [PATCH] arm64: dts: rockchip: Enable eMMC HS200 mode on Radxa E20C
+
+eMMC HS200 mode (1.8V I/O) is supported by the MMC host controller on
+RK3528 and works with the optional on-board eMMC module on Radxa E20C.
+
+Be explicit about HS200 support in the device tree for Radxa E20C.
+
+Fixes: 3a01b5f14a8a ("arm64: dts: rockchip: Enable onboard eMMC on Radxa E20C")
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20250621165832.2226160-1-jonas@kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -283,6 +283,7 @@
+ &sdhci {
+ 	bus-width = <8>;
+ 	cap-mmc-highspeed;
++	mmc-hs200-1_8v;
+ 	no-sd;
+ 	no-sdio;
+ 	non-removable;
diff --git a/target/linux/rockchip/patches-6.12/071-14-v6.18-arm64-dts-rockchip-Enable-PCIe-controller-on-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/071-14-v6.18-arm64-dts-rockchip-Enable-PCIe-controller-on-Radxa-E20C.patch
new file mode 100644
index 0000000000..b420608a87
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/071-14-v6.18-arm64-dts-rockchip-Enable-PCIe-controller-on-Radxa-E20C.patch
@@ -0,0 +1,44 @@
+From 047bac0be317e68b89d0deed4f659f8e080df6e8 Mon Sep 17 00:00:00 2001
+From: Yao Zi <ziyao at disroot.org>
+Date: Thu, 18 Sep 2025 15:30:57 +0000
+Subject: [PATCH] arm64: dts: rockchip: Enable PCIe controller on Radxa E20C
+
+Radxa E20C provides one of its GbE ports through RTL8111H connected to
+SoC's PCIe controller. Let's enable the controller and the PHY used by
+it to allow usage of the port.
+
+Signed-off-by: Yao Zi <ziyao at disroot.org>
+Link: https://patch.msgid.link/20250918153057.56023-4-ziyao@disroot.org
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -171,6 +171,10 @@
+ 	};
+ };
+ 
++&combphy {
++	status = "okay";
++};
++
+ &cpu0 {
+ 	cpu-supply = <&vdd_arm>;
+ };
+@@ -229,6 +233,14 @@
+ 	};
+ };
+ 
++&pcie {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pciem1_pins>;
++	reset-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
++	vpcie3v3-supply = <&vcc_3v3>;
++	status = "okay";
++};
++
+ &pinctrl {
+ 	ethernet {
+ 		gmac1_rstn_l: gmac1-rstn-l {
diff --git a/target/linux/rockchip/patches-6.12/138-arm64-dts-rockchip-Update-LED-properties-for-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/138-arm64-dts-rockchip-Update-LED-properties-for-Radxa-E20C.patch
new file mode 100644
index 0000000000..854c576777
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/138-arm64-dts-rockchip-Update-LED-properties-for-Radxa-E20C.patch
@@ -0,0 +1,40 @@
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -22,6 +22,11 @@
+ 		mmc0 = &sdhci;
+ 		mmc1 = &sdmmc;
+ 		serial0 = &uart0;
++
++		led-boot = &sys_led;
++		led-failsafe = &sys_led;
++		led-running = &sys_led;
++		led-upgrade = &sys_led;
+ 	};
+ 
+ 	chosen {
+@@ -65,15 +70,13 @@
+ 			default-state = "off";
+ 			function = LED_FUNCTION_LAN;
+ 			gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
+-			linux,default-trigger = "netdev";
+ 		};
+ 
+-		led-sys {
++		sys_led: led-sys {
+ 			color = <LED_COLOR_ID_GREEN>;
+-			default-state = "on";
++			default-state = "off";
+ 			function = LED_FUNCTION_HEARTBEAT;
+ 			gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>;
+-			linux,default-trigger = "heartbeat";
+ 		};
+ 
+ 		led-wan {
+@@ -81,7 +84,6 @@
+ 			default-state = "off";
+ 			function = LED_FUNCTION_WAN;
+ 			gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>;
+-			linux,default-trigger = "netdev";
+ 		};
+ 	};
+ 
diff --git a/target/linux/rockchip/patches-6.12/164-arm64-dts-rockchip-Enable-USB-2-0-ports-on-Radxa-E20C.patch b/target/linux/rockchip/patches-6.12/164-arm64-dts-rockchip-Enable-USB-2-0-ports-on-Radxa-E20C.patch
new file mode 100644
index 0000000000..24e690c7cd
--- /dev/null
+++ b/target/linux/rockchip/patches-6.12/164-arm64-dts-rockchip-Enable-USB-2-0-ports-on-Radxa-E20C.patch
@@ -0,0 +1,83 @@
+From d78af3aa816344d6e76dd77fbaf410fcbfa58bef Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Wed, 23 Jul 2025 12:23:06 +0000
+Subject: [PATCH] arm64: dts: rockchip: Enable USB 2.0 ports on Radxa E20C
+
+The Radxa E20C has one USB2.0 Type-A HOST port and one USB2.0 Type-C OTG
+port.
+
+Add support for using the USB 2.0 ports on Radxa E20C.
+
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+---
+ .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 48 +++++++++++++++++++
+ 1 file changed, 48 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+@@ -136,6 +136,18 @@
+ 		regulator-max-microvolt = <5000000>;
+ 	};
+ 
++	vcc5v0_usb20: regulator-5v0-vcc-usb20 {
++		compatible = "regulator-fixed";
++		enable-active-high;
++		gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&usb_host_en>;
++		regulator-name = "vcc5v0_usb20";
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++
+ 	vccio_sd: regulator-vccio-sd {
+ 		compatible = "regulator-gpio";
+ 		gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+@@ -275,6 +287,12 @@
+ 			rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ 		};
+ 	};
++
++	usb {
++		usb_host_en: usb-host-en {
++			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
+ };
+ 
+ &pwm1 {
+@@ -322,3 +340,33 @@
+ 	pinctrl-0 = <&uart0m0_xfer>;
+ 	status = "okay";
+ };
++
++&usb_host0_ehci {
++	status = "okay";
++};
++
++&usb_host0_ohci {
++	status = "okay";
++};
++
++&usb_host0_xhci {
++	extcon = <&usb2phy>;
++	maximum-speed = "high-speed";
++	phys = <&usb2phy_otg>;
++	phy-names = "usb2-phy";
++	snps,dis_u2_susphy_quirk;
++	status = "okay";
++};
++
++&usb2phy {
++	status = "okay";
++};
++
++&usb2phy_host {
++	phy-supply = <&vcc5v0_usb20>;
++	status = "okay";
++};
++
++&usb2phy_otg {
++	status = "okay";
++};




More information about the lede-commits mailing list