Skip to content

Commit f9d7bbd

Browse files
lumagkwilczynski
authored andcommitted
dt-bindings: PCI: qcom-ep: Consolidate DMA vs non-DMA cases
On Qualcomm platforms here are two major kinds of PCIe Endpoint controllers: ones which use eDMA and IOMMU and the ones which do not (e.g., SDX55 or SDX65). As such, it doesn't make sense to duplicate similar properties all over the place. Thus, merge these two cases into a single conditional clause. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <[email protected]>
1 parent d589fe0 commit f9d7bbd

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

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

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ required:
131131

132132
allOf:
133133
- $ref: pci-ep.yaml#
134+
134135
- if:
135136
properties:
136137
compatible:
@@ -140,9 +141,43 @@ allOf:
140141
then:
141142
properties:
142143
reg:
144+
minItems: 6
143145
maxItems: 6
144146
reg-names:
147+
minItems: 6
145148
maxItems: 6
149+
interrupts:
150+
minItems: 2
151+
maxItems: 2
152+
interrupt-names:
153+
minItems: 2
154+
maxItems: 2
155+
iommus: false
156+
else:
157+
properties:
158+
reg:
159+
minItems: 7
160+
maxItems: 7
161+
reg-names:
162+
minItems: 7
163+
maxItems: 7
164+
interrupts:
165+
minItems: 3
166+
maxItems: 3
167+
interrupt-names:
168+
minItems: 3
169+
maxItems: 3
170+
required:
171+
- iommus
172+
173+
- if:
174+
properties:
175+
compatible:
176+
contains:
177+
enum:
178+
- qcom,sdx55-pcie-ep
179+
then:
180+
properties:
146181
clocks:
147182
items:
148183
- description: PCIe Auxiliary clock
@@ -161,11 +196,6 @@ allOf:
161196
- const: slave_q2a
162197
- const: sleep
163198
- const: ref
164-
interrupts:
165-
maxItems: 2
166-
interrupt-names:
167-
maxItems: 2
168-
iommus: false
169199

170200
- if:
171201
properties:
@@ -175,12 +205,6 @@ allOf:
175205
- qcom,sm8450-pcie-ep
176206
then:
177207
properties:
178-
reg:
179-
minItems: 7
180-
maxItems: 7
181-
reg-names:
182-
minItems: 7
183-
maxItems: 7
184208
clocks:
185209
items:
186210
- description: PCIe Auxiliary clock
@@ -201,14 +225,6 @@ allOf:
201225
- const: ref
202226
- const: ddrss_sf_tbu
203227
- const: aggre_noc_axi
204-
interrupts:
205-
minItems: 3
206-
maxItems: 3
207-
interrupt-names:
208-
minItems: 3
209-
maxItems: 3
210-
required:
211-
- iommus
212228

213229
- if:
214230
properties:
@@ -218,12 +234,6 @@ allOf:
218234
- qcom,sa8775p-pcie-ep
219235
then:
220236
properties:
221-
reg:
222-
minItems: 7
223-
maxItems: 7
224-
reg-names:
225-
minItems: 7
226-
maxItems: 7
227237
clocks:
228238
items:
229239
- description: PCIe Auxiliary clock
@@ -238,14 +248,6 @@ allOf:
238248
- const: bus_master
239249
- const: bus_slave
240250
- const: slave_q2a
241-
interrupts:
242-
minItems: 3
243-
maxItems: 3
244-
interrupt-names:
245-
minItems: 3
246-
maxItems: 3
247-
required:
248-
- iommus
249251

250252
unevaluatedProperties: false
251253

0 commit comments

Comments
 (0)