rockchip: backport pcie update for rock 5a
authorTianling Shen <cnsztl@immortalwrt.org>
Fri, 6 Sep 2024 07:20:46 +0000 (15:20 +0800)
committerRobert Marko <robimarko@gmail.com>
Sun, 8 Sep 2024 16:31:11 +0000 (18:31 +0200)
This enables the M.2 E-key on ROCK 5A board.
Reorder rk356x patch while at it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/16340
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/rockchip/patches-6.6/015-v6.10-arm64-dts-rockchip-correct-the-model-name-for-Radxa-.patch [new file with mode: 0644]
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 with mode: 0644]
target/linux/rockchip/patches-6.6/052-16-v6.11-arm64-dts-rockchip-enable-thermal-management-on-all-RK358.patch
target/linux/rockchip/patches-6.6/060-01-v6.10-arm64-dts-rockchip-correct-the-model-name-for-Radxa-.patch [deleted file]
target/linux/rockchip/patches-6.6/117-arm64-dts-rockchip-lower-mmc-speed-for-Radxa-Rock-5A.patch

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 (file)
index 0000000..d03039d
--- /dev/null
@@ -0,0 +1,29 @@
+From 626a479873b6a680b3227c4852bde4a1f2c17fdf Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus@jmu.edu.cn>
+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 <naoki@radxa.com>
+Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
+Reviewed-by: Dragan Simic <dsimic@manjaro.org>
+Link: https://lore.kernel.org/r/20240419103019.992586-3-amadeus@jmu.edu.cn
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+---
+ 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 (file)
index 0000000..e4fe686
--- /dev/null
@@ -0,0 +1,110 @@
+From b728d4c51f0ce9207daf502f3a85073785c46319 Mon Sep 17 00:00:00 2001
+From: FUKAUMI Naoki <naoki@radxa.com>
+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: <LOOPBACK,UP,LOWER_UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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: <BROADCAST,MULTICAST> 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 <naoki@radxa.com>
+Link: https://lore.kernel.org/r/20240826080456.525-1-naoki@radxa.com
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+---
+ .../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>;
index b0948126031b8f643326fb834cc840b751f0243f..d59574bc498ccf170f1f0c652c5eabfa12e32ab1 100644 (file)
@@ -53,7 +53,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
        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 (file)
index d03039d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From 626a479873b6a680b3227c4852bde4a1f2c17fdf Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus@jmu.edu.cn>
-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 <naoki@radxa.com>
-Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
-Reviewed-by: Dragan Simic <dsimic@manjaro.org>
-Link: https://lore.kernel.org/r/20240419103019.992586-3-amadeus@jmu.edu.cn
-Signed-off-by: Heiko Stuebner <heiko@sntech.de>
----
- 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 {
index 46d56d850d74d22a93b5b60a7e0ae77c24fb3bbf..675d083a3af8507e963b5aadb14ed3f035ec2347 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Tianling Shen <cnsztl@gmail.com>
 
 --- 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;