Skip to content

Commit b237474

Browse files
committed
Merge branch 'pci/controller/qcom'
- Add DT compatible for qcom MSM8998 (Krzysztof Kozlowski) - Unify qcom MSM8996 and MSM8998 clock orderings (Krzysztof Kozlowski) - Correct qcom,perst-regs (Krzysztof Kozlowski) - Add qcom SM8350 DT binding and driver support (Dmitry Baryshkov) - Add qcom_pcie_host_deinit() so the PHY is powered off and regulators and clocks are disabled on late host-init errors (Johan Hovold) - Add IPQ8074 Gen3 port DT binding and driver support (the Gen2 port was already supported) (Robert Marko) * pci/controller/qcom: PCI: qcom: Add IPQ8074 Gen3 port support dt-bindings: PCI: qcom: Add IPQ8074 Gen3 port dt-bindings: PCI: qcom: Sort compatibles alphabetically PCI: qcom: Fix host-init error handling PCI: qcom: Add SM8350 support dt-bindings: PCI: qcom: Add SM8350 dt-bindings: PCI: qcom-ep: Correct qcom,perst-regs dt-bindings: PCI: qcom: Unify MSM8996 and MSM8998 clock order dt-bindings: PCI: qcom: Add MSM8998 specific compatible dt-bindings: PCI: qcom: Add oneOf to compatible match
2 parents 7cfd342 + f356132 commit b237474

File tree

3 files changed

+85
-39
lines changed

3 files changed

+85
-39
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ properties:
4747
enable registers
4848
$ref: "/schemas/types.yaml#/definitions/phandle-array"
4949
items:
50-
minItems: 3
51-
maxItems: 3
50+
- items:
51+
- description: Syscon to TCSR system registers
52+
- description: Perst enable offset
53+
- description: Perst separation enable offset
5254

5355
interrupts:
5456
items:

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

Lines changed: 67 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,31 @@ description: |
1616
1717
properties:
1818
compatible:
19-
enum:
20-
- qcom,pcie-ipq8064
21-
- qcom,pcie-ipq8064-v2
22-
- qcom,pcie-apq8064
23-
- qcom,pcie-apq8084
24-
- qcom,pcie-msm8996
25-
- qcom,pcie-ipq4019
26-
- qcom,pcie-ipq8074
27-
- qcom,pcie-qcs404
28-
- qcom,pcie-sa8540p
29-
- qcom,pcie-sc7280
30-
- qcom,pcie-sc8180x
31-
- qcom,pcie-sc8280xp
32-
- qcom,pcie-sdm845
33-
- qcom,pcie-sm8150
34-
- qcom,pcie-sm8250
35-
- qcom,pcie-sm8450-pcie0
36-
- qcom,pcie-sm8450-pcie1
37-
- qcom,pcie-ipq6018
19+
oneOf:
20+
- enum:
21+
- qcom,pcie-apq8064
22+
- qcom,pcie-apq8084
23+
- qcom,pcie-ipq4019
24+
- qcom,pcie-ipq6018
25+
- qcom,pcie-ipq8064
26+
- qcom,pcie-ipq8064-v2
27+
- qcom,pcie-ipq8074
28+
- qcom,pcie-ipq8074-gen3
29+
- qcom,pcie-msm8996
30+
- qcom,pcie-qcs404
31+
- qcom,pcie-sa8540p
32+
- qcom,pcie-sc7280
33+
- qcom,pcie-sc8180x
34+
- qcom,pcie-sc8280xp
35+
- qcom,pcie-sdm845
36+
- qcom,pcie-sm8150
37+
- qcom,pcie-sm8250
38+
- qcom,pcie-sm8350
39+
- qcom,pcie-sm8450-pcie0
40+
- qcom,pcie-sm8450-pcie1
41+
- items:
42+
- const: qcom,pcie-msm8998
43+
- const: qcom,pcie-msm8996
3844

3945
reg:
4046
minItems: 4
@@ -153,6 +159,7 @@ allOf:
153159
contains:
154160
enum:
155161
- qcom,pcie-ipq6018
162+
- qcom,pcie-ipq8074-gen3
156163
then:
157164
properties:
158165
reg:
@@ -195,6 +202,7 @@ allOf:
195202
- qcom,pcie-sc8180x
196203
- qcom,pcie-sc8280xp
197204
- qcom,pcie-sm8250
205+
- qcom,pcie-sm8350
198206
- qcom,pcie-sm8450-pcie0
199207
- qcom,pcie-sm8450-pcie1
200208
then:
@@ -312,27 +320,17 @@ allOf:
312320
enum:
313321
- qcom,pcie-msm8996
314322
then:
315-
oneOf:
316-
- properties:
317-
clock-names:
318-
items:
319-
- const: pipe # Pipe Clock driving internal logic
320-
- const: aux # Auxiliary (AUX) clock
321-
- const: cfg # Configuration clock
322-
- const: bus_master # Master AXI clock
323-
- const: bus_slave # Slave AXI clock
324-
- properties:
325-
clock-names:
326-
items:
327-
- const: pipe # Pipe Clock driving internal logic
328-
- const: bus_master # Master AXI clock
329-
- const: bus_slave # Slave AXI clock
330-
- const: cfg # Configuration clock
331-
- const: aux # Auxiliary (AUX) clock
332323
properties:
333324
clocks:
334325
minItems: 5
335326
maxItems: 5
327+
clock-names:
328+
items:
329+
- const: pipe # Pipe Clock driving internal logic
330+
- const: aux # Auxiliary (AUX) clock
331+
- const: cfg # Configuration clock
332+
- const: bus_master # Master AXI clock
333+
- const: bus_slave # Slave AXI clock
336334
resets: false
337335
reset-names: false
338336

@@ -373,6 +371,7 @@ allOf:
373371
contains:
374372
enum:
375373
- qcom,pcie-ipq6018
374+
- qcom,pcie-ipq8074-gen3
376375
then:
377376
properties:
378377
clocks:
@@ -550,6 +549,35 @@ allOf:
550549
items:
551550
- const: pci # PCIe core reset
552551

552+
- if:
553+
properties:
554+
compatible:
555+
contains:
556+
enum:
557+
- qcom,pcie-sm8350
558+
then:
559+
properties:
560+
clocks:
561+
minItems: 8
562+
maxItems: 9
563+
clock-names:
564+
minItems: 8
565+
items:
566+
- const: aux # Auxiliary clock
567+
- const: cfg # Configuration clock
568+
- const: bus_master # Master AXI clock
569+
- const: bus_slave # Slave AXI clock
570+
- const: slave_q2a # Slave Q2A clock
571+
- const: tbu # PCIe TBU clock
572+
- const: ddrss_sf_tbu # PCIe SF TBU clock
573+
- const: aggre1 # Aggre NoC PCIe1 AXI clock
574+
- const: aggre0 # Aggre NoC PCIe0 AXI clock
575+
resets:
576+
maxItems: 1
577+
reset-names:
578+
items:
579+
- const: pci # PCIe core reset
580+
553581
- if:
554582
properties:
555583
compatible:
@@ -664,6 +692,7 @@ allOf:
664692
- qcom,pcie-ipq8064
665693
- qcom,pcie-ipq8064v2
666694
- qcom,pcie-ipq8074
695+
- qcom,pcie-ipq8074-gen3
667696
- qcom,pcie-qcs404
668697
then:
669698
required:
@@ -692,6 +721,7 @@ allOf:
692721
- qcom,pcie-sdm845
693722
- qcom,pcie-sm8150
694723
- qcom,pcie-sm8250
724+
- qcom,pcie-sm8350
695725
- qcom,pcie-sm8450-pcie0
696726
- qcom,pcie-sm8450-pcie1
697727
then:
@@ -746,6 +776,7 @@ allOf:
746776
- qcom,pcie-ipq8064
747777
- qcom,pcie-ipq8064-v2
748778
- qcom,pcie-ipq8074
779+
- qcom,pcie-ipq8074-gen3
749780
- qcom,pcie-qcs404
750781
- qcom,pcie-sa8540p
751782
then:

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,8 +1534,19 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp)
15341534
return ret;
15351535
}
15361536

1537+
static void qcom_pcie_host_deinit(struct dw_pcie_rp *pp)
1538+
{
1539+
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
1540+
struct qcom_pcie *pcie = to_qcom_pcie(pci);
1541+
1542+
qcom_ep_reset_assert(pcie);
1543+
phy_power_off(pcie->phy);
1544+
pcie->cfg->ops->deinit(pcie);
1545+
}
1546+
15371547
static const struct dw_pcie_host_ops qcom_pcie_dw_ops = {
1538-
.host_init = qcom_pcie_host_init,
1548+
.host_init = qcom_pcie_host_init,
1549+
.host_deinit = qcom_pcie_host_deinit,
15391550
};
15401551

15411552
/* Qcom IP rev.: 2.1.0 Synopsys IP rev.: 4.01a */
@@ -1817,6 +1828,7 @@ static const struct of_device_id qcom_pcie_match[] = {
18171828
{ .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 },
18181829
{ .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 },
18191830
{ .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 },
1831+
{ .compatible = "qcom,pcie-ipq8074-gen3", .data = &cfg_2_9_0 },
18201832
{ .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 },
18211833
{ .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 },
18221834
{ .compatible = "qcom,pcie-sa8540p", .data = &cfg_1_9_0 },
@@ -1826,6 +1838,7 @@ static const struct of_device_id qcom_pcie_match[] = {
18261838
{ .compatible = "qcom,pcie-sdm845", .data = &cfg_2_7_0 },
18271839
{ .compatible = "qcom,pcie-sm8150", .data = &cfg_1_9_0 },
18281840
{ .compatible = "qcom,pcie-sm8250", .data = &cfg_1_9_0 },
1841+
{ .compatible = "qcom,pcie-sm8350", .data = &cfg_1_9_0 },
18291842
{ .compatible = "qcom,pcie-sm8450-pcie0", .data = &cfg_1_9_0 },
18301843
{ .compatible = "qcom,pcie-sm8450-pcie1", .data = &cfg_1_9_0 },
18311844
{ }

0 commit comments

Comments
 (0)