Skip to content

Commit 6547faa

Browse files
committed
Merge branch 'pci/controller/qcom'
- Describe endpoint BAR0 and BAR2 as 64-bit only and BAR1 and BAR3 as RESERVED (Manivannan Sadhasivam) - Add optional dma-coherent DT property for Qualcomm SA8775P (Dmitry Baryshkov) - Make DT iommu property required for SA8775P and prohibited for SDX55 (Dmitry Baryshkov) - Add DT iommu and DMA-related properties for Qualcomm SM8450 (Dmitry Baryshkov) - Consolidate DMA vs non-DMA cases in DT (Dmitry Baryshkov) - Add endpoint DT properties for SAR2130P and enable endpoint mode in driver (Dmitry Baryshkov) * pci/controller/qcom: PCI: qcom-ep: Enable EP mode support for SAR2130P dt-bindings: PCI: qcom-ep: Add SAR2130P compatible dt-bindings: PCI: qcom-ep: Consolidate DMA vs non-DMA cases dt-bindings: PCI: qcom-ep: Enable DMA for SM8450 dt-bindings: PCI: qcom-ep: Describe optional IOMMU dt-bindings: PCI: qcom-ep: Describe optional dma-coherent property PCI: qcom-ep: Mark BAR0/BAR2 as 64bit BARs and BAR1/BAR3 as RESERVED
2 parents d7f6f07 + 42c812d commit 6547faa

File tree

2 files changed

+79
-26
lines changed

2 files changed

+79
-26
lines changed

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

Lines changed: 74 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ properties:
1414
oneOf:
1515
- enum:
1616
- qcom,sa8775p-pcie-ep
17+
- qcom,sar2130p-pcie-ep
1718
- qcom,sdx55-pcie-ep
1819
- qcom,sm8450-pcie-ep
1920
- items:
@@ -44,11 +45,11 @@ properties:
4445

4546
clocks:
4647
minItems: 5
47-
maxItems: 8
48+
maxItems: 9
4849

4950
clock-names:
5051
minItems: 5
51-
maxItems: 8
52+
maxItems: 9
5253

5354
qcom,perst-regs:
5455
description: Reference to a syscon representing TCSR followed by the two
@@ -75,6 +76,9 @@ properties:
7576
- const: doorbell
7677
- const: dma
7778

79+
iommus:
80+
maxItems: 1
81+
7882
reset-gpios:
7983
description: GPIO used as PERST# input signal
8084
maxItems: 1
@@ -91,6 +95,8 @@ properties:
9195
- const: pcie-mem
9296
- const: cpu-pcie
9397

98+
dma-coherent: true
99+
94100
resets:
95101
maxItems: 1
96102

@@ -126,6 +132,38 @@ required:
126132

127133
allOf:
128134
- $ref: pci-ep.yaml#
135+
136+
- if:
137+
properties:
138+
compatible:
139+
contains:
140+
enum:
141+
- qcom,sar2130p-pcie-ep
142+
then:
143+
properties:
144+
clocks:
145+
items:
146+
- description: PCIe Auxiliary clock
147+
- description: PCIe CFG AHB clock
148+
- description: PCIe Master AXI clock
149+
- description: PCIe Slave AXI clock
150+
- description: PCIe Slave Q2A AXI clock
151+
- description: PCIe DDRSS SF TBU clock
152+
- description: PCIe AGGRE NOC AXI clock
153+
- description: PCIe CFG NOC AXI clock
154+
- description: PCIe QMIP AHB clock
155+
clock-names:
156+
items:
157+
- const: aux
158+
- const: cfg
159+
- const: bus_master
160+
- const: bus_slave
161+
- const: slave_q2a
162+
- const: ddrss_sf_tbu
163+
- const: aggre_noc_axi
164+
- const: cnoc_sf_axi
165+
- const: qmip_pcie_ahb
166+
129167
- if:
130168
properties:
131169
compatible:
@@ -135,9 +173,43 @@ allOf:
135173
then:
136174
properties:
137175
reg:
176+
minItems: 6
138177
maxItems: 6
139178
reg-names:
179+
minItems: 6
140180
maxItems: 6
181+
interrupts:
182+
minItems: 2
183+
maxItems: 2
184+
interrupt-names:
185+
minItems: 2
186+
maxItems: 2
187+
iommus: false
188+
else:
189+
properties:
190+
reg:
191+
minItems: 7
192+
maxItems: 7
193+
reg-names:
194+
minItems: 7
195+
maxItems: 7
196+
interrupts:
197+
minItems: 3
198+
maxItems: 3
199+
interrupt-names:
200+
minItems: 3
201+
maxItems: 3
202+
required:
203+
- iommus
204+
205+
- if:
206+
properties:
207+
compatible:
208+
contains:
209+
enum:
210+
- qcom,sdx55-pcie-ep
211+
then:
212+
properties:
141213
clocks:
142214
items:
143215
- description: PCIe Auxiliary clock
@@ -156,10 +228,6 @@ allOf:
156228
- const: slave_q2a
157229
- const: sleep
158230
- const: ref
159-
interrupts:
160-
maxItems: 2
161-
interrupt-names:
162-
maxItems: 2
163231

164232
- if:
165233
properties:
@@ -169,10 +237,6 @@ allOf:
169237
- qcom,sm8450-pcie-ep
170238
then:
171239
properties:
172-
reg:
173-
maxItems: 6
174-
reg-names:
175-
maxItems: 6
176240
clocks:
177241
items:
178242
- description: PCIe Auxiliary clock
@@ -193,10 +257,6 @@ allOf:
193257
- const: ref
194258
- const: ddrss_sf_tbu
195259
- const: aggre_noc_axi
196-
interrupts:
197-
maxItems: 2
198-
interrupt-names:
199-
maxItems: 2
200260

201261
- if:
202262
properties:
@@ -206,12 +266,6 @@ allOf:
206266
- qcom,sa8775p-pcie-ep
207267
then:
208268
properties:
209-
reg:
210-
minItems: 7
211-
maxItems: 7
212-
reg-names:
213-
minItems: 7
214-
maxItems: 7
215269
clocks:
216270
items:
217271
- description: PCIe Auxiliary clock
@@ -226,12 +280,6 @@ allOf:
226280
- const: bus_master
227281
- const: bus_slave
228282
- const: slave_q2a
229-
interrupts:
230-
minItems: 3
231-
maxItems: 3
232-
interrupt-names:
233-
minItems: 3
234-
maxItems: 3
235283

236284
unevaluatedProperties: false
237285

drivers/pci/controller/dwc/pcie-qcom-ep.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,10 @@ static const struct pci_epc_features qcom_pcie_epc_features = {
825825
.msi_capable = true,
826826
.msix_capable = false,
827827
.align = SZ_4K,
828+
.bar[BAR_0] = { .only_64bit = true, },
829+
.bar[BAR_1] = { .type = BAR_RESERVED, },
830+
.bar[BAR_2] = { .only_64bit = true, },
831+
.bar[BAR_3] = { .type = BAR_RESERVED, },
828832
};
829833

830834
static const struct pci_epc_features *
@@ -933,6 +937,7 @@ static const struct of_device_id qcom_pcie_ep_match[] = {
933937
{ .compatible = "qcom,sa8775p-pcie-ep", .data = &cfg_1_34_0},
934938
{ .compatible = "qcom,sdx55-pcie-ep", },
935939
{ .compatible = "qcom,sm8450-pcie-ep", },
940+
{ .compatible = "qcom,sar2130p-pcie-ep", },
936941
{ }
937942
};
938943
MODULE_DEVICE_TABLE(of, qcom_pcie_ep_match);

0 commit comments

Comments
 (0)