|
Depends on the device you're using. And generally speaking: You won't be able to read out "CPU temperature" -- only SoC or PMU.
The A20 contains a touchpad controller which contains a thermal sensor. This piece of hardware is nearly undocumented and even the kernel sources for its driver say regarding the thermal values:
- * Allwinner does not have any documentation whatsoever for
- * this hardware. Moreover, it is claimed that the sensor
- * is inaccurate and cannot work properly.
Copy code The H3 has a "Thermal Sensor Controller (TSC) providing over-temperature protection interrupt and over-temperature alarm interrupt" which is read out by a driver being responsible for shutting down CPU cores (one after another) when internal temperatures exceed 70°C. So there's a driver that can both read out these values and act upon.
But this is not "CPU". This is always "SoC" (containing GPU cores and other stuff like a display controller, that also produce heat).
And then there's the PMU/PMIC. On A20 based boards this is always the AXP209 which has an internal thermal sensor that can be read out (more precisely than the A20's touchpad controller). No idea about H3's PMIC. But gaara talked about an A20 based Orange Pi (and most likely not about SoC but PMU instead).
|
|