summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Marangi2024-05-21 15:33:02 +0000
committerDaniel Golle2024-06-01 15:40:10 +0000
commit611413cc3fec3cee178ffceff6825a87d8f85e47 (patch)
treeeba2f7a83238ef05075005a6affca052062d3f71
parente5c7b5ec43718df0c758368a7c1fa645fab96ce2 (diff)
downloadopenwrt-611413cc3fec3cee178ffceff6825a87d8f85e47.tar.gz
mvebu: split thermal zone for puzzle chassis
Split thermal zone for puzzle chassis. Thermal platform supports only one sensor per thermal zone. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts57
-rw-r--r--target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts46
-rw-r--r--target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi36
3 files changed, 50 insertions, 89 deletions
diff --git a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
index b3e3d0a1e0..90d6e855be 100644
--- a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
@@ -56,57 +56,14 @@
};
thermal-zones {
- chassis-thermal {
- polling-delay = <5000>;
- thermal-sensors = <&puzzle_hwmon 0>, <&puzzle_hwmon 1>;
-
- trips {
- chassis_very_hot: trip-point3 {
- temperature = <55000>;
- hysteresis = <5000>;
- type = "active";
- };
-
- chassis_hot: trip-point2 {
- temperature = <50000>;
- hysteresis = <5000>;
- type = "active";
- };
-
- chassis_warm: trip-point1 {
- temperature = <45000>;
- hysteresis = <5000>;
- type = "active";
- };
-
- chassis_cold: trip-point0 {
- temperature = <40000>;
- hysteresis = <5000>;
- type = "active";
- };
- };
+ chassis0-thermal {
+ thermal-sensors = <&puzzle_hwmon 0>;
+ PUZZLE_FAN_CHASSIS_THERMAL(chassis0, &chassis_fan_group0);
+ };
- cooling-maps {
- map3 {
- trip = <&chassis_very_hot>;
- cooling-device = <&chassis_fan_group0 6 6>;
- };
-
- map2 {
- trip = <&chassis_hot>;
- cooling-device = <&chassis_fan_group0 3 3>;
- };
-
- map1 {
- trip = <&chassis_warm>;
- cooling-device = <&chassis_fan_group0 1 1>;
- };
-
- map0 {
- trip = <&chassis_cold>;
- cooling-device = <&chassis_fan_group0 0 0>;
- };
- };
+ chassis1-thermal {
+ thermal-sensors = <&puzzle_hwmon 1>;
+ PUZZLE_FAN_CHASSIS_THERMAL(chassis1, &chassis_fan_group0);
};
cp0-phy0-thermal {
diff --git a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
index 1394f2010a..67dace4888 100644
--- a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
@@ -101,46 +101,14 @@
};
thermal-zones {
- chassis-thermal {
- polling-delay = <5000>;
- thermal-sensors = <&puzzle_hwmon 0>, <&puzzle_hwmon 1>;
-
- trips {
- chassis_very_hot: trip-point2 {
- temperature = <55000>;
- hysteresis = <5000>;
- type = "active";
- };
-
- chassis_hot: trip-point1 {
- temperature = <50000>;
- hysteresis = <5000>;
- type = "active";
- };
-
- chassis_warm: trip-point0 {
- temperature = <45000>;
- hysteresis = <5000>;
- type = "active";
- };
- };
+ chassis0-thermal {
+ thermal-sensors = <&puzzle_hwmon 0>;
+ PUZZLE_FAN_CHASSIS_THERMAL(chassis0, &chassis_fan_group0);
+ };
- cooling-maps {
- map2 {
- trip = <&chassis_very_hot>;
- cooling-device = <&chassis_fan_group0 6 6>;
- };
-
- map1 {
- trip = <&chassis_hot>;
- cooling-device = <&chassis_fan_group0 3 3>;
- };
-
- map0 {
- trip = <&chassis_warm>;
- cooling-device = <&chassis_fan_group0 1 1>;
- };
- };
+ chassis1-thermal {
+ thermal-sensors = <&puzzle_hwmon 1>;
+ PUZZLE_FAN_CHASSIS_THERMAL(chassis1, &chassis_fan_group0);
};
cp0-phy0-thermal {
diff --git a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi
index d347a429ae..093f910558 100644
--- a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi
+++ b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi
@@ -60,3 +60,39 @@
cooling-device = <_fan 1 1>; \
}; \
}
+
+#define PUZZLE_FAN_CHASSIS_THERMAL(_cname, _fan) \
+ polling-delay-passive = <0>; \
+ polling-delay = <5000>; \
+ \
+ trips { \
+ _cname##_active_full: trip-point2 { \
+ temperature = <70000>; \
+ hysteresis = <3000>; \
+ type = "active"; \
+ }; \
+ _cname##_active_med: trip-point1 { \
+ temperature = <62500>; \
+ hysteresis = <3000>; \
+ type = "active"; \
+ }; \
+ _cname##_active_min: trip-point0 { \
+ temperature = <55000>; \
+ hysteresis = <5000>; \
+ type = "active"; \
+ }; \
+ }; \
+ cooling-maps { \
+ map2 { \
+ trip = <&_cname##_active_full>; \
+ cooling-device = <_fan 6 6>; \
+ }; \
+ map1 { \
+ trip = <&_cname##_active_med>; \
+ cooling-device = <_fan 3 3>; \
+ }; \
+ map0 { \
+ trip = <&_cname##_active_min>; \
+ cooling-device = <_fan 1 1>; \
+ }; \
+ }