Skip to content

Commit b673d06

Browse files
krzkMani-Sadhasivam
authored andcommitted
dt-bindings: PCI: qcom,pcie-apq8064: Move APQ8064 to dedicated schema
Move APQ8064 and IPQ8064 PCIe devices from qcom,pcie.yaml binding to a dedicated file to make reviewing and maintenance easier. New schema is equivalent to the old one with few changes: - Adding a required compatible, which is actually redundant. - Drop the really obvious comments next to clock/reg/reset-names items. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20251217-dt-bindings-pci-qcom-v2-10-873721599754@oss.qualcomm.com
1 parent 5e8bf1c commit b673d06

2 files changed

Lines changed: 170 additions & 127 deletions

File tree

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/qcom,pcie-apq8064.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm APQ8064/IPQ8064 PCI Express Root Complex
8+
9+
maintainers:
10+
- Bjorn Andersson <andersson@kernel.org>
11+
- Manivannan Sadhasivam <mani@kernel.org>
12+
13+
properties:
14+
compatible:
15+
enum:
16+
- qcom,pcie-apq8064
17+
- qcom,pcie-ipq8064
18+
- qcom,pcie-ipq8064-v2
19+
20+
reg:
21+
maxItems: 4
22+
23+
reg-names:
24+
items:
25+
- const: dbi
26+
- const: elbi
27+
- const: parf
28+
- const: config
29+
30+
clocks:
31+
minItems: 3
32+
maxItems: 5
33+
34+
clock-names:
35+
minItems: 3
36+
items:
37+
- const: core # Clocks the pcie hw block
38+
- const: iface # Configuration AHB clock
39+
- const: phy
40+
- const: aux
41+
- const: ref
42+
43+
interrupts:
44+
maxItems: 1
45+
46+
interrupt-names:
47+
items:
48+
- const: msi
49+
50+
resets:
51+
minItems: 5
52+
maxItems: 6
53+
54+
reset-names:
55+
minItems: 5
56+
items:
57+
- const: axi
58+
- const: ahb
59+
- const: por
60+
- const: pci
61+
- const: phy
62+
- const: ext
63+
64+
vdda-supply:
65+
description: A phandle to the core analog power supply
66+
67+
vdda_phy-supply:
68+
description: A phandle to the core analog power supply for PHY
69+
70+
vdda_refclk-supply:
71+
description: A phandle to the core analog power supply for IC which generates reference clock
72+
73+
required:
74+
- resets
75+
- reset-names
76+
- vdda-supply
77+
- vdda_phy-supply
78+
- vdda_refclk-supply
79+
80+
allOf:
81+
- $ref: qcom,pcie-common.yaml#
82+
- if:
83+
properties:
84+
compatible:
85+
contains:
86+
enum:
87+
- qcom,pcie-apq8064
88+
then:
89+
properties:
90+
clocks:
91+
maxItems: 3
92+
clock-names:
93+
maxItems: 3
94+
resets:
95+
maxItems: 5
96+
reset-names:
97+
maxItems: 5
98+
else:
99+
properties:
100+
clocks:
101+
minItems: 5
102+
clock-names:
103+
minItems: 5
104+
resets:
105+
minItems: 6
106+
reset-names:
107+
minItems: 6
108+
109+
unevaluatedProperties: false
110+
111+
examples:
112+
- |
113+
#include <dt-bindings/clock/qcom,gcc-msm8960.h>
114+
#include <dt-bindings/gpio/gpio.h>
115+
#include <dt-bindings/interrupt-controller/arm-gic.h>
116+
#include <dt-bindings/reset/qcom,gcc-msm8960.h>
117+
118+
pcie@1b500000 {
119+
compatible = "qcom,pcie-apq8064";
120+
reg = <0x1b500000 0x1000>,
121+
<0x1b502000 0x80>,
122+
<0x1b600000 0x100>,
123+
<0x0ff00000 0x100000>;
124+
reg-names = "dbi", "elbi", "parf", "config";
125+
ranges = <0x81000000 0x0 0x00000000 0x0fe00000 0x0 0x00100000>, /* I/O */
126+
<0x82000000 0x0 0x08000000 0x08000000 0x0 0x07e00000>; /* mem */
127+
128+
device_type = "pci";
129+
linux,pci-domain = <0>;
130+
bus-range = <0x00 0xff>;
131+
num-lanes = <1>;
132+
#address-cells = <3>;
133+
#size-cells = <2>;
134+
135+
clocks = <&gcc PCIE_A_CLK>,
136+
<&gcc PCIE_H_CLK>,
137+
<&gcc PCIE_PHY_REF_CLK>;
138+
clock-names = "core", "iface", "phy";
139+
140+
interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
141+
interrupt-names = "msi";
142+
#interrupt-cells = <1>;
143+
interrupt-map-mask = <0 0 0 0x7>;
144+
interrupt-map = <0 0 0 1 &intc GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
145+
<0 0 0 2 &intc GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
146+
<0 0 0 3 &intc GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
147+
<0 0 0 4 &intc GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
148+
149+
resets = <&gcc PCIE_ACLK_RESET>,
150+
<&gcc PCIE_HCLK_RESET>,
151+
<&gcc PCIE_POR_RESET>,
152+
<&gcc PCIE_PCI_RESET>,
153+
<&gcc PCIE_PHY_RESET>;
154+
reset-names = "axi", "ahb", "por", "pci", "phy";
155+
156+
perst-gpios = <&tlmm_pinmux 27 GPIO_ACTIVE_LOW>;
157+
vdda-supply = <&pm8921_s3>;
158+
vdda_phy-supply = <&pm8921_lvs6>;
159+
vdda_refclk-supply = <&v3p3_fixed>;
160+
161+
pcie@0 {
162+
device_type = "pci";
163+
reg = <0x0 0x0 0x0 0x0 0x0>;
164+
bus-range = <0x01 0xff>;
165+
166+
#address-cells = <3>;
167+
#size-cells = <2>;
168+
ranges;
169+
};
170+
};

Documentation/devicetree/bindings/pci/qcom,pcie.yaml

Lines changed: 0 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ properties:
1818
compatible:
1919
oneOf:
2020
- enum:
21-
- qcom,pcie-apq8064
2221
- qcom,pcie-apq8084
23-
- qcom,pcie-ipq8064
24-
- qcom,pcie-ipq8064-v2
2522
- qcom,pcie-msm8996
2623
- items:
2724
- const: qcom,pcie-msm8998
@@ -78,12 +75,6 @@ properties:
7875
vdda-supply:
7976
description: A phandle to the core analog power supply
8077

81-
vdda_phy-supply:
82-
description: A phandle to the core analog power supply for PHY
83-
84-
vdda_refclk-supply:
85-
description: A phandle to the core analog power supply for IC which generates reference clock
86-
8778
vddpe-3v3-supply:
8879
description: A phandle to the PCIe endpoint power supply
8980

@@ -127,26 +118,6 @@ anyOf:
127118

128119
allOf:
129120
- $ref: /schemas/pci/pci-host-bridge.yaml#
130-
- if:
131-
properties:
132-
compatible:
133-
contains:
134-
enum:
135-
- qcom,pcie-apq8064
136-
- qcom,pcie-ipq8064
137-
- qcom,pcie-ipq8064v2
138-
then:
139-
properties:
140-
reg:
141-
minItems: 4
142-
maxItems: 4
143-
reg-names:
144-
items:
145-
- const: dbi # DesignWare PCIe registers
146-
- const: elbi # External local bus interface registers
147-
- const: parf # Qualcomm specific registers
148-
- const: config # PCIe configuration space
149-
150121
- if:
151122
properties:
152123
compatible:
@@ -168,44 +139,6 @@ allOf:
168139
- const: config # PCIe configuration space
169140
- const: mhi # MHI registers
170141

171-
- if:
172-
properties:
173-
compatible:
174-
contains:
175-
enum:
176-
- qcom,pcie-apq8064
177-
- qcom,pcie-ipq8064
178-
- qcom,pcie-ipq8064v2
179-
then:
180-
properties:
181-
clocks:
182-
minItems: 3
183-
maxItems: 5
184-
clock-names:
185-
minItems: 3
186-
items:
187-
- const: core # Clocks the pcie hw block
188-
- const: iface # Configuration AHB clock
189-
- const: phy # Clocks the pcie PHY block
190-
- const: aux # Clocks the pcie AUX block, not on apq8064
191-
- const: ref # Clocks the pcie ref block, not on apq8064
192-
resets:
193-
minItems: 5
194-
maxItems: 6
195-
reset-names:
196-
minItems: 5
197-
items:
198-
- const: axi # AXI reset
199-
- const: ahb # AHB reset
200-
- const: por # POR reset
201-
- const: pci # PCI reset
202-
- const: phy # PHY reset
203-
- const: ext # EXT reset, not on apq8064
204-
required:
205-
- vdda-supply
206-
- vdda_phy-supply
207-
- vdda_refclk-supply
208-
209142
- if:
210143
properties:
211144
compatible:
@@ -250,19 +183,6 @@ allOf:
250183
resets: false
251184
reset-names: false
252185

253-
- if:
254-
not:
255-
properties:
256-
compatible:
257-
contains:
258-
enum:
259-
- qcom,pcie-apq8064
260-
- qcom,pcie-ipq8064
261-
- qcom,pcie-ipq8064v2
262-
then:
263-
required:
264-
- power-domains
265-
266186
- if:
267187
not:
268188
properties:
@@ -312,10 +232,7 @@ allOf:
312232
compatible:
313233
contains:
314234
enum:
315-
- qcom,pcie-apq8064
316235
- qcom,pcie-apq8084
317-
- qcom,pcie-ipq8064
318-
- qcom,pcie-ipq8064-v2
319236
then:
320237
properties:
321238
interrupts:
@@ -327,50 +244,6 @@ allOf:
327244
unevaluatedProperties: false
328245

329246
examples:
330-
- |
331-
#include <dt-bindings/interrupt-controller/arm-gic.h>
332-
pcie@1b500000 {
333-
compatible = "qcom,pcie-ipq8064";
334-
reg = <0x1b500000 0x1000>,
335-
<0x1b502000 0x80>,
336-
<0x1b600000 0x100>,
337-
<0x0ff00000 0x100000>;
338-
reg-names = "dbi", "elbi", "parf", "config";
339-
device_type = "pci";
340-
linux,pci-domain = <0>;
341-
bus-range = <0x00 0xff>;
342-
num-lanes = <1>;
343-
#address-cells = <3>;
344-
#size-cells = <2>;
345-
ranges = <0x81000000 0 0 0x0fe00000 0 0x00100000>,
346-
<0x82000000 0 0 0x08000000 0 0x07e00000>;
347-
interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
348-
interrupt-names = "msi";
349-
#interrupt-cells = <1>;
350-
interrupt-map-mask = <0 0 0 0x7>;
351-
interrupt-map = <0 0 0 1 &intc 0 36 IRQ_TYPE_LEVEL_HIGH>,
352-
<0 0 0 2 &intc 0 37 IRQ_TYPE_LEVEL_HIGH>,
353-
<0 0 0 3 &intc 0 38 IRQ_TYPE_LEVEL_HIGH>,
354-
<0 0 0 4 &intc 0 39 IRQ_TYPE_LEVEL_HIGH>;
355-
clocks = <&gcc 41>,
356-
<&gcc 43>,
357-
<&gcc 44>,
358-
<&gcc 42>,
359-
<&gcc 248>;
360-
clock-names = "core", "iface", "phy", "aux", "ref";
361-
resets = <&gcc 27>,
362-
<&gcc 26>,
363-
<&gcc 25>,
364-
<&gcc 24>,
365-
<&gcc 23>,
366-
<&gcc 22>;
367-
reset-names = "axi", "ahb", "por", "pci", "phy", "ext";
368-
pinctrl-0 = <&pcie_pins_default>;
369-
pinctrl-names = "default";
370-
vdda-supply = <&pm8921_s3>;
371-
vdda_phy-supply = <&pm8921_lvs6>;
372-
vdda_refclk-supply = <&ext_3p3v>;
373-
};
374247
- |
375248
#include <dt-bindings/interrupt-controller/arm-gic.h>
376249
#include <dt-bindings/gpio/gpio.h>

0 commit comments

Comments
 (0)