xref: /freebsd/sys/contrib/device-tree/Bindings/pci/qcom,pcie.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/pci/qcom,pcie.yaml#
5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
7d5b0e70fSEmmanuel Vadottitle: Qualcomm PCI express root complex
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
11fac71e4eSEmmanuel Vadot  - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
12d5b0e70fSEmmanuel Vadot
13d5b0e70fSEmmanuel Vadotdescription: |
14b97ee269SEmmanuel Vadot  Qualcomm PCIe root complex controller is based on the Synopsys DesignWare
15d5b0e70fSEmmanuel Vadot  PCIe IP.
16d5b0e70fSEmmanuel Vadot
17d5b0e70fSEmmanuel Vadotproperties:
18d5b0e70fSEmmanuel Vadot  compatible:
19cb7aa33aSEmmanuel Vadot    oneOf:
20cb7aa33aSEmmanuel Vadot      - enum:
21d5b0e70fSEmmanuel Vadot          - qcom,pcie-apq8064
22d5b0e70fSEmmanuel Vadot          - qcom,pcie-apq8084
23d5b0e70fSEmmanuel Vadot          - qcom,pcie-ipq4019
24cb7aa33aSEmmanuel Vadot          - qcom,pcie-ipq6018
25cb7aa33aSEmmanuel Vadot          - qcom,pcie-ipq8064
26cb7aa33aSEmmanuel Vadot          - qcom,pcie-ipq8064-v2
27d5b0e70fSEmmanuel Vadot          - qcom,pcie-ipq8074
28cb7aa33aSEmmanuel Vadot          - qcom,pcie-ipq8074-gen3
29cb7aa33aSEmmanuel Vadot          - qcom,pcie-msm8996
30d5b0e70fSEmmanuel Vadot          - qcom,pcie-qcs404
31d5b0e70fSEmmanuel Vadot          - qcom,pcie-sdm845
32fac71e4eSEmmanuel Vadot          - qcom,pcie-sdx55
338d13bc63SEmmanuel Vadot      - items:
34cb7aa33aSEmmanuel Vadot          - const: qcom,pcie-msm8998
35cb7aa33aSEmmanuel Vadot          - const: qcom,pcie-msm8996
36d5b0e70fSEmmanuel Vadot
37d5b0e70fSEmmanuel Vadot  reg:
38d5b0e70fSEmmanuel Vadot    minItems: 4
39fac71e4eSEmmanuel Vadot    maxItems: 6
40d5b0e70fSEmmanuel Vadot
41d5b0e70fSEmmanuel Vadot  reg-names:
42d5b0e70fSEmmanuel Vadot    minItems: 4
43fac71e4eSEmmanuel Vadot    maxItems: 6
44d5b0e70fSEmmanuel Vadot
45d5b0e70fSEmmanuel Vadot  interrupts:
46b97ee269SEmmanuel Vadot    minItems: 1
47b97ee269SEmmanuel Vadot    maxItems: 8
48d5b0e70fSEmmanuel Vadot
49d5b0e70fSEmmanuel Vadot  interrupt-names:
50b97ee269SEmmanuel Vadot    minItems: 1
51b97ee269SEmmanuel Vadot    maxItems: 8
52d5b0e70fSEmmanuel Vadot
53fac71e4eSEmmanuel Vadot  iommu-map:
548d13bc63SEmmanuel Vadot    minItems: 1
558d13bc63SEmmanuel Vadot    maxItems: 16
56fac71e4eSEmmanuel Vadot
57d5b0e70fSEmmanuel Vadot  # Common definitions for clocks, clock-names and reset.
58d5b0e70fSEmmanuel Vadot  # Platform constraints are described later.
59d5b0e70fSEmmanuel Vadot  clocks:
60d5b0e70fSEmmanuel Vadot    minItems: 3
617ef62cebSEmmanuel Vadot    maxItems: 13
62d5b0e70fSEmmanuel Vadot
63d5b0e70fSEmmanuel Vadot  clock-names:
64d5b0e70fSEmmanuel Vadot    minItems: 3
657ef62cebSEmmanuel Vadot    maxItems: 13
66d5b0e70fSEmmanuel Vadot
678bab661aSEmmanuel Vadot  dma-coherent: true
688bab661aSEmmanuel Vadot
698bab661aSEmmanuel Vadot  interconnects:
708bab661aSEmmanuel Vadot    maxItems: 2
718bab661aSEmmanuel Vadot
728bab661aSEmmanuel Vadot  interconnect-names:
738bab661aSEmmanuel Vadot    items:
748bab661aSEmmanuel Vadot      - const: pcie-mem
758bab661aSEmmanuel Vadot      - const: cpu-pcie
768bab661aSEmmanuel Vadot
77d5b0e70fSEmmanuel Vadot  resets:
78d5b0e70fSEmmanuel Vadot    minItems: 1
79d5b0e70fSEmmanuel Vadot    maxItems: 12
80d5b0e70fSEmmanuel Vadot
818d13bc63SEmmanuel Vadot  reset-names:
82d5b0e70fSEmmanuel Vadot    minItems: 1
83d5b0e70fSEmmanuel Vadot    maxItems: 12
84d5b0e70fSEmmanuel Vadot
85d5b0e70fSEmmanuel Vadot  vdda-supply:
86d5b0e70fSEmmanuel Vadot    description: A phandle to the core analog power supply
87d5b0e70fSEmmanuel Vadot
88d5b0e70fSEmmanuel Vadot  vdda_phy-supply:
89d5b0e70fSEmmanuel Vadot    description: A phandle to the core analog power supply for PHY
90d5b0e70fSEmmanuel Vadot
91d5b0e70fSEmmanuel Vadot  vdda_refclk-supply:
92d5b0e70fSEmmanuel Vadot    description: A phandle to the core analog power supply for IC which generates reference clock
93d5b0e70fSEmmanuel Vadot
94d5b0e70fSEmmanuel Vadot  phys:
95d5b0e70fSEmmanuel Vadot    maxItems: 1
96d5b0e70fSEmmanuel Vadot
97d5b0e70fSEmmanuel Vadot  phy-names:
98d5b0e70fSEmmanuel Vadot    items:
99d5b0e70fSEmmanuel Vadot      - const: pciephy
100d5b0e70fSEmmanuel Vadot
101d5b0e70fSEmmanuel Vadot  power-domains:
102d5b0e70fSEmmanuel Vadot    maxItems: 1
103d5b0e70fSEmmanuel Vadot
104d5b0e70fSEmmanuel Vadot  perst-gpios:
105d5b0e70fSEmmanuel Vadot    description: GPIO controlled connection to PERST# signal
106d5b0e70fSEmmanuel Vadot    maxItems: 1
107d5b0e70fSEmmanuel Vadot
10801950c46SEmmanuel Vadot  required-opps:
10901950c46SEmmanuel Vadot    maxItems: 1
11001950c46SEmmanuel Vadot
111d5b0e70fSEmmanuel Vadot  wake-gpios:
112d5b0e70fSEmmanuel Vadot    description: GPIO controlled connection to WAKE# signal
113d5b0e70fSEmmanuel Vadot    maxItems: 1
114d5b0e70fSEmmanuel Vadot
115d5b0e70fSEmmanuel Vadotrequired:
116d5b0e70fSEmmanuel Vadot  - compatible
117d5b0e70fSEmmanuel Vadot  - reg
118d5b0e70fSEmmanuel Vadot  - reg-names
119d5b0e70fSEmmanuel Vadot  - interrupt-map-mask
120d5b0e70fSEmmanuel Vadot  - interrupt-map
121d5b0e70fSEmmanuel Vadot  - clocks
122d5b0e70fSEmmanuel Vadot  - clock-names
123d5b0e70fSEmmanuel Vadot
124fac71e4eSEmmanuel VadotanyOf:
125fac71e4eSEmmanuel Vadot  - required:
126fac71e4eSEmmanuel Vadot      - interrupts
127fac71e4eSEmmanuel Vadot      - interrupt-names
128fac71e4eSEmmanuel Vadot      - "#interrupt-cells"
129fac71e4eSEmmanuel Vadot  - required:
130fac71e4eSEmmanuel Vadot      - msi-map
131fac71e4eSEmmanuel Vadot
132d5b0e70fSEmmanuel VadotallOf:
133*7d0873ebSEmmanuel Vadot  - $ref: /schemas/pci/pci-host-bridge.yaml#
134d5b0e70fSEmmanuel Vadot  - if:
135d5b0e70fSEmmanuel Vadot      properties:
136d5b0e70fSEmmanuel Vadot        compatible:
137d5b0e70fSEmmanuel Vadot          contains:
138d5b0e70fSEmmanuel Vadot            enum:
139d5b0e70fSEmmanuel Vadot              - qcom,pcie-apq8064
140d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq4019
141d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq8064
142d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq8064v2
143d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq8074
144d5b0e70fSEmmanuel Vadot              - qcom,pcie-qcs404
145d5b0e70fSEmmanuel Vadot    then:
146d5b0e70fSEmmanuel Vadot      properties:
147d5b0e70fSEmmanuel Vadot        reg:
148d5b0e70fSEmmanuel Vadot          minItems: 4
149d5b0e70fSEmmanuel Vadot          maxItems: 4
150d5b0e70fSEmmanuel Vadot        reg-names:
151d5b0e70fSEmmanuel Vadot          items:
152d5b0e70fSEmmanuel Vadot            - const: dbi # DesignWare PCIe registers
153d5b0e70fSEmmanuel Vadot            - const: elbi # External local bus interface registers
154d5b0e70fSEmmanuel Vadot            - const: parf # Qualcomm specific registers
155d5b0e70fSEmmanuel Vadot            - const: config # PCIe configuration space
156d5b0e70fSEmmanuel Vadot
157d5b0e70fSEmmanuel Vadot  - if:
158d5b0e70fSEmmanuel Vadot      properties:
159d5b0e70fSEmmanuel Vadot        compatible:
160d5b0e70fSEmmanuel Vadot          contains:
161d5b0e70fSEmmanuel Vadot            enum:
162d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq6018
163cb7aa33aSEmmanuel Vadot              - qcom,pcie-ipq8074-gen3
164d5b0e70fSEmmanuel Vadot    then:
165d5b0e70fSEmmanuel Vadot      properties:
166d5b0e70fSEmmanuel Vadot        reg:
167d5b0e70fSEmmanuel Vadot          minItems: 5
168d5b0e70fSEmmanuel Vadot          maxItems: 5
169d5b0e70fSEmmanuel Vadot        reg-names:
170d5b0e70fSEmmanuel Vadot          items:
171d5b0e70fSEmmanuel Vadot            - const: dbi # DesignWare PCIe registers
172d5b0e70fSEmmanuel Vadot            - const: elbi # External local bus interface registers
173d5b0e70fSEmmanuel Vadot            - const: atu # ATU address space
174d5b0e70fSEmmanuel Vadot            - const: parf # Qualcomm specific registers
175d5b0e70fSEmmanuel Vadot            - const: config # PCIe configuration space
176d5b0e70fSEmmanuel Vadot
177d5b0e70fSEmmanuel Vadot  - if:
178d5b0e70fSEmmanuel Vadot      properties:
179d5b0e70fSEmmanuel Vadot        compatible:
180d5b0e70fSEmmanuel Vadot          contains:
181d5b0e70fSEmmanuel Vadot            enum:
182d5b0e70fSEmmanuel Vadot              - qcom,pcie-apq8084
183d5b0e70fSEmmanuel Vadot              - qcom,pcie-msm8996
184d5b0e70fSEmmanuel Vadot              - qcom,pcie-sdm845
185d5b0e70fSEmmanuel Vadot    then:
186d5b0e70fSEmmanuel Vadot      properties:
187d5b0e70fSEmmanuel Vadot        reg:
188d5b0e70fSEmmanuel Vadot          minItems: 4
189fac71e4eSEmmanuel Vadot          maxItems: 5
190d5b0e70fSEmmanuel Vadot        reg-names:
191fac71e4eSEmmanuel Vadot          minItems: 4
192d5b0e70fSEmmanuel Vadot          items:
193d5b0e70fSEmmanuel Vadot            - const: parf # Qualcomm specific registers
194d5b0e70fSEmmanuel Vadot            - const: dbi # DesignWare PCIe registers
195d5b0e70fSEmmanuel Vadot            - const: elbi # External local bus interface registers
196d5b0e70fSEmmanuel Vadot            - const: config # PCIe configuration space
197fac71e4eSEmmanuel Vadot            - const: mhi # MHI registers
198d5b0e70fSEmmanuel Vadot
199d5b0e70fSEmmanuel Vadot  - if:
200d5b0e70fSEmmanuel Vadot      properties:
201d5b0e70fSEmmanuel Vadot        compatible:
202d5b0e70fSEmmanuel Vadot          contains:
203d5b0e70fSEmmanuel Vadot            enum:
204fac71e4eSEmmanuel Vadot              - qcom,pcie-sdx55
205d5b0e70fSEmmanuel Vadot    then:
206d5b0e70fSEmmanuel Vadot      properties:
207d5b0e70fSEmmanuel Vadot        reg:
208d5b0e70fSEmmanuel Vadot          minItems: 5
209fac71e4eSEmmanuel Vadot          maxItems: 6
210d5b0e70fSEmmanuel Vadot        reg-names:
211fac71e4eSEmmanuel Vadot          minItems: 5
212d5b0e70fSEmmanuel Vadot          items:
213d5b0e70fSEmmanuel Vadot            - const: parf # Qualcomm specific registers
214d5b0e70fSEmmanuel Vadot            - const: dbi # DesignWare PCIe registers
215d5b0e70fSEmmanuel Vadot            - const: elbi # External local bus interface registers
216d5b0e70fSEmmanuel Vadot            - const: atu # ATU address space
217d5b0e70fSEmmanuel Vadot            - const: config # PCIe configuration space
218fac71e4eSEmmanuel Vadot            - const: mhi # MHI registers
219d5b0e70fSEmmanuel Vadot
220d5b0e70fSEmmanuel Vadot  - if:
221d5b0e70fSEmmanuel Vadot      properties:
222d5b0e70fSEmmanuel Vadot        compatible:
223d5b0e70fSEmmanuel Vadot          contains:
224d5b0e70fSEmmanuel Vadot            enum:
225d5b0e70fSEmmanuel Vadot              - qcom,pcie-apq8064
226d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq8064
227d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq8064v2
228d5b0e70fSEmmanuel Vadot    then:
229d5b0e70fSEmmanuel Vadot      properties:
230d5b0e70fSEmmanuel Vadot        clocks:
231d5b0e70fSEmmanuel Vadot          minItems: 3
232d5b0e70fSEmmanuel Vadot          maxItems: 5
233d5b0e70fSEmmanuel Vadot        clock-names:
234d5b0e70fSEmmanuel Vadot          minItems: 3
235d5b0e70fSEmmanuel Vadot          items:
236d5b0e70fSEmmanuel Vadot            - const: core # Clocks the pcie hw block
237d5b0e70fSEmmanuel Vadot            - const: iface # Configuration AHB clock
238d5b0e70fSEmmanuel Vadot            - const: phy # Clocks the pcie PHY block
239d5b0e70fSEmmanuel Vadot            - const: aux # Clocks the pcie AUX block, not on apq8064
240d5b0e70fSEmmanuel Vadot            - const: ref # Clocks the pcie ref block, not on apq8064
241d5b0e70fSEmmanuel Vadot        resets:
242d5b0e70fSEmmanuel Vadot          minItems: 5
243d5b0e70fSEmmanuel Vadot          maxItems: 6
244d5b0e70fSEmmanuel Vadot        reset-names:
245d5b0e70fSEmmanuel Vadot          minItems: 5
246d5b0e70fSEmmanuel Vadot          items:
247d5b0e70fSEmmanuel Vadot            - const: axi # AXI reset
248d5b0e70fSEmmanuel Vadot            - const: ahb # AHB reset
249d5b0e70fSEmmanuel Vadot            - const: por # POR reset
250d5b0e70fSEmmanuel Vadot            - const: pci # PCI reset
251d5b0e70fSEmmanuel Vadot            - const: phy # PHY reset
252d5b0e70fSEmmanuel Vadot            - const: ext # EXT reset, not on apq8064
253d5b0e70fSEmmanuel Vadot      required:
254d5b0e70fSEmmanuel Vadot        - vdda-supply
255d5b0e70fSEmmanuel Vadot        - vdda_phy-supply
256d5b0e70fSEmmanuel Vadot        - vdda_refclk-supply
257d5b0e70fSEmmanuel Vadot
258d5b0e70fSEmmanuel Vadot  - if:
259d5b0e70fSEmmanuel Vadot      properties:
260d5b0e70fSEmmanuel Vadot        compatible:
261d5b0e70fSEmmanuel Vadot          contains:
262d5b0e70fSEmmanuel Vadot            enum:
263d5b0e70fSEmmanuel Vadot              - qcom,pcie-apq8084
264d5b0e70fSEmmanuel Vadot    then:
265d5b0e70fSEmmanuel Vadot      properties:
266d5b0e70fSEmmanuel Vadot        clocks:
267d5b0e70fSEmmanuel Vadot          minItems: 4
268d5b0e70fSEmmanuel Vadot          maxItems: 4
269d5b0e70fSEmmanuel Vadot        clock-names:
270d5b0e70fSEmmanuel Vadot          items:
271d5b0e70fSEmmanuel Vadot            - const: iface # Configuration AHB clock
272d5b0e70fSEmmanuel Vadot            - const: master_bus # Master AXI clock
273d5b0e70fSEmmanuel Vadot            - const: slave_bus # Slave AXI clock
274d5b0e70fSEmmanuel Vadot            - const: aux # Auxiliary (AUX) clock
275d5b0e70fSEmmanuel Vadot        resets:
276d5b0e70fSEmmanuel Vadot          maxItems: 1
277d5b0e70fSEmmanuel Vadot        reset-names:
278d5b0e70fSEmmanuel Vadot          items:
279d5b0e70fSEmmanuel Vadot            - const: core # Core reset
280d5b0e70fSEmmanuel Vadot
281d5b0e70fSEmmanuel Vadot  - if:
282d5b0e70fSEmmanuel Vadot      properties:
283d5b0e70fSEmmanuel Vadot        compatible:
284d5b0e70fSEmmanuel Vadot          contains:
285d5b0e70fSEmmanuel Vadot            enum:
286d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq4019
287d5b0e70fSEmmanuel Vadot    then:
288d5b0e70fSEmmanuel Vadot      properties:
289d5b0e70fSEmmanuel Vadot        clocks:
290d5b0e70fSEmmanuel Vadot          minItems: 3
291d5b0e70fSEmmanuel Vadot          maxItems: 3
292d5b0e70fSEmmanuel Vadot        clock-names:
293d5b0e70fSEmmanuel Vadot          items:
294d5b0e70fSEmmanuel Vadot            - const: aux # Auxiliary (AUX) clock
295d5b0e70fSEmmanuel Vadot            - const: master_bus # Master AXI clock
296d5b0e70fSEmmanuel Vadot            - const: slave_bus # Slave AXI clock
297d5b0e70fSEmmanuel Vadot        resets:
298d5b0e70fSEmmanuel Vadot          minItems: 12
299d5b0e70fSEmmanuel Vadot          maxItems: 12
300d5b0e70fSEmmanuel Vadot        reset-names:
301d5b0e70fSEmmanuel Vadot          items:
302d5b0e70fSEmmanuel Vadot            - const: axi_m # AXI master reset
303d5b0e70fSEmmanuel Vadot            - const: axi_s # AXI slave reset
304d5b0e70fSEmmanuel Vadot            - const: pipe # PIPE reset
305d5b0e70fSEmmanuel Vadot            - const: axi_m_vmid # VMID reset
306d5b0e70fSEmmanuel Vadot            - const: axi_s_xpu # XPU reset
307d5b0e70fSEmmanuel Vadot            - const: parf # PARF reset
308d5b0e70fSEmmanuel Vadot            - const: phy # PHY reset
309d5b0e70fSEmmanuel Vadot            - const: axi_m_sticky # AXI sticky reset
310d5b0e70fSEmmanuel Vadot            - const: pipe_sticky # PIPE sticky reset
311d5b0e70fSEmmanuel Vadot            - const: pwr # PWR reset
312d5b0e70fSEmmanuel Vadot            - const: ahb # AHB reset
313d5b0e70fSEmmanuel Vadot            - const: phy_ahb # PHY AHB reset
314d5b0e70fSEmmanuel Vadot
315d5b0e70fSEmmanuel Vadot  - if:
316d5b0e70fSEmmanuel Vadot      properties:
317d5b0e70fSEmmanuel Vadot        compatible:
318d5b0e70fSEmmanuel Vadot          contains:
319d5b0e70fSEmmanuel Vadot            enum:
320d5b0e70fSEmmanuel Vadot              - qcom,pcie-msm8996
321d5b0e70fSEmmanuel Vadot    then:
322d5b0e70fSEmmanuel Vadot      properties:
323d5b0e70fSEmmanuel Vadot        clocks:
324d5b0e70fSEmmanuel Vadot          minItems: 5
325d5b0e70fSEmmanuel Vadot          maxItems: 5
326cb7aa33aSEmmanuel Vadot        clock-names:
327cb7aa33aSEmmanuel Vadot          items:
328cb7aa33aSEmmanuel Vadot            - const: pipe # Pipe Clock driving internal logic
329cb7aa33aSEmmanuel Vadot            - const: aux # Auxiliary (AUX) clock
330cb7aa33aSEmmanuel Vadot            - const: cfg # Configuration clock
331cb7aa33aSEmmanuel Vadot            - const: bus_master # Master AXI clock
332cb7aa33aSEmmanuel Vadot            - const: bus_slave # Slave AXI clock
333d5b0e70fSEmmanuel Vadot        resets: false
334d5b0e70fSEmmanuel Vadot        reset-names: false
335d5b0e70fSEmmanuel Vadot
336d5b0e70fSEmmanuel Vadot  - if:
337d5b0e70fSEmmanuel Vadot      properties:
338d5b0e70fSEmmanuel Vadot        compatible:
339d5b0e70fSEmmanuel Vadot          contains:
340d5b0e70fSEmmanuel Vadot            enum:
341d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq8074
342d5b0e70fSEmmanuel Vadot    then:
343d5b0e70fSEmmanuel Vadot      properties:
344d5b0e70fSEmmanuel Vadot        clocks:
345d5b0e70fSEmmanuel Vadot          minItems: 5
346d5b0e70fSEmmanuel Vadot          maxItems: 5
347d5b0e70fSEmmanuel Vadot        clock-names:
348d5b0e70fSEmmanuel Vadot          items:
349d5b0e70fSEmmanuel Vadot            - const: iface # PCIe to SysNOC BIU clock
350d5b0e70fSEmmanuel Vadot            - const: axi_m # AXI Master clock
351d5b0e70fSEmmanuel Vadot            - const: axi_s # AXI Slave clock
352d5b0e70fSEmmanuel Vadot            - const: ahb # AHB clock
353d5b0e70fSEmmanuel Vadot            - const: aux # Auxiliary clock
354d5b0e70fSEmmanuel Vadot        resets:
355d5b0e70fSEmmanuel Vadot          minItems: 7
356d5b0e70fSEmmanuel Vadot          maxItems: 7
357d5b0e70fSEmmanuel Vadot        reset-names:
358d5b0e70fSEmmanuel Vadot          items:
359d5b0e70fSEmmanuel Vadot            - const: pipe # PIPE reset
360d5b0e70fSEmmanuel Vadot            - const: sleep # Sleep reset
361d5b0e70fSEmmanuel Vadot            - const: sticky # Core Sticky reset
362d5b0e70fSEmmanuel Vadot            - const: axi_m # AXI Master reset
363d5b0e70fSEmmanuel Vadot            - const: axi_s # AXI Slave reset
364d5b0e70fSEmmanuel Vadot            - const: ahb # AHB Reset
365d5b0e70fSEmmanuel Vadot            - const: axi_m_sticky # AXI Master Sticky reset
366d5b0e70fSEmmanuel Vadot
367d5b0e70fSEmmanuel Vadot  - if:
368d5b0e70fSEmmanuel Vadot      properties:
369d5b0e70fSEmmanuel Vadot        compatible:
370d5b0e70fSEmmanuel Vadot          contains:
371d5b0e70fSEmmanuel Vadot            enum:
372d5b0e70fSEmmanuel Vadot              - qcom,pcie-ipq6018
373cb7aa33aSEmmanuel Vadot              - qcom,pcie-ipq8074-gen3
374d5b0e70fSEmmanuel Vadot    then:
375d5b0e70fSEmmanuel Vadot      properties:
376d5b0e70fSEmmanuel Vadot        clocks:
377d5b0e70fSEmmanuel Vadot          minItems: 5
378d5b0e70fSEmmanuel Vadot          maxItems: 5
379d5b0e70fSEmmanuel Vadot        clock-names:
380d5b0e70fSEmmanuel Vadot          items:
381d5b0e70fSEmmanuel Vadot            - const: iface # PCIe to SysNOC BIU clock
382d5b0e70fSEmmanuel Vadot            - const: axi_m # AXI Master clock
383d5b0e70fSEmmanuel Vadot            - const: axi_s # AXI Slave clock
384d5b0e70fSEmmanuel Vadot            - const: axi_bridge # AXI bridge clock
385d5b0e70fSEmmanuel Vadot            - const: rchng
386d5b0e70fSEmmanuel Vadot        resets:
387d5b0e70fSEmmanuel Vadot          minItems: 8
388d5b0e70fSEmmanuel Vadot          maxItems: 8
389d5b0e70fSEmmanuel Vadot        reset-names:
390d5b0e70fSEmmanuel Vadot          items:
391d5b0e70fSEmmanuel Vadot            - const: pipe # PIPE reset
392d5b0e70fSEmmanuel Vadot            - const: sleep # Sleep reset
393d5b0e70fSEmmanuel Vadot            - const: sticky # Core Sticky reset
394d5b0e70fSEmmanuel Vadot            - const: axi_m # AXI Master reset
395d5b0e70fSEmmanuel Vadot            - const: axi_s # AXI Slave reset
396d5b0e70fSEmmanuel Vadot            - const: ahb # AHB Reset
397d5b0e70fSEmmanuel Vadot            - const: axi_m_sticky # AXI Master Sticky reset
398d5b0e70fSEmmanuel Vadot            - const: axi_s_sticky # AXI Slave Sticky reset
399d5b0e70fSEmmanuel Vadot
400d5b0e70fSEmmanuel Vadot  - if:
401d5b0e70fSEmmanuel Vadot      properties:
402d5b0e70fSEmmanuel Vadot        compatible:
403d5b0e70fSEmmanuel Vadot          contains:
404d5b0e70fSEmmanuel Vadot            enum:
405d5b0e70fSEmmanuel Vadot              - qcom,pcie-qcs404
406d5b0e70fSEmmanuel Vadot    then:
407d5b0e70fSEmmanuel Vadot      properties:
408d5b0e70fSEmmanuel Vadot        clocks:
409d5b0e70fSEmmanuel Vadot          minItems: 4
410d5b0e70fSEmmanuel Vadot          maxItems: 4
411d5b0e70fSEmmanuel Vadot        clock-names:
412d5b0e70fSEmmanuel Vadot          items:
413d5b0e70fSEmmanuel Vadot            - const: iface # AHB clock
414d5b0e70fSEmmanuel Vadot            - const: aux # Auxiliary clock
415d5b0e70fSEmmanuel Vadot            - const: master_bus # AXI Master clock
416d5b0e70fSEmmanuel Vadot            - const: slave_bus # AXI Slave clock
417d5b0e70fSEmmanuel Vadot        resets:
418d5b0e70fSEmmanuel Vadot          minItems: 6
419d5b0e70fSEmmanuel Vadot          maxItems: 6
420d5b0e70fSEmmanuel Vadot        reset-names:
421d5b0e70fSEmmanuel Vadot          items:
422d5b0e70fSEmmanuel Vadot            - const: axi_m # AXI Master reset
423d5b0e70fSEmmanuel Vadot            - const: axi_s # AXI Slave reset
424d5b0e70fSEmmanuel Vadot            - const: axi_m_sticky # AXI Master Sticky reset
425d5b0e70fSEmmanuel Vadot            - const: pipe_sticky # PIPE sticky reset
426d5b0e70fSEmmanuel Vadot            - const: pwr # PWR reset
427d5b0e70fSEmmanuel Vadot            - const: ahb # AHB reset
428d5b0e70fSEmmanuel Vadot
429d5b0e70fSEmmanuel Vadot  - if:
430d5b0e70fSEmmanuel Vadot      properties:
431d5b0e70fSEmmanuel Vadot        compatible:
432d5b0e70fSEmmanuel Vadot          contains:
433d5b0e70fSEmmanuel Vadot            enum:
434d5b0e70fSEmmanuel Vadot              - qcom,pcie-sdm845
435d5b0e70fSEmmanuel Vadot    then:
436d5b0e70fSEmmanuel Vadot      oneOf:
437d5b0e70fSEmmanuel Vadot          # Unfortunately the "optional" ref clock is used in the middle of the list
438d5b0e70fSEmmanuel Vadot        - properties:
439d5b0e70fSEmmanuel Vadot            clocks:
440d5b0e70fSEmmanuel Vadot              minItems: 8
441d5b0e70fSEmmanuel Vadot              maxItems: 8
442d5b0e70fSEmmanuel Vadot            clock-names:
443d5b0e70fSEmmanuel Vadot              items:
444d5b0e70fSEmmanuel Vadot                - const: pipe # PIPE clock
445d5b0e70fSEmmanuel Vadot                - const: aux # Auxiliary clock
446d5b0e70fSEmmanuel Vadot                - const: cfg # Configuration clock
447d5b0e70fSEmmanuel Vadot                - const: bus_master # Master AXI clock
448d5b0e70fSEmmanuel Vadot                - const: bus_slave # Slave AXI clock
449d5b0e70fSEmmanuel Vadot                - const: slave_q2a # Slave Q2A clock
450d5b0e70fSEmmanuel Vadot                - const: ref # REFERENCE clock
451d5b0e70fSEmmanuel Vadot                - const: tbu # PCIe TBU clock
452d5b0e70fSEmmanuel Vadot        - properties:
453d5b0e70fSEmmanuel Vadot            clocks:
454d5b0e70fSEmmanuel Vadot              minItems: 7
455d5b0e70fSEmmanuel Vadot              maxItems: 7
456d5b0e70fSEmmanuel Vadot            clock-names:
457d5b0e70fSEmmanuel Vadot              items:
458d5b0e70fSEmmanuel Vadot                - const: pipe # PIPE clock
459d5b0e70fSEmmanuel Vadot                - const: aux # Auxiliary clock
460d5b0e70fSEmmanuel Vadot                - const: cfg # Configuration clock
461d5b0e70fSEmmanuel Vadot                - const: bus_master # Master AXI clock
462d5b0e70fSEmmanuel Vadot                - const: bus_slave # Slave AXI clock
463d5b0e70fSEmmanuel Vadot                - const: slave_q2a # Slave Q2A clock
464d5b0e70fSEmmanuel Vadot                - const: tbu # PCIe TBU clock
465d5b0e70fSEmmanuel Vadot      properties:
466d5b0e70fSEmmanuel Vadot        resets:
467d5b0e70fSEmmanuel Vadot          maxItems: 1
468d5b0e70fSEmmanuel Vadot        reset-names:
469d5b0e70fSEmmanuel Vadot          items:
470d5b0e70fSEmmanuel Vadot            - const: pci # PCIe core reset
471d5b0e70fSEmmanuel Vadot
472d5b0e70fSEmmanuel Vadot  - if:
473d5b0e70fSEmmanuel Vadot      properties:
474d5b0e70fSEmmanuel Vadot        compatible:
475d5b0e70fSEmmanuel Vadot          contains:
476d5b0e70fSEmmanuel Vadot            enum:
477fac71e4eSEmmanuel Vadot              - qcom,pcie-sdx55
478fac71e4eSEmmanuel Vadot    then:
479fac71e4eSEmmanuel Vadot      properties:
480fac71e4eSEmmanuel Vadot        clocks:
481fac71e4eSEmmanuel Vadot          minItems: 7
482fac71e4eSEmmanuel Vadot          maxItems: 7
483fac71e4eSEmmanuel Vadot        clock-names:
484fac71e4eSEmmanuel Vadot          items:
485fac71e4eSEmmanuel Vadot            - const: pipe # PIPE clock
486fac71e4eSEmmanuel Vadot            - const: aux # Auxiliary clock
487fac71e4eSEmmanuel Vadot            - const: cfg # Configuration clock
488fac71e4eSEmmanuel Vadot            - const: bus_master # Master AXI clock
489fac71e4eSEmmanuel Vadot            - const: bus_slave # Slave AXI clock
490fac71e4eSEmmanuel Vadot            - const: slave_q2a # Slave Q2A clock
491fac71e4eSEmmanuel Vadot            - const: sleep # PCIe Sleep clock
492fac71e4eSEmmanuel Vadot        resets:
493fac71e4eSEmmanuel Vadot          maxItems: 1
494fac71e4eSEmmanuel Vadot        reset-names:
495fac71e4eSEmmanuel Vadot          items:
496fac71e4eSEmmanuel Vadot            - const: pci # PCIe core reset
497fac71e4eSEmmanuel Vadot
498fac71e4eSEmmanuel Vadot  - if:
499d5b0e70fSEmmanuel Vadot      not:
500d5b0e70fSEmmanuel Vadot        properties:
501d5b0e70fSEmmanuel Vadot          compatible:
502d5b0e70fSEmmanuel Vadot            contains:
503d5b0e70fSEmmanuel Vadot              enum:
504d5b0e70fSEmmanuel Vadot                - qcom,pcie-apq8064
505d5b0e70fSEmmanuel Vadot                - qcom,pcie-ipq4019
506d5b0e70fSEmmanuel Vadot                - qcom,pcie-ipq8064
507d5b0e70fSEmmanuel Vadot                - qcom,pcie-ipq8064v2
508d5b0e70fSEmmanuel Vadot                - qcom,pcie-ipq8074
509cb7aa33aSEmmanuel Vadot                - qcom,pcie-ipq8074-gen3
510d5b0e70fSEmmanuel Vadot                - qcom,pcie-qcs404
511d5b0e70fSEmmanuel Vadot    then:
512d5b0e70fSEmmanuel Vadot      required:
513d5b0e70fSEmmanuel Vadot        - power-domains
514d5b0e70fSEmmanuel Vadot
515d5b0e70fSEmmanuel Vadot  - if:
516d5b0e70fSEmmanuel Vadot      not:
517d5b0e70fSEmmanuel Vadot        properties:
518b97ee269SEmmanuel Vadot          compatible:
519d5b0e70fSEmmanuel Vadot            contains:
520d5b0e70fSEmmanuel Vadot              enum:
521d5b0e70fSEmmanuel Vadot                - qcom,pcie-msm8996
522d5b0e70fSEmmanuel Vadot    then:
523d5b0e70fSEmmanuel Vadot      required:
524d5b0e70fSEmmanuel Vadot        - resets
525d5b0e70fSEmmanuel Vadot        - reset-names
526d5b0e70fSEmmanuel Vadot
527b97ee269SEmmanuel Vadot  - if:
528b97ee269SEmmanuel Vadot      properties:
529b97ee269SEmmanuel Vadot        compatible:
530b97ee269SEmmanuel Vadot          contains:
531b97ee269SEmmanuel Vadot            enum:
532b97ee269SEmmanuel Vadot              - qcom,pcie-msm8996
533b97ee269SEmmanuel Vadot              - qcom,pcie-sdm845
534b97ee269SEmmanuel Vadot    then:
535b97ee269SEmmanuel Vadot      oneOf:
536b97ee269SEmmanuel Vadot        - properties:
537b97ee269SEmmanuel Vadot            interrupts:
538b97ee269SEmmanuel Vadot              maxItems: 1
539b97ee269SEmmanuel Vadot            interrupt-names:
540b97ee269SEmmanuel Vadot              items:
541b97ee269SEmmanuel Vadot                - const: msi
542b97ee269SEmmanuel Vadot        - properties:
543b97ee269SEmmanuel Vadot            interrupts:
544b97ee269SEmmanuel Vadot              minItems: 8
545b97ee269SEmmanuel Vadot            interrupt-names:
546b97ee269SEmmanuel Vadot              items:
547b97ee269SEmmanuel Vadot                - const: msi0
548b97ee269SEmmanuel Vadot                - const: msi1
549b97ee269SEmmanuel Vadot                - const: msi2
550b97ee269SEmmanuel Vadot                - const: msi3
551b97ee269SEmmanuel Vadot                - const: msi4
552b97ee269SEmmanuel Vadot                - const: msi5
553b97ee269SEmmanuel Vadot                - const: msi6
554b97ee269SEmmanuel Vadot                - const: msi7
5557ef62cebSEmmanuel Vadot
5567ef62cebSEmmanuel Vadot  - if:
5577ef62cebSEmmanuel Vadot      properties:
5587ef62cebSEmmanuel Vadot        compatible:
5597ef62cebSEmmanuel Vadot          contains:
5607ef62cebSEmmanuel Vadot            enum:
5617ef62cebSEmmanuel Vadot              - qcom,pcie-apq8064
5627ef62cebSEmmanuel Vadot              - qcom,pcie-apq8084
5637ef62cebSEmmanuel Vadot              - qcom,pcie-ipq4019
5647ef62cebSEmmanuel Vadot              - qcom,pcie-ipq6018
5657ef62cebSEmmanuel Vadot              - qcom,pcie-ipq8064
5667ef62cebSEmmanuel Vadot              - qcom,pcie-ipq8064-v2
5677ef62cebSEmmanuel Vadot              - qcom,pcie-ipq8074
568cb7aa33aSEmmanuel Vadot              - qcom,pcie-ipq8074-gen3
5697ef62cebSEmmanuel Vadot              - qcom,pcie-qcs404
5707ef62cebSEmmanuel Vadot    then:
571b97ee269SEmmanuel Vadot      properties:
572b97ee269SEmmanuel Vadot        interrupts:
573b97ee269SEmmanuel Vadot          maxItems: 1
574b97ee269SEmmanuel Vadot        interrupt-names:
575b97ee269SEmmanuel Vadot          items:
576b97ee269SEmmanuel Vadot            - const: msi
577b97ee269SEmmanuel Vadot
578d5b0e70fSEmmanuel VadotunevaluatedProperties: false
579d5b0e70fSEmmanuel Vadot
580d5b0e70fSEmmanuel Vadotexamples:
581d5b0e70fSEmmanuel Vadot  - |
582d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
583d5b0e70fSEmmanuel Vadot    pcie@1b500000 {
584d5b0e70fSEmmanuel Vadot      compatible = "qcom,pcie-ipq8064";
585d5b0e70fSEmmanuel Vadot      reg = <0x1b500000 0x1000>,
586d5b0e70fSEmmanuel Vadot            <0x1b502000 0x80>,
587d5b0e70fSEmmanuel Vadot            <0x1b600000 0x100>,
588d5b0e70fSEmmanuel Vadot            <0x0ff00000 0x100000>;
589d5b0e70fSEmmanuel Vadot      reg-names = "dbi", "elbi", "parf", "config";
590d5b0e70fSEmmanuel Vadot      device_type = "pci";
591d5b0e70fSEmmanuel Vadot      linux,pci-domain = <0>;
592d5b0e70fSEmmanuel Vadot      bus-range = <0x00 0xff>;
593d5b0e70fSEmmanuel Vadot      num-lanes = <1>;
594d5b0e70fSEmmanuel Vadot      #address-cells = <3>;
595d5b0e70fSEmmanuel Vadot      #size-cells = <2>;
596d5b0e70fSEmmanuel Vadot      ranges = <0x81000000 0 0 0x0fe00000 0 0x00100000>,
597d5b0e70fSEmmanuel Vadot               <0x82000000 0 0 0x08000000 0 0x07e00000>;
598d5b0e70fSEmmanuel Vadot      interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
599d5b0e70fSEmmanuel Vadot      interrupt-names = "msi";
600d5b0e70fSEmmanuel Vadot      #interrupt-cells = <1>;
601d5b0e70fSEmmanuel Vadot      interrupt-map-mask = <0 0 0 0x7>;
602d5b0e70fSEmmanuel Vadot      interrupt-map = <0 0 0 1 &intc 0 36 IRQ_TYPE_LEVEL_HIGH>,
603d5b0e70fSEmmanuel Vadot                      <0 0 0 2 &intc 0 37 IRQ_TYPE_LEVEL_HIGH>,
604d5b0e70fSEmmanuel Vadot                      <0 0 0 3 &intc 0 38 IRQ_TYPE_LEVEL_HIGH>,
605d5b0e70fSEmmanuel Vadot                      <0 0 0 4 &intc 0 39 IRQ_TYPE_LEVEL_HIGH>;
606d5b0e70fSEmmanuel Vadot      clocks = <&gcc 41>,
607d5b0e70fSEmmanuel Vadot               <&gcc 43>,
608d5b0e70fSEmmanuel Vadot               <&gcc 44>,
609d5b0e70fSEmmanuel Vadot               <&gcc 42>,
610d5b0e70fSEmmanuel Vadot               <&gcc 248>;
611d5b0e70fSEmmanuel Vadot      clock-names = "core", "iface", "phy", "aux", "ref";
612d5b0e70fSEmmanuel Vadot      resets = <&gcc 27>,
613d5b0e70fSEmmanuel Vadot               <&gcc 26>,
614d5b0e70fSEmmanuel Vadot               <&gcc 25>,
615d5b0e70fSEmmanuel Vadot               <&gcc 24>,
616d5b0e70fSEmmanuel Vadot               <&gcc 23>,
617d5b0e70fSEmmanuel Vadot               <&gcc 22>;
618d5b0e70fSEmmanuel Vadot      reset-names = "axi", "ahb", "por", "pci", "phy", "ext";
619d5b0e70fSEmmanuel Vadot      pinctrl-0 = <&pcie_pins_default>;
620d5b0e70fSEmmanuel Vadot      pinctrl-names = "default";
621d5b0e70fSEmmanuel Vadot      vdda-supply = <&pm8921_s3>;
622d5b0e70fSEmmanuel Vadot      vdda_phy-supply = <&pm8921_lvs6>;
623d5b0e70fSEmmanuel Vadot      vdda_refclk-supply = <&ext_3p3v>;
624d5b0e70fSEmmanuel Vadot    };
625d5b0e70fSEmmanuel Vadot  - |
626d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
627d5b0e70fSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
628d5b0e70fSEmmanuel Vadot    pcie@fc520000 {
629d5b0e70fSEmmanuel Vadot      compatible = "qcom,pcie-apq8084";
630d5b0e70fSEmmanuel Vadot      reg = <0xfc520000 0x2000>,
631d5b0e70fSEmmanuel Vadot            <0xff000000 0x1000>,
632d5b0e70fSEmmanuel Vadot            <0xff001000 0x1000>,
633d5b0e70fSEmmanuel Vadot            <0xff002000 0x2000>;
634d5b0e70fSEmmanuel Vadot      reg-names = "parf", "dbi", "elbi", "config";
635d5b0e70fSEmmanuel Vadot      device_type = "pci";
636d5b0e70fSEmmanuel Vadot      linux,pci-domain = <0>;
637d5b0e70fSEmmanuel Vadot      bus-range = <0x00 0xff>;
638d5b0e70fSEmmanuel Vadot      num-lanes = <1>;
639d5b0e70fSEmmanuel Vadot      #address-cells = <3>;
640d5b0e70fSEmmanuel Vadot      #size-cells = <2>;
641d5b0e70fSEmmanuel Vadot      ranges = <0x81000000 0 0          0xff200000 0 0x00100000>,
642d5b0e70fSEmmanuel Vadot               <0x82000000 0 0x00300000 0xff300000 0 0x00d00000>;
643d5b0e70fSEmmanuel Vadot      interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>;
644d5b0e70fSEmmanuel Vadot      interrupt-names = "msi";
645d5b0e70fSEmmanuel Vadot      #interrupt-cells = <1>;
646d5b0e70fSEmmanuel Vadot      interrupt-map-mask = <0 0 0 0x7>;
647d5b0e70fSEmmanuel Vadot      interrupt-map = <0 0 0 1 &intc 0 244 IRQ_TYPE_LEVEL_HIGH>,
648d5b0e70fSEmmanuel Vadot                      <0 0 0 2 &intc 0 245 IRQ_TYPE_LEVEL_HIGH>,
649d5b0e70fSEmmanuel Vadot                      <0 0 0 3 &intc 0 247 IRQ_TYPE_LEVEL_HIGH>,
650d5b0e70fSEmmanuel Vadot                      <0 0 0 4 &intc 0 248 IRQ_TYPE_LEVEL_HIGH>;
651d5b0e70fSEmmanuel Vadot      clocks = <&gcc 324>,
652d5b0e70fSEmmanuel Vadot               <&gcc 325>,
653d5b0e70fSEmmanuel Vadot               <&gcc 327>,
654d5b0e70fSEmmanuel Vadot               <&gcc 323>;
655d5b0e70fSEmmanuel Vadot      clock-names = "iface", "master_bus", "slave_bus", "aux";
656d5b0e70fSEmmanuel Vadot      resets = <&gcc 81>;
657d5b0e70fSEmmanuel Vadot      reset-names = "core";
658d5b0e70fSEmmanuel Vadot      power-domains = <&gcc 1>;
659d5b0e70fSEmmanuel Vadot      vdda-supply = <&pma8084_l3>;
660d5b0e70fSEmmanuel Vadot      phys = <&pciephy0>;
661d5b0e70fSEmmanuel Vadot      phy-names = "pciephy";
662d5b0e70fSEmmanuel Vadot      perst-gpios = <&tlmm 70 GPIO_ACTIVE_LOW>;
663d5b0e70fSEmmanuel Vadot      pinctrl-0 = <&pcie0_pins_default>;
664d5b0e70fSEmmanuel Vadot      pinctrl-names = "default";
665d5b0e70fSEmmanuel Vadot    };
666d5b0e70fSEmmanuel Vadot...
667