Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CANNOT get CPU temperature via sysfs on rpi-4.12.y ARM64 #2136
One day I tried to get CPU temperature via sysfs:
However,I can get correct temperature via VCHIQ:
I have no idea how bcm2835_thermal failed to probe 3f212000.thermal.
A temporary solution:
After that, BOTH sysfs and VCHIQ function properly:
The upstream driver works in the current rpi-4.12.y branch, but CONFIG_BCM2835_THERMAL can only be set with CONFIG_ARCH_BCM, which is enabled for 32-bit but not 64-bit.
The Kconfig patch below allows using CONFIG_BCM2835_THERMAL when ARCH=arm64, which works for me on the pi3.
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 257e2d59d1b0..61353fdcc995 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -415,7 +415,7 @@ config MTK_THERMAL controller present in Mediatek SoCs menu "Broadcom thermal drivers" -depends on ARCH_BCM || COMPILE_TEST +depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST source "drivers/thermal/broadcom/Kconfig" endmenu
Sure, I'll get a patch sent out.
For the downstream linux-rpi kernel, I think we should also change bcmrpi3_defconfig to use the (working) upstream driver. Presumably both CONFIG_THERMAL_BCM2835 and CONFIG_BCM2835_THERMAL shouldn't be set at the same time, but it seems to work when that's the case.
I need to double-check the configs for 32-bit mode and update bcm2709_defconfig if needed for the rpi-4.12.y branch.