From: Tianling Shen Date: Fri, 6 Sep 2024 07:20:46 +0000 (+0800) Subject: rockchip: backport pcie update for rock 5a X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=317076d2573eb91a97675c689ff56446ba15ab52;p=openwrt%2Fstaging%2Fblocktrron.git rockchip: backport pcie update for rock 5a This enables the M.2 E-key on ROCK 5A board. Reorder rk356x patch while at it. Signed-off-by: Tianling Shen Link: https://github.com/openwrt/openwrt/pull/16340 Signed-off-by: Robert Marko --- diff --git a/target/linux/rockchip/patches-6.6/015-v6.10-arm64-dts-rockchip-correct-the-model-name-for-Radxa-.patch b/target/linux/rockchip/patches-6.6/015-v6.10-arm64-dts-rockchip-correct-the-model-name-for-Radxa-.patch new file mode 100644 index 0000000000..d03039d978 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/015-v6.10-arm64-dts-rockchip-correct-the-model-name-for-Radxa-.patch @@ -0,0 +1,29 @@ +From 626a479873b6a680b3227c4852bde4a1f2c17fdf Mon Sep 17 00:00:00 2001 +From: Chukun Pan +Date: Fri, 19 Apr 2024 18:30:19 +0800 +Subject: [PATCH] arm64: dts: rockchip: correct the model name for Radxa ROCK + 3A + +According to https://radxa.com/products/rock3/3a, +the name of this board should be "Radxa ROCK 3A". + +Suggested-by: FUKAUMI Naoki +Signed-off-by: Chukun Pan +Reviewed-by: Dragan Simic +Link: https://lore.kernel.org/r/20240419103019.992586-3-amadeus@jmu.edu.cn +Signed-off-by: Heiko Stuebner +--- + arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +@@ -8,7 +8,7 @@ + #include "rk3568.dtsi" + + / { +- model = "Radxa ROCK3 Model A"; ++ model = "Radxa ROCK 3A"; + compatible = "radxa,rock3a", "rockchip,rk3568"; + + aliases { diff --git a/target/linux/rockchip/patches-6.6/051-04-v6.12-arm64-dts-rockchip-enable-PCIe-on-M.2-E-key-for-Radxa-ROC.patch b/target/linux/rockchip/patches-6.6/051-04-v6.12-arm64-dts-rockchip-enable-PCIe-on-M.2-E-key-for-Radxa-ROC.patch new file mode 100644 index 0000000000..e4fe686da9 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/051-04-v6.12-arm64-dts-rockchip-enable-PCIe-on-M.2-E-key-for-Radxa-ROC.patch @@ -0,0 +1,110 @@ +From b728d4c51f0ce9207daf502f3a85073785c46319 Mon Sep 17 00:00:00 2001 +From: FUKAUMI Naoki +Date: Mon, 26 Aug 2024 17:04:56 +0900 +Subject: [PATCH] arm64: dts: rockchip: enable PCIe on M.2 E key for Radxa ROCK + 5A + +Enable pcie2x1l2 and related combphy/regulator routed to M.2 E key +connector on Radxa ROCK 5A. + +Tested with Radxa Wireless Module A8: + +$ lspci +0004:40:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) +0004:41:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8852BE PCIe 802.11ax Wireless Network Controller + +$ ip l +1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +2: end0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 + link/ether c2:58:fc:70:55:86 brd ff:ff:ff:ff:ff:ff +3: wlP4p65s0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 + link/ether 2c:05:47:65:5b:ed brd ff:ff:ff:ff:ff:ff + +$ lsusb +Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub +Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub +Bus 001 Device 003: ID 0bda:b85b Realtek Semiconductor Corp. Bluetooth Radio +Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub +Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub +Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub +Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub +Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub +Bus 006 Device 002: ID 0789:0336 Logitec Corp. LMD USB Device +Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub +Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub + +$ hciconfig +hci0: Type: Primary Bus: USB + BD Address: 2C:05:47:65:5B:EE ACL MTU: 1021:6 SCO MTU: 255:12 + UP RUNNING + RX bytes:2698 acl:0 sco:0 events:329 errors:0 + TX bytes:69393 acl:0 sco:0 commands:329 errors:0 + +Signed-off-by: FUKAUMI Naoki +Link: https://lore.kernel.org/r/20240826080456.525-1-naoki@radxa.com +Signed-off-by: Heiko Stuebner +--- + .../boot/dts/rockchip/rk3588s-rock-5a.dts | 30 +++++++++++++++++++ + 1 file changed, 30 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +@@ -64,6 +64,18 @@ + regulator-max-microvolt = <12000000>; + }; + ++ vcc3v3_wf: vcc3v3-wf-regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc3v3_wf"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ enable-active-high; ++ gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; ++ pinctrl-0 = <&pow_en>; ++ pinctrl-names = "default"; ++ vin-supply = <&vcc5v0_sys>; ++ }; ++ + vcc5v0_host: vcc5v0-host-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_host"; +@@ -113,6 +125,10 @@ + }; + }; + ++&combphy0_ps { ++ status = "okay"; ++}; ++ + &combphy2_psu { + status = "okay"; + }; +@@ -292,6 +308,14 @@ + }; + }; + ++&pcie2x1l2 { ++ pinctrl-0 = <&pcie20x1m0_pins>; ++ pinctrl-names = "default"; ++ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; ++ vpcie3v3-supply = <&vcc3v3_wf>; ++ status = "okay"; ++}; ++ + &pinctrl { + leds { + io_led: io-led { +@@ -299,6 +323,12 @@ + }; + }; + ++ pcie { ++ pow_en: pow-en { ++ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ + power { + vcc_5v0_en: vcc-5v0-en { + rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; diff --git a/target/linux/rockchip/patches-6.6/052-16-v6.11-arm64-dts-rockchip-enable-thermal-management-on-all-RK358.patch b/target/linux/rockchip/patches-6.6/052-16-v6.11-arm64-dts-rockchip-enable-thermal-management-on-all-RK358.patch index b094812603..d59574bc49 100644 --- a/target/linux/rockchip/patches-6.6/052-16-v6.11-arm64-dts-rockchip-enable-thermal-management-on-all-RK358.patch +++ b/target/linux/rockchip/patches-6.6/052-16-v6.11-arm64-dts-rockchip-enable-thermal-management-on-all-RK358.patch @@ -53,7 +53,7 @@ Signed-off-by: Heiko Stuebner status = "okay"; --- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts -@@ -711,6 +711,10 @@ +@@ -741,6 +741,10 @@ }; }; diff --git a/target/linux/rockchip/patches-6.6/060-01-v6.10-arm64-dts-rockchip-correct-the-model-name-for-Radxa-.patch b/target/linux/rockchip/patches-6.6/060-01-v6.10-arm64-dts-rockchip-correct-the-model-name-for-Radxa-.patch deleted file mode 100644 index d03039d978..0000000000 --- a/target/linux/rockchip/patches-6.6/060-01-v6.10-arm64-dts-rockchip-correct-the-model-name-for-Radxa-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 626a479873b6a680b3227c4852bde4a1f2c17fdf Mon Sep 17 00:00:00 2001 -From: Chukun Pan -Date: Fri, 19 Apr 2024 18:30:19 +0800 -Subject: [PATCH] arm64: dts: rockchip: correct the model name for Radxa ROCK - 3A - -According to https://radxa.com/products/rock3/3a, -the name of this board should be "Radxa ROCK 3A". - -Suggested-by: FUKAUMI Naoki -Signed-off-by: Chukun Pan -Reviewed-by: Dragan Simic -Link: https://lore.kernel.org/r/20240419103019.992586-3-amadeus@jmu.edu.cn -Signed-off-by: Heiko Stuebner ---- - arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts -+++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts -@@ -8,7 +8,7 @@ - #include "rk3568.dtsi" - - / { -- model = "Radxa ROCK3 Model A"; -+ model = "Radxa ROCK 3A"; - compatible = "radxa,rock3a", "rockchip,rk3568"; - - aliases { diff --git a/target/linux/rockchip/patches-6.6/117-arm64-dts-rockchip-lower-mmc-speed-for-Radxa-Rock-5A.patch b/target/linux/rockchip/patches-6.6/117-arm64-dts-rockchip-lower-mmc-speed-for-Radxa-Rock-5A.patch index 46d56d850d..675d083a3a 100644 --- a/target/linux/rockchip/patches-6.6/117-arm64-dts-rockchip-lower-mmc-speed-for-Radxa-Rock-5A.patch +++ b/target/linux/rockchip/patches-6.6/117-arm64-dts-rockchip-lower-mmc-speed-for-Radxa-Rock-5A.patch @@ -15,7 +15,7 @@ Signed-off-by: Tianling Shen --- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts -@@ -374,7 +374,7 @@ +@@ -404,7 +404,7 @@ max-frequency = <150000000>; no-sdio; no-mmc;