xref: /freebsd/sys/contrib/device-tree/Bindings/pci/fsl,imx6q-pcie.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2354d7675SEmmanuel Vadot%YAML 1.2
3354d7675SEmmanuel Vadot---
4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/pci/fsl,imx6q-pcie.yaml#
5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6354d7675SEmmanuel Vadot
7354d7675SEmmanuel Vadottitle: Freescale i.MX6 PCIe host controller
8354d7675SEmmanuel Vadot
9354d7675SEmmanuel Vadotmaintainers:
10354d7675SEmmanuel Vadot  - Lucas Stach <l.stach@pengutronix.de>
11354d7675SEmmanuel Vadot  - Richard Zhu <hongxing.zhu@nxp.com>
12354d7675SEmmanuel Vadot
13354d7675SEmmanuel Vadotdescription: |+
14354d7675SEmmanuel Vadot  This PCIe host controller is based on the Synopsys DesignWare PCIe IP
15354d7675SEmmanuel Vadot  and thus inherits all the common properties defined in snps,dw-pcie.yaml.
16fac71e4eSEmmanuel Vadot  The controller instances are dual mode where in they can work either in
17fac71e4eSEmmanuel Vadot  Root Port mode or Endpoint mode but one at a time.
18fac71e4eSEmmanuel Vadot
19fac71e4eSEmmanuel Vadot  See fsl,imx6q-pcie-ep.yaml for details on the Endpoint mode device tree
20fac71e4eSEmmanuel Vadot  bindings.
21354d7675SEmmanuel Vadot
22354d7675SEmmanuel Vadotproperties:
23354d7675SEmmanuel Vadot  compatible:
24354d7675SEmmanuel Vadot    enum:
25354d7675SEmmanuel Vadot      - fsl,imx6q-pcie
26354d7675SEmmanuel Vadot      - fsl,imx6sx-pcie
27354d7675SEmmanuel Vadot      - fsl,imx6qp-pcie
28354d7675SEmmanuel Vadot      - fsl,imx7d-pcie
29354d7675SEmmanuel Vadot      - fsl,imx8mq-pcie
30c9ccf3a3SEmmanuel Vadot      - fsl,imx8mm-pcie
31c9ccf3a3SEmmanuel Vadot      - fsl,imx8mp-pcie
3201950c46SEmmanuel Vadot      - fsl,imx95-pcie
33*b2d2a78aSEmmanuel Vadot      - fsl,imx8q-pcie
34354d7675SEmmanuel Vadot
35354d7675SEmmanuel Vadot  clocks:
36354d7675SEmmanuel Vadot    minItems: 3
37354d7675SEmmanuel Vadot    items:
38354d7675SEmmanuel Vadot      - description: PCIe bridge clock.
39354d7675SEmmanuel Vadot      - description: PCIe bus clock.
40354d7675SEmmanuel Vadot      - description: PCIe PHY clock.
41354d7675SEmmanuel Vadot      - description: Additional required clock entry for imx6sx-pcie,
42fac71e4eSEmmanuel Vadot           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
43354d7675SEmmanuel Vadot
44354d7675SEmmanuel Vadot  clock-names:
45354d7675SEmmanuel Vadot    minItems: 3
46fac71e4eSEmmanuel Vadot    maxItems: 4
47fac71e4eSEmmanuel Vadot
48fac71e4eSEmmanuel Vadot  interrupts:
49354d7675SEmmanuel Vadot    items:
50fac71e4eSEmmanuel Vadot      - description: builtin MSI controller.
51354d7675SEmmanuel Vadot
52fac71e4eSEmmanuel Vadot  interrupt-names:
53354d7675SEmmanuel Vadot    items:
54fac71e4eSEmmanuel Vadot      - const: msi
55e67e8565SEmmanuel Vadot
56354d7675SEmmanuel Vadot  reset-gpio:
57354d7675SEmmanuel Vadot    description: Should specify the GPIO for controlling the PCI bus device
58354d7675SEmmanuel Vadot      reset signal. It's not polarity aware and defaults to active-low reset
59354d7675SEmmanuel Vadot      sequence (L=reset state, H=operation state) (optional required).
60354d7675SEmmanuel Vadot
61354d7675SEmmanuel Vadot  reset-gpio-active-high:
62354d7675SEmmanuel Vadot    description: If present then the reset sequence using the GPIO
63354d7675SEmmanuel Vadot      specified in the "reset-gpio" property is reversed (H=reset state,
64354d7675SEmmanuel Vadot      L=operation state) (optional required).
65b97ee269SEmmanuel Vadot    type: boolean
66354d7675SEmmanuel Vadot
67354d7675SEmmanuel Vadotrequired:
68354d7675SEmmanuel Vadot  - compatible
69354d7675SEmmanuel Vadot  - reg
70354d7675SEmmanuel Vadot  - reg-names
71354d7675SEmmanuel Vadot  - "#address-cells"
72354d7675SEmmanuel Vadot  - "#size-cells"
73354d7675SEmmanuel Vadot  - device_type
74354d7675SEmmanuel Vadot  - bus-range
75354d7675SEmmanuel Vadot  - ranges
76354d7675SEmmanuel Vadot  - interrupts
77354d7675SEmmanuel Vadot  - interrupt-names
78354d7675SEmmanuel Vadot  - "#interrupt-cells"
79354d7675SEmmanuel Vadot  - interrupt-map-mask
80354d7675SEmmanuel Vadot  - interrupt-map
81354d7675SEmmanuel Vadot
828bab661aSEmmanuel VadotallOf:
838bab661aSEmmanuel Vadot  - $ref: /schemas/pci/snps,dw-pcie.yaml#
84fac71e4eSEmmanuel Vadot  - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
858bab661aSEmmanuel Vadot  - if:
868bab661aSEmmanuel Vadot      properties:
878bab661aSEmmanuel Vadot        compatible:
888bab661aSEmmanuel Vadot          enum:
8901950c46SEmmanuel Vadot            - fsl,imx6q-pcie
9001950c46SEmmanuel Vadot            - fsl,imx6sx-pcie
9101950c46SEmmanuel Vadot            - fsl,imx6qp-pcie
9201950c46SEmmanuel Vadot            - fsl,imx7d-pcie
9301950c46SEmmanuel Vadot            - fsl,imx8mq-pcie
9401950c46SEmmanuel Vadot            - fsl,imx8mm-pcie
9501950c46SEmmanuel Vadot            - fsl,imx8mp-pcie
9601950c46SEmmanuel Vadot    then:
9701950c46SEmmanuel Vadot      properties:
9801950c46SEmmanuel Vadot        reg:
9901950c46SEmmanuel Vadot          maxItems: 2
10001950c46SEmmanuel Vadot        reg-names:
10101950c46SEmmanuel Vadot          items:
10201950c46SEmmanuel Vadot            - const: dbi
10301950c46SEmmanuel Vadot            - const: config
10401950c46SEmmanuel Vadot
10501950c46SEmmanuel Vadot  - if:
10601950c46SEmmanuel Vadot      properties:
10701950c46SEmmanuel Vadot        compatible:
10801950c46SEmmanuel Vadot          enum:
10901950c46SEmmanuel Vadot            - fsl,imx95-pcie
11001950c46SEmmanuel Vadot    then:
11101950c46SEmmanuel Vadot      properties:
11201950c46SEmmanuel Vadot        reg:
11301950c46SEmmanuel Vadot          minItems: 4
11401950c46SEmmanuel Vadot          maxItems: 4
11501950c46SEmmanuel Vadot        reg-names:
11601950c46SEmmanuel Vadot          items:
11701950c46SEmmanuel Vadot            - const: dbi
11801950c46SEmmanuel Vadot            - const: config
11901950c46SEmmanuel Vadot            - const: atu
12001950c46SEmmanuel Vadot            - const: app
12101950c46SEmmanuel Vadot
12201950c46SEmmanuel Vadot  - if:
12301950c46SEmmanuel Vadot      properties:
12401950c46SEmmanuel Vadot        compatible:
12501950c46SEmmanuel Vadot          enum:
1268bab661aSEmmanuel Vadot            - fsl,imx6sx-pcie
127fac71e4eSEmmanuel Vadot    then:
128fac71e4eSEmmanuel Vadot      properties:
129fac71e4eSEmmanuel Vadot        clocks:
130fac71e4eSEmmanuel Vadot          minItems: 4
131fac71e4eSEmmanuel Vadot        clock-names:
132fac71e4eSEmmanuel Vadot          items:
133fac71e4eSEmmanuel Vadot            - const: pcie
134fac71e4eSEmmanuel Vadot            - const: pcie_bus
135fac71e4eSEmmanuel Vadot            - const: pcie_phy
136fac71e4eSEmmanuel Vadot            - const: pcie_inbound_axi
137fac71e4eSEmmanuel Vadot
138fac71e4eSEmmanuel Vadot  - if:
139fac71e4eSEmmanuel Vadot      properties:
140fac71e4eSEmmanuel Vadot        compatible:
141fac71e4eSEmmanuel Vadot          enum:
1428bab661aSEmmanuel Vadot            - fsl,imx8mq-pcie
14301950c46SEmmanuel Vadot            - fsl,imx95-pcie
1448bab661aSEmmanuel Vadot    then:
1458bab661aSEmmanuel Vadot      properties:
1468bab661aSEmmanuel Vadot        clocks:
147fac71e4eSEmmanuel Vadot          minItems: 4
148fac71e4eSEmmanuel Vadot        clock-names:
149fac71e4eSEmmanuel Vadot          items:
150fac71e4eSEmmanuel Vadot            - const: pcie
151fac71e4eSEmmanuel Vadot            - const: pcie_bus
152fac71e4eSEmmanuel Vadot            - const: pcie_phy
153fac71e4eSEmmanuel Vadot            - const: pcie_aux
154fac71e4eSEmmanuel Vadot
155fac71e4eSEmmanuel Vadot  - if:
156fac71e4eSEmmanuel Vadot      properties:
157fac71e4eSEmmanuel Vadot        compatible:
158fac71e4eSEmmanuel Vadot          enum:
159fac71e4eSEmmanuel Vadot            - fsl,imx6q-pcie
160fac71e4eSEmmanuel Vadot            - fsl,imx6qp-pcie
161fac71e4eSEmmanuel Vadot            - fsl,imx7d-pcie
162fac71e4eSEmmanuel Vadot    then:
163fac71e4eSEmmanuel Vadot      properties:
164fac71e4eSEmmanuel Vadot        clocks:
1658bab661aSEmmanuel Vadot          maxItems: 3
1668bab661aSEmmanuel Vadot        clock-names:
167fac71e4eSEmmanuel Vadot          items:
168fac71e4eSEmmanuel Vadot            - const: pcie
169fac71e4eSEmmanuel Vadot            - const: pcie_bus
170fac71e4eSEmmanuel Vadot            - const: pcie_phy
1718bab661aSEmmanuel Vadot
1728bab661aSEmmanuel Vadot  - if:
1738bab661aSEmmanuel Vadot      properties:
1748bab661aSEmmanuel Vadot        compatible:
1758bab661aSEmmanuel Vadot          enum:
1768bab661aSEmmanuel Vadot            - fsl,imx8mm-pcie
1778bab661aSEmmanuel Vadot            - fsl,imx8mp-pcie
1788bab661aSEmmanuel Vadot    then:
1798bab661aSEmmanuel Vadot      properties:
180fac71e4eSEmmanuel Vadot        clocks:
1818bab661aSEmmanuel Vadot          maxItems: 3
182fac71e4eSEmmanuel Vadot        clock-names:
1838bab661aSEmmanuel Vadot          items:
184fac71e4eSEmmanuel Vadot            - const: pcie
185fac71e4eSEmmanuel Vadot            - const: pcie_bus
186fac71e4eSEmmanuel Vadot            - const: pcie_aux
1878bab661aSEmmanuel Vadot
188*b2d2a78aSEmmanuel Vadot  - if:
189*b2d2a78aSEmmanuel Vadot      properties:
190*b2d2a78aSEmmanuel Vadot        compatible:
191*b2d2a78aSEmmanuel Vadot          enum:
192*b2d2a78aSEmmanuel Vadot            - fsl,imx8q-pcie
193*b2d2a78aSEmmanuel Vadot    then:
194*b2d2a78aSEmmanuel Vadot      properties:
195*b2d2a78aSEmmanuel Vadot        clocks:
196*b2d2a78aSEmmanuel Vadot          maxItems: 3
197*b2d2a78aSEmmanuel Vadot        clock-names:
198*b2d2a78aSEmmanuel Vadot          items:
199*b2d2a78aSEmmanuel Vadot            - const: dbi
200*b2d2a78aSEmmanuel Vadot            - const: mstr
201*b2d2a78aSEmmanuel Vadot            - const: slv
202*b2d2a78aSEmmanuel Vadot
203354d7675SEmmanuel VadotunevaluatedProperties: false
204354d7675SEmmanuel Vadot
205354d7675SEmmanuel Vadotexamples:
206354d7675SEmmanuel Vadot  - |
207354d7675SEmmanuel Vadot    #include <dt-bindings/clock/imx6qdl-clock.h>
208354d7675SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
209354d7675SEmmanuel Vadot
210354d7675SEmmanuel Vadot    pcie: pcie@1ffc000 {
211354d7675SEmmanuel Vadot        compatible = "fsl,imx6q-pcie";
212354d7675SEmmanuel Vadot        reg = <0x01ffc000 0x04000>,
213354d7675SEmmanuel Vadot              <0x01f00000 0x80000>;
214354d7675SEmmanuel Vadot        reg-names = "dbi", "config";
215354d7675SEmmanuel Vadot        #address-cells = <3>;
216354d7675SEmmanuel Vadot        #size-cells = <2>;
217354d7675SEmmanuel Vadot        device_type = "pci";
218354d7675SEmmanuel Vadot        bus-range = <0x00 0xff>;
219354d7675SEmmanuel Vadot        ranges = <0x81000000 0 0          0x01f80000 0 0x00010000>,
220354d7675SEmmanuel Vadot                 <0x82000000 0 0x01000000 0x01000000 0 0x00f00000>;
221354d7675SEmmanuel Vadot        num-lanes = <1>;
222354d7675SEmmanuel Vadot        interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
223354d7675SEmmanuel Vadot        interrupt-names = "msi";
224354d7675SEmmanuel Vadot        #interrupt-cells = <1>;
225354d7675SEmmanuel Vadot        interrupt-map-mask = <0 0 0 0x7>;
226354d7675SEmmanuel Vadot        interrupt-map = <0 0 0 1 &gpc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
227354d7675SEmmanuel Vadot                        <0 0 0 2 &gpc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
228354d7675SEmmanuel Vadot                        <0 0 0 3 &gpc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
229354d7675SEmmanuel Vadot                        <0 0 0 4 &gpc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
230354d7675SEmmanuel Vadot        clocks = <&clks IMX6QDL_CLK_PCIE_AXI>,
231354d7675SEmmanuel Vadot                <&clks IMX6QDL_CLK_LVDS1_GATE>,
232354d7675SEmmanuel Vadot                <&clks IMX6QDL_CLK_PCIE_REF_125M>;
233354d7675SEmmanuel Vadot        clock-names = "pcie", "pcie_bus", "pcie_phy";
234354d7675SEmmanuel Vadot    };
235354d7675SEmmanuel Vadot...
236