[BPI-R2] Recent OpenWrt snapshots break temperature monitoring

It appears that recent snapshots of OpenWrt break CPU temperature monitoring:

22.03.02:

root@OpenWrt:/sys# cat /sys/devices/virtual/thermal/thermal_zone0/temp
48961

SNAPSHOT:

root@OpenWrt:/sys# cat /sys/devices/virtual/thermal/thermal_zone0/temp
0

Has anyone else noticed this?

Which kernelversion do you have there? My vanilla kernel 5.15.63 (mhm…time for upgrade :slight_smile: uptime 86 days ) does not have this bug.

Latest OpenWrt snapshot is 5.15.78. What are you running that uses a vanilla kernel?

I do not use openwrt,but i guess it is a openwrt specific issue (maybe due to backports)

mainline do not have this issue (or already fixed)

root@bpi-r2:~# cat /sys/class/thermal/thermal_zone0/temp
34891
root@bpi-r2:~# uname -a
Linux bpi-r2 5.15.80-bpi-r2-main #2 SMP Mon Nov 28 17:56:27 CET 2022 armv7l GNU/Linux

maybe you miss any config option (efuse or adc)?

do not see any related commits in drivers/thermal, drivers/nvmem, drivers/iio/adc between 5.15.78 and 5.15.80

Installing kmod-iio-mt6577-auxadc fixes the issue for now, but that’s not a good solution. I’ll push a fix again having this driver as built-into the kernel in a few moments.

Edit: It’s weird that this seems to be needed only on MT7623 while other MediaTek SoCs (MT7622, MT7986) correctly report temperature even without the mt6577_auxadc being loaded.

And it’s only on snapshot. On 22.03.2 the 7623 reports its temperature with no problems.

Yep, it was caused by my commit

This commit is only present in the master branch and not in openwrt-22.03 or earlier releases.

And I’ve now fixed it with

1 Like