i.MX 8X Thermal
The Linux kernel has an integrated thermal management which is capable of monitoring SoC temperatures, reducing the CPU frequency, driving fans, advising other drivers to reduce the power consumption of devices, and – worst case – shutting down the system gracefully (https://www.kernel.org/doc/Documentation/thermal/sysfs-api.txt).
This section describes how the thermal management kernel API is used for the i.MX 8X SoC platform.
The i.MX 8X has internal temperature sensors for the SoC.
The current temperature can be read in millicelsius with:
$ cat /sys/class/thermal/thermal_zone0/temp
You will get, for example:
29700
There are two trip points registered by the imx_thermal kernel driver:
trip_point_0: 107 °C type: passive
trip_point_1: 127 °C type: critical
(see kernel sysfs folder /sys/class/thermal/thermal_zone0/)
These trip points are used by the kernel thermal management to trigger events and change the cooling behavior.
The following thermal policies (also named thermal governors) are available in the kernel:Step Wise, Fair Share, Bang Bang and User space.
The default policy used in the BSP is step_wise.
If the value of the SoC temperature in the sysfs file temp is above trip_point_0 (greater than 85 °C), the CPU frequency is set to the lowest CPU frequency. When the SoC temperature drops below trip_point_0 again, the throttling is released.
If the SoC temperature reaches 127 °C, the thermal management of the kernel shuts down the systems.