[PATCH 2/2] riscv: sophgo: dts: add cooling maps for Milk-V Pioneer

From: Chen Wang
Date: Wed Feb 12 2025 - 04:42:44 EST


From: Chen Wang <unicorn_wang@xxxxxxxxxxx>

The normal operating temperature range of SG2042 is -20 degrees
Celsius ~ 85 degrees Celsius.

Simultaneously monitor soc temperature and board temperature to
improve redundancy and safety.

Signed-off-by: Chen Wang <unicorn_wang@xxxxxxxxxxx>
---
.../boot/dts/sophgo/sg2042-milkv-pioneer.dts | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)

diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
index 74c997ed8283..34645a5f6038 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
@@ -111,6 +111,28 @@ soc_hot: soc-hot {
type = "hot";
};
};
+
+ cooling-maps {
+ map0 {
+ trip = <&soc_active1>;
+ cooling-device = <&pwmfan 0 1>;
+ };
+
+ map1 {
+ trip = <&soc_active2>;
+ cooling-device = <&pwmfan 1 2>;
+ };
+
+ map2 {
+ trip = <&soc_active3>;
+ cooling-device = <&pwmfan 2 3>;
+ };
+
+ map3 {
+ trip = <&soc_hot>;
+ cooling-device = <&pwmfan 3 4>;
+ };
+ };
};

board-thermal {
@@ -125,6 +147,13 @@ board_active: board-active {
type = "active";
};
};
+
+ cooling-maps {
+ map4 {
+ trip = <&board_active>;
+ cooling-device = <&pwmfan 3 4>;
+ };
+ };
};
};
};
--
2.34.1