# ARM MHUv3 Mailbox Controller

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

> Device-tree binding reference for ARM MHUv3 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;mhuv3&#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>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Cristian Marussi &#60;cristian&#46;marussi&#64;arm&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Arm Message Handling Unit (MHU) Version 3 is a mailbox controller that
enables unidirectional communications with remote processors through various
possible transport protocols.
The controller can optionally support a varying number of extensions that, in
turn, enable different kinds of transport to be used for communication.
Number, type and characteristics of each supported extension can be discovered
dynamically at runtime.</p>
<p style="white-space: pre-wrap">Given the unidirectional nature of the controller, an MHUv3 mailbox controller
is composed of a MHU Sender (MHUS) containing a PostBox (PBX) block and a MHU
Receiver (MHUR) containing a MailBox (MBX) block, where</p>
<pre><code> PBX is used to
    - Configure the MHU
    - Send Transfers to the Receiver
    - Optionally receive acknowledgment of a Transfer from the Receiver</code></pre>
<pre><code> MBX is used to
    - Configure the MHU
    - Receive Transfers from the Sender
    - Optionally acknowledge Transfers sent by the Sender</code></pre>
<p style="white-space: pre-wrap">Both PBX and MBX need to be present and defined in the DT description if you
need to establish a bidirectional communication, since you will have to
acquire two distinct unidirectional channels, one for each block.</p>
<p style="white-space: pre-wrap">As a consequence both blocks needs to be represented separately and specified
as distinct DT nodes in order to properly describe their resources.</p>
<p style="white-space: pre-wrap">Note that, though, thanks to the runtime discoverability, there is no need to
identify the type of blocks with distinct compatibles.</p>
<p style="white-space: pre-wrap">Following are the MHUv3 possible extensions.</p>
<pre><code>- Doorbell Extension (DBE): DBE defines a type of channel called a Doorbell
  Channel (DBCH). DBCH enables a single bit Transfer to be sent from the
  Sender to Receiver. The Transfer indicates that an event has occurred.
  When DBE is implemented, the number of DBCHs that an implementation of the
  MHU can support is between 1 and 128, numbered starting from 0 in ascending
  order and discoverable at run-time.
  Each DBCH contains 32 individual fields, referred to as flags, each of which
  can be used independently. It is possible for the Sender to send multiple
  Transfers at once using a single DBCH, so long as each Transfer uses
  a different flag in the DBCH.
  Optionally, data may be transmitted through an out-of-band shared memory
  region, wherein the MHU Doorbell is used strictly as an interrupt generation
  mechanism, but this is out of the scope of these bindings.</code></pre>
<pre><code>- FastChannel Extension (FCE): FCE defines a type of channel called a Fast
  Channel (FCH). FCH is intended for lower overhead communication between
  Sender and Receiver at the expense of determinism. An FCH allows the Sender
  to update the channel value at any time, regardless of whether the previous
  value has been seen by the Receiver. When the Receiver reads the channel's
  content it gets the last value written to the channel.
  FCH is considered lossy in nature, and means that the Sender has no way of
  knowing if, or when, the Receiver will act on the Transfer.
  FCHs are expected to behave as RAM which generates interrupts when writes
  occur to the locations within the RAM.
  When FCE is implemented, the number of FCHs that an implementation of the
  MHU can support is between 1-1024, if the FastChannel word-size is 32-bits,
  or between 1-512, when the FastChannel word-size is 64-bits.
  FCHs are numbered from 0 in ascending order.
  Note that the number of FCHs and the word-size are implementation defined,
  not configurable but discoverable at run-time.
  Optionally, data may be transmitted through an out-of-band shared memory
  region, wherein the MHU FastChannel is used as an interrupt generation
  mechanism which carries also a pointer to such out-of-band data, but this
  is out of the scope of these bindings.</code></pre>
<pre><code>- FIFO Extension (FE): FE defines a Channel type called a FIFO Channel (FFCH).
  FFCH allows a Sender to send
     - Multiple Transfers to the Receiver without having to wait for the
       previous Transfer to be acknowledged by the Receiver, as long as the
       FIFO has room for the Transfer.
     - Transfers which require the Receiver to provide acknowledgment.
     - Transfers which have in-band payload.
  In all cases, the data is guaranteed to be observed by the Receiver in the
  same order which the Sender sent it.
  When FE is implemented, the number of FFCHs that an implementation of the
  MHU can support is between 1 and 64, numbered starting from 0 in ascending
  order. The number of FFCHs, their depth (same for all implemented FFCHs) and
  the access-granularity are implementation defined, not configurable but
  discoverable at run-time.
  Optionally, additional data may be transmitted through an out-of-band shared
  memory region, wherein the MHU FIFO is used to transmit, in order, a small
  part of the payload (like a header) and a reference to the shared memory
  area holding the remaining, bigger, chunk of the payload, but this is out of
  the scope of these bindings.</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;arm&#44;mhuv3&#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>1</code></span>

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

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

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

<div id="dt-3c9c5232b17bbf88febb">
<p style="white-space: pre-wrap">The MHUv3 controller generates a number of events some of which are used
to generate interrupts; as a consequence it can expose a varying number of
optional PBX/MBX interrupts, representing the events generated during the
operation of the various transport protocols associated with different
extensions. All interrupts of the MHU are level-sensitive.
Some of these optional interrupts are defined per-channel, where the
number of channels effectively available is implementation defined and
run-time discoverable.
In the following names are enumerated using patterns, with per-channel
interrupts implicitly capped at the maximum channels allowed by the
specification for each extension type.
For the sake of simplicity maxItems is anyway capped to a most plausible
number, assuming way less channels would be implemented than actually
possible.</p>
<pre><code>The only mandatory interrupts on the MHU are:
  - combined
  - mbx-fch-xfer-&lt;N&gt; but only if mbx-fcgrp-xfer-&lt;N&gt; is not implemented.</code></pre>
</div>

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-718f7c4b526ed5355ff2"><code>74</code></span>

<a id="dt-77e94e63ca0b20bb5ef1"></a>

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

> <a id="dt-e0b766d7be30927f4483"></a>
>
> **Exactly one of these rules must match (<code>oneOf</code>)**
>
> <a id="dt-80861a13f5c8c72768cc"></a>
>
> **Rule 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-a1433149f3bc33924dcb"><code>&#34;combined&#34;</code></span>
> >
> > <div id="dt-f3732731ccad68e0a991">
> > <p style="white-space: pre-wrap">PBX/MBX Combined interrupt</p>
> > </div>
>
> <a id="dt-2b1f822be8da8477332d"></a>
>
> **Rule 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-4f36f4f40e452f75b5b9"><code>&#34;combined&#45;ffch&#34;</code></span>
> >
> > <div id="dt-5f7eb67dd900af4ecac2">
> > <p style="white-space: pre-wrap">PBX/MBX FIFO Combined interrupt</p>
> > </div>
>
> <a id="dt-cb7c80ea9df505674878"></a>
>
> **Rule 3**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-bc3449256a91ba7469b7"><code>&#34;&#94;ffch&#45;low&#45;tide&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-74b636d7c4fddbccbb85">
> > <p style="white-space: pre-wrap">PBX/MBX FIFO Channel &lt;N&gt; Low Tide interrupt</p>
> > </div>
>
> <a id="dt-0d49e846bbaa59d34c25"></a>
>
> **Rule 4**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-200d71ac54808a409b50"><code>&#34;&#94;ffch&#45;high&#45;tide&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-2d68a75db1203793c694">
> > <p style="white-space: pre-wrap">PBX/MBX FIFO Channel &lt;N&gt; High Tide interrupt</p>
> > </div>
>
> <a id="dt-c1b1d320e94acfe6eeb7"></a>
>
> **Rule 5**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-10604f1fe3cd6a28e0c0"><code>&#34;&#94;ffch&#45;flush&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-354d0e7d2dd22f46fdc8">
> > <p style="white-space: pre-wrap">PBX/MBX FIFO Channel &lt;N&gt; Flush interrupt</p>
> > </div>
>
> <a id="dt-857d5c8bf3f723bf4337"></a>
>
> **Rule 6**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-931324f7be54fd36275c"><code>&#34;&#94;mbx&#45;dbch&#45;xfer&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-bbb6107945923fb8a9ad">
> > <p style="white-space: pre-wrap">MBX Doorbell Channel &lt;N&gt; Transfer interrupt</p>
> > </div>
>
> <a id="dt-73bf2d6eb973e054f010"></a>
>
> **Rule 7**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-37e136915a5307e7afce"><code>&#34;&#94;mbx&#45;fch&#45;xfer&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-03d4c101518a44ddc8c3">
> > <p style="white-space: pre-wrap">MBX FastChannel &lt;N&gt; Transfer interrupt</p>
> > </div>
>
> <a id="dt-ba6137bd553c5257de6a"></a>
>
> **Rule 8**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-29fe878cc69597ae9a31"><code>&#34;&#94;mbx&#45;fchgrp&#45;xfer&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-676430f6e19fc6719d3d">
> > <p style="white-space: pre-wrap">MBX FastChannel &lt;N&gt; Group Transfer interrupt</p>
> > </div>
>
> <a id="dt-61e767256332f33311c8"></a>
>
> **Rule 9**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-7ee3c8cbd196fbf02d5a"><code>&#34;&#94;mbx&#45;ffch&#45;xfer&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-9e75b06f8b276a7c8902">
> > <p style="white-space: pre-wrap">MBX FIFO Channel &lt;N&gt; Transfer interrupt</p>
> > </div>
>
> <a id="dt-60f426958cff50b5adbd"></a>
>
> **Rule 10**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-85d1a8b99175f88ede7b"><code>&#34;&#94;pbx&#45;dbch&#45;xfer&#45;ack&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-56d9b10e1a5f29eb8636">
> > <p style="white-space: pre-wrap">PBX Doorbell Channel &lt;N&gt; Transfer Ack interrupt</p>
> > </div>
>
> <a id="dt-338e8ad0bd0aeffba077"></a>
>
> **Rule 11**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-bca862d84be4030a3da5"><code>&#34;&#94;pbx&#45;ffch&#45;xfer&#45;ack&#45;&#91;0&#45;9&#93;&#43;&#36;&#34;</code></span>
> >
> > <div id="dt-73d0e09d7fa96029a287">
> > <p style="white-space: pre-wrap">PBX FIFO Channel &lt;N&gt; Transfer Ack interrupt</p>
> > </div>

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

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

<div id="dt-c8db8f9a4474894f1bab">
<p style="white-space: pre-wrap">The first argument in the consumers 'mboxes' property represents the
extension type, the second is for the channel number while the third
depends on extension type.</p>
<p style="white-space: pre-wrap">Extension types constants are defined in &lt;dt-bindings/arm/mhuv3-dt.h&gt;.</p>
<p style="white-space: pre-wrap">Extension type for DBE is DBE_EXT and the third parameter represents the
doorbell flag number to use.
Extension type for FCE is FCE_EXT, third parameter unused.
Extension type for FE is FE_EXT, third parameter unused.</p>
<p style="white-space: pre-wrap">mboxes = &lt;&amp;mhu DBE_EXT 0 5&gt;; // DBE, Doorbell Channel Window 0, doorbell 5.
mboxes = &lt;&amp;mhu DBE_EXT 7&gt;; // DBE, Doorbell Channel Window 1, doorbell 7.
mboxes = &lt;&amp;mhu FCE_EXT 0 0&gt;; // FCE, FastChannel Window 0.
mboxes = &lt;&amp;mhu FCE_EXT 3 0&gt;; // FCE, FastChannel Window 3.
mboxes = &lt;&amp;mhu FE_EXT 1 0&gt;; // FE, FIFO Channel Window 1.
mboxes = &lt;&amp;mhu FE_EXT 7 0&gt;; // FE, FIFO Channel Window 7.</p>
</div>

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

<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>

**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;interrupt&#45;names&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><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">#include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;

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

    mailbox@2aaa0000 {
        compatible = "arm,mhuv3";
        #mbox-cells = &lt;3&gt;;
        reg = &lt;0 0x2aaa0000 0 0x10000&gt;;
        clocks = &lt;&amp;clock 0&gt;;
        interrupt-names = "combined", "pbx-dbch-xfer-ack-1",
                           "ffch-high-tide-0";
        interrupts = &lt;GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH&gt;,
                     &lt;GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH&gt;;
    };

    mailbox@2ab00000 {
        compatible = "arm,mhuv3";
        #mbox-cells = &lt;3&gt;;
        reg = &lt;0 0x2aab0000 0 0x10000&gt;;
        clocks = &lt;&amp;clock 0&gt;;
        interrupt-names = "combined", "mbx-dbch-xfer-1", "ffch-low-tide-0";
        interrupts = &lt;GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH&gt;,
                     &lt;GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH&gt;,
                     &lt;GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH&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>
