# NVIDIA Tegra Hardware Synchronization Primitives (HSP)

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

> Device-tree binding reference for NVIDIA Tegra Hardware Synchronization Primitives (HSP).

<!-- 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;nvidia&#44;tegra186&#45;hsp&#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;Thierry Reding &#60;thierry&#46;reding&#64;gmail&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Jon Hunter &#60;jonathanh&#64;nvidia&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The HSP modules are used for the processors to share resources and
communicate together. It provides a set of hardware synchronization
primitives for interprocessor communication. So the interprocessor
communication (IPC) protocols can use hardware synchronization
primitives, when operating between two processors not in an SMP
relationship.</p>
<p style="white-space: pre-wrap">The features that HSP supported are shared mailboxes, shared
semaphores, arbitrated semaphores and doorbells.</p>
<p style="white-space: pre-wrap">The mbox specifier of the "mboxes" property in the client node should
contain two cells. The first cell determines the HSP type and the
second cell is used to identify the mailbox that the client is going
to use.</p>
<pre><code>For shared mailboxes, the first cell composed of two fields:
  - bits 15..8:
      A bit mask of flags that further specifies the type of shared
      mailbox to be used (based on the data size). If no flag is
      specified then, 32-bit shared mailbox is used.
  - bits 7..0:
      Defines the type of the mailbox to be used. This field should be
      TEGRA_HSP_MBOX_TYPE_SM for shared mailboxes.</code></pre>
<p style="white-space: pre-wrap">For doorbells, the second cell specifies the index of the doorbell to
use.</p>
<pre><code>For shared mailboxes, the second cell is composed of two fields:
  - bits 31..24:
      A bit mask of flags that further specify how the shared mailbox
      will be used. Valid flags are:
        - bit 31:
            Defines the direction of the mailbox. If set, the mailbox
            will be used as a producer (i.e. used to send data). If
            cleared, the mailbox is the consumer of data sent by a
            producer.</code></pre>
<pre><code>  - bits 23..0:
      The index of the shared mailbox to use. The number of available
      mailboxes may vary by instance of the HSP block and SoC
      generation.</code></pre>
<pre><code>  The following file contains definitions that can be used to
  construct mailbox specifiers:</code></pre>
<pre><code>      &lt;dt-bindings/mailbox/tegra186-hsp.h&gt;</code></pre>
</div>

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

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

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

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

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

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

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

**Rule 1**

> **Allowed values (<code>enum</code>):** <a id="dt-617e1a2040e2496013d4"></a> <span id="dt-c31075c43df89b2793e3"><code>&#34;nvidia&#44;tegra186&#45;hsp&#34;</code></span>, <span id="dt-44b402f75e7bf3caf313"><code>&#34;nvidia&#44;tegra194&#45;hsp&#34;</code></span>, <span id="dt-f03e1478792ca587ff5c"><code>&#34;nvidia&#44;tegra264&#45;hsp&#34;</code></span>

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

**Rule 2**

> <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;nvidia&#44;tegra234&#45;hsp&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;nvidia&#44;tegra194&#45;hsp&#34;</code></span>

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

### <code>reg</code> — not listed as 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> — not listed as 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>17</code></span>

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

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

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

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

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

**Rule 1**

> <a id="dt-884cf2259e7919782d91"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-ae566b1863c35904fd78"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-70b44ca6c048c5d3a3af"><code>&#34;doorbell&#34;</code></span>

<a id="dt-49450ca309f7fa677720"></a>

**Rule 2**

> <a id="dt-3f5226d3358b9f7233cd"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-168695c518f0a2b5192f"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-219a5f51cbccd7444454"><code>&#34;doorbell&#34;</code></span>
>
> <a id="dt-74dea7eca44399918292"></a>
>
> **Item 2**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-229e264f0e83241fa40c"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-c5cfc6a5b382577118b4"></a>
>
> **Item 3**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-6db7ee32700203c3bc6d"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-49e904b35cf148fa04a1"></a>
>
> **Item 4**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-2a8babf457a57278be9e"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-aca97ad6b05856b2ff86"></a>
>
> **Item 5**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-2290518130bc44497d95"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-b2830d2e7c8601d01a26"></a>
>
> **Item 6**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-3bda6a87e098f56228c4"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-ff78428506c9d25ff2ca"></a>
>
> **Item 7**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-82670106cbd68975dccd"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-706218495f27514079f3"></a>
>
> **Item 8**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-877e9313e8ec16142196"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-372b995893291e33a41f"></a>
>
> **Item 9**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-cdf785a6edc5dafbdaf6"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-95a5fd50c48693f760ea"></a>
>
> **Item 10**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-9386558dbf84a056779e"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-7c21cf099ffb8bba512e"></a>
>
> **Item 11**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-8e4da5845b8d91878a6b"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-da7846cef98cbedfeb74"></a>
>
> **Item 12**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-30e57dc61c1c2ef66b90"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-723c0ff9f459d57596b7"></a>
>
> **Item 13**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-1a142f73ddc458808117"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-e31ce77f29ac50c2f1db"></a>
>
> **Item 14**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-b43e58f17cb0e5a76f64"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-7c49298f281829cb3c8e"></a>
>
> **Item 15**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-2cda5e73272a8aeb0e00"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-24bdc0ab8824f86a2e79"></a>
>
> **Item 16**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-7f41e05c3392e57afa2d"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>
>
> <a id="dt-1d68052ec65c39788626"></a>
>
> **Item 17**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-365a0985136551074258"><code>&#34;&#94;shared&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#36;&#34;</code></span>

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

**Rule 3**

> <a id="dt-0a34a9219f0559f42d7c"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-17e5d9c70b8e096d3a37"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-eeee93287c9adb685082"><code>&#34;doorbell&#34;</code></span>
>
> <a id="dt-5b9a1aed9d67e56e84fb"></a>
>
> **Item 2**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-e10d0720a157ac6f19dc"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-dadd9e3233136c1e6806"></a>
>
> **Item 3**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-034137c243edbf45fdec"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-57bacc5d6b94c3a2685e"></a>
>
> **Item 4**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-678ef1f76a5868b6d4a5"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-c74c2cdfa87ba4652360"></a>
>
> **Item 5**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-544cb8028fd4dffb9a88"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-cddb13426171ab03950b"></a>
>
> **Item 6**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-b0d4df58c9cb85bff336"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-7b979050724bf370d112"></a>
>
> **Item 7**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-54e92c945e736c41e172"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-d2c47a54b837390e29ed"></a>
>
> **Item 8**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-984ba10ecedf67a5d4bd"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-e8f2f1544856a6c093fa"></a>
>
> **Item 9**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-6834aadfcf893ee5c662"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>

<a id="dt-933ae21ee49e34e0add8"></a>

**Rule 4**

> <a id="dt-7b3b6da4da6ab359ea33"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-da99cf79114891006525"></a>
>
> **Item 1**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-feeac6398749ce417b5d"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-202a5be37b86c1dc8bd5"></a>
>
> **Item 2**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-6c7cb88def047fd18312"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-9af91b9f72b69a498901"></a>
>
> **Item 3**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-d28cdc6069279edd42ec"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>
>
> <a id="dt-55c39397875841c62397"></a>
>
> **Item 4**
>
> > **String pattern (<code>pattern</code>):** <span id="dt-e52b15be4e0d5dbfcde0"><code>&#34;&#94;shared&#91;0&#45;7&#93;&#36;&#34;</code></span>

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

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

**Exact value (<code>const</code>):** <span id="dt-35dce2a22cd12b009c30"><code>2</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;
#include &lt;dt-bindings/mailbox/tegra186-hsp.h&gt;

mailbox@3c00000 {
    compatible = "nvidia,tegra186-hsp";
    reg = &lt;0x03c00000 0xa0000&gt;;
    interrupts = &lt;GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH&gt;;
    interrupt-names = "doorbell";
    #mbox-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 81:</strong> <span> shared interrupts are optional</span></p>

</details>
