# PCI Endpoint Controller

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

> Device-tree binding reference for PCI Endpoint 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;pci&#47;pci&#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>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Common properties for PCI Endpoint Controller Nodes.</p>
</div>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Kishon Vijay Abraham I &#60;kishon&#64;kernel&#46;org&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Manivannan Sadhasivam &#60;mani&#64;kernel&#46;org&#62;&#34;</code></span>

<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;pcie&#45;ep&#64;&#34;</code></span>

<a id="dt-476cf51129594c4bb1fd"></a>

### <code>iommu&#45;map</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-467f9994d944559515a3">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;matrix</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d948f2945b497d9aa3c7>)</span>

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

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

> <a id="dt-482609778f9ab09c199c"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-9b6526f97095813b61ab"></a>
>
> **Item 1**
>
> > <div id="dt-3fbeb1a8e20e72bce15e">
> > <p style="white-space: pre-wrap">Device ID (see msi-map) base</p>
> > </div>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-551a86fc46e9a789e416"><code>524287</code></span>
>
> <a id="dt-f5a2bf0227544d534a2e"></a>
>
> **Item 2**
>
> > <div id="dt-4b543a15f9c5b9e2df6c">
> > <p style="white-space: pre-wrap">phandle to IOMMU</p>
> > </div>
>
> <a id="dt-1ed8462d545ddc2a51c6"></a>
>
> **Item 3**
>
> > <div id="dt-89437a5debe4b5c7c709">
> > <p style="white-space: pre-wrap">IOMMU specifier base (currently always 1 cell)</p>
> > </div>
>
> <a id="dt-2522e8f9cacf8aadfa8d"></a>
>
> **Item 4**
>
> > <div id="dt-b88da4bee75e253bc4e7">
> > <p style="white-space: pre-wrap">Number of Device IDs</p>
> > </div>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-367c715950015d0ab6f4"><code>524288</code></span>

<a id="dt-00761d1c23dbb6f3acd2"></a>

### <code>iommu&#45;map&#45;mask</code> — not listed as required here

<div id="dt-d6b446884f238fed6f5a">
<p style="white-space: pre-wrap">A mask to be applied to each Device ID prior to being mapped to an IOMMU specifier per the iommu-map property.</p>
</div>

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

**Maximum value (<code>maximum</code>):** <span id="dt-4d97fe954bbc2502650c"><code>524287</code></span>

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

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

<div id="dt-09cf1bd699177400134d">
<p style="white-space: pre-wrap">Maximum number of functions that can be configured</p>
</div>

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

**Minimum value (<code>minimum</code>):** <span id="dt-e1674da56f597780d36e"><code>1</code></span>

**Default value (<code>default</code>):** <span id="dt-eff97def34985859f852"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-df90fd99fac03fe2ab17"><code>255</code></span>

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

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

<div id="dt-bb7e64fa99767df542ca">
<p style="white-space: pre-wrap">Array representing the number of virtual functions corresponding to each physical function</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-74600953feeff8396fa1">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint8&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-184849745c5e941c3ec5>)</span>

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-4a134a64587f395cfaba"><code>255</code></span>

<a id="dt-26c6584f22e6181654c2"></a>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-78f05354c4d8178d2bf0"></a> <span id="dt-bad991325ad465904471"><code>1</code></span>, <span id="dt-34c40061719c5946759a"><code>2</code></span>, <span id="dt-79cecec04dd39bf587f1"><code>3</code></span>, <span id="dt-769e9898823f7d22989d"><code>4</code></span>, <span id="dt-b885835cd213f0767082"><code>5</code></span>, <span id="dt-8c745a49b11d9a302257"><code>6</code></span>

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

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

<div id="dt-54ed7189386b290602d7">
<p style="white-space: pre-wrap">Maps a Device ID to an MSI and associated MSI specifier data.</p>
<p style="white-space: pre-wrap">A PCI Endpoint (EP) can use MSI as a doorbell function. This is achieved by
mapping the MSI controller's address into PCI BAR&lt;n&gt;. The PCI Root Complex
can write to this BAR&lt;n&gt;, triggering the EP to generate IRQ. This notifies
the EP-side driver of an event, eliminating the need for the driver to
continuously poll for status changes.</p>
<p style="white-space: pre-wrap">However, the EP cannot rely on Requester ID (RID) because the RID is
determined by the PCI topology of the host system. Since the EP may be
connected to different PCI hosts, the RID can vary between systems and is
therefore not a reliable identifier.</p>
<pre><code>Each EP can support up to 8 physical functions and up to 65,536 virtual
functions. To uniquely identify each child device, a device ID is defined
as
   - Bits [2:0] for the function number (func)
   - Bits [18:3] for the virtual function index (vfunc)</code></pre>
<p style="white-space: pre-wrap">The resulting device ID is computed as:</p>
<pre><code>  (func &amp; 0x7) | (vfunc &lt;&lt; 3)</code></pre>
<p style="white-space: pre-wrap">The property is an arbitrary number of tuples of
(device-id-base, msi, msi-base,length).</p>
<p style="white-space: pre-wrap">Any Device ID id in the interval [id-base, id-base + length) is
associated with the listed MSI, with the MSI specifier
(id - id-base + msi-base).</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-d7e761fdda6377c8a486">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32&#45;matrix</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d948f2945b497d9aa3c7>)</span>

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

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

> <a id="dt-a6639d80812e51c25c32"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-a728dcd899d004a4712f"></a>
>
> **Item 1**
>
> > <div id="dt-827fd622dae755a9310d">
> > <p style="white-space: pre-wrap">The Device ID base matched by the entry</p>
> > </div>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-8cb52ac806472460bf9c"><code>524287</code></span>
>
> <a id="dt-f3d99ee112ea8e5efdce"></a>
>
> **Item 2**
>
> > <div id="dt-a45a1cff87aa69d1f927">
> > <p style="white-space: pre-wrap">phandle to msi-controller node</p>
> > </div>
>
> <a id="dt-aef9a9bbf0704baa9c69"></a>
>
> **Item 3**
>
> > <div id="dt-48815ec1e4c4be05f9b2">
> > <p style="white-space: pre-wrap">(optional) The msi-specifier produced for the first Device ID matched by the entry. Currently, msi-specifier is 0 or 1 cells.</p>
> > </div>
>
> <a id="dt-bf75e11bae22fbdc9ac9"></a>
>
> **Item 4**
>
> > <div id="dt-428ece21ca8f5405365d">
> > <p style="white-space: pre-wrap">The length of consecutive Device IDs following the Device ID base</p>
> > </div>
> >
> > **Maximum value (<code>maximum</code>):** <span id="dt-423aa529e9da039f5012"><code>524288</code></span>

<a id="dt-8348eccb058042c2c9a4"></a>

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

<div id="dt-12fe564b9ea9db965be0">
<p style="white-space: pre-wrap">A mask to be applied to each Device ID prior to being mapped to an msi-specifier per the msi-map property.</p>
</div>

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

**Maximum value (<code>maximum</code>):** <span id="dt-acfa259f79546923db0e"><code>524287</code></span>

<a id="dt-83c3e7dccda194782155"></a>

### <code>num&#45;lanes</code> — not listed as required here

<div id="dt-68a4648696bf029727d8">
<p style="white-space: pre-wrap">maximum number of lanes</p>
</div>

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

**Minimum value (<code>minimum</code>):** <span id="dt-dd9fc0bd0303afcbd666"><code>1</code></span>

**Default value (<code>default</code>):** <span id="dt-a31b12b716f1543e8e42"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-f0c37fe356dbe48c09fc"><code>16</code></span>

<a id="dt-3867543ed7ae763c635e"></a>

### <code>linux&#44;pci&#45;domain</code> — not listed as required here

<div id="dt-485a3065507d002af0fb">
<p style="white-space: pre-wrap">If present this property assigns a fixed PCI domain number to a PCI Endpoint Controller, otherwise an unstable (across boots) unique number will be assigned. It is required to either not set this property at all or set it for all PCI endpoint controllers in the system, otherwise potentially conflicting domain numbers may be assigned to endpoint controllers. The domain number for each endpoint controller in the system must be unique.</p>
</div>

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

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#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.

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