# Thermal cooling device

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

> Device-tree binding reference for Thermal cooling device.

<!-- 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;cooling&#45;devices&#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 cooling devices and thermal zones required to
take appropriate action to mitigate thermal overload.</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 cooling devices.</p>
<pre><code>There are essentially two ways to provide control on power dissipation:
  - Passive cooling: by means of regulating device performance. A typical
    passive cooling mechanism is a CPU that has dynamic voltage and frequency
    scaling (DVFS), and uses lower frequencies as cooling states.
  - Active cooling: by means of activating devices in order to remove the
    dissipated heat, e.g. regulating fan speeds.</code></pre>
<p style="white-space: pre-wrap">Any cooling device has a range of cooling states (i.e. different levels of
heat dissipation). They also have a way to determine the state of cooling in
which the device is. For example, a fan's cooling states correspond to the
different fan speeds possible. Cooling states are referred to by single
unsigned integers, where larger numbers mean greater heat dissipation. The
precise set of cooling states associated with a device should be defined in
a particular device's binding.</p>
</div>

<a id="dt-865ef19e891fb9fe7b15"></a>

## Automatic schema selection (<code>select</code>)

<code>true</code>

This selection rule always matches.

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

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

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

### <code>&#35;cooling&#45;cells</code> — not listed as required here

<div id="dt-12ba0e3f87c43781a56e">
<p style="white-space: pre-wrap">Must be 2, in order to specify minimum and maximum cooling state used in the cooling-maps reference. The first cell is the minimum cooling state and the second cell is the maximum cooling state requested.</p>
</div>

**Exact value (<code>const</code>):** <span id="dt-e98f0f4904b5004851bd"><code>2</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;
#include &lt;dt-bindings/thermal/thermal.h&gt;

// Example 1: Cpufreq cooling device on CPU0
cpus {
        #address-cells = &lt;2&gt;;
        #size-cells = &lt;0&gt;;

        CPU0: cpu@0 {
                device_type = "cpu";
                compatible = "qcom,kryo385";
                reg = &lt;0x0 0x0&gt;;
                enable-method = "psci";
                cpu-idle-states = &lt;&amp;LITTLE_CPU_SLEEP_0&gt;,
                                  &lt;&amp;LITTLE_CPU_SLEEP_1&gt;,
                                  &lt;&amp;CLUSTER_SLEEP_0&gt;;
                capacity-dmips-mhz = &lt;607&gt;;
                dynamic-power-coefficient = &lt;100&gt;;
                qcom,freq-domain = &lt;&amp;cpufreq_hw 0&gt;;
                #cooling-cells = &lt;2&gt;;
                next-level-cache = &lt;&amp;L2_0&gt;;
                L2_0: l2-cache {
                        compatible = "cache";
                        cache-unified;
                        cache-level = &lt;2&gt;;
                        next-level-cache = &lt;&amp;L3_0&gt;;
                        L3_0: l3-cache {
                                compatible = "cache";
                                cache-unified;
                                cache-level = &lt;3&gt;;
                        };
                };
      };

      /* ... */

};

/* ... */

thermal-zones {
        cpu0-thermal {
                polling-delay-passive = &lt;250&gt;;
                polling-delay = &lt;1000&gt;;

                thermal-sensors = &lt;&amp;tsens0 1&gt;;

                trips {
                        cpu0_alert0: trip-point0 {
                                temperature = &lt;90000&gt;;
                                hysteresis = &lt;2000&gt;;
                                type = "passive";
                        };
                };

                cooling-maps {
                        map0 {
                                trip = &lt;&amp;cpu0_alert0&gt;;
                                /* Corresponds to 1000MHz in OPP table */
                                cooling-device = &lt;&amp;CPU0 5 5&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>
