mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-20 15:45:29 +04:00
Add thermal zone for the Wi-Fi chip using the same trip levels and cooling maps as the CPU. The kernel thermal governor will act on whichever temperature is the highest. There is only a single heatsink and fan to cover both the SoC and Wi-Fi chip, so tracking both CPU and Wi-Fi temperatures ensures that neither chip will overheat from low fan speed. The trip levels are spaced 1.25C apart with double that (2.5C) for the hysteresis, with 5C hysteresis for the lowest trip level (65C) because it is preferable for the fan to run for longer at low speed than to stop and start repeatedly. In the absence of continuous proportional feedback control, tightly grouping the trip levels and cooling maps minimises the frequency and amplitude of temperature and fan speed oscillations. The cooling states are set to increments of 5 (out of 255) from 12% to 61% and then increments of 10 from 61% to 100% with kick start speed at 15%. In comparison, the default in mt7981b.dtsi starts at 50% fan speed and leads to constant on/off cycles within a short period of time (every ~2 minutes). Signed-off-by: Ryan Leung <untilscour@protonmail.com> Link: https://github.com/openwrt/openwrt/pull/22936 Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>