# Thermal zone

The thermal zone connects Tsens hardware information, temperature
thresholds, and mitigation actions. The thermal framework creates node
IDs for each thermal zone rule defined in the device tree.

The following table lists the `sysfs` commands used to read and
customize the thermal zone configurations:

Note

`<x>` in the table represents thermal zone ID.

Table : Description of thermal zone commands

| Commands | Description |
| --- | --- |
| cat /sys/class/thermal/thermal_zone*<br>    Copy to clipboard | Lists all thermal zones and their IDs that the device<br>contains |
| echo enabled > /sys/class/thermal/thermal_zone<x>/mode<br>    Copy to clipboard | Enables a thermal zone<br><br><br>Note<br><br><br>All thermal zones are enabled by default. |
| echo disabled > /sys/class/thermal/thermal_zone<x>/mode<br>    Copy to clipboard | Disables a thermal zone |
| > <br>> <br>> echo <trip_temp> >/sys/class/thermal/thermal_zone<x>/trip_point_<A>_temp<br>>     Copy to clipboard<br><br><br><br>Here,<br><br><br>`trip_temp` is the temperature threshold in m°C. `A`<br>denotes trip point numerical.<br>For example, you can modify the temperature threshold for a<br>trip point 0 using the following command:<br><br><br><br>> <br>> <br>> echo 95000 > /sys/class/thermal/thermal_zone20/trip_point_0_temp<br>>     Copy to clipboard | <ul><br><li><p>Modifies threshold temperature for trip point A</p></li><br><li><p>Verify the number of trip points available to the thermal<br>zone in the thermal zone directory:</p><br><blockquote><br><div><div class="nohighlight docutils container"><br><div class="highlight-default notranslate"><div class="highlight"><pre class="pre codeblock"><code>/sys/class/thermal/thermal_zone&lt;x&gt;<br></code><span class="copyclip"><svg xmlns="http://www.w3.org/2000/svg" class="copyclipicon" width="25px" height="25px" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><title>Copy to clipboard</title><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span></pre></div><br></div><br></div><br></div></blockquote><br><p>and run the command</p><br></li><br></ul> |
| > <br>> <br>> echo <trip_hyst> > /sys/class/thermal/thermal_zone<x>/trip_point_<A>_hyst<br>>     Copy to clipboard<br><br><br><br>Here,<br><br><br>`trip_hyst` is hysteresis value in m°C. `A` denotes trip<br>point numerical.<br>For example, you can modify hysteresis for trip point 0,<br>which means a clear threshold is triggered at trip\_temp-1000<br>m°C using the following command:<br><br><br><br>> <br>> <br>> echo 1000 > /sys/class/thermal/thermal_zone20/trip_point_0_hyst<br>>     Copy to clipboard | <ul><br><li><p>Modifies hysteresis value for trip point A</p></li><br><li><p>Verify the number of trip points available to the<br>thermal zone in the thermal zone directory:</p><br><blockquote><br><div><div class="nohighlight docutils container"><br><div class="highlight-default notranslate"><div class="highlight"><pre class="pre codeblock"><code>/sys/class/thermal/thermal_zone&lt;x&gt;<br></code><span class="copyclip"><svg xmlns="http://www.w3.org/2000/svg" class="copyclipicon" width="25px" height="25px" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><title>Copy to clipboard</title><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span></pre></div><br></div><br></div><br></div></blockquote><br></li><br></ul><br><br>and run the command |

Note

Modifications to temperature threshold configurations should
be for test purpose only. Do not change any thermal zone configurations
of Tsens. Modifications performed through `sysfs` commands are changed
to default values when the device is reset.

You can add a product specific thermal zone and its rules in the device
tree to control the temperature of the device according to the thermal
requirement as described in: [Configure a new thermal zone](https://docs.qualcomm.com/doc/80-70017-30/topic/customize.html#section-lq4-xxb-51c).

Last Published: Jan 26, 2025

[Previous Topic
Interfaces](https://docs.qualcomm.com/bundle/publicresource/80-70017-30/topics/thermal-interfaces.md) [Next Topic
Cooling devices](https://docs.qualcomm.com/bundle/publicresource/80-70017-30/topics/coolingdevices.md)