# thermal zone

thermal zone 连接 Tsens 硬件信息、温度门限和调节操作。温控框架为设备树中定义的每个 thermal zone 规则创建节点 ID。

下表列出了用于读取和定制 thermal zone 配置的 `sysfs` 命令：

Note

表中的 `<x>` 表示 thermal zone ID。

表：thermal zone 命令的说明

| 命令 | 说明 |
| --- | --- |
| cat /sys/class/thermal/thermal_zone*<br>    Copy to clipboard | 列出设备包含的所有 thermal zone 及其 ID |
| echo enabled > /sys/class/thermal/thermal_zone<x>/mode<br>    Copy to clipboard | 启用 thermal zone<br><br><br>Note<br><br><br>默认情况下启用所有 thermal zone。 |
| echo disabled > /sys/class/thermal/thermal_zone<x>/mode<br>    Copy to clipboard | 禁用 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>此处，<br><br><br>`trip_temp` 是温度阈值，单位为 m°C。`A` 表示 trip 数值。例如，可以使用以下命令修改 trip 0 的温度门限：<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>修改 trip A 的门限温度</p></li><br><li><p>验证 thermal zone 目录中可用于 thermal zone 的 trip 点数：</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>并运行命令</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>此处，<br><br><br>`trip_hyst` 是滞后值，单位为 m°C。`A` 表示 trip 数值。例如，可以使用以下命令修改 trip 0 的滞后，这意味着在 trip\_temp-1000 m°C 时触发清除门限：<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>修改 trip A 的滞后值</p></li><br><li><p>验证 thermal zone 目录中可用于 thermal zone 的 trip 点数：</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>并运行命令 |

Note

对温度门限配置的修改应仅用于测试目的。请勿更改 Tsens 的任何 thermal zone 配置。复位设备时，通过 `sysfs` 命令执行的修改将更改为默认值。

您可以在设备树中添加产品特定的 thermal zone 及其规则，以根据如[配置一个新的温区](https://docs.qualcomm.com/doc/80-70017-30SC/topic/customize.html#section-lq4-xxb-51c)章节所述的温控要求控制设备温度。

Last Published: Apr 27, 2025

[Previous Topic
接口](https://docs.qualcomm.com/bundle/publicresource/80-70017-30SC/topics/thermal-interfaces.md) [Next Topic
cooling device](https://docs.qualcomm.com/bundle/publicresource/80-70017-30SC/topics/coolingdevices.md)