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