* [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC
@ 2023-02-22 15:32 Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 01/11] dt-bindings: PCI: qcom: Update maintainers entry Manivannan Sadhasivam
` (10 more replies)
0 siblings, 11 replies; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Hi,
This series adds PCIe RC support to the Qcom SDX55 SoC. The PCIe controller
in SDX55 can act as both Root Complex and Endpoint but only one mode at a
time i.e., the mode cannot be switched during runtime.
This series has been tested on Thundercomm T55 board having QCA6390 WLAN
chipset connected to the PCIe controller. For powering up the WLAN chipset,
an out-of-tree patch has been used since we do not have a proper driver in
mainline to handle the power supplies.
NOTE: Even with this series, I couldn't get network connectivity using
QCA6390. But that's due to ath11k regression for which I've filed a bug
report: https://bugzilla.kernel.org/show_bug.cgi?id=206923
Merging strategy
----------------
PCI and binding patches through PCI tree
PHY patches through PHY tree
Devicetree patches through Qcom tree
Thanks,
Mani
Manivannan Sadhasivam (11):
dt-bindings: PCI: qcom: Update maintainers entry
dt-bindings: PCI: qcom: Add iommu properties
dt-bindings: PCI: qcom: Add SDX55 SoC
dt-bindings: PCI: qcom-ep: Fix the unit address used in example
ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node
ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane}
ARM: dts: qcom: sdx55: Add support for PCIe RC controller
ARM: dts: qcom: sdx55-t55: Enable PCIe RC support
phy: qcom-qmp-pcie: Split out EP related init sequence for SDX55
phy: qcom-qmp-pcie: Add RC init sequence for SDX55
PCI: qcom: Add support for SDX55 SoC
.../devicetree/bindings/pci/qcom,pcie-ep.yaml | 2 +-
.../devicetree/bindings/pci/qcom,pcie.yaml | 35 +++-
arch/arm/boot/dts/qcom-sdx55-t55.dts | 42 +++++
.../boot/dts/qcom-sdx55-telit-fn980-tlb.dts | 2 +-
arch/arm/boot/dts/qcom-sdx55.dtsi | 154 +++++++++++++-----
drivers/pci/controller/dwc/pcie-qcom.c | 4 +-
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 91 +++++++++--
.../qualcomm/phy-qcom-qmp-pcs-pcie-v4_20.h | 2 +
8 files changed, 272 insertions(+), 60 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 01/11] dt-bindings: PCI: qcom: Update maintainers entry
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-23 9:36 ` Krzysztof Kozlowski
2023-02-22 15:32 ` [PATCH 02/11] dt-bindings: PCI: qcom: Add iommu properties Manivannan Sadhasivam
` (9 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Stan is no longer working with MMSOL and expressed his interest to not
continue maintaining Qcom PCIe driver. Since I took over the driver
maintainership, I'm stepping in to maintain the binding also.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index a5859bb3dc28..a3639920fcbb 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -8,7 +8,7 @@ title: Qualcomm PCI express root complex
maintainers:
- Bjorn Andersson <bjorn.andersson@linaro.org>
- - Stanimir Varbanov <svarbanov@mm-sol.com>
+ - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
description: |
Qualcomm PCIe root complex controller is based on the Synopsys DesignWare
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 02/11] dt-bindings: PCI: qcom: Add iommu properties
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 01/11] dt-bindings: PCI: qcom: Update maintainers entry Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-23 9:37 ` Krzysztof Kozlowski
2023-02-22 15:32 ` [PATCH 03/11] dt-bindings: PCI: qcom: Add SDX55 SoC Manivannan Sadhasivam
` (8 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Most of the PCIe controllers require iommu support to function properly.
So let's add them to the binding.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index a3639920fcbb..f48d0792aa57 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -64,6 +64,11 @@ properties:
dma-coherent: true
+ iommus:
+ maxItems: 1
+
+ iommu-map: true
+
interconnects:
maxItems: 2
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 03/11] dt-bindings: PCI: qcom: Add SDX55 SoC
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 01/11] dt-bindings: PCI: qcom: Update maintainers entry Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 02/11] dt-bindings: PCI: qcom: Add iommu properties Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-23 9:38 ` Krzysztof Kozlowski
2023-02-22 15:32 ` [PATCH 04/11] dt-bindings: PCI: qcom-ep: Fix the unit address used in example Manivannan Sadhasivam
` (7 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Add support for the PCIe controller on the Qcom SDX55 SoC to the binding.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
.../devicetree/bindings/pci/qcom,pcie.yaml | 28 +++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index f48d0792aa57..3bba1ef3cff5 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -30,6 +30,7 @@ properties:
- qcom,pcie-sc8180x
- qcom,pcie-sc8280xp
- qcom,pcie-sdm845
+ - qcom,pcie-sdx55
- qcom,pcie-sm8150
- qcom,pcie-sm8250
- qcom,pcie-sm8450-pcie0
@@ -199,6 +200,7 @@ allOf:
- qcom,pcie-sc7280
- qcom,pcie-sc8180x
- qcom,pcie-sc8280xp
+ - qcom,pcie-sdx55
- qcom,pcie-sm8250
- qcom,pcie-sm8450-pcie0
- qcom,pcie-sm8450-pcie1
@@ -646,6 +648,32 @@ allOf:
items:
- const: pci # PCIe core reset
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,pcie-sdx55
+ then:
+ properties:
+ clocks:
+ minItems: 7
+ maxItems: 7
+ clock-names:
+ items:
+ - const: pipe # PIPE clock
+ - const: aux # Auxiliary clock
+ - const: cfg # Configuration clock
+ - const: bus_master # Master AXI clock
+ - const: bus_slave # Slave AXI clock
+ - const: slave_q2a # Slave Q2A clock
+ - const: sleep # PCIe Sleep clock
+ resets:
+ maxItems: 1
+ reset-names:
+ items:
+ - const: pci # PCIe core reset
+
- if:
properties:
compatible:
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 04/11] dt-bindings: PCI: qcom-ep: Fix the unit address used in example
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
` (2 preceding siblings ...)
2023-02-22 15:32 ` [PATCH 03/11] dt-bindings: PCI: qcom: Add SDX55 SoC Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-23 9:38 ` Krzysztof Kozlowski
2023-02-22 15:32 ` [PATCH 05/11] ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node Manivannan Sadhasivam
` (6 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Unit address of PCIe EP node should be 0x1c00000 as it has to match the
first address specified in the reg property.
Fixes: 31c9ef002580 ("dt-bindings: PCI: Add Qualcomm PCIe Endpoint controller")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
index 8d7eb51edcb4..c1800e44f3da 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
@@ -164,7 +164,7 @@ examples:
#include <dt-bindings/clock/qcom,gcc-sdx55.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
- pcie_ep: pcie-ep@40000000 {
+ pcie_ep: pcie-ep@1c00000 {
compatible = "qcom,sdx55-pcie-ep";
reg = <0x01c00000 0x3000>,
<0x40000000 0xf1d>,
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 05/11] ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
` (3 preceding siblings ...)
2023-02-22 15:32 ` [PATCH 04/11] dt-bindings: PCI: qcom-ep: Fix the unit address used in example Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-22 16:02 ` Konrad Dybcio
2023-02-22 15:32 ` [PATCH 06/11] ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane} Manivannan Sadhasivam
` (5 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Unit address of PCIe EP node should be 0x1c00000 as it has to match the
first address specified in the reg property.
This also requires sorting the node in the ascending order.
Fixes: 31c9ef002580 ("dt-bindings: PCI: Add Qualcomm PCIe Endpoint controller")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
arch/arm/boot/dts/qcom-sdx55.dtsi | 78 +++++++++++++++----------------
1 file changed, 39 insertions(+), 39 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi
index 93d71aff3fab..e84ca795cae6 100644
--- a/arch/arm/boot/dts/qcom-sdx55.dtsi
+++ b/arch/arm/boot/dts/qcom-sdx55.dtsi
@@ -303,6 +303,45 @@ qpic_nand: nand-controller@1b30000 {
status = "disabled";
};
+ pcie_ep: pcie-ep@1c00000 {
+ compatible = "qcom,sdx55-pcie-ep";
+ reg = <0x01c00000 0x3000>,
+ <0x40000000 0xf1d>,
+ <0x40000f20 0xc8>,
+ <0x40001000 0x1000>,
+ <0x40200000 0x100000>,
+ <0x01c03000 0x3000>;
+ reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
+ "mmio";
+
+ qcom,perst-regs = <&tcsr 0xb258 0xb270>;
+
+ clocks = <&gcc GCC_PCIE_AUX_CLK>,
+ <&gcc GCC_PCIE_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_MSTR_AXI_CLK>,
+ <&gcc GCC_PCIE_SLV_AXI_CLK>,
+ <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
+ <&gcc GCC_PCIE_SLEEP_CLK>,
+ <&gcc GCC_PCIE_0_CLKREF_CLK>;
+ clock-names = "aux", "cfg", "bus_master", "bus_slave",
+ "slave_q2a", "sleep", "ref";
+
+ interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "global", "doorbell";
+ reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
+ resets = <&gcc GCC_PCIE_BCR>;
+ reset-names = "core";
+ power-domains = <&gcc PCIE_GDSC>;
+ phys = <&pcie0_lane>;
+ phy-names = "pciephy";
+ max-link-speed = <3>;
+ num-lanes = <2>;
+
+ status = "disabled";
+ };
+
pcie0_phy: phy@1c07000 {
compatible = "qcom,sdx55-qmp-pcie-phy";
reg = <0x01c07000 0x1c4>;
@@ -400,45 +439,6 @@ sdhc_1: mmc@8804000 {
status = "disabled";
};
- pcie_ep: pcie-ep@40000000 {
- compatible = "qcom,sdx55-pcie-ep";
- reg = <0x01c00000 0x3000>,
- <0x40000000 0xf1d>,
- <0x40000f20 0xc8>,
- <0x40001000 0x1000>,
- <0x40200000 0x100000>,
- <0x01c03000 0x3000>;
- reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
- "mmio";
-
- qcom,perst-regs = <&tcsr 0xb258 0xb270>;
-
- clocks = <&gcc GCC_PCIE_AUX_CLK>,
- <&gcc GCC_PCIE_CFG_AHB_CLK>,
- <&gcc GCC_PCIE_MSTR_AXI_CLK>,
- <&gcc GCC_PCIE_SLV_AXI_CLK>,
- <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
- <&gcc GCC_PCIE_SLEEP_CLK>,
- <&gcc GCC_PCIE_0_CLKREF_CLK>;
- clock-names = "aux", "cfg", "bus_master", "bus_slave",
- "slave_q2a", "sleep", "ref";
-
- interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "global", "doorbell";
- reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
- wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
- resets = <&gcc GCC_PCIE_BCR>;
- reset-names = "core";
- power-domains = <&gcc PCIE_GDSC>;
- phys = <&pcie0_lane>;
- phy-names = "pciephy";
- max-link-speed = <3>;
- num-lanes = <2>;
-
- status = "disabled";
- };
-
remoteproc_mpss: remoteproc@4080000 {
compatible = "qcom,sdx55-mpss-pas";
reg = <0x04080000 0x4040>;
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 06/11] ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane}
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
` (4 preceding siblings ...)
2023-02-22 15:32 ` [PATCH 05/11] ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-22 16:45 ` Konrad Dybcio
2023-02-22 15:32 ` [PATCH 07/11] ARM: dts: qcom: sdx55: Add support for PCIe RC controller Manivannan Sadhasivam
` (4 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
There is only one PCIe PHY in this SoC, so there is no need to add an
index to the suffix. This also matches the naming convention of the PCIe
controller.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts | 2 +-
arch/arm/boot/dts/qcom-sdx55.dtsi | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts b/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
index ac8b4626ae9a..b7ee0237608f 100644
--- a/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
+++ b/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
@@ -242,7 +242,7 @@ &ipa {
memory-region = <&ipa_fw_mem>;
};
-&pcie0_phy {
+&pcie_phy {
status = "okay";
vdda-phy-supply = <&vreg_l1e_bb_1p2>;
diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi
index e84ca795cae6..a1f4a7b0904a 100644
--- a/arch/arm/boot/dts/qcom-sdx55.dtsi
+++ b/arch/arm/boot/dts/qcom-sdx55.dtsi
@@ -334,7 +334,7 @@ pcie_ep: pcie-ep@1c00000 {
resets = <&gcc GCC_PCIE_BCR>;
reset-names = "core";
power-domains = <&gcc PCIE_GDSC>;
- phys = <&pcie0_lane>;
+ phys = <&pcie_lane>;
phy-names = "pciephy";
max-link-speed = <3>;
num-lanes = <2>;
@@ -342,7 +342,7 @@ pcie_ep: pcie-ep@1c00000 {
status = "disabled";
};
- pcie0_phy: phy@1c07000 {
+ pcie_phy: phy@1c07000 {
compatible = "qcom,sdx55-qmp-pcie-phy";
reg = <0x01c07000 0x1c4>;
#address-cells = <1>;
@@ -362,7 +362,7 @@ pcie0_phy: phy@1c07000 {
status = "disabled";
- pcie0_lane: lanes@1c06000 {
+ pcie_lane: lanes@1c06000 {
reg = <0x01c06000 0x104>, /* tx0 */
<0x01c06200 0x328>, /* rx0 */
<0x01c07200 0x1e8>, /* pcs */
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 07/11] ARM: dts: qcom: sdx55: Add support for PCIe RC controller
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
` (5 preceding siblings ...)
2023-02-22 15:32 ` [PATCH 06/11] ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane} Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-22 16:03 ` Konrad Dybcio
2023-02-22 15:32 ` [PATCH 08/11] ARM: dts: qcom: sdx55-t55: Enable PCIe RC support Manivannan Sadhasivam
` (3 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
The PCIe controller in SDX55 can act as the RC controller also. Let's
add support for it.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
arch/arm/boot/dts/qcom-sdx55.dtsi | 72 +++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi
index a1f4a7b0904a..768d7d7f6335 100644
--- a/arch/arm/boot/dts/qcom-sdx55.dtsi
+++ b/arch/arm/boot/dts/qcom-sdx55.dtsi
@@ -303,6 +303,78 @@ qpic_nand: nand-controller@1b30000 {
status = "disabled";
};
+ pcie_rc: pcie@1c00000 {
+ compatible = "qcom,pcie-sdx55";
+ reg = <0x01c00000 0x3000>,
+ <0x40000000 0xf1d>,
+ <0x40000f20 0xc8>,
+ <0x40001000 0x1000>,
+ <0x40100000 0x100000>;
+ reg-names = "parf", "dbi", "elbi", "atu", "config";
+ device_type = "pci";
+ linux,pci-domain = <0>;
+ bus-range = <0x00 0xff>;
+ num-lanes = <1>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ ranges = <0x01000000 0x0 0x40200000 0x40200000 0x0 0x100000>,
+ <0x02000000 0x0 0x40300000 0x40300000 0x0 0x3fd00000>;
+
+ interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi", "msi2", "msi3", "msi4",
+ "msi5", "msi6", "msi7", "msi8";
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &intc 0 0 0 141 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
+ <0 0 0 2 &intc 0 0 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
+ <0 0 0 3 &intc 0 0 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
+ <0 0 0 4 &intc 0 0 0 144 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
+
+ clocks = <&gcc GCC_PCIE_PIPE_CLK>,
+ <&gcc GCC_PCIE_AUX_CLK>,
+ <&gcc GCC_PCIE_CFG_AHB_CLK>,
+ <&gcc GCC_PCIE_MSTR_AXI_CLK>,
+ <&gcc GCC_PCIE_SLV_AXI_CLK>,
+ <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
+ <&gcc GCC_PCIE_SLEEP_CLK>;
+ clock-names = "pipe",
+ "aux",
+ "cfg",
+ "bus_master",
+ "bus_slave",
+ "slave_q2a",
+ "sleep";
+
+ assigned-clocks = <&gcc GCC_PCIE_AUX_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ iommus = <&apps_smmu 0x0200 0x0f>;
+ iommu-map = <0x0 &apps_smmu 0x0200 0x1>,
+ <0x100 &apps_smmu 0x0201 0x1>,
+ <0x200 &apps_smmu 0x0202 0x1>,
+ <0x300 &apps_smmu 0x0203 0x1>,
+ <0x400 &apps_smmu 0x0204 0x1>;
+
+ resets = <&gcc GCC_PCIE_BCR>;
+ reset-names = "pci";
+
+ power-domains = <&gcc PCIE_GDSC>;
+
+ phys = <&pcie_lane>;
+ phy-names = "pciephy";
+
+ status = "disabled";
+ };
+
pcie_ep: pcie-ep@1c00000 {
compatible = "qcom,sdx55-pcie-ep";
reg = <0x01c00000 0x3000>,
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 08/11] ARM: dts: qcom: sdx55-t55: Enable PCIe RC support
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
` (6 preceding siblings ...)
2023-02-22 15:32 ` [PATCH 07/11] ARM: dts: qcom: sdx55: Add support for PCIe RC controller Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-22 16:04 ` Konrad Dybcio
2023-02-22 15:32 ` [PATCH 09/11] phy: qcom-qmp-pcie: Split out EP related init sequence for SDX55 Manivannan Sadhasivam
` (2 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Enable PCIe RC support on Thundercomm T55 board.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
arch/arm/boot/dts/qcom-sdx55-t55.dts | 42 ++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-sdx55-t55.dts b/arch/arm/boot/dts/qcom-sdx55-t55.dts
index 7ed8feb99afb..fb5b9264077c 100644
--- a/arch/arm/boot/dts/qcom-sdx55-t55.dts
+++ b/arch/arm/boot/dts/qcom-sdx55-t55.dts
@@ -242,6 +242,23 @@ &ipa {
memory-region = <&ipa_fw_mem>;
};
+&pcie_phy {
+ status = "okay";
+
+ vdda-phy-supply = <&vreg_l1e_bb_1p2>;
+ vdda-pll-supply = <&vreg_l4e_bb_0p875>;
+};
+
+&pcie_rc {
+ status = "okay";
+
+ perst-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&tlmm 53 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_default>;
+};
+
&qpic_bam {
status = "ok";
};
@@ -265,6 +282,31 @@ &remoteproc_mpss {
memory-region = <&mpss_adsp_mem>;
};
+&tlmm {
+ pcie_default: pcie-default-state {
+ clkreq-pins {
+ pins = "gpio56";
+ function = "pcie_clkreq";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ perst-pins {
+ pins = "gpio57";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ wake-pins {
+ pins = "gpio53";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+};
+
&usb_hsphy {
status = "okay";
vdda-pll-supply = <&vreg_l4e_bb_0p875>;
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 09/11] phy: qcom-qmp-pcie: Split out EP related init sequence for SDX55
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
` (7 preceding siblings ...)
2023-02-22 15:32 ` [PATCH 08/11] ARM: dts: qcom: sdx55-t55: Enable PCIe RC support Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 10/11] phy: qcom-qmp-pcie: Add RC " Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 11/11] PCI: qcom: Add support for SDX55 SoC Manivannan Sadhasivam
10 siblings, 0 replies; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
In preparation for adding RC support, let's split out the EP related init
sequence so that the common sequence could be reused by RC as well.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 42 ++++++++++++++++--------
1 file changed, 28 insertions(+), 14 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 1b136a87053f..f526f73f76ef 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1122,10 +1122,25 @@ static const struct qmp_phy_init_tbl sm8250_qmp_gen3x2_pcie_pcs_misc_tbl[] = {
};
static const struct qmp_phy_init_tbl sdx55_qmp_pcie_serdes_tbl[] = {
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_BG_TIMER, 0x02),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIAS_EN_CLKBUFLR_EN, 0x18),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYS_CLK_CTRL, 0x07),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_IVCO, 0x0f),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP_EN, 0x46),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP_CFG, 0x04),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_VCO_TUNE_MAP, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_SEL, 0x12),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_HS_SWITCH_SEL, 0x00),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CORECLK_DIV_MODE0, 0x05),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CORECLK_DIV_MODE1, 0x04),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CMN_MISC1, 0x88),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CMN_MISC2, 0x03),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CMN_MODE, 0x17),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_VCO_DC_LEVEL_CTRL, 0x0b),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_HSCLK_SEL, 0x22),
+};
+
+static const struct qmp_phy_init_tbl sdx55_qmp_pcie_ep_serdes_tbl[] = {
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_BG_TIMER, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYS_CLK_CTRL, 0x07),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_CP_CTRL_MODE0, 0x0a),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_CP_CTRL_MODE1, 0x0a),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_RCTRL_MODE0, 0x19),
@@ -1133,8 +1148,6 @@ static const struct qmp_phy_init_tbl sdx55_qmp_pcie_serdes_tbl[] = {
QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_CCTRL_MODE0, 0x03),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_CCTRL_MODE1, 0x03),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYSCLK_EN_SEL, 0x00),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP_EN, 0x46),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP_CFG, 0x04),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP1_MODE0, 0x7f),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP2_MODE0, 0x02),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP1_MODE1, 0xff),
@@ -1146,21 +1159,11 @@ static const struct qmp_phy_init_tbl sdx55_qmp_pcie_serdes_tbl[] = {
QMP_PHY_INIT_CFG(QSERDES_V4_COM_INTEGLOOP_GAIN1_MODE0, 0x01),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_INTEGLOOP_GAIN0_MODE1, 0xfb),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_INTEGLOOP_GAIN1_MODE1, 0x01),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_VCO_TUNE_MAP, 0x02),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_SEL, 0x12),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_HS_SWITCH_SEL, 0x00),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_CORECLK_DIV_MODE0, 0x05),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_CORECLK_DIV_MODE1, 0x04),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_CMN_CONFIG, 0x04),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_CMN_MISC1, 0x88),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_CMN_MISC2, 0x03),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_CMN_MODE, 0x17),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_VCO_DC_LEVEL_CTRL, 0x0b),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE1_MODE0, 0x56),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE2_MODE0, 0x1d),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE1_MODE1, 0x4b),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE2_MODE1, 0x1f),
- QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_HSCLK_SEL, 0x22),
};
static const struct qmp_phy_init_tbl sdx55_qmp_pcie_tx_tbl[] = {
@@ -1212,6 +1215,9 @@ static const struct qmp_phy_init_tbl sdx55_qmp_pcie_pcs_misc_tbl[] = {
QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_PCIE_G4_RXEQEVAL_TIME, 0x13),
QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_PCIE_G4_EQ_CONFIG2, 0x01),
QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_PCIE_G4_EQ_CONFIG5, 0x02),
+};
+
+static const struct qmp_phy_init_tbl sdx55_qmp_pcie_ep_pcs_misc_tbl[] = {
QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_LANE1_INSIG_SW_CTRL2, 0x00),
QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_LANE1_INSIG_MX_CTRL2, 0x00),
};
@@ -2003,6 +2009,14 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
.pcs_misc = sdx55_qmp_pcie_pcs_misc_tbl,
.pcs_misc_num = ARRAY_SIZE(sdx55_qmp_pcie_pcs_misc_tbl),
},
+
+ .tbls_ep = &(const struct qmp_phy_cfg_tbls) {
+ .serdes = sdx55_qmp_pcie_ep_serdes_tbl,
+ .serdes_num = ARRAY_SIZE(sdx55_qmp_pcie_ep_serdes_tbl),
+ .pcs_misc = sdx55_qmp_pcie_ep_pcs_misc_tbl,
+ .pcs_misc_num = ARRAY_SIZE(sdx55_qmp_pcie_ep_pcs_misc_tbl),
+ },
+
.clk_list = sdm845_pciephy_clk_l,
.num_clks = ARRAY_SIZE(sdm845_pciephy_clk_l),
.reset_list = sdm845_pciephy_reset_l,
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 10/11] phy: qcom-qmp-pcie: Add RC init sequence for SDX55
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
` (8 preceding siblings ...)
2023-02-22 15:32 ` [PATCH 09/11] phy: qcom-qmp-pcie: Split out EP related init sequence for SDX55 Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 11/11] PCI: qcom: Add support for SDX55 SoC Manivannan Sadhasivam
10 siblings, 0 replies; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Add PCIe RC init sequence making use of the common init sequence. The RC
mode additionally requires REFCLK_DRV_DSBL bit to set during powerup and
powerdown.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 49 ++++++++++++++++++-
.../qualcomm/phy-qcom-qmp-pcs-pcie-v4_20.h | 2 +
2 files changed, 50 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index f526f73f76ef..9d92facd47a6 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1138,6 +1138,41 @@ static const struct qmp_phy_init_tbl sdx55_qmp_pcie_serdes_tbl[] = {
QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_HSCLK_SEL, 0x22),
};
+static const struct qmp_phy_init_tbl sdx55_qmp_pcie_rc_serdes_tbl[] = {
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_EN_CENTER, 0x01),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_PER1, 0x31),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_PER2, 0x01),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_STEP_SIZE1_MODE0, 0xce),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_STEP_SIZE2_MODE0, 0x0b),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_STEP_SIZE1_MODE1, 0x97),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_STEP_SIZE2_MODE1, 0x0c),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CLK_ENABLE1, 0x90),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CLK_EP_DIV_MODE0, 0x0a),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CLK_EP_DIV_MODE1, 0x10),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CP_CTRL_MODE0, 0x06),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CP_CTRL_MODE1, 0x06),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_RCTRL_MODE0, 0x16),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_RCTRL_MODE1, 0x16),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_CCTRL_MODE0, 0x36),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_CCTRL_MODE1, 0x36),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYSCLK_EN_SEL, 0x08),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP1_MODE0, 0x04),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP2_MODE0, 0x0d),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP1_MODE1, 0x0a),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP2_MODE1, 0x1a),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_DEC_START_MODE0, 0xc3),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_DEC_START_MODE1, 0xd0),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_DIV_FRAC_START3_MODE0, 0x05),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_DIV_FRAC_START1_MODE1, 0x55),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_DIV_FRAC_START2_MODE1, 0x55),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_DIV_FRAC_START3_MODE1, 0x05),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_CLK_SELECT, 0x34),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE1_MODE0, 0xca),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE2_MODE0, 0x1e),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE1_MODE1, 0xd8),
+ QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE2_MODE1, 0x20),
+};
+
static const struct qmp_phy_init_tbl sdx55_qmp_pcie_ep_serdes_tbl[] = {
QMP_PHY_INIT_CFG(QSERDES_V4_COM_BG_TIMER, 0x02),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYS_CLK_CTRL, 0x07),
@@ -1217,6 +1252,11 @@ static const struct qmp_phy_init_tbl sdx55_qmp_pcie_pcs_misc_tbl[] = {
QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_PCIE_G4_EQ_CONFIG5, 0x02),
};
+static const struct qmp_phy_init_tbl sdx55_qmp_pcie_rc_pcs_misc_tbl[] = {
+ QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_PCIE_ENDPOINT_REFCLK_DRIVE, 0xc1),
+ QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_PCIE_OSC_DTCT_ACTIONS, 0x00),
+};
+
static const struct qmp_phy_init_tbl sdx55_qmp_pcie_ep_pcs_misc_tbl[] = {
QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_LANE1_INSIG_SW_CTRL2, 0x00),
QMP_PHY_INIT_CFG(QPHY_V4_20_PCS_LANE1_INSIG_MX_CTRL2, 0x00),
@@ -2010,6 +2050,13 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
.pcs_misc_num = ARRAY_SIZE(sdx55_qmp_pcie_pcs_misc_tbl),
},
+ .tbls_rc = &(const struct qmp_phy_cfg_tbls) {
+ .serdes = sdx55_qmp_pcie_rc_serdes_tbl,
+ .serdes_num = ARRAY_SIZE(sdx55_qmp_pcie_rc_serdes_tbl),
+ .pcs_misc = sdx55_qmp_pcie_rc_pcs_misc_tbl,
+ .pcs_misc_num = ARRAY_SIZE(sdx55_qmp_pcie_rc_pcs_misc_tbl),
+ },
+
.tbls_ep = &(const struct qmp_phy_cfg_tbls) {
.serdes = sdx55_qmp_pcie_ep_serdes_tbl,
.serdes_num = ARRAY_SIZE(sdx55_qmp_pcie_ep_serdes_tbl),
@@ -2025,7 +2072,7 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
.regs = sm8250_pcie_regs_layout,
- .pwrdn_ctrl = SW_PWRDN,
+ .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL,
.phy_status = PHYSTATUS_4_20,
};
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v4_20.h b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v4_20.h
index af273602998e..ac872a9eff9a 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v4_20.h
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v4_20.h
@@ -6,6 +6,8 @@
#ifndef QCOM_PHY_QMP_PCS_PCIE_V4_20_H_
#define QCOM_PHY_QMP_PCS_PCIE_V4_20_H_
+#define QPHY_V4_20_PCS_PCIE_ENDPOINT_REFCLK_DRIVE 0x01c
+#define QPHY_V4_20_PCS_PCIE_OSC_DTCT_ACTIONS 0x090
#define QPHY_V4_20_PCS_PCIE_EQ_CONFIG1 0x0a0
#define QPHY_V4_20_PCS_PCIE_G3_RXEQEVAL_TIME 0x0f0
#define QPHY_V4_20_PCS_PCIE_G4_RXEQEVAL_TIME 0x0f4
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 11/11] PCI: qcom: Add support for SDX55 SoC
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
` (9 preceding siblings ...)
2023-02-22 15:32 ` [PATCH 10/11] phy: qcom-qmp-pcie: Add RC " Manivannan Sadhasivam
@ 2023-02-22 15:32 ` Manivannan Sadhasivam
10 siblings, 0 replies; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-22 15:32 UTC (permalink / raw)
To: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree, Manivannan Sadhasivam
Add support for SDX55 SoC reusing the 1.9.0 config. The PCIe controller is
of version 1.10.0 but it is compatible with the 1.9.0 config. This SoC also
requires "sleep" clock which is added as an optional clock in the driver,
since it is not required on other SoCs.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
drivers/pci/controller/dwc/pcie-qcom.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 77e5dc7b88ad..659df73114dd 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -182,7 +182,7 @@ struct qcom_pcie_resources_2_3_3 {
/* 6 clocks typically, 7 for sm8250 */
struct qcom_pcie_resources_2_7_0 {
- struct clk_bulk_data clks[12];
+ struct clk_bulk_data clks[13];
int num_clks;
struct regulator_bulk_data supplies[2];
struct reset_control *pci_reset;
@@ -1208,6 +1208,7 @@ static int qcom_pcie_get_resources_2_7_0(struct qcom_pcie *pcie)
res->clks[idx++].id = "noc_aggr_4";
res->clks[idx++].id = "noc_aggr_south_sf";
res->clks[idx++].id = "cnoc_qx";
+ res->clks[idx++].id = "sleep";
num_opt_clks = idx - num_clks;
res->num_clks = idx;
@@ -1824,6 +1825,7 @@ static const struct of_device_id qcom_pcie_match[] = {
{ .compatible = "qcom,pcie-sc8180x", .data = &cfg_1_9_0 },
{ .compatible = "qcom,pcie-sc8280xp", .data = &cfg_1_9_0 },
{ .compatible = "qcom,pcie-sdm845", .data = &cfg_2_7_0 },
+ { .compatible = "qcom,pcie-sdx55", .data = &cfg_1_9_0 },
{ .compatible = "qcom,pcie-sm8150", .data = &cfg_1_9_0 },
{ .compatible = "qcom,pcie-sm8250", .data = &cfg_1_9_0 },
{ .compatible = "qcom,pcie-sm8450-pcie0", .data = &cfg_1_9_0 },
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH 05/11] ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node
2023-02-22 15:32 ` [PATCH 05/11] ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node Manivannan Sadhasivam
@ 2023-02-22 16:02 ` Konrad Dybcio
2023-02-23 13:04 ` Manivannan Sadhasivam
0 siblings, 1 reply; 22+ messages in thread
From: Konrad Dybcio @ 2023-02-22 16:02 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, lpieralisi, robh, kw,
krzysztof.kozlowski+dt, vkoul
Cc: bhelgaas, kishon, linux-arm-msm, linux-phy, linux-kernel,
linux-pci, devicetree
On 22.02.2023 16:32, Manivannan Sadhasivam wrote:
> Unit address of PCIe EP node should be 0x1c00000 as it has to match the
> first address specified in the reg property.
>
> This also requires sorting the node in the ascending order.
>
> Fixes: 31c9ef002580 ("dt-bindings: PCI: Add Qualcomm PCIe Endpoint controller")
Unsure, we aren't fixing the bindings..
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
For the dt change:
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm/boot/dts/qcom-sdx55.dtsi | 78 +++++++++++++++----------------
> 1 file changed, 39 insertions(+), 39 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi
> index 93d71aff3fab..e84ca795cae6 100644
> --- a/arch/arm/boot/dts/qcom-sdx55.dtsi
> +++ b/arch/arm/boot/dts/qcom-sdx55.dtsi
> @@ -303,6 +303,45 @@ qpic_nand: nand-controller@1b30000 {
> status = "disabled";
> };
>
> + pcie_ep: pcie-ep@1c00000 {
> + compatible = "qcom,sdx55-pcie-ep";
> + reg = <0x01c00000 0x3000>,
> + <0x40000000 0xf1d>,
> + <0x40000f20 0xc8>,
> + <0x40001000 0x1000>,
> + <0x40200000 0x100000>,
> + <0x01c03000 0x3000>;
> + reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
> + "mmio";
> +
> + qcom,perst-regs = <&tcsr 0xb258 0xb270>;
> +
> + clocks = <&gcc GCC_PCIE_AUX_CLK>,
> + <&gcc GCC_PCIE_CFG_AHB_CLK>,
> + <&gcc GCC_PCIE_MSTR_AXI_CLK>,
> + <&gcc GCC_PCIE_SLV_AXI_CLK>,
> + <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
> + <&gcc GCC_PCIE_SLEEP_CLK>,
> + <&gcc GCC_PCIE_0_CLKREF_CLK>;
> + clock-names = "aux", "cfg", "bus_master", "bus_slave",
> + "slave_q2a", "sleep", "ref";
> +
> + interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "global", "doorbell";
> + reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
> + wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
> + resets = <&gcc GCC_PCIE_BCR>;
> + reset-names = "core";
> + power-domains = <&gcc PCIE_GDSC>;
> + phys = <&pcie0_lane>;
> + phy-names = "pciephy";
> + max-link-speed = <3>;
> + num-lanes = <2>;
> +
> + status = "disabled";
> + };
> +
> pcie0_phy: phy@1c07000 {
> compatible = "qcom,sdx55-qmp-pcie-phy";
> reg = <0x01c07000 0x1c4>;
> @@ -400,45 +439,6 @@ sdhc_1: mmc@8804000 {
> status = "disabled";
> };
>
> - pcie_ep: pcie-ep@40000000 {
> - compatible = "qcom,sdx55-pcie-ep";
> - reg = <0x01c00000 0x3000>,
> - <0x40000000 0xf1d>,
> - <0x40000f20 0xc8>,
> - <0x40001000 0x1000>,
> - <0x40200000 0x100000>,
> - <0x01c03000 0x3000>;
> - reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
> - "mmio";
> -
> - qcom,perst-regs = <&tcsr 0xb258 0xb270>;
> -
> - clocks = <&gcc GCC_PCIE_AUX_CLK>,
> - <&gcc GCC_PCIE_CFG_AHB_CLK>,
> - <&gcc GCC_PCIE_MSTR_AXI_CLK>,
> - <&gcc GCC_PCIE_SLV_AXI_CLK>,
> - <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
> - <&gcc GCC_PCIE_SLEEP_CLK>,
> - <&gcc GCC_PCIE_0_CLKREF_CLK>;
> - clock-names = "aux", "cfg", "bus_master", "bus_slave",
> - "slave_q2a", "sleep", "ref";
> -
> - interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
> - <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
> - interrupt-names = "global", "doorbell";
> - reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
> - wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
> - resets = <&gcc GCC_PCIE_BCR>;
> - reset-names = "core";
> - power-domains = <&gcc PCIE_GDSC>;
> - phys = <&pcie0_lane>;
> - phy-names = "pciephy";
> - max-link-speed = <3>;
> - num-lanes = <2>;
> -
> - status = "disabled";
> - };
> -
> remoteproc_mpss: remoteproc@4080000 {
> compatible = "qcom,sdx55-mpss-pas";
> reg = <0x04080000 0x4040>;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 07/11] ARM: dts: qcom: sdx55: Add support for PCIe RC controller
2023-02-22 15:32 ` [PATCH 07/11] ARM: dts: qcom: sdx55: Add support for PCIe RC controller Manivannan Sadhasivam
@ 2023-02-22 16:03 ` Konrad Dybcio
0 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-02-22 16:03 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, lpieralisi, robh, kw,
krzysztof.kozlowski+dt, vkoul
Cc: bhelgaas, kishon, linux-arm-msm, linux-phy, linux-kernel,
linux-pci, devicetree
On 22.02.2023 16:32, Manivannan Sadhasivam wrote:
> The PCIe controller in SDX55 can act as the RC controller also. Let's
> add support for it.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> arch/arm/boot/dts/qcom-sdx55.dtsi | 72 +++++++++++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi
> index a1f4a7b0904a..768d7d7f6335 100644
> --- a/arch/arm/boot/dts/qcom-sdx55.dtsi
> +++ b/arch/arm/boot/dts/qcom-sdx55.dtsi
> @@ -303,6 +303,78 @@ qpic_nand: nand-controller@1b30000 {
> status = "disabled";
> };
>
> + pcie_rc: pcie@1c00000 {
> + compatible = "qcom,pcie-sdx55";
> + reg = <0x01c00000 0x3000>,
> + <0x40000000 0xf1d>,
> + <0x40000f20 0xc8>,
> + <0x40001000 0x1000>,
> + <0x40100000 0x100000>;
> + reg-names = "parf", "dbi", "elbi", "atu", "config";
It'd be nice if this and interrupt-names could be turned into
a vertical list of entries, sort of like you have in clock-
names. And it'd be even nicer if you could fix that up in
both PCIe nodes.
Konrad
> + device_type = "pci";
> + linux,pci-domain = <0>;
> + bus-range = <0x00 0xff>;
> + num-lanes = <1>;
> +
> + #address-cells = <3>;
> + #size-cells = <2>;
> +
> + ranges = <0x01000000 0x0 0x40200000 0x40200000 0x0 0x100000>,
> + <0x02000000 0x0 0x40300000 0x40300000 0x0 0x3fd00000>;
> +
> + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "msi", "msi2", "msi3", "msi4",
> + "msi5", "msi6", "msi7", "msi8";
> + #interrupt-cells = <1>;
> + interrupt-map-mask = <0 0 0 0x7>;
> + interrupt-map = <0 0 0 1 &intc 0 0 0 141 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> + <0 0 0 2 &intc 0 0 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
> + <0 0 0 3 &intc 0 0 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
> + <0 0 0 4 &intc 0 0 0 144 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
> +
> + clocks = <&gcc GCC_PCIE_PIPE_CLK>,
> + <&gcc GCC_PCIE_AUX_CLK>,
> + <&gcc GCC_PCIE_CFG_AHB_CLK>,
> + <&gcc GCC_PCIE_MSTR_AXI_CLK>,
> + <&gcc GCC_PCIE_SLV_AXI_CLK>,
> + <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
> + <&gcc GCC_PCIE_SLEEP_CLK>;
> + clock-names = "pipe",
> + "aux",
> + "cfg",
> + "bus_master",
> + "bus_slave",
> + "slave_q2a",
> + "sleep";
> +
> + assigned-clocks = <&gcc GCC_PCIE_AUX_CLK>;
> + assigned-clock-rates = <19200000>;
> +
> + iommus = <&apps_smmu 0x0200 0x0f>;
> + iommu-map = <0x0 &apps_smmu 0x0200 0x1>,
> + <0x100 &apps_smmu 0x0201 0x1>,
> + <0x200 &apps_smmu 0x0202 0x1>,
> + <0x300 &apps_smmu 0x0203 0x1>,
> + <0x400 &apps_smmu 0x0204 0x1>;
> +
> + resets = <&gcc GCC_PCIE_BCR>;
> + reset-names = "pci";
> +
> + power-domains = <&gcc PCIE_GDSC>;
> +
> + phys = <&pcie_lane>;
> + phy-names = "pciephy";
> +
> + status = "disabled";
> + };
> +
> pcie_ep: pcie-ep@1c00000 {
> compatible = "qcom,sdx55-pcie-ep";
> reg = <0x01c00000 0x3000>,
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 08/11] ARM: dts: qcom: sdx55-t55: Enable PCIe RC support
2023-02-22 15:32 ` [PATCH 08/11] ARM: dts: qcom: sdx55-t55: Enable PCIe RC support Manivannan Sadhasivam
@ 2023-02-22 16:04 ` Konrad Dybcio
0 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-02-22 16:04 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, lpieralisi, robh, kw,
krzysztof.kozlowski+dt, vkoul
Cc: bhelgaas, kishon, linux-arm-msm, linux-phy, linux-kernel,
linux-pci, devicetree
On 22.02.2023 16:32, Manivannan Sadhasivam wrote:
> Enable PCIe RC support on Thundercomm T55 board.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> arch/arm/boot/dts/qcom-sdx55-t55.dts | 42 ++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-sdx55-t55.dts b/arch/arm/boot/dts/qcom-sdx55-t55.dts
> index 7ed8feb99afb..fb5b9264077c 100644
> --- a/arch/arm/boot/dts/qcom-sdx55-t55.dts
> +++ b/arch/arm/boot/dts/qcom-sdx55-t55.dts
> @@ -242,6 +242,23 @@ &ipa {
> memory-region = <&ipa_fw_mem>;
> };
>
> +&pcie_phy {
> + status = "okay";
'status' should go last. Since you're introducing new nodes,
changing the order in the existing ones would be appreciated.
> +
> + vdda-phy-supply = <&vreg_l1e_bb_1p2>;
> + vdda-pll-supply = <&vreg_l4e_bb_0p875>;
> +};
> +
> +&pcie_rc {
> + status = "okay";
> +
> + perst-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
> + wake-gpios = <&tlmm 53 GPIO_ACTIVE_HIGH>;
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&pcie_default>;
property-
property-names
Konrad
> +};
> +
> &qpic_bam {
> status = "ok";
> };
> @@ -265,6 +282,31 @@ &remoteproc_mpss {
> memory-region = <&mpss_adsp_mem>;
> };
>
> +&tlmm {
> + pcie_default: pcie-default-state {
> + clkreq-pins {
> + pins = "gpio56";
> + function = "pcie_clkreq";
> + drive-strength = <2>;
> + bias-pull-up;
> + };
> +
> + perst-pins {
> + pins = "gpio57";
> + function = "gpio";
> + drive-strength = <2>;
> + bias-pull-down;
> + };
> +
> + wake-pins {
> + pins = "gpio53";
> + function = "gpio";
> + drive-strength = <2>;
> + bias-pull-up;
> + };
> + };
> +};
> +
> &usb_hsphy {
> status = "okay";
> vdda-pll-supply = <&vreg_l4e_bb_0p875>;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 06/11] ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane}
2023-02-22 15:32 ` [PATCH 06/11] ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane} Manivannan Sadhasivam
@ 2023-02-22 16:45 ` Konrad Dybcio
0 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-02-22 16:45 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, lpieralisi, robh, kw,
krzysztof.kozlowski+dt, vkoul
Cc: bhelgaas, kishon, linux-arm-msm, linux-phy, linux-kernel,
linux-pci, devicetree
On 22.02.2023 16:32, Manivannan Sadhasivam wrote:
> There is only one PCIe PHY in this SoC, so there is no need to add an
> index to the suffix. This also matches the naming convention of the PCIe
> controller.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts | 2 +-
> arch/arm/boot/dts/qcom-sdx55.dtsi | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts b/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
> index ac8b4626ae9a..b7ee0237608f 100644
> --- a/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
> +++ b/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
> @@ -242,7 +242,7 @@ &ipa {
> memory-region = <&ipa_fw_mem>;
> };
>
> -&pcie0_phy {
> +&pcie_phy {
> status = "okay";
>
> vdda-phy-supply = <&vreg_l1e_bb_1p2>;
> diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi
> index e84ca795cae6..a1f4a7b0904a 100644
> --- a/arch/arm/boot/dts/qcom-sdx55.dtsi
> +++ b/arch/arm/boot/dts/qcom-sdx55.dtsi
> @@ -334,7 +334,7 @@ pcie_ep: pcie-ep@1c00000 {
> resets = <&gcc GCC_PCIE_BCR>;
> reset-names = "core";
> power-domains = <&gcc PCIE_GDSC>;
> - phys = <&pcie0_lane>;
> + phys = <&pcie_lane>;
> phy-names = "pciephy";
> max-link-speed = <3>;
> num-lanes = <2>;
> @@ -342,7 +342,7 @@ pcie_ep: pcie-ep@1c00000 {
> status = "disabled";
> };
>
> - pcie0_phy: phy@1c07000 {
> + pcie_phy: phy@1c07000 {
> compatible = "qcom,sdx55-qmp-pcie-phy";
> reg = <0x01c07000 0x1c4>;
> #address-cells = <1>;
> @@ -362,7 +362,7 @@ pcie0_phy: phy@1c07000 {
>
> status = "disabled";
>
> - pcie0_lane: lanes@1c06000 {
> + pcie_lane: lanes@1c06000 {
> reg = <0x01c06000 0x104>, /* tx0 */
> <0x01c06200 0x328>, /* rx0 */
> <0x01c07200 0x1e8>, /* pcs */
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 01/11] dt-bindings: PCI: qcom: Update maintainers entry
2023-02-22 15:32 ` [PATCH 01/11] dt-bindings: PCI: qcom: Update maintainers entry Manivannan Sadhasivam
@ 2023-02-23 9:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-23 9:36 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, lpieralisi, robh, kw,
krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree
On 22/02/2023 16:32, Manivannan Sadhasivam wrote:
> Stan is no longer working with MMSOL and expressed his interest to not
> continue maintaining Qcom PCIe driver. Since I took over the driver
> maintainership, I'm stepping in to maintain the binding also.
>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 02/11] dt-bindings: PCI: qcom: Add iommu properties
2023-02-22 15:32 ` [PATCH 02/11] dt-bindings: PCI: qcom: Add iommu properties Manivannan Sadhasivam
@ 2023-02-23 9:37 ` Krzysztof Kozlowski
2023-02-23 13:02 ` Manivannan Sadhasivam
0 siblings, 1 reply; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-23 9:37 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, lpieralisi, robh, kw,
krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree
On 22/02/2023 16:32, Manivannan Sadhasivam wrote:
> Most of the PCIe controllers require iommu support to function properly.
> So let's add them to the binding.
>
If most of them require iommu, why not adding it as a required property
to respective (or new) "if:then:" part?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 03/11] dt-bindings: PCI: qcom: Add SDX55 SoC
2023-02-22 15:32 ` [PATCH 03/11] dt-bindings: PCI: qcom: Add SDX55 SoC Manivannan Sadhasivam
@ 2023-02-23 9:38 ` Krzysztof Kozlowski
0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-23 9:38 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, lpieralisi, robh, kw,
krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree
On 22/02/2023 16:32, Manivannan Sadhasivam wrote:
> Add support for the PCIe controller on the Qcom SDX55 SoC to the binding.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 04/11] dt-bindings: PCI: qcom-ep: Fix the unit address used in example
2023-02-22 15:32 ` [PATCH 04/11] dt-bindings: PCI: qcom-ep: Fix the unit address used in example Manivannan Sadhasivam
@ 2023-02-23 9:38 ` Krzysztof Kozlowski
0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-23 9:38 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, lpieralisi, robh, kw,
krzysztof.kozlowski+dt, vkoul
Cc: konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree
On 22/02/2023 16:32, Manivannan Sadhasivam wrote:
> Unit address of PCIe EP node should be 0x1c00000 as it has to match the
> first address specified in the reg property.
>
> Fixes: 31c9ef002580 ("dt-bindings: PCI: Add Qualcomm PCIe Endpoint controller")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 02/11] dt-bindings: PCI: qcom: Add iommu properties
2023-02-23 9:37 ` Krzysztof Kozlowski
@ 2023-02-23 13:02 ` Manivannan Sadhasivam
0 siblings, 0 replies; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-23 13:02 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul,
konrad.dybcio, bhelgaas, kishon, linux-arm-msm, linux-phy,
linux-kernel, linux-pci, devicetree
On Thu, Feb 23, 2023 at 10:37:27AM +0100, Krzysztof Kozlowski wrote:
> On 22/02/2023 16:32, Manivannan Sadhasivam wrote:
> > Most of the PCIe controllers require iommu support to function properly.
> > So let's add them to the binding.
> >
>
> If most of them require iommu, why not adding it as a required property
> to respective (or new) "if:then:" part?
>
Well, I thought about it but then followed the convention of
"dma-coherent" property. I asked this same question while adding that
property but I didn't get a clear answer (or maybe I missed something).
So if you want me to add iommu properties to individual SoCs, then please
explain why the same cannot be done for "dma-coherent" as not all SoCs
support dma coherency for PCIe controllers.
Thanks,
Mani
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 05/11] ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node
2023-02-22 16:02 ` Konrad Dybcio
@ 2023-02-23 13:04 ` Manivannan Sadhasivam
0 siblings, 0 replies; 22+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-23 13:04 UTC (permalink / raw)
To: Konrad Dybcio
Cc: andersson, lpieralisi, robh, kw, krzysztof.kozlowski+dt, vkoul,
bhelgaas, kishon, linux-arm-msm, linux-phy, linux-kernel,
linux-pci, devicetree
On Wed, Feb 22, 2023 at 05:02:08PM +0100, Konrad Dybcio wrote:
>
>
> On 22.02.2023 16:32, Manivannan Sadhasivam wrote:
> > Unit address of PCIe EP node should be 0x1c00000 as it has to match the
> > first address specified in the reg property.
> >
> > This also requires sorting the node in the ascending order.
> >
> > Fixes: 31c9ef002580 ("dt-bindings: PCI: Add Qualcomm PCIe Endpoint controller")
> Unsure, we aren't fixing the bindings..
>
Err... will fix the tag in next version.
Thanks,
Mani
>
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> For the dt change:
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>
> Konrad
> > arch/arm/boot/dts/qcom-sdx55.dtsi | 78 +++++++++++++++----------------
> > 1 file changed, 39 insertions(+), 39 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi
> > index 93d71aff3fab..e84ca795cae6 100644
> > --- a/arch/arm/boot/dts/qcom-sdx55.dtsi
> > +++ b/arch/arm/boot/dts/qcom-sdx55.dtsi
> > @@ -303,6 +303,45 @@ qpic_nand: nand-controller@1b30000 {
> > status = "disabled";
> > };
> >
> > + pcie_ep: pcie-ep@1c00000 {
> > + compatible = "qcom,sdx55-pcie-ep";
> > + reg = <0x01c00000 0x3000>,
> > + <0x40000000 0xf1d>,
> > + <0x40000f20 0xc8>,
> > + <0x40001000 0x1000>,
> > + <0x40200000 0x100000>,
> > + <0x01c03000 0x3000>;
> > + reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
> > + "mmio";
> > +
> > + qcom,perst-regs = <&tcsr 0xb258 0xb270>;
> > +
> > + clocks = <&gcc GCC_PCIE_AUX_CLK>,
> > + <&gcc GCC_PCIE_CFG_AHB_CLK>,
> > + <&gcc GCC_PCIE_MSTR_AXI_CLK>,
> > + <&gcc GCC_PCIE_SLV_AXI_CLK>,
> > + <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
> > + <&gcc GCC_PCIE_SLEEP_CLK>,
> > + <&gcc GCC_PCIE_0_CLKREF_CLK>;
> > + clock-names = "aux", "cfg", "bus_master", "bus_slave",
> > + "slave_q2a", "sleep", "ref";
> > +
> > + interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "global", "doorbell";
> > + reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
> > + wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
> > + resets = <&gcc GCC_PCIE_BCR>;
> > + reset-names = "core";
> > + power-domains = <&gcc PCIE_GDSC>;
> > + phys = <&pcie0_lane>;
> > + phy-names = "pciephy";
> > + max-link-speed = <3>;
> > + num-lanes = <2>;
> > +
> > + status = "disabled";
> > + };
> > +
> > pcie0_phy: phy@1c07000 {
> > compatible = "qcom,sdx55-qmp-pcie-phy";
> > reg = <0x01c07000 0x1c4>;
> > @@ -400,45 +439,6 @@ sdhc_1: mmc@8804000 {
> > status = "disabled";
> > };
> >
> > - pcie_ep: pcie-ep@40000000 {
> > - compatible = "qcom,sdx55-pcie-ep";
> > - reg = <0x01c00000 0x3000>,
> > - <0x40000000 0xf1d>,
> > - <0x40000f20 0xc8>,
> > - <0x40001000 0x1000>,
> > - <0x40200000 0x100000>,
> > - <0x01c03000 0x3000>;
> > - reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
> > - "mmio";
> > -
> > - qcom,perst-regs = <&tcsr 0xb258 0xb270>;
> > -
> > - clocks = <&gcc GCC_PCIE_AUX_CLK>,
> > - <&gcc GCC_PCIE_CFG_AHB_CLK>,
> > - <&gcc GCC_PCIE_MSTR_AXI_CLK>,
> > - <&gcc GCC_PCIE_SLV_AXI_CLK>,
> > - <&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
> > - <&gcc GCC_PCIE_SLEEP_CLK>,
> > - <&gcc GCC_PCIE_0_CLKREF_CLK>;
> > - clock-names = "aux", "cfg", "bus_master", "bus_slave",
> > - "slave_q2a", "sleep", "ref";
> > -
> > - interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
> > - <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
> > - interrupt-names = "global", "doorbell";
> > - reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
> > - wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
> > - resets = <&gcc GCC_PCIE_BCR>;
> > - reset-names = "core";
> > - power-domains = <&gcc PCIE_GDSC>;
> > - phys = <&pcie0_lane>;
> > - phy-names = "pciephy";
> > - max-link-speed = <3>;
> > - num-lanes = <2>;
> > -
> > - status = "disabled";
> > - };
> > -
> > remoteproc_mpss: remoteproc@4080000 {
> > compatible = "qcom,sdx55-mpss-pas";
> > reg = <0x04080000 0x4040>;
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2023-02-23 13:04 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-22 15:32 [PATCH 00/11] Add PCIe RC support to Qcom SDX55 SoC Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 01/11] dt-bindings: PCI: qcom: Update maintainers entry Manivannan Sadhasivam
2023-02-23 9:36 ` Krzysztof Kozlowski
2023-02-22 15:32 ` [PATCH 02/11] dt-bindings: PCI: qcom: Add iommu properties Manivannan Sadhasivam
2023-02-23 9:37 ` Krzysztof Kozlowski
2023-02-23 13:02 ` Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 03/11] dt-bindings: PCI: qcom: Add SDX55 SoC Manivannan Sadhasivam
2023-02-23 9:38 ` Krzysztof Kozlowski
2023-02-22 15:32 ` [PATCH 04/11] dt-bindings: PCI: qcom-ep: Fix the unit address used in example Manivannan Sadhasivam
2023-02-23 9:38 ` Krzysztof Kozlowski
2023-02-22 15:32 ` [PATCH 05/11] ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node Manivannan Sadhasivam
2023-02-22 16:02 ` Konrad Dybcio
2023-02-23 13:04 ` Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 06/11] ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane} Manivannan Sadhasivam
2023-02-22 16:45 ` Konrad Dybcio
2023-02-22 15:32 ` [PATCH 07/11] ARM: dts: qcom: sdx55: Add support for PCIe RC controller Manivannan Sadhasivam
2023-02-22 16:03 ` Konrad Dybcio
2023-02-22 15:32 ` [PATCH 08/11] ARM: dts: qcom: sdx55-t55: Enable PCIe RC support Manivannan Sadhasivam
2023-02-22 16:04 ` Konrad Dybcio
2023-02-22 15:32 ` [PATCH 09/11] phy: qcom-qmp-pcie: Split out EP related init sequence for SDX55 Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 10/11] phy: qcom-qmp-pcie: Add RC " Manivannan Sadhasivam
2023-02-22 15:32 ` [PATCH 11/11] PCI: qcom: Add support for SDX55 SoC Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).