# RISC-V Platform Management Interface (RPMI) shared memory mailbox

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

> Device-tree binding reference for RISC-V Platform Management Interface (RPMI) shared memory mailbox.

<!-- 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;mailbox&#47;riscv&#44;rpmi&#45;shmem&#45;mbox&#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;Anup Patel &#60;anup&#64;brainfault&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The RISC-V Platform Management Interface (RPMI) [1] defines a common shared
memory based RPMI transport. This RPMI shared memory transport integrates as
mailbox controller in the SBI implementation or supervisor software whereas
each RPMI service group is mailbox client in the SBI implementation and
supervisor software.</p>
<p style="white-space: pre-wrap">===========================================
References
===========================================</p>
<pre><code>[1] RISC-V Platform Management Interface (RPMI) v1.0 (or higher)
    https://github.com/riscv-non-isa/riscv-rpmi/releases</code></pre>
</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;riscv&#44;rpmi&#45;shmem&#45;mbox&#34;</code></span>

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

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

**Minimum number of items (<code>minItems</code>):** <span id="dt-4b3e7791b11b96c3db87"><code>2</code></span>

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

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

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

**Item 1**

> <div id="dt-e773fec0b410a1422253">
> <p style="white-space: pre-wrap">A2P request queue base address</p>
> </div>

<a id="dt-302751dd79bfd514b9d7"></a>

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">P2A acknowledgment queue base address</p>
> </div>

<a id="dt-80d36cb915ffeff5364a"></a>

**Item 3**

> <div id="dt-5151e97c331b693ee0dd">
> <p style="white-space: pre-wrap">P2A request queue base address</p>
> </div>

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

**Item 4**

> <div id="dt-e7b71b4619e949c538b1">
> <p style="white-space: pre-wrap">A2P acknowledgment queue base address</p>
> </div>

<a id="dt-55b482bd3ef74ad8e49c"></a>

**Item 5**

> <div id="dt-9034b08616e8a84a1200">
> <p style="white-space: pre-wrap">A2P doorbell address</p>
> </div>

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

### <code>reg&#45;names</code> — required here

**Minimum number of items (<code>minItems</code>):** <span id="dt-3f2820449161ca72af98"><code>2</code></span>

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-69afd9f8af3b0c5757d2"><code>&#34;a2p&#45;req&#34;</code></span>

<a id="dt-12013039402717d72b48"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-8472c6e17fb2491b6ba3"><code>&#34;p2a&#45;ack&#34;</code></span>

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

**Item 3**

> **Allowed values (<code>enum</code>):** <a id="dt-d213970298548030d3f6"></a> <span id="dt-ed6a115edbc9a55e02c4"><code>&#34;p2a&#45;req&#34;</code></span>, <span id="dt-9de7870dfaa4070fdd3c"><code>&#34;a2p&#45;doorbell&#34;</code></span>

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

**Item 4**

> **Exact value (<code>const</code>):** <span id="dt-98e4b3caabf49b98c17d"><code>&#34;a2p&#45;ack&#34;</code></span>

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

**Item 5**

> **Exact value (<code>const</code>):** <span id="dt-f5b0caab3d0e3bc730aa"><code>&#34;a2p&#45;doorbell&#34;</code></span>

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

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

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">The RPMI shared memory transport supports P2A doorbell as a wired interrupt and this property specifies the interrupt source.</p>
</div>

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

### <code>msi&#45;parent</code> — not listed as required here

<div id="dt-1ceeaa301b582d73ee88">
<p style="white-space: pre-wrap">The RPMI shared memory transport supports P2A doorbell as a system MSI and this property specifies the target MSI controller.</p>
</div>

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

### <code>riscv&#44;slot&#45;size</code> — required here

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

**Minimum value (<code>minimum</code>):** <span id="dt-0ca7b8f77509b3c38e88"><code>64</code></span>

<div id="dt-769f774fce67dfadc6a8">
<p style="white-space: pre-wrap">Power-of-2 RPMI slot size of the RPMI shared memory transport.</p>
</div>

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

### <code>riscv&#44;a2p&#45;doorbell&#45;value</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-011129264299af948612">[<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-4856602999420f29b997"><code>1</code></span>

<div id="dt-1f855433c2642031e2d1">
<p style="white-space: pre-wrap">Value written to the 32-bit A2P doorbell register.</p>
</div>

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

### <code>riscv&#44;p2a&#45;doorbell&#45;sysmsi&#45;index</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8f4e101fe2d004fdb037">[<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-25042f17f2b28a2fb7d6">
<p style="white-space: pre-wrap">The RPMI shared memory transport supports P2A doorbell as a system MSI and this property specifies system MSI index to be used for configuring the P2A doorbell MSI.</p>
</div>

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

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

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

<div id="dt-c8db8f9a4474894f1bab">
<p style="white-space: pre-wrap">The first cell specifies RPMI service group ID.</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;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;reg&#45;names&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;riscv&#44;slot&#45;size&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;&#35;mbox&#45;cells&#34;</code></span>

<a id="dt-413065af65ac6af8f24e"></a>

## At least one of these rules must match (<code>anyOf</code>)

<a id="dt-96eb361b08260472facb"></a>

### Rule 1

> **Required in this object (<code>required</code>):** <a id="dt-a3ce052275bac2469e04"></a> <span id="dt-396aa8b3d1b1aeeb2c7a"><code>&#34;interrupts&#34;</code></span>

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

### Rule 2

> **Required in this object (<code>required</code>):** <a id="dt-bb61b4b3827abc4e9b85"></a> <span id="dt-cffc196e945e46f91e3a"><code>&#34;msi&#45;parent&#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">// Example 1 (RPMI shared memory with only 2 queues):
mailbox@10080000 {
    compatible = "riscv,rpmi-shmem-mbox";
    reg = &lt;0x10080000 0x10000&gt;,
          &lt;0x10090000 0x10000&gt;;
    reg-names = "a2p-req", "p2a-ack";
    msi-parent = &lt;&amp;imsic_mlevel&gt;;
    riscv,slot-size = &lt;64&gt;;
    #mbox-cells = &lt;1&gt;;
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">// Example 2 (RPMI shared memory with only 4 queues):
mailbox@10001000 {
    compatible = "riscv,rpmi-shmem-mbox";
    reg = &lt;0x10001000 0x800&gt;,
          &lt;0x10001800 0x800&gt;,
          &lt;0x10002000 0x800&gt;,
          &lt;0x10002800 0x800&gt;,
          &lt;0x10003000 0x4&gt;;
    reg-names = "a2p-req", "p2a-ack", "p2a-req", "a2p-ack", "a2p-doorbell";
    msi-parent = &lt;&amp;imsic_mlevel&gt;;
    riscv,slot-size = &lt;64&gt;;
    riscv,a2p-doorbell-value = &lt;0x00008000&gt;;
    #mbox-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-only OR BSD-2-Clause)</span></p>

</details>
