# Thermal sensor

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Thermal bindings_

> Device-tree binding reference for Thermal sensor.

<!-- SPDX-License-Identifier: (GPL-2.0) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;thermal&#47;thermal&#45;sensor&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Amit Kucheria &#60;amitk&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Thermal management is achieved in devicetree by describing the sensor hardware
and the software abstraction of thermal zones required to take appropriate
action to mitigate thermal overloads.</p>
<pre><code>The following node types are used to completely describe a thermal management
system in devicetree:
 - thermal-sensor: device that measures temperature, has SoC-specific bindings
 - cooling-device: device used to dissipate heat either passively or actively
 - thermal-zones: a container of the following node types used to describe all
   thermal data for the platform</code></pre>
<p style="white-space: pre-wrap">This binding describes the thermal-sensor.</p>
<p style="white-space: pre-wrap">Thermal sensor devices provide temperature sensing capabilities on thermal
zones. Typical devices are I2C ADC converters and bandgaps. Thermal sensor
devices may control one or more internal sensors.</p>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-ac9841adea46564de589"></a>

### <code>&#35;thermal&#45;sensor&#45;cells</code> — required here

<div id="dt-0ef0091c52eb523e7d0b">
<p style="white-space: pre-wrap">Used to uniquely identify a thermal sensor instance within an IC. Will be 0 on sensor nodes with only a single sensor and at least 1 on nodes containing several internal sensors.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-ef1718d1bd9aff21caeb"></a> <span id="dt-e88932a60c4c95a26554"><code>0</code></span>, <span id="dt-efaf241770130b5c577d"><code>1</code></span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;&#35;thermal&#45;sensor&#45;cells&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>true</code>

Allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;

// Example 1: SDM845 TSENS
soc: soc {
        #address-cells = &lt;2&gt;;
        #size-cells = &lt;2&gt;;

        /* ... */

        tsens0: thermal-sensor@c263000 {
                compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
                reg = &lt;0 0x0c263000 0 0x1ff&gt;, /* TM */
                      &lt;0 0x0c222000 0 0x1ff&gt;; /* SROT */
                #qcom,sensors = &lt;13&gt;;
                interrupts = &lt;GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH&gt;,
                             &lt;GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH&gt;;
                interrupt-names = "uplow", "critical";
                #thermal-sensor-cells = &lt;1&gt;;
        };

        tsens1: thermal-sensor@c265000 {
                compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
                reg = &lt;0 0x0c265000 0 0x1ff&gt;, /* TM */
                      &lt;0 0x0c223000 0 0x1ff&gt;; /* SROT */
                #qcom,sensors = &lt;8&gt;;
                interrupts = &lt;GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH&gt;,
                             &lt;GIC_SPI 509 IRQ_TYPE_LEVEL_HIGH&gt;;
                interrupt-names = "uplow", "critical";
                #thermal-sensor-cells = &lt;1&gt;;
        };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0)</span></p>

<p id="dt-comment-1"><strong>Line 2:</strong> <span> Copyright 2020 Linaro Ltd.</span></p>

</details>
