# ARM MHU Mailbox Controller

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

> Device-tree binding reference for ARM MHU Mailbox Controller.

<!-- 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;arm&#44;mhu&#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;Jassi Brar &#60;jaswinder&#46;singh&#64;linaro&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has 3
independent channels/links to communicate with remote processor(s).  MHU links
are hardwired on a platform. A link raises interrupt for any received data.
However, there is no specified way of knowing if the sent data has been read
by the remote. This driver assumes the sender polls STAT register and the
remote clears it after having read the data.  The last channel is specified to
be a 'Secure' resource, hence can't be used by Linux running NS.</p>
<p style="white-space: pre-wrap">The MHU hardware also allows operations in doorbell mode. The MHU drives the
interrupt signal using a 32-bit register, with all 32-bits logically ORed
together. It provides a set of registers to enable software to set, clear and
check the status of each of the bits of this register independently. The use
of 32 bits per interrupt line enables software to provide more information
about the source of the interrupt. For example, each bit of the register can
be associated with a type of event that can contribute to raising the
interrupt. Each of the 32-bits can be used as "doorbell" to alert the remote
processor.</p>
</div>

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

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

> <a id="dt-54d143fae2406295c883"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-e3400bab629503b08322"></a>
>
> #### <code>compatible</code> — required here
>
> <a id="dt-2ae4f0f9580bb5b2e406"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-ce9b069a8031ff280c23"></a> <span id="dt-e79f31d4eec3cf736314"><code>&#34;arm&#44;mhu&#34;</code></span>, <span id="dt-b228f13d1a3291d89dd4"><code>&#34;arm&#44;mhu&#45;doorbell&#34;</code></span>
>
> **Required in this object (<code>required</code>):** <a id="dt-c7b135d3aebb6d627788"></a> <span id="dt-7b7a89ef483af1198868"><code>&#34;compatible&#34;</code></span>

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

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

<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">Data transfer mode</p>
> </div>
>
> <a id="dt-07409cc9508405f48983"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-822691c82c9797f7b1f9"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-5deec2612224d8d915da"><code>&#34;arm&#44;mhu&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;arm&#44;primecell&#34;</code></span>

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

**Rule 2**

> <div id="dt-4b64ce44adfe069638c4">
> <p style="white-space: pre-wrap">Doorbell mode</p>
> </div>
>
> <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;mhu&#45;doorbell&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;arm&#44;primecell&#34;</code></span>

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

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

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

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

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

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

<a id="dt-985aed94c3a5de8e946a"></a>

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

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

**Item 1**

> <div id="dt-094ee990c529b33ab668">
> <p style="white-space: pre-wrap">low-priority non-secure</p>
> </div>

<a id="dt-14fdf3275cf454d3c593"></a>

**Item 2**

> <div id="dt-f26fcb0c97f34db34fe4">
> <p style="white-space: pre-wrap">high-priority non-secure</p>
> </div>

<a id="dt-6825e597892563d56556"></a>

**Item 3**

> <div id="dt-2c85367ad575dfda8b35">
> <p style="white-space: pre-wrap">Secure</p>
> </div>

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

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

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

<a id="dt-041d7cd76b652a5de06a"></a>

### <code>clock&#45;names</code> — not listed as required here

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-3403d68873725c15739a"><code>&#34;apb&#95;pclk&#34;</code></span>

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

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

<div id="dt-c8db8f9a4474894f1bab">
<p style="white-space: pre-wrap">Set to 1 in data transfer mode and represents index of the channel.
Set to 2 in doorbell mode and represents index of the channel and doorbell
number.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-a4de2be73a0e57ef9726"></a> <span id="dt-594c8157253b9bef7bb3"><code>1</code></span>, <span id="dt-00fae157922f1d3a8ae7"><code>2</code></span>

**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;interrupts&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;mbox&#45;cells&#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">soc {
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;2&gt;;

    mhuA: mailbox@2b1f0000 {
        #mbox-cells = &lt;1&gt;;
        compatible = "arm,mhu", "arm,primecell";
        reg = &lt;0 0x2b1f0000 0 0x1000&gt;;
        interrupts = &lt;0 36 4&gt;, /* LP-NonSecure */
                     &lt;0 35 4&gt;, /* HP-NonSecure */
                     &lt;0 37 4&gt;; /* Secure */
        clocks = &lt;&amp;clock 0 2 1&gt;;
        clock-names = "apb_pclk";
    };
};

firmware {
    scpi {
        compatible = "arm,scpi";
        mboxes = &lt;&amp;mhuA 1&gt;; /* HP-NonSecure */
        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;;
        };
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">soc {
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;2&gt;;

    mhuB: mailbox@2b2f0000 {
        #mbox-cells = &lt;2&gt;;
        compatible = "arm,mhu-doorbell", "arm,primecell";
        reg = &lt;0 0x2b2f0000 0 0x1000&gt;;
        interrupts = &lt;0 36 4&gt;, /* LP-NonSecure */
                     &lt;0 35 4&gt;, /* HP-NonSecure */
                     &lt;0 37 4&gt;; /* Secure */
        clocks = &lt;&amp;clock 0 2 1&gt;;
        clock-names = "apb_pclk";
    };
};

firmware {
    scmi {
        compatible = "arm,scmi";
        mboxes = &lt;&amp;mhuB 0 0&gt;, /* LP-NonSecure, 1st doorbell */
                 &lt;&amp;mhuB 0 1&gt;; /* LP-NonSecure, 2nd doorbell */
        mbox-names = "tx", "rx";
        shmem = &lt;&amp;cpu_scp_lpri0&gt;,
                &lt;&amp;cpu_scp_lpri1&gt;;

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

        scmi_devpd: protocol@11 {
            reg = &lt;0x11&gt;;
            #power-domain-cells = &lt;1&gt;;
        };

        scmi_dvfs: protocol@13 {
            reg = &lt;0x13&gt;;
            #clock-cells = &lt;1&gt;;

            mboxes = &lt;&amp;mhuB 1 2&gt;, /* HP-NonSecure, 3rd doorbell */
                     &lt;&amp;mhuB 1 3&gt;; /* HP-NonSecure, 4th doorbell */
            mbox-names = "tx", "rx";
            shmem = &lt;&amp;cpu_scp_hpri0&gt;,
                    &lt;&amp;cpu_scp_hpri1&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 31:</strong> <span> We need a select here so we don't match all nodes with 'arm,primecell'</span></p>

<p id="dt-comment-2"><strong>Line 88:</strong> <span> Data transfer mode.</span></p>

<p id="dt-comment-3"><strong>Line 120:</strong> <span> Doorbell mode.</span></p>

</details>
