[openwrt/openwrt] mvebu: puzzle-m90x: optimize thermal zone
LEDE Commits
lede-commits at lists.infradead.org
Thu Mar 21 14:25:53 PDT 2024
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1a47ce5ff2f2db07fca8fc28801c0a78cbf19fe4
commit 1a47ce5ff2f2db07fca8fc28801c0a78cbf19fe4
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu Mar 21 20:59:13 2024 +0000
mvebu: puzzle-m90x: optimize thermal zone
* have more defined PWM steps similar to the vendor's shell script doing
the same thing
* replace PWM values with experiencal values provided by forum users
* increase hyteresis to prevent changing fan speed every second
(just because it's annoying to listen to)
* add 'hot' trip point at 75 deg. to warn users that shutdown is imminent
Tested on Puzzle M902 only for now, PWM values for Puzzle M901 might be
slightly different but should quite certainly also be rised.
Suggested-by: Martin Gierschner <martin_gierschner at gmx.de>
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
.../arm64/boot/dts/marvell/cn9131-puzzle-m901.dts | 2 +-
.../arm64/boot/dts/marvell/cn9132-puzzle-m902.dts | 2 +-
.../arm64/boot/dts/marvell/puzzle-thermal.dtsi | 44 +++++++++++++++++-----
3 files changed, 36 insertions(+), 12 deletions(-)
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
index a33f8394ca..d214853f1b 100644
--- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
+++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
@@ -112,7 +112,7 @@
chassis_fan_group0: fan-group at 0 {
#cooling-cells = <2>;
reg = <0x00>;
- cooling-levels = <80 102 170 230 255>;
+ cooling-levels = <0 159 195 211 223 241 255>;
};
};
};
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
index 4b153fdc8c..8c775e4a4f 100644
--- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
+++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
@@ -157,7 +157,7 @@
chassis_fan_group0: fan-group at 0 {
#cooling-cells = <2>;
reg = <0x00>;
- cooling-levels = <80 102 170 230 255>;
+ cooling-levels = <0 159 195 211 223 241 255>;
};
};
};
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi
index a8ce8fd102..ea79ab224e 100644
--- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi
+++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi
@@ -3,38 +3,62 @@
polling-delay = <1000>; \
\
trips { \
+ cpu-hot { \
+ temperature = <75000>; \
+ hysteresis = <5000>; \
+ type = "hot"; \
+ }; \
+ _cname##_active_full: cpu-active-full { \
+ temperature = <70000>; \
+ hysteresis = <5000>; \
+ type = "active"; \
+ }; \
_cname##_active_high: cpu-active-high { \
- temperature = <80000>; \
- hysteresis = <2000>; \
+ temperature = <65000>; \
+ hysteresis = <5000>; \
type = "active"; \
}; \
_cname##_active_med: cpu-active-med { \
- temperature = <72000>; \
- hysteresis = <2000>; \
+ temperature = <62500>; \
+ hysteresis = <3000>; \
type = "active"; \
}; \
_cname##_active_low: cpu-active-low { \
- temperature = <65000>; \
- hysteresis = <2000>; \
+ temperature = <60000>; \
+ hysteresis = <3000>; \
+ type = "active"; \
+ }; \
+ _cname##_active_min: cpu-active-min { \
+ temperature = <55000>; \
+ hysteresis = <5000>; \
type = "active"; \
}; \
_cname##_active_idle: cpu-active-idle { \
- temperature = <60000>; \
- hysteresis = <2000>; \
+ temperature = <50000>; \
+ hysteresis = <5000>; \
type = "active"; \
}; \
}; \
cooling-maps { \
+ cpu-active-full { \
+ trip = <&_cname##_active_full>; \
+ cooling-device = <_fan THERMAL_NO_LIMIT \
+ THERMAL_NO_LIMIT>; \
+ }; \
cpu-active-high { \
trip = <&_cname##_active_high>; \
- cooling-device = <_fan 3 THERMAL_NO_LIMIT>; \
+ cooling-device = <_fan 4 5>; \
}; \
cpu-active-med { \
trip = <&_cname##_active_med>; \
- cooling-device = <_fan 2 3>; \
+ cooling-device = <_fan 3 4>; \
}; \
cpu-active-low { \
trip = <&_cname##_active_low>; \
+ cooling-device = <_fan 2 3>; \
+ }; \
+ cpu-active-min { \
+ trip = <&_cname##_active_min>; \
cooling-device = <_fan 1 2>; \
}; \
cpu-active-idle { \
More information about the lede-commits
mailing list