@frank-w @dangowrt @sam33 (Authors of mt7986a-bananapi-bpi-r3.dts)
Looking at the BPI-R3:
At the moment there is only an active cooling device defined. Because there is no variable voltage regulator for the CPU, there is no cpu-frequency scaling defined, unlike the BPI-R64.
So when there is no fan installed, or it fails (and no 4th pin to tell us it isn’t rotating), there is no cooling-map that will somehow throttle the cpu when the cpu gets hotter and hotter.
I’m not sure if the mediatek drver does something with THERMAL_TRIP_HOT
, but I can’t find it if I have a brief look…
Anyway, may I suggest adding thermal-idle
as cooling-device
, like so?
Just wrote this down to elaborate, without actually testing it yet
&cpu0 {
cpu0_therm: thermal-idle {
#cooling-cells = <2>;
duration-us = <10000>;
exit-latency-us = <500>;
};
};
&cpu1 {
cpu1_therm: thermal-idle {
#cooling-cells = <2>;
duration-us = <10000>;
exit-latency-us = <500>;
};
};
&cpu2 {
cpu2_therm: thermal-idle {
#cooling-cells = <2>;
duration-us = <10000>;
exit-latency-us = <500>;
};
};
&cpu3 {
cpu3_therm: thermal-idle {
#cooling-cells = <2>;
duration-us = <10000>;
exit-latency-us = <500>;
};
};
&cpu_thermal {
trips {
cpu_trip_passive_idle: passive_idle {
temperature = <100000>;
hysteresis = <2000>;
type = "passive";
};
};
cooling-maps {
map-cpu-passive_idle {
trip = <&cpu_trip_passive_idle>;
cooling-device = <&cpu0_therm 0 15>,
<&cpu1_therm 0 15>,
<&cpu2_therm 0 15>,
<&cpu3_therm 0 15>;
};
};
};
As found in: thermal-idle.yaml - Documentation/devicetree/bindings/thermal/thermal-idle.yaml - Linux source code (v6.9) - Bootlin