Faraday Technology FTPCI100 PCI Host Bridge

Schema identifier ($id): "http://devicetree.org/schemas/pci/faraday,ftpci100.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Linus Walleij <linusw@kernel.org>"

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.

Interrupt map considerations:

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.

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:

interrupt-map-mask = <0xf800 0 0 7>;
interrupt-map =
    <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
    <0x4800 0 0 2 &pci_intc 1>,
    <0x4800 0 0 3 &pci_intc 2>,
    <0x4800 0 0 4 &pci_intc 3>,
    <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
    <0x5000 0 0 2 &pci_intc 2>,
    <0x5000 0 0 3 &pci_intc 3>,
    <0x5000 0 0 4 &pci_intc 0>,
    <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
    <0x5800 0 0 2 &pci_intc 3>,
    <0x5800 0 0 3 &pci_intc 0>,
    <0x5800 0 0 4 &pci_intc 1>,
    <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
    <0x6000 0 0 2 &pci_intc 0>,
    <0x6000 0 0 3 &pci_intc 1>,
    <0x6000 0 0 4 &pci_intc 2>;

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/pci/pci-host-bridge.yaml#

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Exact value (const): "cortina,gemini-pci"

Item 2

Exact value (const): "faraday,ftpci100"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "cortina,gemini-pci-dual"

Item 2

Exact value (const): "faraday,ftpci100-dual"

Rule 3

Exact value (const): "faraday,ftpci100"

Rule 4

Exact value (const): "faraday,ftpci100-dual"

reg — required here #

Maximum number of items (maxItems): 1

#address-cells — not listed as required here #

Exact value (const): 3

#interrupt-cells — required here #

Exact value (const): 1

ranges — not listed as required here #

Minimum number of items (minItems): 2

dma-ranges — required here #

Minimum number of items (minItems): 3

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.

clocks — not listed as required here #

Array item rules (items) #

Item 1

peripheral clock (PCLK)

Item 2

PCI clock (PCICLK).

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.

clock-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "PCLK"

Item 2

Exact value (const): "PCICLK"

interrupt-controller — not listed as required here #

Value type (type): "object"

Required in this object (required): "reg", "compatible", "#interrupt-cells", "interrupt-map-mask", "interrupt-map", "dma-ranges"

Condition (if) #

Properties and child nodes (properties) #

compatible — not listed as required here #

Rule for matching array elements (contains)

Exact value (const): "faraday,ftpci100"

When the condition matches (then) #

Required in this object (required): "interrupt-controller"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
pci@50000000 {
  compatible = "cortina,gemini-pci", "faraday,ftpci100";
  reg = <0x50000000 0x100>;
  device_type = "pci";
  #address-cells = <3>;
  #size-cells = <2>;
  #interrupt-cells = <1>;

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

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

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

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page