# Synopsys DesignWare PCIe endpoint interface

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

> Device-tree binding reference for Synopsys DesignWare PCIe endpoint interface.

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


<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;pci&#47;snps&#44;dw&#45;pcie&#45;ep&#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;Jingoo Han &#60;jingoohan1&#64;gmail&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Gustavo Pimentel &#60;gustavo&#46;pimentel&#64;synopsys&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Synopsys DesignWare PCIe host controller endpoint</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
>
> **Exact value (<code>const</code>):** <span id="dt-76ab70c4588b57127918"><code>&#34;snps&#44;dw&#45;pcie&#45;ep&#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-935ee547587f3e75de61"></a>

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

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

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>&#47;schemas&#47;pci&#47;pci&#45;ep&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pci/pci-ep.md#dt-root>)</span>

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8549616abc3b04702c51">[<code>&#47;schemas&#47;pci&#47;snps&#44;dw&#45;pcie&#45;common&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-pci/snps-dw-pcie-common.md#dt-root>)</span>

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

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

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

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

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">DBI, DBI2 reg-spaces and outbound memory window are required for the normal controller functioning. iATU memory IO region is also required if the space is unrolled (IP-core version &gt;= 4.80a).</p>
</div>

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

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

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-58a7d566e1c7a6b0e414"><code>7</code></span>

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

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

> <a id="dt-d103ab162350c3404678"></a>
>
> **Exactly one of these rules must match (<code>oneOf</code>)**
>
> <a id="dt-cf2e08fffed914131e04"></a>
>
> **Rule 1**
>
> > <div id="dt-bd8f3818e0aceb5ff2ab">
> > <p style="white-space: pre-wrap">Basic DWC PCIe controller configuration-space accessible over the DBI interface. This memory space is either activated with CDM/ELBI = 0 and CS2 = 0 or is a contiguous memory region with all spaces. Note iATU/eDMA CSRs are indirectly accessible via the PL viewports on the DWC PCIe controllers older than v4.80a.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-3d265eed3dda6a79d4af"><code>&#34;dbi&#34;</code></span>
>
> <a id="dt-85162b38fc1362339820"></a>
>
> **Rule 2**
>
> > <div id="dt-1dfc4ff54a25d545b315">
> > <p style="white-space: pre-wrap">Shadow DWC PCIe config-space registers. This space is selected by setting CDM/ELBI = 0 and CS2 = 1. This is an intermix of the PCI-SIG PCIe CFG-space with the shadow registers for some PCI Header space, PCI Standard and Extended Structures. It's mainly relevant for the end-point controller configuration, but still there are some shadow registers available for the Root Port mode too.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-57c553b6e748d3ddcfb0"><code>&#34;dbi2&#34;</code></span>
>
> <a id="dt-dbad8790da5e83e887fa"></a>
>
> **Rule 3**
>
> > <div id="dt-0b747bd46a437558014f">
> > <p style="white-space: pre-wrap">External Local Bus registers. It's an application-dependent registers normally defined by the platform engineers. The space can be selected by setting CDM/ELBI = 1 and CS2 = 0 wires or can be accessed over some platform-specific means (for instance as a part of a system controller).</p>
> > </div>
> >
> > **Allowed values (<code>enum</code>):** <a id="dt-1c3305c3309ce1fb99a8"></a> <span id="dt-780704e9196f11390129"><code>&#34;elbi&#34;</code></span>, <span id="dt-6b13e11a9fc1d16c281d"><code>&#34;app&#34;</code></span>
>
> <a id="dt-7c5c8605c36432dac635"></a>
>
> **Rule 4**
>
> > <div id="dt-2b6e28759c273b293f42">
> > <p style="white-space: pre-wrap">iATU/eDMA registers common for all device functions. It's an unrolled memory space with the internal Address Translation Unit and Enhanced DMA, which is selected by setting CDM/ELBI = 1 and CS2 = 1. For IP-core releases prior v4.80a, these registers have been programmed via an indirect addressing scheme using a set of viewport CSRs mapped into the PL space. Note iATU is normally mapped to the 0x0 address of this region, while eDMA is available at 0x80000 base address.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-38a1a4bbdbf4d6668e64"><code>&#34;atu&#34;</code></span>
>
> <a id="dt-26d5a0fd5b23c06e660a"></a>
>
> **Rule 5**
>
> > <div id="dt-c5b2b360241946fe4ebf">
> > <p style="white-space: pre-wrap">Platform-specific eDMA registers. Some platforms may have eDMA CSRs mapped in a non-standard base address. The registers offset can be changed or the MS/LS-bits of the address can be attached in an additional RTL block before the MEM-IO transactions reach the DW PCIe slave interface.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-2b25ad7e3594a4413def"><code>&#34;dma&#34;</code></span>
>
> <a id="dt-c25630450437115ecfd6"></a>
>
> **Rule 6**
>
> > <div id="dt-496ac64a671e0abf6a9f">
> > <p style="white-space: pre-wrap">PHY/PCS configuration registers. Some platforms can have the PCS and PHY CSRs accessible over a dedicated memory mapped region, but mainly these registers are indirectly accessible either by means of the embedded PHY viewport schema or by some platform-specific method.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-5e349995e834c94ce877"><code>&#34;phy&#34;</code></span>
>
> <a id="dt-4cd39ba8c4408eef8726"></a>
>
> **Rule 7**
>
> > <div id="dt-1a6b580e3427b669d983">
> > <p style="white-space: pre-wrap">Outbound iATU-capable memory-region which will be used to generate various application-specific traffic on the PCIe bus hierarchy. It's usage scenario depends on the endpoint functionality, for instance it can be used to create MSI(X) messages.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-02489a80dcf48c0e47de"><code>&#34;addr&#95;space&#34;</code></span>
>
> <a id="dt-9d041877b8d29d3c949f"></a>
>
> **Rule 8**
>
> > <div id="dt-43406bb3cf2a8a21cb41">
> > <p style="white-space: pre-wrap">Vendor-specific CSR names. Consider using the generic names above for new bindings.</p>
> > </div>
> >
> > <a id="dt-7203cb1e1d2971a339fe"></a>
> >
> > **Exactly one of these rules must match (<code>oneOf</code>)**
> >
> > <a id="dt-1785125659491df629c2"></a>
> >
> > **Rule 1**
> >
> > > <div id="dt-c04ab627e994beb8b597">
> > > <p style="white-space: pre-wrap">See native 'elbi/app' CSR region for details.</p>
> > > </div>
> > >
> > > **Allowed values (<code>enum</code>):** <a id="dt-45e3b64a4c81d97281b3"></a> <span id="dt-72f4fef9d9318ecd5a88"><code>&#34;apb&#34;</code></span>, <span id="dt-7ac5201f7f91fcf9f1d6"><code>&#34;link&#34;</code></span>, <span id="dt-d8b3d2134e2ccb7a3095"><code>&#34;appl&#34;</code></span>
> >
> > <a id="dt-0bc92042b116a986caaf"></a>
> >
> > **Rule 2**
> >
> > > <div id="dt-5e7ad109be066f0aa688">
> > > <p style="white-space: pre-wrap">See native 'atu' CSR region for details.</p>
> > > </div>
> > >
> > > **Allowed values (<code>enum</code>):** <a id="dt-98c771697bafcb07d614"></a> <span id="dt-025dcb58cfb5b913b70e"><code>&#34;atu&#95;dma&#34;</code></span>

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

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

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

**Rule 1**

> <a id="dt-69c49847f5484d4d0c54"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Exact value (<code>const</code>):** <span id="dt-a651e4061500e5cf3665"><code>&#34;dbi&#34;</code></span>

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

**Rule 2**

> <a id="dt-149140957311e2f80696"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Exact value (<code>const</code>):** <span id="dt-fab2795f9a594bf4521c"><code>&#34;addr&#95;space&#34;</code></span>

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

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

<div id="dt-b3ddec0f69e9f0c0dc40">
<p style="white-space: pre-wrap">There is no mandatory IRQ signals for the normal controller functioning, but in addition to the native set the platforms may have a link- or PM-related IRQs specified.</p>
</div>

**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>20</code></span>

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

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

**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>20</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**
>
> > <div id="dt-f3732731ccad68e0a991">
> > <p style="white-space: pre-wrap">Controller request to read or write virtual product data from/to the VPD capability registers.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-a1433149f3bc33924dcb"><code>&#34;vpd&#34;</code></span>
>
> <a id="dt-2b1f822be8da8477332d"></a>
>
> **Rule 2**
>
> > <div id="dt-5f7eb67dd900af4ecac2">
> > <p style="white-space: pre-wrap">Link Equalization Request flag is set in the Link Status 2 register (applicable if the corresponding IRQ is enabled in the Link Control 3 register).</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-4f36f4f40e452f75b5b9"><code>&#34;l&#95;eq&#34;</code></span>
>
> <a id="dt-cb7c80ea9df505674878"></a>
>
> **Rule 3**
>
> > <div id="dt-74b636d7c4fddbccbb85">
> > <p style="white-space: pre-wrap">Indicates that the eDMA Tx/Rx transfer is complete or that an error has occurred on the corresponding channel. eDMA can have eight Tx (Write) and Rx (Read) eDMA channels thus supporting up to 16 IRQ signals all together. Write eDMA channels shall go first in the ordered row as per default edma_int[*] bus setup.</p>
> > </div>
> >
> > **String pattern (<code>pattern</code>):** <span id="dt-bc3449256a91ba7469b7"><code>&#34;&#94;dma&#40;&#91;0&#45;9&#93;&#124;1&#91;0&#45;5&#93;&#41;&#63;&#36;&#34;</code></span>
>
> <a id="dt-0d49e846bbaa59d34c25"></a>
>
> **Rule 4**
>
> > <div id="dt-2d68a75db1203793c694">
> > <p style="white-space: pre-wrap">PCIe protocol correctable error or a Data Path protection correctable error is detected by the automotive/safety feature.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-193e42b7fc5a26fa19dd"><code>&#34;sft&#95;ce&#34;</code></span>
>
> <a id="dt-c1b1d320e94acfe6eeb7"></a>
>
> **Rule 5**
>
> > <div id="dt-354d0e7d2dd22f46fdc8">
> > <p style="white-space: pre-wrap">Indicates that the internal safety mechanism has detected an uncorrectable error.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-128cff437ea1fc29961a"><code>&#34;sft&#95;ue&#34;</code></span>
>
> <a id="dt-857d5c8bf3f723bf4337"></a>
>
> **Rule 6**
>
> > <div id="dt-bbb6107945923fb8a9ad">
> > <p style="white-space: pre-wrap">Application-specific IRQ raised depending on the vendor-specific events basis.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-950a62ae8122f8b0504c"><code>&#34;app&#34;</code></span>
>
> <a id="dt-73bf2d6eb973e054f010"></a>
>
> **Rule 7**
>
> > <div id="dt-03d4c101518a44ddc8c3">
> > <p style="white-space: pre-wrap">Interrupts triggered when the controller itself (in Endpoint mode) has sent an Assert_INT{A,B,C,D}/Desassert_INT{A,B,C,D} message to the upstream device.</p>
> > </div>
> >
> > **String pattern (<code>pattern</code>):** <span id="dt-37e136915a5307e7afce"><code>&#34;&#94;tx&#95;int&#40;a&#124;b&#124;c&#124;d&#41;&#36;&#34;</code></span>
>
> <a id="dt-ba6137bd553c5257de6a"></a>
>
> **Rule 8**
>
> > <div id="dt-676430f6e19fc6719d3d">
> > <p style="white-space: pre-wrap">Combined interrupt signal raised when the controller has sent an Assert_INT{A,B,C,D} message. See "^tx_int(a|b|c|d)$" for details.</p>
> > </div>
> >
> > **Exact value (<code>const</code>):** <span id="dt-6e4b0ecd9325026c47cd"><code>&#34;legacy&#34;</code></span>
>
> <a id="dt-61e767256332f33311c8"></a>
>
> **Rule 9**
>
> > <div id="dt-9e75b06f8b276a7c8902">
> > <p style="white-space: pre-wrap">Vendor-specific IRQ names. Consider using the generic names above for new bindings.</p>
> > </div>
> >
> > <a id="dt-365c6bf14812d177cab5"></a>
> >
> > **Exactly one of these rules must match (<code>oneOf</code>)**
> >
> > <a id="dt-1c930ef46436c2f2c6ee"></a>
> >
> > **Rule 1**
> >
> > > <div id="dt-cf07f7272d1cc1053470">
> > > <p style="white-space: pre-wrap">See native "app" IRQ for details</p>
> > > </div>
> > >
> > > **Allowed values (<code>enum</code>):** <a id="dt-f7a3d269c86c1522b846"></a> <span id="dt-b39538bd36c442165dc2"><code>&#34;intr&#34;</code></span>, <span id="dt-81d99d0637c0aec981c7"><code>&#34;sys&#34;</code></span>, <span id="dt-6749b4cdb8122cac1e49"><code>&#34;pmc&#34;</code></span>, <span id="dt-839d08f6e7c0e0d20d13"><code>&#34;msg&#34;</code></span>, <span id="dt-ad83c10fbf89c80a96b3"><code>&#34;err&#34;</code></span>

<a id="dt-13eef0af6a1d5d2fa6b6"></a>

### <code>max&#45;functions</code> — not listed as required here

**Maximum value (<code>maximum</code>):** <span id="dt-df90fd99fac03fe2ab17"><code>32</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;reg&#45;names&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>true</code>

Allowed by this rule.

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

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">pcie-ep@dfd00000 {
  compatible = "snps,dw-pcie-ep";
  reg = &lt;0xdfc00000 0x0001000&gt;, /* IP registers 1 */
        &lt;0xdfc01000 0x0001000&gt;, /* IP registers 2 */
        &lt;0xd0000000 0x2000000&gt;; /* Configuration space */
  reg-names = "dbi", "dbi2", "addr_space";

  interrupts = &lt;23&gt;, &lt;24&gt;;
  interrupt-names = "dma0", "dma1";

  clocks = &lt;&amp;sys_clk 12&gt;, &lt;&amp;sys_clk 24&gt;;
  clock-names = "dbi", "ref";

  resets = &lt;&amp;sys_rst 12&gt;, &lt;&amp;sys_rst 24&gt;;
  reset-names = "dbi", "phy";

  phys = &lt;&amp;pcie_phy0&gt;, &lt;&amp;pcie_phy1&gt;, &lt;&amp;pcie_phy2&gt;, &lt;&amp;pcie_phy3&gt;;
  phy-names = "pcie0", "pcie1", "pcie2", "pcie3";

  max-link-speed = &lt;3&gt;;
  max-functions = /bits/ 8 &lt;4&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</span></p>

<p id="dt-comment-1"><strong>Line 16:</strong> <span> Please create a separate DT-schema for your DWC PCIe Endpoint controller</span></p>

<p id="dt-comment-2"><strong>Line 17:</strong> <span> and make sure it's assigned with the vendor-specific compatible string.</span></p>

</details>
