Skip to content

Commit cd48bff

Browse files
committed
Merge branch 'remotes/lorenzo/pci/qcom'
- Add Qualcomm PCIe Endpoint controller driver and DT binding (Manivannan Sadhasivam) - Add qcom struct for device-specific details in match data (Prasad Malisetty) - Switch pcie_1_pipe_clk_src from TCXO to pipe clock after PHY init in SC7280 (Prasad Malisetty) - Add .compatible device ID for SC8180x platform (Bjorn Andersson) * remotes/lorenzo/pci/qcom: PCI: qcom: Add sc8180x compatible PCI: qcom: Switch pcie_1_pipe_clk_src after PHY init in SC7280 PCI: qcom: Replace ops with struct pcie_cfg in pcie match data MAINTAINERS: Add entry for Qualcomm PCIe Endpoint driver and binding PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver dt-bindings: PCI: Add Qualcomm PCIe Endpoint controller
2 parents 83e168d + 45a3ec8 commit cd48bff

File tree

8 files changed

+989
-14
lines changed

8 files changed

+989
-14
lines changed
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
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-ep.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm PCIe Endpoint Controller binding
8+
9+
maintainers:
10+
- Manivannan Sadhasivam <[email protected]>
11+
12+
allOf:
13+
- $ref: "pci-ep.yaml#"
14+
15+
properties:
16+
compatible:
17+
const: qcom,sdx55-pcie-ep
18+
19+
reg:
20+
items:
21+
- description: Qualcomm-specific PARF configuration registers
22+
- description: DesignWare PCIe registers
23+
- description: External local bus interface registers
24+
- description: Address Translation Unit (ATU) registers
25+
- description: Memory region used to map remote RC address space
26+
- description: BAR memory region
27+
28+
reg-names:
29+
items:
30+
- const: parf
31+
- const: dbi
32+
- const: elbi
33+
- const: atu
34+
- const: addr_space
35+
- const: mmio
36+
37+
clocks:
38+
items:
39+
- description: PCIe Auxiliary clock
40+
- description: PCIe CFG AHB clock
41+
- description: PCIe Master AXI clock
42+
- description: PCIe Slave AXI clock
43+
- description: PCIe Slave Q2A AXI clock
44+
- description: PCIe Sleep clock
45+
- description: PCIe Reference clock
46+
47+
clock-names:
48+
items:
49+
- const: aux
50+
- const: cfg
51+
- const: bus_master
52+
- const: bus_slave
53+
- const: slave_q2a
54+
- const: sleep
55+
- const: ref
56+
57+
qcom,perst-regs:
58+
description: Reference to a syscon representing TCSR followed by the two
59+
offsets within syscon for Perst enable and Perst separation
60+
enable registers
61+
$ref: "/schemas/types.yaml#/definitions/phandle-array"
62+
items:
63+
minItems: 3
64+
maxItems: 3
65+
66+
interrupts:
67+
items:
68+
- description: PCIe Global interrupt
69+
- description: PCIe Doorbell interrupt
70+
71+
interrupt-names:
72+
items:
73+
- const: global
74+
- const: doorbell
75+
76+
reset-gpios:
77+
description: GPIO used as PERST# input signal
78+
maxItems: 1
79+
80+
wake-gpios:
81+
description: GPIO used as WAKE# output signal
82+
maxItems: 1
83+
84+
resets:
85+
maxItems: 1
86+
87+
reset-names:
88+
const: core
89+
90+
power-domains:
91+
maxItems: 1
92+
93+
phys:
94+
maxItems: 1
95+
96+
phy-names:
97+
const: pciephy
98+
99+
num-lanes:
100+
default: 2
101+
102+
required:
103+
- compatible
104+
- reg
105+
- reg-names
106+
- clocks
107+
- clock-names
108+
- qcom,perst-regs
109+
- interrupts
110+
- interrupt-names
111+
- reset-gpios
112+
- resets
113+
- reset-names
114+
- power-domains
115+
116+
unevaluatedProperties: false
117+
118+
examples:
119+
- |
120+
#include <dt-bindings/clock/qcom,gcc-sdx55.h>
121+
#include <dt-bindings/gpio/gpio.h>
122+
#include <dt-bindings/interrupt-controller/arm-gic.h>
123+
pcie_ep: pcie-ep@40000000 {
124+
compatible = "qcom,sdx55-pcie-ep";
125+
reg = <0x01c00000 0x3000>,
126+
<0x40000000 0xf1d>,
127+
<0x40000f20 0xc8>,
128+
<0x40001000 0x1000>,
129+
<0x40002000 0x1000>,
130+
<0x01c03000 0x3000>;
131+
reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
132+
"mmio";
133+
134+
clocks = <&gcc GCC_PCIE_AUX_CLK>,
135+
<&gcc GCC_PCIE_CFG_AHB_CLK>,
136+
<&gcc GCC_PCIE_MSTR_AXI_CLK>,
137+
<&gcc GCC_PCIE_SLV_AXI_CLK>,
138+
<&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
139+
<&gcc GCC_PCIE_SLEEP_CLK>,
140+
<&gcc GCC_PCIE_0_CLKREF_CLK>;
141+
clock-names = "aux", "cfg", "bus_master", "bus_slave",
142+
"slave_q2a", "sleep", "ref";
143+
144+
qcom,perst-regs = <&tcsr 0xb258 0xb270>;
145+
146+
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
147+
<GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
148+
interrupt-names = "global", "doorbell";
149+
reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
150+
wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
151+
resets = <&gcc GCC_PCIE_BCR>;
152+
reset-names = "core";
153+
power-domains = <&gcc PCIE_GDSC>;
154+
phys = <&pcie0_lane>;
155+
phy-names = "pciephy";
156+
max-link-speed = <3>;
157+
num-lanes = <2>;
158+
};

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- "qcom,pcie-ipq4019" for ipq4019
1313
- "qcom,pcie-ipq8074" for ipq8074
1414
- "qcom,pcie-qcs404" for qcs404
15+
- "qcom,pcie-sc8180x" for sc8180x
1516
- "qcom,pcie-sdm845" for sdm845
1617
- "qcom,pcie-sm8250" for sm8250
1718
- "qcom,pcie-ipq6018" for ipq6018
@@ -156,7 +157,7 @@
156157
- "pipe" PIPE clock
157158

158159
- clock-names:
159-
Usage: required for sm8250
160+
Usage: required for sc8180x and sm8250
160161
Value type: <stringlist>
161162
Definition: Should contain the following entries
162163
- "aux" Auxiliary clock
@@ -245,7 +246,7 @@
245246
- "ahb" AHB reset
246247

247248
- reset-names:
248-
Usage: required for sdm845 and sm8250
249+
Usage: required for sc8180x, sdm845 and sm8250
249250
Value type: <stringlist>
250251
Definition: Should contain the following entries
251252
- "pci" PCIe core reset

MAINTAINERS

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14618,7 +14618,15 @@ M: Stanimir Varbanov <[email protected]>
1461814618
1461914619
1462014620
S: Maintained
14621-
F: drivers/pci/controller/dwc/*qcom*
14621+
F: drivers/pci/controller/dwc/pcie-qcom.c
14622+
14623+
PCIE ENDPOINT DRIVER FOR QUALCOMM
14624+
M: Manivannan Sadhasivam <[email protected]>
14625+
14626+
14627+
S: Maintained
14628+
F: Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
14629+
F: drivers/pci/controller/dwc/pcie-qcom-ep.c
1462214630

1462314631
PCIE DRIVER FOR ROCKCHIP
1462414632
M: Shawn Lin <[email protected]>

drivers/pci/controller/dwc/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ config PCIE_QCOM
178178
PCIe controller uses the DesignWare core plus Qualcomm-specific
179179
hardware wrappers.
180180

181+
config PCIE_QCOM_EP
182+
tristate "Qualcomm PCIe controller - Endpoint mode"
183+
depends on OF && (ARCH_QCOM || COMPILE_TEST)
184+
depends on PCI_ENDPOINT
185+
select PCIE_DW_EP
186+
help
187+
Say Y here to enable support for the PCIe controllers on Qualcomm SoCs
188+
to work in endpoint mode. The PCIe controller uses the DesignWare core
189+
plus Qualcomm-specific hardware wrappers.
190+
181191
config PCIE_ARMADA_8K
182192
bool "Marvell Armada-8K PCIe controller"
183193
depends on ARCH_MVEBU || COMPILE_TEST

drivers/pci/controller/dwc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ obj-$(CONFIG_PCI_KEYSTONE) += pci-keystone.o
1212
obj-$(CONFIG_PCI_LAYERSCAPE) += pci-layerscape.o
1313
obj-$(CONFIG_PCI_LAYERSCAPE_EP) += pci-layerscape-ep.o
1414
obj-$(CONFIG_PCIE_QCOM) += pcie-qcom.o
15+
obj-$(CONFIG_PCIE_QCOM_EP) += pcie-qcom-ep.o
1516
obj-$(CONFIG_PCIE_ARMADA_8K) += pcie-armada8k.o
1617
obj-$(CONFIG_PCIE_ARTPEC6) += pcie-artpec6.o
1718
obj-$(CONFIG_PCIE_ROCKCHIP_DW_HOST) += pcie-dw-rockchip.o

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ int dw_pcie_ep_raise_legacy_irq(struct dw_pcie_ep *ep, u8 func_no)
486486

487487
return -EINVAL;
488488
}
489+
EXPORT_SYMBOL_GPL(dw_pcie_ep_raise_legacy_irq);
489490

490491
int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
491492
u8 interrupt_num)
@@ -537,6 +538,7 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
537538

538539
return 0;
539540
}
541+
EXPORT_SYMBOL_GPL(dw_pcie_ep_raise_msi_irq);
540542

541543
int dw_pcie_ep_raise_msix_irq_doorbell(struct dw_pcie_ep *ep, u8 func_no,
542544
u16 interrupt_num)

0 commit comments

Comments
 (0)