xref: /freebsd/sys/contrib/device-tree/Bindings/pci/fsl,layerscape-pcie.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
17d0873ebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
27d0873ebSEmmanuel Vadot%YAML 1.2
37d0873ebSEmmanuel Vadot---
47d0873ebSEmmanuel Vadot$id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie.yaml#
57d0873ebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
67d0873ebSEmmanuel Vadot
77d0873ebSEmmanuel Vadottitle: Freescale Layerscape PCIe Root Complex(RC) controller
87d0873ebSEmmanuel Vadot
97d0873ebSEmmanuel Vadotmaintainers:
107d0873ebSEmmanuel Vadot  - Frank Li <Frank.Li@nxp.com>
117d0873ebSEmmanuel Vadot
127d0873ebSEmmanuel Vadotdescription:
137d0873ebSEmmanuel Vadot  This PCIe RC controller is based on the Synopsys DesignWare PCIe IP
147d0873ebSEmmanuel Vadot
157d0873ebSEmmanuel Vadot  This controller derives its clocks from the Reset Configuration Word (RCW)
167d0873ebSEmmanuel Vadot  which is used to describe the PLL settings at the time of chip-reset.
177d0873ebSEmmanuel Vadot
187d0873ebSEmmanuel Vadot  Also as per the available Reference Manuals, there is no specific 'version'
197d0873ebSEmmanuel Vadot  register available in the Freescale PCIe controller register set,
207d0873ebSEmmanuel Vadot  which can allow determining the underlying DesignWare PCIe controller version
217d0873ebSEmmanuel Vadot  information.
227d0873ebSEmmanuel Vadot
237d0873ebSEmmanuel Vadotproperties:
247d0873ebSEmmanuel Vadot  compatible:
25*b2d2a78aSEmmanuel Vadot    oneOf:
26*b2d2a78aSEmmanuel Vadot      - enum:
27*b2d2a78aSEmmanuel Vadot          - fsl,ls1012a-pcie
287d0873ebSEmmanuel Vadot          - fsl,ls1021a-pcie
29*b2d2a78aSEmmanuel Vadot          - fsl,ls1028a-pcie
30*b2d2a78aSEmmanuel Vadot          - fsl,ls1043a-pcie
31*b2d2a78aSEmmanuel Vadot          - fsl,ls1046a-pcie
32*b2d2a78aSEmmanuel Vadot          - fsl,ls1088a-pcie
337d0873ebSEmmanuel Vadot          - fsl,ls2080a-pcie
347d0873ebSEmmanuel Vadot          - fsl,ls2085a-pcie
357d0873ebSEmmanuel Vadot          - fsl,ls2088a-pcie
36*b2d2a78aSEmmanuel Vadot      - items:
37*b2d2a78aSEmmanuel Vadot          - const: fsl,lx2160ar2-pcie
38*b2d2a78aSEmmanuel Vadot          - const: fsl,ls2088a-pcie
397d0873ebSEmmanuel Vadot  reg:
407d0873ebSEmmanuel Vadot    maxItems: 2
417d0873ebSEmmanuel Vadot
427d0873ebSEmmanuel Vadot  reg-names:
437d0873ebSEmmanuel Vadot    items:
447d0873ebSEmmanuel Vadot      - const: regs
457d0873ebSEmmanuel Vadot      - const: config
467d0873ebSEmmanuel Vadot
477d0873ebSEmmanuel Vadot  fsl,pcie-scfg:
48*b2d2a78aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
497d0873ebSEmmanuel Vadot    description: A phandle to the SCFG device node. The second entry is the
507d0873ebSEmmanuel Vadot      physical PCIe controller index starting from '0'. This is used to get
517d0873ebSEmmanuel Vadot      SCFG PEXN registers.
52*b2d2a78aSEmmanuel Vadot    items:
53*b2d2a78aSEmmanuel Vadot      items:
54*b2d2a78aSEmmanuel Vadot        - description: A phandle to the SCFG device node
55*b2d2a78aSEmmanuel Vadot        - description: PCIe controller index starting from '0'
56*b2d2a78aSEmmanuel Vadot    maxItems: 1
577d0873ebSEmmanuel Vadot
587d0873ebSEmmanuel Vadot  big-endian:
597d0873ebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
607d0873ebSEmmanuel Vadot    description: If the PEX_LUT and PF register block is in big-endian, specify
617d0873ebSEmmanuel Vadot      this property.
627d0873ebSEmmanuel Vadot
637d0873ebSEmmanuel Vadot  dma-coherent: true
647d0873ebSEmmanuel Vadot
657d0873ebSEmmanuel Vadot  msi-parent: true
667d0873ebSEmmanuel Vadot
677d0873ebSEmmanuel Vadot  iommu-map: true
687d0873ebSEmmanuel Vadot
697d0873ebSEmmanuel Vadot  interrupts:
707d0873ebSEmmanuel Vadot    minItems: 1
717d0873ebSEmmanuel Vadot    maxItems: 2
727d0873ebSEmmanuel Vadot
737d0873ebSEmmanuel Vadot  interrupt-names:
747d0873ebSEmmanuel Vadot    minItems: 1
757d0873ebSEmmanuel Vadot    maxItems: 2
767d0873ebSEmmanuel Vadot
77*b2d2a78aSEmmanuel Vadot  num-viewport:
78*b2d2a78aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
79*b2d2a78aSEmmanuel Vadot    deprecated: true
80*b2d2a78aSEmmanuel Vadot    description:
81*b2d2a78aSEmmanuel Vadot      Number of outbound view ports configured in hardware. It's the same as
82*b2d2a78aSEmmanuel Vadot      the number of outbound AT windows.
83*b2d2a78aSEmmanuel Vadot    maximum: 256
84*b2d2a78aSEmmanuel Vadot
857d0873ebSEmmanuel Vadotrequired:
867d0873ebSEmmanuel Vadot  - compatible
877d0873ebSEmmanuel Vadot  - reg
887d0873ebSEmmanuel Vadot  - reg-names
897d0873ebSEmmanuel Vadot  - "#address-cells"
907d0873ebSEmmanuel Vadot  - "#size-cells"
917d0873ebSEmmanuel Vadot  - device_type
927d0873ebSEmmanuel Vadot  - bus-range
937d0873ebSEmmanuel Vadot  - ranges
947d0873ebSEmmanuel Vadot  - interrupts
957d0873ebSEmmanuel Vadot  - interrupt-names
967d0873ebSEmmanuel Vadot  - "#interrupt-cells"
977d0873ebSEmmanuel Vadot  - interrupt-map-mask
987d0873ebSEmmanuel Vadot  - interrupt-map
997d0873ebSEmmanuel Vadot
1007d0873ebSEmmanuel VadotallOf:
1017d0873ebSEmmanuel Vadot  - $ref: /schemas/pci/pci-bus.yaml#
1027d0873ebSEmmanuel Vadot
1037d0873ebSEmmanuel Vadot  - if:
1047d0873ebSEmmanuel Vadot      properties:
1057d0873ebSEmmanuel Vadot        compatible:
1067d0873ebSEmmanuel Vadot          enum:
1077d0873ebSEmmanuel Vadot            - fsl,ls1028a-pcie
1087d0873ebSEmmanuel Vadot            - fsl,ls1046a-pcie
1097d0873ebSEmmanuel Vadot            - fsl,ls1043a-pcie
1107d0873ebSEmmanuel Vadot            - fsl,ls1012a-pcie
1117d0873ebSEmmanuel Vadot    then:
1127d0873ebSEmmanuel Vadot      properties:
1137d0873ebSEmmanuel Vadot        interrupts:
1147d0873ebSEmmanuel Vadot          maxItems: 2
1157d0873ebSEmmanuel Vadot        interrupt-names:
1167d0873ebSEmmanuel Vadot          items:
1177d0873ebSEmmanuel Vadot            - const: pme
1187d0873ebSEmmanuel Vadot            - const: aer
1197d0873ebSEmmanuel Vadot
1207d0873ebSEmmanuel Vadot  - if:
1217d0873ebSEmmanuel Vadot      properties:
1227d0873ebSEmmanuel Vadot        compatible:
1237d0873ebSEmmanuel Vadot          enum:
1247d0873ebSEmmanuel Vadot            - fsl,ls2080a-pcie
1257d0873ebSEmmanuel Vadot            - fsl,ls2085a-pcie
1267d0873ebSEmmanuel Vadot            - fsl,ls2088a-pcie
1277d0873ebSEmmanuel Vadot    then:
1287d0873ebSEmmanuel Vadot      properties:
1297d0873ebSEmmanuel Vadot        interrupts:
1307d0873ebSEmmanuel Vadot          maxItems: 1
1317d0873ebSEmmanuel Vadot        interrupt-names:
1327d0873ebSEmmanuel Vadot          items:
1337d0873ebSEmmanuel Vadot            - const: intr
1347d0873ebSEmmanuel Vadot
1357d0873ebSEmmanuel Vadot  - if:
1367d0873ebSEmmanuel Vadot      properties:
1377d0873ebSEmmanuel Vadot        compatible:
1387d0873ebSEmmanuel Vadot          enum:
1397d0873ebSEmmanuel Vadot            - fsl,ls1088a-pcie
1407d0873ebSEmmanuel Vadot    then:
1417d0873ebSEmmanuel Vadot      properties:
1427d0873ebSEmmanuel Vadot        interrupts:
1437d0873ebSEmmanuel Vadot          maxItems: 1
1447d0873ebSEmmanuel Vadot        interrupt-names:
1457d0873ebSEmmanuel Vadot          items:
1467d0873ebSEmmanuel Vadot            - const: aer
1477d0873ebSEmmanuel Vadot
1487d0873ebSEmmanuel VadotunevaluatedProperties: false
1497d0873ebSEmmanuel Vadot
1507d0873ebSEmmanuel Vadotexamples:
1517d0873ebSEmmanuel Vadot  - |
1527d0873ebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1537d0873ebSEmmanuel Vadot
1547d0873ebSEmmanuel Vadot    soc {
1557d0873ebSEmmanuel Vadot      #address-cells = <2>;
1567d0873ebSEmmanuel Vadot      #size-cells = <2>;
1577d0873ebSEmmanuel Vadot
1587d0873ebSEmmanuel Vadot      pcie@3400000 {
1597d0873ebSEmmanuel Vadot        compatible = "fsl,ls1088a-pcie";
1607d0873ebSEmmanuel Vadot        reg = <0x00 0x03400000 0x0 0x00100000>, /* controller registers */
1617d0873ebSEmmanuel Vadot            <0x20 0x00000000 0x0 0x00002000>; /* configuration space */
1627d0873ebSEmmanuel Vadot        reg-names = "regs", "config";
1637d0873ebSEmmanuel Vadot        interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */
1647d0873ebSEmmanuel Vadot        interrupt-names = "aer";
1657d0873ebSEmmanuel Vadot        #address-cells = <3>;
1667d0873ebSEmmanuel Vadot        #size-cells = <2>;
1677d0873ebSEmmanuel Vadot        dma-coherent;
1687d0873ebSEmmanuel Vadot        device_type = "pci";
1697d0873ebSEmmanuel Vadot        bus-range = <0x0 0xff>;
1707d0873ebSEmmanuel Vadot        ranges = <0x81000000 0x0 0x00000000 0x20 0x00010000 0x0 0x00010000   /* downstream I/O */
1717d0873ebSEmmanuel Vadot                 0x82000000 0x0 0x40000000 0x20 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
1727d0873ebSEmmanuel Vadot        msi-parent = <&its>;
1737d0873ebSEmmanuel Vadot        #interrupt-cells = <1>;
1747d0873ebSEmmanuel Vadot        interrupt-map-mask = <0 0 0 7>;
1757d0873ebSEmmanuel Vadot        interrupt-map = <0000 0 0 1 &gic 0 0 0 109 IRQ_TYPE_LEVEL_HIGH>,
1767d0873ebSEmmanuel Vadot                        <0000 0 0 2 &gic 0 0 0 110 IRQ_TYPE_LEVEL_HIGH>,
1777d0873ebSEmmanuel Vadot                        <0000 0 0 3 &gic 0 0 0 111 IRQ_TYPE_LEVEL_HIGH>,
1787d0873ebSEmmanuel Vadot                        <0000 0 0 4 &gic 0 0 0 112 IRQ_TYPE_LEVEL_HIGH>;
1797d0873ebSEmmanuel Vadot        iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */
1807d0873ebSEmmanuel Vadot      };
1817d0873ebSEmmanuel Vadot    };
1827d0873ebSEmmanuel Vadot...
183