# Qualcomm Shared Memory State Machine

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Soc bindings / qcom_

> Device-tree binding reference for Qualcomm Shared Memory State Machine.

<!-- SPDX-License-Identifier: GPL-2.0-only 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;soc&#47;qcom&#47;qcom&#44;smsm&#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;Andy Gross &#60;agross&#64;kernel&#46;org&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Bjorn Andersson &#60;bjorn&#46;andersson&#64;linaro&#46;org&#62;&#34;</code></span>, <span id="dt-2f1516674166ff6e66b8"><code>&#34;Krzysztof Kozlowski &#60;krzk&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Shared Memory State Machine facilitates broadcasting of single bit state information between the processors in a Qualcomm SoC. Each processor is assigned 32 bits of state that can be modified. A processor can through a matrix of bitmaps signal subscription of notifications upon changes to a certain bit owned by a certain remote processor.</p>
</div>

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

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

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

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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;qcom&#44;smsm&#34;</code></span>

<a id="dt-2efe70314a961a652abe"></a>

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

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

<a id="dt-92cc40d2444ae3e57de0"></a>

### <code>qcom&#44;local&#45;host</code> — not listed as required here

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

**Default value (<code>default</code>):** <span id="dt-bbd9212145445b66b06f"><code>0</code></span>

<div id="dt-66c37d69275d2b484eaa">
<p style="white-space: pre-wrap">Identifier of the local processor in the list of hosts, or in other words specifier of the column in the subscription matrix representing the local processor.</p>
</div>

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

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

**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>5</code></span>

<div id="dt-35048c35d9f2ceeeab93">
<p style="white-space: pre-wrap">Reference to the mailbox representing the outgoing doorbell in APCS for this client. Each entry represents the N:th remote processor by index (0-indexed).</p>
</div>

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

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

**Exact value (<code>const</code>):** <span id="dt-793e842f88ef513a8f93"><code>0</code></span>

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

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

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

### <code>&#94;qcom&#44;ipc&#45;&#91;1&#45;4&#93;&#36;</code> — name matches this regular expression

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

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

#### Array item rules (<code>items</code>)

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

**Item 1**

> <a id="dt-91efa143ba2068a5a645"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-62f8262116e0af3211b5"></a>
>
> **Item 1**
>
> > <div id="dt-39a1b5a66efd1f86fd59">
> > <p style="white-space: pre-wrap">phandle to a syscon node representing the APCS registers</p>
> > </div>
>
> <a id="dt-287ba86e3eb9a7420ed6"></a>
>
> **Item 2**
>
> > <div id="dt-209c38ce718ed553815f">
> > <p style="white-space: pre-wrap">u32 representing offset to the register within the syscon</p>
> > </div>
>
> <a id="dt-22e1ee3c6a2c7425479d"></a>
>
> **Item 3**
>
> > <div id="dt-628356486487eaa595b0">
> > <p style="white-space: pre-wrap">u32 representing the ipc bit within the register</p>
> > </div>

<div id="dt-e2191b8964ad03a1f873">
<p style="white-space: pre-wrap">Three entries specifying the outgoing ipc bit used for signaling the N:th remote processor.</p>
</div>

**Deprecated (<code>deprecated</code>):** <span id="dt-38a279ed92c1be31018e"><code>true</code></span>

<a id="dt-7f18949a6780d4ac5174"></a>

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

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

<div id="dt-e3694c45112a26a91aa8">
<p style="white-space: pre-wrap">Each processor's state bits are described by a subnode of the SMSM device node.  Nodes can either be flagged as an interrupt-controller to denote a remote processor's state bits or the local processors bits.  The node names are not important.</p>
</div>

<a id="dt-200a43b20e2dee422bec"></a>

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

<a id="dt-27982c5f21a24fb7f4d5"></a>

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-a17d0d0e24784fcad9dd"><code>1</code></span>

<a id="dt-0290bd59f618094be4c6"></a>

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

<div id="dt-6a02cb84daba93491911">
<p style="white-space: pre-wrap">Marks the entry as a interrupt-controller and the state bits to belong to a remote processor.</p>
</div>

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

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

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

<a id="dt-09a14cb91dd7c079a81c"></a>

**<code>interrupts</code> — not listed as required here**

**Maximum number of items (<code>maxItems</code>):** <span id="dt-c0217f8601d73984c957"><code>1</code></span>

<div id="dt-fb9e1227d2465b888b45">
<p style="white-space: pre-wrap">One entry specifying remote IRQ used by the remote processor to signal changes of its state bits.</p>
</div>

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

**<code>&#35;qcom&#44;smem&#45;state&#45;cells</code> — not listed as required here**

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

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

<div id="dt-f6d20022058c688f8f0d">
<p style="white-space: pre-wrap">Required for local entry. Denotes bit number.</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-236a3bb85488b1a1a7aa"></a> <span id="dt-c1743e60a663f31998b9"><code>&#34;reg&#34;</code></span>

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

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

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

**Rule 1**

> **Required in this object (<code>required</code>):** <a id="dt-87c39d474a3e58b8667e"></a> <span id="dt-2aa695e3d30af2880790"><code>&#34;&#35;qcom&#44;smem&#45;state&#45;cells&#34;</code></span>

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

**Rule 2**

> **Required in this object (<code>required</code>):** <a id="dt-3ba2cf7b33e8caafcb54"></a> <span id="dt-f729e2bbf93f644124c4"><code>&#34;interrupt&#45;controller&#34;</code></span>, <span id="dt-b2925a4fdc71183b2733"><code>&#34;&#35;interrupt&#45;cells&#34;</code></span>, <span id="dt-380bd1b50178184414b3"><code>&#34;interrupts&#34;</code></span>

<a id="dt-88b7e0a236b105a3022b"></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;&#35;address&#45;cells&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;size&#45;cells&#34;</code></span>

<a id="dt-51356188806d31ca2021"></a>

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

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

### Rule 1

> **Required in this object (<code>required</code>):** <a id="dt-48cc38ffec184df79a62"></a> <span id="dt-bbd3b687ebb435349af2"><code>&#34;mboxes&#34;</code></span>

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

### Rule 2

> <a id="dt-739ef889457bf575c8f1"></a>
>
> #### At least one of these rules must match (<code>anyOf</code>)
>
> <a id="dt-62094f1c1767210a2d38"></a>
>
> **Rule 1**
>
> > **Required in this object (<code>required</code>):** <a id="dt-70bd99455d23905f7e0c"></a> <span id="dt-3024584bfb9a82ad26fa"><code>&#34;qcom&#44;ipc&#45;1&#34;</code></span>
>
> <a id="dt-010a6105e2abd28d56c2"></a>
>
> **Rule 2**
>
> > **Required in this object (<code>required</code>):** <a id="dt-4e2eff7431748cef5a86"></a> <span id="dt-b6a1e8d937677a3fff14"><code>&#34;qcom&#44;ipc&#45;2&#34;</code></span>
>
> <a id="dt-4a0a2f9e1a6c66b8d7f3"></a>
>
> **Rule 3**
>
> > **Required in this object (<code>required</code>):** <a id="dt-c209742370c3ab159e40"></a> <span id="dt-6a7afcab1ad8e3403351"><code>&#34;qcom&#44;ipc&#45;3&#34;</code></span>
>
> <a id="dt-ec4e4622317cce0a7604"></a>
>
> **Rule 4**
>
> > **Required in this object (<code>required</code>):** <a id="dt-8b7c08c427f33942a575"></a> <span id="dt-2ce5f59d403697765c11"><code>&#34;qcom&#44;ipc&#45;4&#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">#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;

shared-memory {
    compatible = "qcom,smsm";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    mboxes = &lt;0&gt;, &lt;0&gt;, &lt;0&gt;, &lt;&amp;apcs 19&gt;;

    apps_smsm: apps@0 {
        reg = &lt;0&gt;;
        #qcom,smem-state-cells = &lt;1&gt;;
    };

    wcnss_smsm: wcnss@7 {
        reg = &lt;7&gt;;
        interrupts = &lt;GIC_SPI 144 IRQ_TYPE_EDGE_RISING&gt;;
        interrupt-controller;
        #interrupt-cells = &lt;2&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-only OR BSD-2-Clause</span></p>

<p id="dt-comment-1"><strong>Line 126:</strong> <span> The following example shows the SMEM setup for controlling properties of</span></p>

<p id="dt-comment-2"><strong>Line 127:</strong> <span> the wireless processor, defined from the 8974 apps processor's</span></p>

<p id="dt-comment-3"><strong>Line 128:</strong> <span> point-of-view. It encompasses one outbound entry and the outgoing interrupt</span></p>

<p id="dt-comment-4"><strong>Line 129:</strong> <span> for the wireless processor.</span></p>

</details>
