xref: /linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml (revision 9e676a024fa1fa2bd8150c2d2ba85478280353bc)
1b10f8238SRichard Zhu# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b10f8238SRichard Zhu%YAML 1.2
3b10f8238SRichard Zhu---
4b10f8238SRichard Zhu$id: http://devicetree.org/schemas/pci/fsl,imx6q-pcie-ep.yaml#
5b10f8238SRichard Zhu$schema: http://devicetree.org/meta-schemas/core.yaml#
6b10f8238SRichard Zhu
7b10f8238SRichard Zhutitle: Freescale i.MX6 PCIe Endpoint controller
8b10f8238SRichard Zhu
9b10f8238SRichard Zhumaintainers:
10b10f8238SRichard Zhu  - Lucas Stach <l.stach@pengutronix.de>
11b10f8238SRichard Zhu  - Richard Zhu <hongxing.zhu@nxp.com>
12b10f8238SRichard Zhu
13b10f8238SRichard Zhudescription: |+
14b10f8238SRichard Zhu  This PCIe controller is based on the Synopsys DesignWare PCIe IP and
15b10f8238SRichard Zhu  thus inherits all the common properties defined in snps,dw-pcie-ep.yaml.
16b10f8238SRichard Zhu  The controller instances are dual mode where in they can work either in
17b10f8238SRichard Zhu  Root Port mode or Endpoint mode but one at a time.
18b10f8238SRichard Zhu
19b10f8238SRichard Zhuproperties:
20b10f8238SRichard Zhu  compatible:
21b10f8238SRichard Zhu    enum:
22b10f8238SRichard Zhu      - fsl,imx8mm-pcie-ep
23b10f8238SRichard Zhu      - fsl,imx8mq-pcie-ep
24b10f8238SRichard Zhu      - fsl,imx8mp-pcie-ep
253d220725SFrank Li      - fsl,imx8q-pcie-ep
26adfdef73SFrank Li      - fsl,imx95-pcie-ep
27b10f8238SRichard Zhu
288bbec86cSKrzysztof Kozlowski  clocks:
298bbec86cSKrzysztof Kozlowski    minItems: 3
308bbec86cSKrzysztof Kozlowski    items:
318bbec86cSKrzysztof Kozlowski      - description: PCIe bridge clock.
328bbec86cSKrzysztof Kozlowski      - description: PCIe bus clock.
338bbec86cSKrzysztof Kozlowski      - description: PCIe PHY clock.
348bbec86cSKrzysztof Kozlowski      - description: Additional required clock entry for imx6sx-pcie,
358bbec86cSKrzysztof Kozlowski           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
368bbec86cSKrzysztof Kozlowski
378bbec86cSKrzysztof Kozlowski  clock-names:
388bbec86cSKrzysztof Kozlowski    minItems: 3
398bbec86cSKrzysztof Kozlowski    maxItems: 4
408bbec86cSKrzysztof Kozlowski
41b10f8238SRichard Zhu  interrupts:
42b10f8238SRichard Zhu    items:
43b10f8238SRichard Zhu      - description: builtin eDMA interrupter.
44b10f8238SRichard Zhu
45b10f8238SRichard Zhu  interrupt-names:
46b10f8238SRichard Zhu    items:
47b10f8238SRichard Zhu      - const: dma
48b10f8238SRichard Zhu
49b10f8238SRichard Zhurequired:
50b10f8238SRichard Zhu  - compatible
51b10f8238SRichard Zhu  - reg
52b10f8238SRichard Zhu  - reg-names
53b10f8238SRichard Zhu  - interrupts
54b10f8238SRichard Zhu  - interrupt-names
55b10f8238SRichard Zhu
56b10f8238SRichard ZhuallOf:
57b10f8238SRichard Zhu  - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
58b10f8238SRichard Zhu  - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
598bbec86cSKrzysztof Kozlowski  - if:
608bbec86cSKrzysztof Kozlowski      properties:
618bbec86cSKrzysztof Kozlowski        compatible:
628bbec86cSKrzysztof Kozlowski          enum:
63adfdef73SFrank Li            - fsl,imx8mm-pcie-ep
648bbec86cSKrzysztof Kozlowski            - fsl,imx8mq-pcie-ep
65adfdef73SFrank Li            - fsl,imx8mp-pcie-ep
66adfdef73SFrank Li    then:
67adfdef73SFrank Li      properties:
68adfdef73SFrank Li        reg:
69f500a2f1SRichard Zhu          minItems: 4
70f500a2f1SRichard Zhu          maxItems: 4
71adfdef73SFrank Li        reg-names:
72adfdef73SFrank Li          items:
73adfdef73SFrank Li            - const: dbi
74adfdef73SFrank Li            - const: addr_space
75f500a2f1SRichard Zhu            - const: dbi2
76f500a2f1SRichard Zhu            - const: atu
77adfdef73SFrank Li
78adfdef73SFrank Li  - if:
79adfdef73SFrank Li      properties:
80adfdef73SFrank Li        compatible:
81adfdef73SFrank Li          enum:
823d220725SFrank Li            - fsl,imx8q-pcie-ep
833d220725SFrank Li    then:
843d220725SFrank Li      properties:
853d220725SFrank Li        reg:
863d220725SFrank Li          maxItems: 2
873d220725SFrank Li        reg-names:
883d220725SFrank Li          items:
893d220725SFrank Li            - const: dbi
903d220725SFrank Li            - const: addr_space
913d220725SFrank Li
923d220725SFrank Li  - if:
933d220725SFrank Li      properties:
943d220725SFrank Li        compatible:
953d220725SFrank Li          enum:
96adfdef73SFrank Li            - fsl,imx95-pcie-ep
97adfdef73SFrank Li    then:
98adfdef73SFrank Li      properties:
99adfdef73SFrank Li        reg:
100adfdef73SFrank Li          minItems: 6
101adfdef73SFrank Li          maxItems: 6
102adfdef73SFrank Li        reg-names:
103adfdef73SFrank Li          items:
104adfdef73SFrank Li            - const: dbi
105adfdef73SFrank Li            - const: atu
106adfdef73SFrank Li            - const: dbi2
107adfdef73SFrank Li            - const: app
108adfdef73SFrank Li            - const: dma
109adfdef73SFrank Li            - const: addr_space
110adfdef73SFrank Li
111adfdef73SFrank Li  - if:
112adfdef73SFrank Li      properties:
113adfdef73SFrank Li        compatible:
114adfdef73SFrank Li          enum:
115adfdef73SFrank Li            - fsl,imx8mq-pcie-ep
116adfdef73SFrank Li            - fsl,imx95-pcie-ep
1178bbec86cSKrzysztof Kozlowski    then:
1188bbec86cSKrzysztof Kozlowski      properties:
1198bbec86cSKrzysztof Kozlowski        clocks:
1208bbec86cSKrzysztof Kozlowski          minItems: 4
121*d4627402SRichard Zhu          maxItems: 4
1228bbec86cSKrzysztof Kozlowski        clock-names:
1238bbec86cSKrzysztof Kozlowski          items:
1248bbec86cSKrzysztof Kozlowski            - const: pcie
1258bbec86cSKrzysztof Kozlowski            - const: pcie_bus
1268bbec86cSKrzysztof Kozlowski            - const: pcie_phy
1278bbec86cSKrzysztof Kozlowski            - const: pcie_aux
1283d220725SFrank Li
1293d220725SFrank Li  - if:
1303d220725SFrank Li      properties:
1313d220725SFrank Li        compatible:
1323d220725SFrank Li          enum:
1333d220725SFrank Li            - fsl,imx8mm-pcie-ep
1343d220725SFrank Li            - fsl,imx8mp-pcie-ep
1353d220725SFrank Li    then:
1368bbec86cSKrzysztof Kozlowski      properties:
1378bbec86cSKrzysztof Kozlowski        clocks:
1388bbec86cSKrzysztof Kozlowski          maxItems: 3
1398bbec86cSKrzysztof Kozlowski        clock-names:
1408bbec86cSKrzysztof Kozlowski          items:
1418bbec86cSKrzysztof Kozlowski            - const: pcie
1428bbec86cSKrzysztof Kozlowski            - const: pcie_bus
1438bbec86cSKrzysztof Kozlowski            - const: pcie_aux
1448bbec86cSKrzysztof Kozlowski
1453d220725SFrank Li  - if:
1463d220725SFrank Li      properties:
1473d220725SFrank Li        compatible:
1483d220725SFrank Li          enum:
1493d220725SFrank Li            - fsl,imxq-pcie-ep
1503d220725SFrank Li    then:
1513d220725SFrank Li      properties:
1523d220725SFrank Li        clocks:
1533d220725SFrank Li          maxItems: 3
1543d220725SFrank Li        clock-names:
1553d220725SFrank Li          items:
1563d220725SFrank Li            - const: dbi
1573d220725SFrank Li            - const: mstr
1583d220725SFrank Li            - const: slv
159b10f8238SRichard Zhu
160b10f8238SRichard ZhuunevaluatedProperties: false
161b10f8238SRichard Zhu
162b10f8238SRichard Zhuexamples:
163b10f8238SRichard Zhu  - |
164b10f8238SRichard Zhu    #include <dt-bindings/clock/imx8mp-clock.h>
165b10f8238SRichard Zhu    #include <dt-bindings/power/imx8mp-power.h>
166b10f8238SRichard Zhu    #include <dt-bindings/reset/imx8mp-reset.h>
167b10f8238SRichard Zhu    #include <dt-bindings/interrupt-controller/arm-gic.h>
168b10f8238SRichard Zhu
169b10f8238SRichard Zhu    pcie_ep: pcie-ep@33800000 {
170b10f8238SRichard Zhu      compatible = "fsl,imx8mp-pcie-ep";
171f500a2f1SRichard Zhu      reg = <0x33800000 0x100000>,
172f500a2f1SRichard Zhu            <0x18000000 0x8000000>,
173f500a2f1SRichard Zhu            <0x33900000 0x100000>,
174f500a2f1SRichard Zhu            <0x33b00000 0x100000>;
175f500a2f1SRichard Zhu      reg-names = "dbi", "addr_space", "dbi2", "atu";
176b10f8238SRichard Zhu      clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
177b10f8238SRichard Zhu               <&clk IMX8MP_CLK_HSIO_AXI>,
178b10f8238SRichard Zhu               <&clk IMX8MP_CLK_PCIE_ROOT>;
179b10f8238SRichard Zhu      clock-names = "pcie", "pcie_bus", "pcie_aux";
180b10f8238SRichard Zhu      assigned-clocks = <&clk IMX8MP_CLK_PCIE_AUX>;
181b10f8238SRichard Zhu      assigned-clock-rates = <10000000>;
182b10f8238SRichard Zhu      assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_50M>;
183b10f8238SRichard Zhu      num-lanes = <1>;
184b10f8238SRichard Zhu      interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>; /* eDMA */
185b10f8238SRichard Zhu      interrupt-names = "dma";
186b10f8238SRichard Zhu      fsl,max-link-speed = <3>;
187b10f8238SRichard Zhu      power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_PCIE>;
188b10f8238SRichard Zhu      resets = <&src IMX8MP_RESET_PCIE_CTRL_APPS_EN>,
189b10f8238SRichard Zhu               <&src IMX8MP_RESET_PCIE_CTRL_APPS_TURNOFF>;
190b10f8238SRichard Zhu      reset-names = "apps", "turnoff";
191b10f8238SRichard Zhu      phys = <&pcie_phy>;
192b10f8238SRichard Zhu      phy-names = "pcie-phy";
193b10f8238SRichard Zhu      num-ib-windows = <4>;
194b10f8238SRichard Zhu      num-ob-windows = <4>;
195b10f8238SRichard Zhu    };
196