mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Add PCIe EP support for SDX65
@ 2023-03-08 13:35 Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 1/5] dt-bindings: PCI: qcom: Add SDX65 SoC Rohit Agarwal
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Rohit Agarwal @ 2023-03-08 13:35 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, mani, lpieralisi, kw, bhelgaas,
	manivannan.sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, Rohit Agarwal

Hi,

Changes in v3:
 - Removing the applied patch.
 - Addressing some of the compile time issues missed in v2.

Changes in v2:
 - Addressing comments from Konrad and Dmitry.
 - Rebased on top of 6.3-rc1.

This series adds the devicetree support for PCIe PHY and PCIe EP on SDX65.
The PCIe EP is enabled on SDX65 MTP board.

Thanks,
Rohit.

Rohit Agarwal (5):
  dt-bindings: PCI: qcom: Add SDX65 SoC
  ARM: dts: qcom: sdx65: Add support for PCIe PHY
  ARM: dts: qcom: sdx65: Add support for PCIe EP
  ARM: dts: qcom: sdx65-mtp: Enable PCIe PHY
  ARM: dts: qcom: sdx65-mtp: Enable PCIe EP

 .../devicetree/bindings/pci/qcom,pcie-ep.yaml      |  2 +
 arch/arm/boot/dts/qcom-sdx65-mtp.dts               | 47 ++++++++++-
 arch/arm/boot/dts/qcom-sdx65.dtsi                  | 90 ++++++++++++++++++++++
 3 files changed, 136 insertions(+), 3 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 1/5] dt-bindings: PCI: qcom: Add SDX65 SoC
  2023-03-08 13:35 [PATCH v3 0/5] Add PCIe EP support for SDX65 Rohit Agarwal
@ 2023-03-08 13:35 ` Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 2/5] ARM: dts: qcom: sdx65: Add support for PCIe PHY Rohit Agarwal
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Rohit Agarwal @ 2023-03-08 13:35 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, mani, lpieralisi, kw, bhelgaas,
	manivannan.sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, Rohit Agarwal

Add PCIe EP compatible string for SDX65 SoC.

Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
index 89cfdee..096540b 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
@@ -13,6 +13,7 @@ properties:
   compatible:
     enum:
       - qcom,sdx55-pcie-ep
+      - qcom,sdx65-pcie-ep
       - qcom,sm8450-pcie-ep
 
   reg:
@@ -109,6 +110,7 @@ allOf:
           contains:
             enum:
               - qcom,sdx55-pcie-ep
+              - qcom,sdx65-pcie-ep
     then:
       properties:
         clocks:
-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 2/5] ARM: dts: qcom: sdx65: Add support for PCIe PHY
  2023-03-08 13:35 [PATCH v3 0/5] Add PCIe EP support for SDX65 Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 1/5] dt-bindings: PCI: qcom: Add SDX65 SoC Rohit Agarwal
@ 2023-03-08 13:35 ` Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 3/5] ARM: dts: qcom: sdx65: Add support for PCIe EP Rohit Agarwal
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Rohit Agarwal @ 2023-03-08 13:35 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, mani, lpieralisi, kw, bhelgaas,
	manivannan.sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, Rohit Agarwal

Add devicetree support for PCIe PHY used in SDX65 platform. This PHY is
used by the PCIe EP controller.

Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
 arch/arm/boot/dts/qcom-sdx65.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom-sdx65.dtsi
index 192f9f9..084daf8 100644
--- a/arch/arm/boot/dts/qcom-sdx65.dtsi
+++ b/arch/arm/boot/dts/qcom-sdx65.dtsi
@@ -293,6 +293,37 @@
 			status = "disabled";
 		};
 
+		pcie_phy: phy@1c06000 {
+			compatible = "qcom,sdx65-qmp-gen4x2-pcie-phy";
+			reg = <0x01c06000 0x2000>;
+
+			clocks = <&gcc GCC_PCIE_AUX_PHY_CLK_SRC>,
+				 <&gcc GCC_PCIE_CFG_AHB_CLK>,
+				 <&gcc GCC_PCIE_0_CLKREF_EN>,
+				 <&gcc GCC_PCIE_RCHNG_PHY_CLK>,
+				 <&gcc GCC_PCIE_PIPE_CLK>;
+			clock-names = "aux",
+				      "cfg_ahb",
+				      "ref",
+				      "rchng",
+				      "pipe";
+
+			resets = <&gcc GCC_PCIE_PHY_BCR>;
+			reset-names = "phy";
+
+			assigned-clocks = <&gcc GCC_PCIE_RCHNG_PHY_CLK>;
+			assigned-clock-rates = <100000000>;
+
+			power-domains = <&gcc PCIE_GDSC>;
+
+			#clock-cells = <0>;
+			clock-output-names = "pcie_pipe_clk";
+
+			#phy-cells = <0>;
+
+			status = "disabled";
+		};
+
 		tcsr_mutex: hwlock@1f40000 {
 			compatible = "qcom,tcsr-mutex";
 			reg = <0x01f40000 0x40000>;
-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 3/5] ARM: dts: qcom: sdx65: Add support for PCIe EP
  2023-03-08 13:35 [PATCH v3 0/5] Add PCIe EP support for SDX65 Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 1/5] dt-bindings: PCI: qcom: Add SDX65 SoC Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 2/5] ARM: dts: qcom: sdx65: Add support for PCIe PHY Rohit Agarwal
@ 2023-03-08 13:35 ` Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 4/5] ARM: dts: qcom: sdx65-mtp: Enable PCIe PHY Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 5/5] ARM: dts: qcom: sdx65-mtp: Enable PCIe EP Rohit Agarwal
  4 siblings, 0 replies; 6+ messages in thread
From: Rohit Agarwal @ 2023-03-08 13:35 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, mani, lpieralisi, kw, bhelgaas,
	manivannan.sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, Rohit Agarwal

Add support for PCIe Endpoint controller on the
Qualcomm SDX65 platform.

Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
 arch/arm/boot/dts/qcom-sdx65.dtsi | 59 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom-sdx65.dtsi
index 084daf8..47d7379 100644
--- a/arch/arm/boot/dts/qcom-sdx65.dtsi
+++ b/arch/arm/boot/dts/qcom-sdx65.dtsi
@@ -11,6 +11,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/qcom-rpmpd.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	#address-cells = <1>;
@@ -293,6 +294,59 @@
 			status = "disabled";
 		};
 
+		pcie_ep: pcie-ep@1c00000 {
+			compatible = "qcom,sdx65-pcie-ep", "qcom,sdx55-pcie-ep";
+			reg = <0x01c00000 0x3000>,
+			      <0x40000000 0xf1d>,
+			      <0x40000f20 0xa8>,
+			      <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_EN>;
+			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 = <&pcie_phy>;
+			phy-names = "pcie-phy";
+
+			max-link-speed = <3>;
+			num-lanes = <2>;
+
+			status = "disabled";
+		};
+
 		pcie_phy: phy@1c06000 {
 			compatible = "qcom,sdx65-qmp-gen4x2-pcie-phy";
 			reg = <0x01c06000 0x2000>;
@@ -330,6 +384,11 @@
 			#hwlock-cells = <1>;
 		};
 
+		tcsr: syscon@1fcb000 {
+			compatible = "qcom,sdx65-tcsr", "syscon";
+			reg = <0x01fc0000 0x1000>;
+		};
+
 		remoteproc_mpss: remoteproc@4080000 {
 			compatible = "qcom,sdx55-mpss-pas";
 			reg = <0x04080000 0x4040>;
-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 4/5] ARM: dts: qcom: sdx65-mtp: Enable PCIe PHY
  2023-03-08 13:35 [PATCH v3 0/5] Add PCIe EP support for SDX65 Rohit Agarwal
                   ` (2 preceding siblings ...)
  2023-03-08 13:35 ` [PATCH v3 3/5] ARM: dts: qcom: sdx65: Add support for PCIe EP Rohit Agarwal
@ 2023-03-08 13:35 ` Rohit Agarwal
  2023-03-08 13:35 ` [PATCH v3 5/5] ARM: dts: qcom: sdx65-mtp: Enable PCIe EP Rohit Agarwal
  4 siblings, 0 replies; 6+ messages in thread
From: Rohit Agarwal @ 2023-03-08 13:35 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, mani, lpieralisi, kw, bhelgaas,
	manivannan.sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, Rohit Agarwal

Enable PCIe PHY on SDX65 MTP for PCIe EP. While at it,
updating status as last property for each node.

Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
 arch/arm/boot/dts/qcom-sdx65-mtp.dts | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-sdx65-mtp.dts b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
index ed98c83..70720e6 100644
--- a/arch/arm/boot/dts/qcom-sdx65-mtp.dts
+++ b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
@@ -245,6 +245,13 @@
 	status = "okay";
 };
 
+&pcie_phy {
+	vdda-phy-supply = <&vreg_l1b_1p2>;
+	vdda-pll-supply = <&vreg_l4b_0p88>;
+
+	status = "okay";
+};
+
 &qpic_bam {
 	status = "okay";
 };
@@ -265,8 +272,9 @@
 };
 
 &remoteproc_mpss {
-	status = "okay";
 	memory-region = <&mpss_adsp_mem>;
+
+	status = "okay";
 };
 
 &usb {
@@ -278,14 +286,16 @@
 };
 
 &usb_hsphy {
-	status = "okay";
 	vdda-pll-supply = <&vreg_l4b_0p88>;
 	vdda33-supply = <&vreg_l10b_3p08>;
 	vdda18-supply = <&vreg_l5b_1p8>;
+
+	status = "okay";
 };
 
 &usb_qmpphy {
-	status = "okay";
 	vdda-phy-supply = <&vreg_l4b_0p88>;
 	vdda-pll-supply = <&vreg_l1b_1p2>;
+
+	status = "okay";
 };
-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 5/5] ARM: dts: qcom: sdx65-mtp: Enable PCIe EP
  2023-03-08 13:35 [PATCH v3 0/5] Add PCIe EP support for SDX65 Rohit Agarwal
                   ` (3 preceding siblings ...)
  2023-03-08 13:35 ` [PATCH v3 4/5] ARM: dts: qcom: sdx65-mtp: Enable PCIe PHY Rohit Agarwal
@ 2023-03-08 13:35 ` Rohit Agarwal
  4 siblings, 0 replies; 6+ messages in thread
From: Rohit Agarwal @ 2023-03-08 13:35 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lee, robh+dt,
	krzysztof.kozlowski+dt, mani, lpieralisi, kw, bhelgaas,
	manivannan.sadhasivam
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, Rohit Agarwal

Enable PCIe Endpoint controller on the SDX65 MTP board based
on Qualcomm SDX65 platform.

Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
 arch/arm/boot/dts/qcom-sdx65-mtp.dts | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-sdx65-mtp.dts b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
index 70720e6..13c71f5 100644
--- a/arch/arm/boot/dts/qcom-sdx65-mtp.dts
+++ b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
@@ -245,6 +245,14 @@
 	status = "okay";
 };
 
+&pcie_ep {
+	pinctrl-0 = <&pcie_ep_clkreq_default &pcie_ep_perst_default
+			&pcie_ep_wake_default>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
 &pcie_phy {
 	vdda-phy-supply = <&vreg_l1b_1p2>;
 	vdda-pll-supply = <&vreg_l4b_0p88>;
@@ -277,6 +285,29 @@
 	status = "okay";
 };
 
+&tlmm {
+	pcie_ep_clkreq_default: pcie-ep-clkreq-default-state {
+		pins = "gpio56";
+		function = "pcie_clkreq";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	pcie_ep_perst_default: pcie-ep-perst-default-state {
+		pins = "gpio57";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	pcie_ep_wake_default: pcie-ep-wake-default-state {
+		pins = "gpio53";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+};
+
 &usb {
 	status = "okay";
 };
-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-08 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-08 13:35 [PATCH v3 0/5] Add PCIe EP support for SDX65 Rohit Agarwal
2023-03-08 13:35 ` [PATCH v3 1/5] dt-bindings: PCI: qcom: Add SDX65 SoC Rohit Agarwal
2023-03-08 13:35 ` [PATCH v3 2/5] ARM: dts: qcom: sdx65: Add support for PCIe PHY Rohit Agarwal
2023-03-08 13:35 ` [PATCH v3 3/5] ARM: dts: qcom: sdx65: Add support for PCIe EP Rohit Agarwal
2023-03-08 13:35 ` [PATCH v3 4/5] ARM: dts: qcom: sdx65-mtp: Enable PCIe PHY Rohit Agarwal
2023-03-08 13:35 ` [PATCH v3 5/5] ARM: dts: qcom: sdx65-mtp: Enable PCIe EP Rohit Agarwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®