Thermal Driver Operations

This section lists some runtime operations of the thermal interface.

Read Sensor Temperature

Identify the zone type:
cat /sys/class/thermal/thermal_zone0/type
# Output: cpu-thermal
Read the current temperature:
cat /sys/class/thermal/thermal_zone0/temp
# Output: 36000
The temperature is reported in milli-degrees Celsius. 36000 = 36.0°C

Simulate Temperature

The thermal emulation feature allows injecting a fake temperature to test trip point behavior without physically heating the SoC.

Inject a test temperature into thermal zone 0 (for example, 80°C):
echo 80000 > /sys/class/thermal/thermal_zone0/emul_temp
The thermal framework will react as if the sensor reports 80°C — if this exceeds the passive trip threshold, CPU frequency will be throttled.
Disable emulation (return to real sensor readings):
echo 0 > /sys/class/thermal/thermal_zone0/emul_temp

Disable Thermal Controls

Disable the thermal governor (stop automatic throttling):
echo disabled > /sys/class/thermal/thermal_zone0/mode
Reset all cooling device status:
echo 0 > /sys/class/thermal/thermal_zone0/cdev*/cur_state

Adjust Over-Heat Thresholds

You can avoid automatic shut-down by modifying the over-heat temperature threshold of the cpu@crit node to a greater value. For example:
cpu_trips: trips{
    cpu_crit: cpu_crit@0 { 
    temperature = <110000>; 
    type = "critical"; 
    hyste-resis = <0>;
};
If the board uses a PMIC with its own over-temperature shutdown, the PMIC threshold must also be configured to avoid premature shutdown. For example:
pmu0: pmu@0{
overtemp_shutdown = <1>;   //Overtemp protection, 0 means shutdown
overtemp_value = <145>;    //Overtemp protection temperature

Modify Trip Point Thresholds

You can modify trip pint thresholds of the trip-point@ nodes based on your temperature control policy. For example:
cpu_trips: trips{
    cpu_threshold: trip-point@0 { 
    temperature = <70000>; 
    type = "passive";
    hysteresis = <0>;
};
    cpu_target: trip-point@1 { 
    tem-perature = <80000>; 
    type = "passive"; 
    hysteresis = <0>;
};