[PATCH v2 5/5] arm64: dts: rockchip: add Khadas MCU and fan control nodes
muhammed.efecetin.67 at gmail.com
muhammed.efecetin.67 at gmail.com
Tue Jul 22 05:38:15 PDT 2025
From: Muhammed Efe Cetin <efectn at protonmail.com>
Add Khadas MCU fan control to Khadas Edge 2 with 4 fan control levels.
Signed-off-by: Muhammed Efe Cetin <efectn at protonmail.com>
---
.../dts/rockchip/rk3588s-khadas-edge2.dts | 58 +++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
index 2c22abaf4..b51b64732 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
@@ -271,12 +271,70 @@ hym8563: rtc at 51 {
clock-output-names = "hym8563";
wakeup-source;
};
+
+ khadas_mcu: system-controller at 18 {
+ compatible = "khadas,mcu-v2";
+ reg = <0x18>;
+ #cooling-cells = <2>;
+ };
};
&i2s5_8ch {
status = "okay";
};
+&package_thermal {
+ polling-delay = <2000>;
+
+ trips {
+ package_fan0: package-fan0 {
+ temperature = <50000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+
+ package_fan1: package-fan1 {
+ temperature = <60000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+
+ package_fan2: package-fan2 {
+ temperature = <65000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+
+ package_fan3: package-fan3 {
+ temperature = <75000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&package_fan0>;
+ cooling-device = <&khadas_mcu THERMAL_NO_LIMIT 50>;
+ };
+
+ map1 {
+ trip = <&package_fan1>;
+ cooling-device = <&khadas_mcu 50 72>;
+ };
+
+ map2 {
+ trip = <&package_fan2>;
+ cooling-device = <&khadas_mcu 72 100>;
+ };
+
+ map3 {
+ trip = <&package_fan3>;
+ cooling-device = <&khadas_mcu 100 THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
&pd_gpu {
domain-supply = <&vdd_gpu_s0>;
};
--
2.50.1
More information about the linux-arm-kernel
mailing list