# ARM SMMUv3 Architecture Implementation

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

> Device-tree binding reference for ARM SMMUv3 Architecture Implementation.

<!-- SPDX-License-Identifier: GPL-2.0-only -->


<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;iommu&#47;arm&#44;smmu&#45;v3&#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;Will Deacon &#60;will&#64;kernel&#46;org&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Robin Murphy &#60;Robin&#46;Murphy&#64;arm&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The SMMUv3 architecture is a significant departure from previous
revisions, replacing the MMIO register interface with in-memory command
and event queues and adding support for the ATS and PRI components of
the PCIe specification.</p>
</div>

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

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

<a id="dt-5155525ecd924660ec0a"></a>

### <code>&#36;nodename</code> — not listed as required here

**String pattern (<code>pattern</code>):** <span id="dt-0b2111a24a010949ece7"><code>&#34;&#94;iommu&#64;&#91;0&#45;9a&#45;f&#93;&#42;&#34;</code></span>

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

> **Exact value (<code>const</code>):** <span id="dt-d1fe1b456a54b64074d3"><code>&#34;arm&#44;smmu&#45;v3&#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**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-aa1230b5a2b80f9fb387"></a> <span id="dt-49b534c9c8948cfc8034"><code>&#34;nvidia&#44;tegra264&#45;smmu&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;arm&#44;smmu&#45;v3&#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> — 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>4</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**

> **Exact value (<code>const</code>):** <span id="dt-4fe9bab67ab55220851c"><code>&#34;combined&#34;</code></span>
>
> <div id="dt-63f7bcb74f50844b5360">
> <p style="white-space: pre-wrap">The combined interrupt is optional, and should only be provided if the hardware supports just a single, combined interrupt line. If provided, then the combined interrupt will be used in preference to any others.</p>
> </div>

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

**Rule 2**

> **Minimum number of items (<code>minItems</code>):** <span id="dt-3896a531ace6248bdf5a"><code>1</code></span>
>
> <a id="dt-3f5226d3358b9f7233cd"></a>
>
> **Array item rules (<code>items</code>)**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-378727ef7d2fd0b47f74"></a> <span id="dt-dc0b4ed0ed38d9590b30"><code>&#34;eventq&#34;</code></span>, <span id="dt-b795631de3f8104c8855"><code>&#34;gerror&#34;</code></span>, <span id="dt-2f74a920b0f0b254385d"><code>&#34;cmdq&#45;sync&#34;</code></span>, <span id="dt-7b72cf790e5fdca5a1e2"><code>&#34;priq&#34;</code></span>

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

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

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

<a id="dt-4603ee192633e8dffc49"></a>

### <code>dma&#45;coherent</code> — not listed as required here

<div id="dt-6333c054e0313964665a">
<p style="white-space: pre-wrap">Present if page table walks made by the SMMU are cache coherent with the
CPU.</p>
<p style="white-space: pre-wrap">NOTE: this only applies to the SMMU itself, not masters connected
upstream of the SMMU.</p>
</div>

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

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

<code>true</code> — No constraints added by this property rule.

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

### <code>nvidia&#44;cmdqv</code> — not listed as required here

<div id="dt-bac97bed6d73ce676e81">
<p style="white-space: pre-wrap">A phandle to its pairing CMDQV extension for an implementation on NVIDIA
Tegra SoC.</p>
<p style="white-space: pre-wrap">If this property is absent, CMDQ-Virtualization won't be used and SMMU
will only use its own CMDQ.</p>
</div>

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

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

### <code>hisilicon&#44;broken&#45;prefetch&#45;cmd</code> — not listed as required here

**Value type (<code>type</code>):** <span id="dt-53a49ff5d53f8f444150"><code>&#34;boolean&#34;</code></span>

<div id="dt-e4d52394fa172a6f3d2f">
<p style="white-space: pre-wrap">Avoid sending CMD_PREFETCH_* commands to the SMMU.</p>
</div>

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

### <code>cavium&#44;cn9900&#45;broken&#45;page1&#45;regspace</code> — not listed as required here

**Value type (<code>type</code>):** <span id="dt-353038199e5e4e4158db"><code>&#34;boolean&#34;</code></span>

<div id="dt-ffcb5f1c44b950fb7a4f">
<p style="white-space: pre-wrap">Replaces all page 1 offsets used for EVTQ_PROD/CONS, PRIQ_PROD/CONS register access with page 0 offsets. Set for Cavium ThunderX2 silicon that doesn't support SMMU page1 register space.</p>
</div>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

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

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-17723ad0bbc7f42a3e70"></a>
> >
> > **This rule must not match (<code>not</code>)**
> >
> > > <a id="dt-3defb1f4dc0d6847a043"></a>
> > >
> > > **Properties and child nodes (<code>properties</code>)**
> > >
> > > <a id="dt-0e5d4207b2374940f9d3"></a>
> > >
> > > **<code>compatible</code> — not listed as required here**
> > >
> > > <a id="dt-6e1ee4ed1b112666419d"></a>
> > >
> > > **Rule for matching array elements (<code>contains</code>)**
> > >
> > > > **Exact value (<code>const</code>):** <span id="dt-1c1f690154555df6cea9"><code>&#34;nvidia&#44;tegra264&#45;smmu&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-b212c2ef78c22fab2e20"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bcb268511d116d55ecae"></a>
> >
> > **<code>nvidia&#44;cmdqv</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property 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;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;iommu&#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;
#include &lt;dt-bindings/interrupt-controller/irq.h&gt;

iommu@2b400000 {
        compatible = "arm,smmu-v3";
        reg = &lt;0x2b400000 0x20000&gt;;
        interrupts = &lt;GIC_SPI 74 IRQ_TYPE_EDGE_RISING&gt;,
                     &lt;GIC_SPI 75 IRQ_TYPE_EDGE_RISING&gt;,
                     &lt;GIC_SPI 77 IRQ_TYPE_EDGE_RISING&gt;,
                     &lt;GIC_SPI 79 IRQ_TYPE_EDGE_RISING&gt;;
        interrupt-names = "eventq", "gerror", "priq", "cmdq-sync";
        dma-coherent;
        #iommu-cells = &lt;1&gt;;
        msi-parent = &lt;&amp;its 0xff0000&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</span></p>

<p id="dt-comment-1"><strong>Line 48:</strong> <span> Event Queue not empty</span></p>

<p id="dt-comment-2"><strong>Line 49:</strong> <span> Global Error activated</span></p>

<p id="dt-comment-3"><strong>Line 50:</strong> <span> CMD_SYNC complete</span></p>

<p id="dt-comment-4"><strong>Line 51:</strong> <span> PRI Queue not empty</span></p>

</details>
