rockchip: enable USB3 port on NanoPC T6
authorTianling Shen <cnsztl@immortalwrt.org>
Mon, 23 Dec 2024 13:13:24 +0000 (21:13 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 1 Jan 2025 13:11:55 +0000 (14:11 +0100)
Enable the USB3 port on FriendlyELEC NanoPC-T6.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17349
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/rockchip/patches-6.6/055-16-v6.13-arm64-dts-rockchip-enable-USB3-on-NanoPC-T6.patch [new file with mode: 0644]
target/linux/rockchip/patches-6.6/121-arm64-dts-rockchip-lower-mmc-speed-for-nanopc-t6.patch

diff --git a/target/linux/rockchip/patches-6.6/055-16-v6.13-arm64-dts-rockchip-enable-USB3-on-NanoPC-T6.patch b/target/linux/rockchip/patches-6.6/055-16-v6.13-arm64-dts-rockchip-enable-USB3-on-NanoPC-T6.patch
new file mode 100644 (file)
index 0000000..d3aa8b9
--- /dev/null
@@ -0,0 +1,87 @@
+From a6ae420439dc47a58550a6e61e596e9dd1562caf Mon Sep 17 00:00:00 2001
+From: Rick Wertenbroek <rick.wertenbroek@gmail.com>
+Date: Wed, 6 Nov 2024 14:03:13 +0100
+Subject: [PATCH] arm64: dts: rockchip: enable USB3 on NanoPC-T6
+
+Enable the USB3 port on FriendlyELEC NanoPC-T6.
+
+Signed-off-by: Rick Wertenbroek <rick.wertenbroek@gmail.com>
+Link: https://lore.kernel.org/r/20241106130314.1289055-1-rick.wertenbroek@gmail.com
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+---
+ .../boot/dts/rockchip/rk3588-nanopc-t6.dtsi   | 36 +++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
+@@ -160,6 +160,20 @@
+               vin-supply = <&vcc5v0_sys>;
+       };
++      vbus5v0_usb: vbus5v0-usb-regulator {
++              compatible = "regulator-fixed";
++              enable-active-high;
++              gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
++              pinctrl-names = "default";
++              pinctrl-0 = <&usb5v_pwren>;
++              regulator-always-on;
++              regulator-boot-on;
++              regulator-name = "vbus5v0_usb";
++              regulator-min-microvolt = <5000000>;
++              regulator-max-microvolt = <5000000>;
++              vin-supply = <&vcc5v0_sys>;
++      };
++
+       vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+@@ -577,6 +591,10 @@
+                       rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
++              usb5v_pwren: usb5v_pwren {
++                      rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
++              };
++
+               usbc0_int: usbc0-int {
+                       rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+@@ -976,6 +994,14 @@
+       status = "okay";
+ };
++&u2phy1 {
++      status = "okay";
++};
++
++&u2phy1_otg {
++      status = "okay";
++};
++
+ &u2phy2_host {
+       status = "okay";
+ };
+@@ -1015,6 +1041,11 @@
+       };
+ };
++&usbdp_phy1 {
++      phy-supply = <&vbus5v0_usb>;
++      status = "okay";
++};
++
+ &usb_host0_ehci {
+       status = "okay";
+ };
+@@ -1035,6 +1066,11 @@
+       };
+ };
++&usb_host1_xhci {
++      dr_mode = "host";
++      status = "okay";
++};
++
+ &usb_host1_ehci {
+       status = "okay";
+ };
index bbcff0179068bb4b21c47b278a1c9b9d87ce4bbf..1b76fac103a7d5bb7075fe7de8b84fcfccd894d9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
 +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
-@@ -616,7 +616,7 @@
+@@ -634,7 +634,7 @@
        disable-wp;
        no-mmc;
        no-sdio;