# Faraday Technology FTPCI100 PCI Host Bridge

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

> Device-tree binding reference for Faraday Technology FTPCI100 PCI Host Bridge.

<!-- 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;faraday&#44;ftpci100&#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;Linus Walleij &#60;linusw&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">This PCI bridge is found inside that Cortina Systems Gemini SoC platform and
is a generic IP block from Faraday Technology. It exists in two variants:
plain and dual PCI. The plain version embeds a cascading interrupt controller
into the host bridge. The dual version routes the interrupts to the host
chips interrupt controller.
The host controller appear on the PCI bus with vendor ID 0x159b (Faraday
Technology) and product ID 0x4321.
I/O space considerations:
The plain variant has 128MiB of non-prefetchable memory space, whereas the
"dual" variant has 64MiB. Take this into account when describing the ranges.</p>
<p style="white-space: pre-wrap">Interrupt map considerations:</p>
<p style="white-space: pre-wrap">The "dual" variant will get INT A, B, C, D from the system interrupt controller
and should point to respective interrupt in that controller in its interrupt-map.</p>
<p style="white-space: pre-wrap">The code which is the only documentation of how the Faraday PCI (the non-dual
variant) interrupts assigns the default interrupt mapping/swizzling has
typically been like this, doing the swizzling on the interrupt controller side
rather than in the interconnect:</p>
<pre><code>interrupt-map-mask = &lt;0xf800 0 0 7&gt;;
interrupt-map =
    &lt;0x4800 0 0 1 &amp;pci_intc 0&gt;, /* Slot 9 */
    &lt;0x4800 0 0 2 &amp;pci_intc 1&gt;,
    &lt;0x4800 0 0 3 &amp;pci_intc 2&gt;,
    &lt;0x4800 0 0 4 &amp;pci_intc 3&gt;,
    &lt;0x5000 0 0 1 &amp;pci_intc 1&gt;, /* Slot 10 */
    &lt;0x5000 0 0 2 &amp;pci_intc 2&gt;,
    &lt;0x5000 0 0 3 &amp;pci_intc 3&gt;,
    &lt;0x5000 0 0 4 &amp;pci_intc 0&gt;,
    &lt;0x5800 0 0 1 &amp;pci_intc 2&gt;, /* Slot 11 */
    &lt;0x5800 0 0 2 &amp;pci_intc 3&gt;,
    &lt;0x5800 0 0 3 &amp;pci_intc 0&gt;,
    &lt;0x5800 0 0 4 &amp;pci_intc 1&gt;,
    &lt;0x6000 0 0 1 &amp;pci_intc 3&gt;, /* Slot 12 */
    &lt;0x6000 0 0 2 &amp;pci_intc 0&gt;,
    &lt;0x6000 0 0 3 &amp;pci_intc 1&gt;,
    &lt;0x6000 0 0 4 &amp;pci_intc 2&gt;;</code></pre>
</div>

<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;host&#45;bridge&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-shared/pci/pci-host-bridge.md#dt-root>)</span>

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

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

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

> <a id="dt-07409cc9508405f48983"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-822691c82c9797f7b1f9"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-5deec2612224d8d915da"><code>&#34;cortina&#44;gemini&#45;pci&#34;</code></span>
>
> <a id="dt-bc83d1191bdc72da8559"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-1da74b37131fdcec1073"><code>&#34;faraday&#44;ftpci100&#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;cortina&#44;gemini&#45;pci&#45;dual&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><code>&#34;faraday&#44;ftpci100&#45;dual&#34;</code></span>

<a id="dt-39cb5b72c94e12bd53ea"></a>

**Rule 3**

> **Exact value (<code>const</code>):** <span id="dt-710bc579d54b8b6b1f6c"><code>&#34;faraday&#44;ftpci100&#34;</code></span>

<a id="dt-61219c29f99de6d21702"></a>

**Rule 4**

> **Exact value (<code>const</code>):** <span id="dt-bb8aa9a35453860e510c"><code>&#34;faraday&#44;ftpci100&#45;dual&#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-2efe70314a961a652abe"></a>

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

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

<a id="dt-8586fac2d9a71adf4795"></a>

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

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

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

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

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

<a id="dt-43b0a2c310c74daba2e4"></a>

### <code>dma&#45;ranges</code> — required here

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

<div id="dt-3a503d91f0f1aa82288d">
<p style="white-space: pre-wrap">three ranges for the inbound memory region. The ranges must
be aligned to a 1MB boundary, and may be 1MB, 2MB, 4MB, 8MB, 16MB, 32MB, 64MB,
128MB, 256MB, 512MB, 1GB or 2GB in size. The memory should be marked as
pre-fetchable.</p>
</div>

<a id="dt-4e9a371963ac013ad39d"></a>

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

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

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

<a id="dt-41adf3ed8101eca13466"></a>

**Item 1**

> <div id="dt-4cfd4c1642ba13c357d6">
> <p style="white-space: pre-wrap">peripheral clock (PCLK)</p>
> </div>

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

**Item 2**

> <div id="dt-6b79aebfd2287d4aeab8">
> <p style="white-space: pre-wrap">PCI clock (PCICLK).</p>
> </div>

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">If these are not present, they are assumed to be
hard-wired enabled and always on. The PCI clock will be 33 or 66 MHz.</p>
</div>

<a id="dt-041d7cd76b652a5de06a"></a>

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

<a id="dt-3d1de59bdfddccf00eed"></a>

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-3403d68873725c15739a"><code>&#34;PCLK&#34;</code></span>

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

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-0298e5f353a64a09a8a6"><code>&#34;PCICLK&#34;</code></span>

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

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

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

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;reg&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;compatible&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;interrupt&#45;cells&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;interrupt&#45;map&#45;mask&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;interrupt&#45;map&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;dma&#45;ranges&#34;</code></span>

<a id="dt-158e3f6339df9dc0e448"></a>

## Condition (<code>if</code>)

> <a id="dt-0c7b6d12024f922c1b96"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-824fdc441f7c94ae56ca"></a>
>
> #### <code>compatible</code> — not listed as required here
>
> <a id="dt-8239149d6c8b0a5dabbe"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Exact value (<code>const</code>):** <span id="dt-0259836b095562054cc8"><code>&#34;faraday&#44;ftpci100&#34;</code></span>

<a id="dt-94d3067a06aec87aad7f"></a>

## When the condition matches (<code>then</code>)

> **Required in this object (<code>required</code>):** <a id="dt-824165741bab07e919e7"></a> <span id="dt-0be16f81402541b26aff"><code>&#34;interrupt&#45;controller&#34;</code></span>

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</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/irq.h&gt;
pci@50000000 {
  compatible = "cortina,gemini-pci", "faraday,ftpci100";
  reg = &lt;0x50000000 0x100&gt;;
  device_type = "pci";
  #address-cells = &lt;3&gt;;
  #size-cells = &lt;2&gt;;
  #interrupt-cells = &lt;1&gt;;

  bus-range = &lt;0x00 0xff&gt;;
  ranges = /* 1MiB I/O space 0x50000000-0x500fffff */
    &lt;0x01000000 0 0          0x50000000 0 0x00100000&gt;,
    /* 128MiB non-prefetchable memory 0x58000000-0x5fffffff */
    &lt;0x02000000 0 0x58000000 0x58000000 0 0x08000000&gt;;

  /* DMA ranges */
  dma-ranges =
    /* 128MiB at 0x00000000-0x07ffffff */
    &lt;0x02000000 0 0x00000000 0x00000000 0 0x08000000&gt;,
    /* 64MiB at 0x00000000-0x03ffffff */
    &lt;0x02000000 0 0x00000000 0x00000000 0 0x04000000&gt;,
    /* 64MiB at 0x00000000-0x03ffffff */
    &lt;0x02000000 0 0x00000000 0x00000000 0 0x04000000&gt;;

  interrupt-map-mask = &lt;0xf800 0 0 7&gt;;
  interrupt-map =
    &lt;0x4800 0 0 1 &amp;pci_intc 0&gt;, /* Slot 9 */
    &lt;0x4800 0 0 2 &amp;pci_intc 1&gt;,
    &lt;0x4800 0 0 3 &amp;pci_intc 2&gt;,
    &lt;0x4800 0 0 4 &amp;pci_intc 3&gt;,
    &lt;0x5000 0 0 1 &amp;pci_intc 1&gt;, /* Slot 10 */
    &lt;0x5000 0 0 2 &amp;pci_intc 2&gt;,
    &lt;0x5000 0 0 3 &amp;pci_intc 3&gt;,
    &lt;0x5000 0 0 4 &amp;pci_intc 0&gt;,
    &lt;0x5800 0 0 1 &amp;pci_intc 2&gt;, /* Slot 11 */
    &lt;0x5800 0 0 2 &amp;pci_intc 3&gt;,
    &lt;0x5800 0 0 3 &amp;pci_intc 0&gt;,
    &lt;0x5800 0 0 4 &amp;pci_intc 1&gt;,
    &lt;0x6000 0 0 1 &amp;pci_intc 3&gt;, /* Slot 12 */
    &lt;0x6000 0 0 2 &amp;pci_intc 0&gt;,
    &lt;0x6000 0 0 3 &amp;pci_intc 0&gt;,
    &lt;0x6000 0 0 4 &amp;pci_intc 0&gt;;
  pci_intc: interrupt-controller {
    interrupt-parent = &lt;&amp;intcon&gt;;
    interrupt-controller;
    interrupts = &lt;8 IRQ_TYPE_LEVEL_HIGH&gt;;
    #address-cells = &lt;0&gt;;
    #interrupt-cells = &lt;1&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>
