# System Control and Power Interface (SCPI) Message Protocol

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

> Device-tree binding reference for System Control and Power Interface (SCPI) Message Protocol.

<!-- SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) -->


<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;firmware&#47;arm&#44;scpi&#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;Sudeep Holla &#60;sudeep&#46;holla&#64;arm&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Firmware implementing the SCPI described in ARM document number ARM DUI
0922B ("ARM Compute Subsystem SCP: Message Interface Protocols")[0] can be
used by Linux to initiate various system control and power operations.</p>
<p style="white-space: pre-wrap">This binding is intended to define the interface the firmware implementing
the SCPI provide for OSPM in the device tree.</p>
<p style="white-space: pre-wrap">[0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html</p>
</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;scpi&#34;</code></span>

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

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

<div id="dt-e84064a2d568e9bcb9c3">
<p style="white-space: pre-wrap">SCPI compliant firmware complying to SCPI v1.0 and above OR SCPI compliant firmware complying to all unversioned releases prior to SCPI v1.0</p>
</div>

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

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

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

**Rule 1**

> **Exact value (<code>const</code>):** <span id="dt-d1fe1b456a54b64074d3"><code>&#34;arm&#44;scpi&#34;</code></span>

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

**Rule 2**

> **Exact value (<code>const</code>):** <span id="dt-58a429cd4bf531951c0d"><code>&#34;arm&#44;scpi&#45;pre&#45;1&#46;0&#34;</code></span>

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

**Rule 3**

> <a id="dt-e626d61e9d5d76cc48f9"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-6b46935eab08de6d1f0a"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-9d5b9f6fd2f9759f6e43"></a> <span id="dt-73fb2f4b762df7b35870"><code>&#34;amlogic&#44;meson&#45;gxbb&#45;scpi&#34;</code></span>
>
> <a id="dt-5ea82ea034747ba6da29"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-e9c55cb91230c7ee5a28"><code>&#34;arm&#44;scpi&#45;pre&#45;1&#46;0&#34;</code></span>

<a id="dt-574e031ceefcc9ce5f61"></a>

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

<div id="dt-35048c35d9f2ceeeab93">
<p style="white-space: pre-wrap">List of phandle and mailbox channel specifiers. All the channels reserved by remote SCP firmware for use by SCPI message protocol should be specified in any order.</p>
</div>

**Minimum number of items (<code>minItems</code>):** <span id="dt-edac1998d2ccc1de886a"><code>1</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-0d6020afe1bf116ee01c"><code>4</code></span>

<a id="dt-8ca956c2cc468b2945c5"></a>

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

<div id="dt-381166fa0a0905117367">
<p style="white-space: pre-wrap">List of phandle pointing to the shared memory(SHM) area between the processors using these mailboxes for IPC, one for each mailbox SHM can be any memory reserved for the purpose of this communication between the processors.</p>
</div>

**Minimum number of items (<code>minItems</code>):** <span id="dt-aa7a1b200cd7f1f12775"><code>1</code></span>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-370d441b90ded7c96a9d"><code>4</code></span>

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

### <code>power&#45;controller</code> — not listed as required here

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

<div id="dt-8ddb746036e1ae910056">
<p style="white-space: pre-wrap">This sub-node represents SCPI power domain controller.</p>
</div>

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

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

<a id="dt-46367cee802b5717685a"></a>

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

**Exact value (<code>const</code>):** <span id="dt-d80517eaa11018a1a0f0"><code>&#34;arm&#44;scpi&#45;power&#45;domains&#34;</code></span>

<a id="dt-3aa3c11b2c4eaf211b02"></a>

**<code>&#35;power&#45;domain&#45;cells</code> — required here**

**Exact value (<code>const</code>):** <span id="dt-8ddf689086c603e42899"><code>1</code></span>

<a id="dt-37f3dde0267c4b624a25"></a>

**<code>num&#45;domains</code> — required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-d7b8125b51c88e2253f0">[<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-11ec5e75a98c28a0a474">
<p style="white-space: pre-wrap">Total number of power domains provided by SCPI. This is needed as the SCPI message protocol lacks a mechanism to query this information at runtime.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-133d7f569972aef40839"></a> <span id="dt-1c74da097f1c7667e066"><code>&#34;compatible&#34;</code></span>, <span id="dt-7d864a8b15e061536108"><code>&#34;&#35;power&#45;domain&#45;cells&#34;</code></span>, <span id="dt-e3048bd96aaa29fed620"><code>&#34;num&#45;domains&#34;</code></span>

<a id="dt-ee979f8882ca84ed6c41"></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-1d8975d6918298cd266e"></a>

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

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

<div id="dt-ba83c962157e7d214ad5">
<p style="white-space: pre-wrap">This sub-node represents SCPI sensors controller.</p>
</div>

<a id="dt-29780888e7c5687d236c"></a>

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

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

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

<a id="dt-9c8d04c61ce0a3508fec"></a>

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

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

**Rule 1**

> **Exact value (<code>const</code>):** <span id="dt-ceb774190f93ca874616"><code>&#34;arm&#44;scpi&#45;sensors&#34;</code></span>

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

**Rule 2**

> <a id="dt-d3900715798a959d3852"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-90a990685a27613378af"></a>
>
> **Item 1**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-6dad53c4cde26f996742"></a> <span id="dt-726f0e2a3c7339ad062b"><code>&#34;amlogic&#44;meson&#45;gxbb&#45;scpi&#45;sensors&#34;</code></span>
>
> <a id="dt-03bae1ae490957d95db6"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-ba5e544b6e562319214f"><code>&#34;arm&#44;scpi&#45;sensors&#34;</code></span>

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

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

**Exact value (<code>const</code>):** <span id="dt-c3b9924a24ffae24a603"><code>1</code></span>

**Required in this object (<code>required</code>):** <a id="dt-5d40c5759c566530b80b"></a> <span id="dt-37bf60b05b191a4526fa"><code>&#34;compatible&#34;</code></span>, <span id="dt-e43bfc74602fcff90181"><code>&#34;&#35;thermal&#45;sensor&#45;cells&#34;</code></span>

<a id="dt-b224babeced4613abc5a"></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-4e9a371963ac013ad39d"></a>

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

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

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">This is the container node. Each sub-node represents one of the types of clock controller - indexed or full range.</p>
</div>

<a id="dt-02e661c8c38d0603cf6b"></a>

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

<a id="dt-780785206ba8eeb04641"></a>

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

**Exact value (<code>const</code>):** <span id="dt-764c6cb302741d807a56"><code>&#34;arm&#44;scpi&#45;clocks&#34;</code></span>

<a id="dt-1893de4a4a57bad9746a"></a>

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

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

**<code>&#94;clocks&#45;&#91;0&#45;9a&#45;f&#93;&#43;&#36;</code> — name matches this regular expression**

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

<div id="dt-df998943aaa8d56385b4">
<p style="white-space: pre-wrap">This sub-node represents one of the types of clock controller
- indexed or full range.</p>
<p style="white-space: pre-wrap">"arm,scpi-dvfs-clocks" - all the clocks that are variable and index
based. These clocks don't provide an entire range of values between
the limits but only discrete points within the range. The firmware
provides the mapping for each such operating frequency and the index
associated with it. The firmware also manages the voltage scaling
appropriately with the clock scaling.</p>
<p style="white-space: pre-wrap">"arm,scpi-variable-clocks" - all the clocks that are variable and
provide full range within the specified range. The firmware provides
the range of values within a specified range.</p>
</div>

<a id="dt-4a8623e320ad9c41071b"></a>

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

<a id="dt-317f5fbdd23d53f6ad8b"></a>

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

**Allowed values (<code>enum</code>):** <a id="dt-2175f977cbce3c3fdeda"></a> <span id="dt-0364f0c3fe75bdbf60a3"><code>&#34;arm&#44;scpi&#45;dvfs&#45;clocks&#34;</code></span>, <span id="dt-d3eb9a040a9a4ad6e513"><code>&#34;arm&#44;scpi&#45;variable&#45;clocks&#34;</code></span>

<a id="dt-6f94d39f7de02f42fe2e"></a>

**<code>&#35;clock&#45;cells</code> — required here**

**Exact value (<code>const</code>):** <span id="dt-51c823cf9da282831bba"><code>1</code></span>

<a id="dt-9c8213d28f438d41c84a"></a>

**<code>clock&#45;output&#45;names</code> — required here**

<code>true</code> — No constraints added by this property rule.

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

**<code>clock&#45;indices</code> — required here**

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

<div id="dt-d6bd80523bd7e6281a91">
<p style="white-space: pre-wrap">The identifying number for the clocks(i.e.clock_id) in the node. It can be non linear and hence provide the mapping of identifiers into the clock-output-names array.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-ab6131d9056437ce2e93"></a> <span id="dt-fe30f20a1eecaf686382"><code>&#34;compatible&#34;</code></span>, <span id="dt-6f9059818d5611e25e74"><code>&#34;&#35;clock&#45;cells&#34;</code></span>, <span id="dt-b42d996b651180321660"><code>&#34;clock&#45;output&#45;names&#34;</code></span>, <span id="dt-ccd295c77247012ef774"><code>&#34;clock&#45;indices&#34;</code></span>

<a id="dt-51822b454257d32e8419"></a>

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

<code>false</code>

Not allowed by this rule.

**Required in this object (<code>required</code>):** <a id="dt-dc4ce997ae9e2cfed75b"></a> <span id="dt-452bea0c88ab67e2a5da"><code>&#34;compatible&#34;</code></span>

<a id="dt-27db5255ceb510037c22"></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-738c4b4f9e483441138b"></a>

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

<code>false</code>

Not allowed by this rule.

**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;mboxes&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;shmem&#34;</code></span>

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">firmware {
    scpi {
        compatible = "arm,scpi";
        mboxes = &lt;&amp;mhuA 1&gt;;
        shmem = &lt;&amp;cpu_scp_hpri&gt;; /* HP-NonSecure */

        scpi_devpd: power-controller {
            compatible = "arm,scpi-power-domains";
            num-domains = &lt;2&gt;;
            #power-domain-cells = &lt;1&gt;;
        };

        clocks {
            compatible = "arm,scpi-clocks";

            scpi_dvfs: clocks-0 {
                compatible = "arm,scpi-dvfs-clocks";
                #clock-cells = &lt;1&gt;;
                clock-indices = &lt;0&gt;, &lt;1&gt;, &lt;2&gt;;
                clock-output-names = "atlclk", "aplclk","gpuclk";
            };

            scpi_clk: clocks-1 {
                compatible = "arm,scpi-variable-clocks";
                #clock-cells = &lt;1&gt;;
                clock-indices = &lt;3&gt;, &lt;4&gt;;
                clock-output-names = "pxlclk0", "pxlclk1";
            };
        };

        scpi_sensors: sensors {
            compatible = "arm,scpi-sensors";
            #thermal-sensor-cells = &lt;1&gt;;
        };

    };
};

soc {
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;2&gt;;

    sram@50000000 {
        compatible = "mmio-sram";
        reg = &lt;0x0 0x50000000 0x0 0x10000&gt;;

        #address-cells = &lt;1&gt;;
        #size-cells = &lt;1&gt;;
        ranges = &lt;0 0x0 0x50000000 0x10000&gt;;

        cpu_scp_lpri: scp-sram-section@0 {
            compatible = "arm,scp-shmem";
            reg = &lt;0x0 0x200&gt;;
        };

        cpu_scp_hpri: scp-sram-section@200 {
            compatible = "arm,scp-shmem";
            reg = &lt;0x200 0x200&gt;;
        };
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">firmware {
    scpi {
        compatible = "amlogic,meson-gxbb-scpi", "arm,scpi-pre-1.0";
        mboxes = &lt;&amp;mailbox 1&gt;, &lt;&amp;mailbox 2&gt;;
        shmem = &lt;&amp;cpu_scp_lpri&gt;, &lt;&amp;cpu_scp_hpri&gt;;

        scpi_sensors1: sensors {
            compatible = "amlogic,meson-gxbb-scpi-sensors", "arm,scpi-sensors";
            #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 OR BSD-2-Clause)</span></p>

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

<p id="dt-comment-2"><strong>Line 33:</strong> <span> SCPI v1.0 and above</span></p>

<p id="dt-comment-3"><strong>Line 34:</strong> <span> Unversioned SCPI before v1.0</span></p>

</details>
