board: nanopc-t6: Add USB3 power supply and pwm fan to DTS

Co-authored-by: SuperKali <hello@superkali.me>
This commit is contained in:
ColorfulRhino 2024-10-21 16:14:47 +02:00 committed by Igor
parent e28a3ec888
commit 864a480578
1 changed files with 126 additions and 0 deletions

View File

@ -0,0 +1,126 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SuperKali <hello@superkali.me>
Date: Mon, 21 Oct 2024 13:21:03 +0000
Subject: Add Missing parameters for USB3.0 and FAN
Signed-off-by: SuperKali <hello@superkali.me>
---
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts | 4 -
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 58 ++++++++++
2 files changed, 58 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6-lts.dts
@@ -42,10 +42,6 @@ &u2phy1 {
status = "okay";
};
-&u2phy1_otg {
- status = "okay";
-};
-
&u2phy2_host {
phy-supply = <&vcc5v0_usb20_host>;
};
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
@@ -66,6 +66,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";
@@ -171,6 +180,18 @@ vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
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: vcc3v3-pcie30-regulator {
compatible = "regulator-fixed";
enable-active-high;
@@ -485,6 +506,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>;
@@ -575,6 +624,10 @@ typec5v_pwren: typec5v-pwren {
rockchip,pins = <1 RK_PD2 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>;
};
@@ -973,6 +1026,11 @@ &u2phy0_otg {
status = "okay";
};
+&u2phy1_otg {
+ phy-supply = <&vcc5v0_host_30>;
+ status = "okay";
+};
+
&u2phy2_host {
status = "okay";
};
--
Armbian