# Power State Coordination Interface (PSCI)

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

> Device-tree binding reference for Power State Coordination Interface (PSCI).

<!-- 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;arm&#47;psci&#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;Lorenzo Pieralisi &#60;lorenzo&#46;pieralisi&#64;arm&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Firmware implementing the PSCI functions described in ARM document number
ARM DEN 0022A ("Power State Coordination Interface System Software on ARM
processors") can be used by Linux to initiate various CPU-centric power
operations.</p>
<p style="white-space: pre-wrap">Issue A of the specification describes functions for CPU suspend, hotplug
and migration of secure software.</p>
<p style="white-space: pre-wrap">Functions are invoked by trapping to the privilege level of the PSCI
firmware (specified as part of the binding below) and passing arguments
in a manner similar to that specified by AAPCS:</p>
<pre><code>   r0       =&gt; 32-bit Function ID / return value
  {r1 - r3}	=&gt; Parameters</code></pre>
<p style="white-space: pre-wrap">Note that the immediate field of the trapping instruction must be set
to #0.</p>
<pre><code>[2] Power State Coordination Interface (PSCI) specification
  http://infocenter.arm.com/help/topic/com.arm.doc.den0022c/DEN0022C_Power_State_Coordination_Interface.pdf</code></pre>
</div>

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

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

<a id="dt-5155525ecd924660ec0a"></a>

### <code>&#36;nodename</code> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-8cca737a574136d30da2"><code>&#34;psci&#34;</code></span>

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

<a id="dt-39566f01414e34c67b85"></a>

#### Exactly one of these rules must match (<code>oneOf</code>)

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

**Rule 1**

> <div id="dt-ab1c3e7063bd95dc962e">
> <p style="white-space: pre-wrap">For implementations complying to PSCI versions prior to 0.2.</p>
> </div>
>
> **Exact value (<code>const</code>):** <span id="dt-d1fe1b456a54b64074d3"><code>&#34;arm&#44;psci&#34;</code></span>

<a id="dt-7482b6e745c4f056161a"></a>

**Rule 2**

> <div id="dt-4b64ce44adfe069638c4">
> <p style="white-space: pre-wrap">For implementations complying to PSCI 0.2. Function IDs are not required and should be ignored by an OS with PSCI 0.2 support, but are permitted to be present for compatibility with existing software when "arm,psci" is later in the compatible list.</p>
> </div>
>
> **Minimum number of items (<code>minItems</code>):** <span id="dt-1167fc97774af0db8621"><code>1</code></span>
>
> <a id="dt-4c3e118873fbaedb5de2"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-b02d8860067795c00ae4"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-82dceb5784ff71f5fdf5"><code>&#34;arm&#44;psci&#45;0&#46;2&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;arm&#44;psci&#34;</code></span>

<a id="dt-39cb5b72c94e12bd53ea"></a>

**Rule 3**

> <div id="dt-34ebc3371373135d1528">
> <p style="white-space: pre-wrap">For implementations complying to PSCI 1.0. PSCI 1.0 is backward compatible with PSCI 0.2 with minor specification updates, as defined in the PSCI specification[2].</p>
> </div>
>
> **Minimum number of items (<code>minItems</code>):** <span id="dt-15d9184cf224a827c528"><code>1</code></span>
>
> <a id="dt-e626d61e9d5d76cc48f9"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-6b46935eab08de6d1f0a"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-b4cf31a5f463012e1429"><code>&#34;arm&#44;psci&#45;1&#46;0&#34;</code></span>
>
> <a id="dt-5ea82ea034747ba6da29"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-e9c55cb91230c7ee5a28"><code>&#34;arm&#44;psci&#45;0&#46;2&#34;</code></span>
>
> <a id="dt-3acd265d2314f4be0bd4"></a>
>
> **Item 3**
>
> > **Exact value (<code>const</code>):** <span id="dt-d09fdb468825e586f676"><code>&#34;arm&#44;psci&#34;</code></span>

<a id="dt-56d20c2fbc412b1c7185"></a>

### <code>method</code> — required here

<div id="dt-d44c6019d774fabafa96">
<p style="white-space: pre-wrap">The method of calling the PSCI firmware.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-2a1d348fe72071187e10">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;string&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-7360acce49da10397d42>)</span>

**Allowed values (<code>enum</code>):** <a id="dt-bcc5905647f9af4090ca"></a> <span id="dt-ddec530f7ba7620ddc6a"><code>&#34;smc&#34;</code></span>, <span id="dt-ce2659a732a2104a0842"><code>&#34;hvc&#34;</code></span>

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

### <code>cpu&#95;suspend</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4ffe64bcd937e281e59c">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-6e236b273fc9d90ebe27">
<p style="white-space: pre-wrap">Function ID for CPU_SUSPEND operation</p>
</div>

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

### <code>cpu&#95;off</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-0690ac157f0e09b4d6e8">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-827318b34f02edd4880e">
<p style="white-space: pre-wrap">Function ID for CPU_OFF operation</p>
</div>

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

### <code>cpu&#95;on</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-81dec8205f64b57fe412">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-474c73140b40140a8e68">
<p style="white-space: pre-wrap">Function ID for CPU_ON operation</p>
</div>

<a id="dt-79e9f898f80c0709cbc8"></a>

### <code>migrate</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-53745c8468d7316dc553">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-74a936b2d8095f404e95">
<p style="white-space: pre-wrap">Function ID for MIGRATE operation</p>
</div>

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

### <code>arm&#44;psci&#45;suspend&#45;param</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-32f7d515083c74283bd7">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-80b85ec659fdc5066637">
<p style="white-space: pre-wrap">power_state parameter to pass to the PSCI suspend call.</p>
<p style="white-space: pre-wrap">Device tree nodes that require usage of PSCI CPU_SUSPEND function (ie
idle state nodes with entry-method property is set to "psci", as per
bindings in [1]) must specify this property.</p>
<pre><code>[1] Kernel documentation - ARM idle states bindings
  Documentation/devicetree/bindings/cpu/idle-states.yaml</code></pre>
</div>

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

## Properties matching a name pattern (<code>patternProperties</code>)

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

### <code>&#94;power&#45;domain&#45;</code> — name matches this regular expression

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-87c0ad27bf420432627b">[<code>&#47;schemas&#47;power&#47;power&#45;domain&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-power/power-domain.md#dt-root>)</span>

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

#### Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

**Value type (<code>type</code>):** <span id="dt-8483b42137c1c8b988ea"><code>&#34;object&#34;</code></span>

<div id="dt-6dac5bdafaf4ea07cc3c">
<p style="white-space: pre-wrap">ARM systems can have multiple cores, sometimes in an hierarchical
arrangement. This often, but not always, maps directly to the processor
power topology of the system. Individual nodes in a topology have their
own specific power states and can be better represented hierarchically.</p>
<p style="white-space: pre-wrap">For these cases, the definitions of the idle states for the CPUs and the
CPU topology, must conform to the binding in [3]. The idle states
themselves must conform to the binding in [4] and must specify the
arm,psci-suspend-param property.</p>
<p style="white-space: pre-wrap">It should also be noted that, in PSCI firmware v1.0 the OS-Initiated
(OSI) CPU suspend mode is introduced. Using a hierarchical representation
helps to implement support for OSI mode and OS implementations may choose
to mandate it.</p>
<p style="white-space: pre-wrap">[3] Documentation/devicetree/bindings/power/power-domain.yaml
[4] Documentation/devicetree/bindings/power/domain-idle-state.yaml</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;method&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

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

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-ebe43a424f4497a78746"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Exact value (<code>const</code>):** <span id="dt-8997992e7087b5549d86"><code>&#34;arm&#44;psci&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-b0b2f2243ff9a854f151"></a> <span id="dt-4e9ead0e861b67997dec"><code>&#34;cpu&#95;off&#34;</code></span>, <span id="dt-5652a54c9ddda3dcd6bf"><code>&#34;cpu&#95;on&#34;</code></span>

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

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

<code>false</code>

Not allowed by this rule.

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">
// Case 1: PSCI v0.1 only.

psci {
  compatible      = "arm,psci";
  method          = "smc";
  cpu_suspend     = &lt;0x95c10000&gt;;
  cpu_off         = &lt;0x95c10001&gt;;
  cpu_on          = &lt;0x95c10002&gt;;
  migrate         = &lt;0x95c10003&gt;;
};

</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">
// Case 2: PSCI v0.2 only

psci {
  compatible      = "arm,psci-0.2";
  method          = "smc";
};

</code></pre>

<pre id="dt-d0212a4cd671f89a0b40"><code class="language-dts">
// Case 3: PSCI v0.2 and PSCI v0.1.

/*
 * A DTB may provide IDs for use by kernels without PSCI 0.2 support,
 * enabling firmware and hypervisors to support existing and new kernels.
 * These IDs will be ignored by kernels with PSCI 0.2 support, which will
 * use the standard PSCI 0.2 IDs exclusively.
 */

psci {
  compatible = "arm,psci-0.2", "arm,psci";
  method = "hvc";

  cpu_on = &lt;0x95c10002&gt;;
  cpu_off = &lt;0x95c10001&gt;;
};

</code></pre>

<pre id="dt-cf8a683b5a963eb1c566"><code class="language-dts">
// Case 4: CPUs and CPU idle states described using the hierarchical model.

cpus {
  #size-cells = &lt;0&gt;;
  #address-cells = &lt;1&gt;;

  cpu@0 {
    device_type = "cpu";
    compatible = "arm,cortex-a53";
    reg = &lt;0x0&gt;;
    enable-method = "psci";
    power-domains = &lt;&amp;cpu_pd0&gt;;
    power-domain-names = "psci";
  };

  cpu@1 {
    device_type = "cpu";
    compatible = "arm,cortex-a53";
    reg = &lt;0x100&gt;;
    enable-method = "psci";
    power-domains = &lt;&amp;cpu_pd1&gt;;
    power-domain-names = "psci";
  };

  idle-states {

    cpu_pwrdn: cpu-power-down {
      compatible = "arm,idle-state";
      arm,psci-suspend-param = &lt;0x0000001&gt;;
      entry-latency-us = &lt;10&gt;;
      exit-latency-us = &lt;10&gt;;
      min-residency-us = &lt;100&gt;;
    };
  };

  domain-idle-states {

    cluster_ret: cluster-retention {
      compatible = "domain-idle-state";
      arm,psci-suspend-param = &lt;0x1000011&gt;;
      entry-latency-us = &lt;500&gt;;
      exit-latency-us = &lt;500&gt;;
      min-residency-us = &lt;2000&gt;;
    };

    cluster_pwrdn: cluster-power-down {
      compatible = "domain-idle-state";
      arm,psci-suspend-param = &lt;0x1000031&gt;;
      entry-latency-us = &lt;2000&gt;;
      exit-latency-us = &lt;2000&gt;;
      min-residency-us = &lt;6000&gt;;
    };
  };
};

psci {
  compatible = "arm,psci-1.0";
  method = "smc";

  cpu_pd0: power-domain-cpu0 {
    #power-domain-cells = &lt;0&gt;;
    domain-idle-states = &lt;&amp;cpu_pwrdn&gt;;
    power-domains = &lt;&amp;cluster_pd&gt;;
  };

  cpu_pd1: power-domain-cpu1 {
    #power-domain-cells = &lt;0&gt;;
    domain-idle-states =  &lt;&amp;cpu_pwrdn&gt;;
    power-domains = &lt;&amp;cluster_pd&gt;;
  };

  cluster_pd: power-domain-cluster {
    #power-domain-cells = &lt;0&gt;;
    domain-idle-states = &lt;&amp;cluster_ret&gt;, &lt;&amp;cluster_pwrdn&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 70:</strong> <span> HVC #0, with the register assignments specified in this binding.</span></p>

</details>
