Refactor patches for NanoPC T6 & LTS (#7980)

This commit is contained in:
SuperKali
2025-03-27 11:28:09 +01:00
committed by GitHub
parent 7c55b4fce9
commit b9d3931dd5
5 changed files with 118 additions and 251 deletions

View File

@@ -1,105 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Muhammed Efe Cetin <efectn@protonmail.com>
Date: Tue, 10 Dec 2024 21:27:49 +0300
Subject: Add Missing parameters for USB3.0 and FAN
---
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 54 ++++++++++
1 file changed, 54 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
@@ -78,6 +78,15 @@ usr_led: led-1 {
};
};
+ /* FAN */
+ fan0: pwm-fan {
+ compatible = "pwm-fan";
+ #cooling-cells = <2>;
+ cooling-levels = <100 160 190 200 215 235 255>;
+ pwms = <&pwm1 0 50000 0>;
+ fan-supply = <&vcc5v0_sys>;
+ };
+
sound {
compatible = "simple-audio-card";
pinctrl-names = "default";
@@ -197,6 +206,18 @@ vcc3v3_pcie2x1l0: regulator-vcc3v3-pcie2x1l0 {
vin-supply = <&vcc5v0_sys>;
};
+ vcc5v0_host_30: vcc5v0-host-30 {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host30_en>;
+ regulator-name = "vcc5v0_host_30";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
vcc3v3_pcie30: regulator-vcc3v3-pcie30 {
compatible = "regulator-fixed";
enable-active-high;
@@ -531,6 +552,34 @@ i2s0_8ch_p0_0: endpoint {
};
};
+&package_thermal {
+ polling-delay = <1000>;
+
+ trips {
+ package_fan0: package-fan0 {
+ temperature = <55000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ package_fan1: package-fan1 {
+ temperature = <65000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map1 {
+ trip = <&package_fan0>;
+ cooling-device = <&fan0 THERMAL_NO_LIMIT 1>;
+ };
+ map2 {
+ trip = <&package_fan1>;
+ cooling-device = <&fan0 2 THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
&pcie2x1l0 {
reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc_3v3_pcie20>;
@@ -625,6 +674,10 @@ usb5v_pwren: usb5v_pwren {
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
};
+ vcc5v0_host30_en: vcc5v0-host30-en {
+ 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>;
};
@@ -1028,6 +1081,7 @@ &u2phy1 {
};
&u2phy1_otg {
+ phy-supply = <&vcc5v0_host_30>;
status = "okay";
};
--
Armbian

View File

@@ -0,0 +1,67 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SuperKali <hello@superkali.me>
Date: Thu, 20 Mar 2025 19:46:09 +0000
Subject: Adding FAN support for NanoPC T6 & LTS
Signed-off-by: SuperKali <hello@superkali.me>
---
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 36 ++++++++++
1 file changed, 36 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
@@ -78,6 +78,14 @@ usr_led: led-1 {
};
};
+ fan0: pwm-fan {
+ compatible = "pwm-fan";
+ #cooling-cells = <2>;
+ cooling-levels = <100 160 190 200 215 235 255>;
+ pwms = <&pwm1 0 50000 0>;
+ fan-supply = <&vcc5v0_sys>;
+ };
+
sound {
compatible = "simple-audio-card";
pinctrl-names = "default";
@@ -531,6 +539,34 @@ i2s0_8ch_p0_0: endpoint {
};
};
+&package_thermal {
+ polling-delay = <1000>;
+
+ trips {
+ package_fan0: package-fan0 {
+ temperature = <55000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ package_fan1: package-fan1 {
+ temperature = <65000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map1 {
+ trip = <&package_fan0>;
+ cooling-device = <&fan0 THERMAL_NO_LIMIT 1>;
+ };
+ map2 {
+ trip = <&package_fan1>;
+ cooling-device = <&fan0 2 THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
&pcie2x1l0 {
reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc_3v3_pcie20>;
--
Armbian

View File

@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SuperKali <hello@superkali.me>
Date: Thu, 20 Mar 2025 19:58:19 +0000
Subject: Fixing USB-A 3.0 on NanoPC T6
Signed-off-by: SuperKali <hello@superkali.me>
---
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
@@ -1056,6 +1056,7 @@ &u2phy0 {
};
&u2phy0_otg {
+ phy-supply = <&vbus5v0_usb>;
status = "okay";
};
@@ -1121,6 +1122,7 @@ &usb_host0_ohci {
&usb_host0_xhci {
dr_mode = "host";
+ extcon = <&u2phy0>;
status = "okay";
usb-role-switch;
--
Armbian

View File

@@ -1,137 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SuperKali <hello@superkali.me>
Date: Tue, 18 Mar 2025 09:14:27 +0000
Subject: Fix USB3-A on NanoPC T6
Signed-off-by: SuperKali <hello@superkali.me>
---
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 49 +++-------
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
@@ -191,20 +191,6 @@ vbus5v0_typec: regulator-vbus5v0-typec {
vin-supply = <&vcc5v0_sys>;
};
- vbus5v0_usb: regulator-vbus5v0-usb {
- 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: regulator-vcc3v3-pcie2x1l0 {
compatible = "regulator-fixed";
enable-active-high;
@@ -717,12 +703,8 @@ typec5v_pwren: typec5v-pwren {
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>;
- };
-
vcc5v0_host30_en: vcc5v0-host30-en {
- rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
};
usbc0_int: usbc0-int {
@@ -1119,35 +1101,36 @@ &u2phy0 {
status = "okay";
};
-&u2phy0_otg {
+&u2phy1 {
status = "okay";
};
-&u2phy1 {
+&u2phy2 {
status = "okay";
};
-&u2phy1_otg {
- phy-supply = <&vcc5v0_host_30>;
+&u2phy3 {
status = "okay";
};
-&u2phy2_host {
+&u2phy0_otg {
+ phy-supply = <&vcc5v0_host_30>;
status = "okay";
};
-&u2phy3_host {
+&u2phy1_otg {
status = "okay";
};
-&u2phy2 {
+&u2phy2_host {
status = "okay";
};
-&u2phy3 {
+&u2phy3_host {
status = "okay";
};
+
&usbdp_phy0 {
mode-switch;
orientation-switch;
@@ -1172,7 +1155,6 @@ usbdp_phy0_typec_sbu: endpoint@1 {
};
&usbdp_phy1 {
- phy-supply = <&vbus5v0_usb>;
status = "okay";
};
@@ -1186,8 +1168,9 @@ &usb_host0_ohci {
&usb_host0_xhci {
dr_mode = "host";
- status = "okay";
+ extcon = <&u2phy0>;
usb-role-switch;
+ status = "okay";
port {
usb_host0_xhci_drd_sw: endpoint {
@@ -1196,16 +1179,16 @@ usb_host0_xhci_drd_sw: endpoint {
};
};
-&usb_host1_xhci {
- dr_mode = "host";
+&usb_host1_ehci {
status = "okay";
};
-&usb_host1_ehci {
+&usb_host1_ohci {
status = "okay";
};
-&usb_host1_ohci {
+&usb_host1_xhci {
+ dr_mode = "host";
status = "okay";
};
--
Armbian

View File

@@ -1,18 +1,18 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SuperKali <hello@superkali.me>
Date: Sun, 9 Mar 2025 14:41:39 +0000
Subject: Enable HDMI1 and Audio on NanoPC T6/LTS
Date: Thu, 20 Mar 2025 19:51:46 +0000
Subject: Add HDMI1 support and Audio for NanoPC T6 & LTS
Signed-off-by: SuperKali <hello@superkali.me>
---
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 54 ++++++++++
1 file changed, 54 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 56 ++++++++++
1 file changed, 56 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
@@ -52,6 +52,17 @@ hdmi0_con_in: endpoint {
@@ -52,6 +52,18 @@ hdmi0_con_in: endpoint {
};
};
@@ -26,18 +26,26 @@ index 111111111111..222222222222 100644
+ };
+ };
+ };
+
+
ir-receiver {
compatible = "gpio-ir-receiver";
gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_LOW>;
@@ -381,10 +392,38 @@ hdmi0_out_con: endpoint {
};
@@ -356,6 +368,10 @@ &hdmi0 {
status = "okay";
};
+&hdmi0_sound {
+ status = "okay";
+};
+
&hdmi0_in {
hdmi0_in_vp0: endpoint {
remote-endpoint = <&vp0_out_hdmi0>;
@@ -368,10 +384,34 @@ hdmi0_out_con: endpoint {
};
};
+&hdmi1 {
+ status = "okay";
+};
@@ -69,7 +77,7 @@ index 111111111111..222222222222 100644
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0m2_xfer>;
@@ -552,6 +591,14 @@ i2s0_8ch_p0_0: endpoint {
@@ -539,6 +579,15 @@ i2s0_8ch_p0_0: endpoint {
};
};
@@ -80,11 +88,12 @@ index 111111111111..222222222222 100644
+&i2s6_8ch {
+ status = "okay";
+};
+
+
&package_thermal {
polling-delay = <1000>;
@@ -1176,3 +1223,10 @@ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
@@ -1160,3 +1209,10 @@ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
remote-endpoint = <&hdmi0_in_vp0>;
};
};