devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/5] Add support for PCIe3 on x1e80100
@ 2024-11-01  3:08 Qiang Yu
  2024-11-01  3:08 ` [PATCH v8 1/5] dt-bindings: PCI: qcom: Move OPP table to qcom,pcie-common.yaml Qiang Yu
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Qiang Yu @ 2024-11-01  3:08 UTC (permalink / raw)
  To: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy
  Cc: dmitry.baryshkov, kw, lpieralisi, neil.armstrong, linux-arm-msm,
	linux-phy, linux-kernel, linux-pci, devicetree, linux-clk,
	johan+linaro, Qiang Yu

This series add support for PCIe3 on x1e80100.

PCIe3 needs additional set of clocks, regulators and new set of PCIe QMP
PHY configuration compare other PCIe instances on x1e80100. Hence add
required resource configuration and usage for PCIe3.

v7->v8:
1. Add Reviewed-by tags
2. Rephrase commit message and remove Fix tags
3. Add Synopsis IP revision and put ops_1_21_0 after ops_1_9_0.
4. Remove  [PATCH v7 1/7] and [PATCH v7 4/7] as they were applied
5. Link to v7: https://lore.kernel.org/all/20241017030412.265000-1-quic_qianyu@quicinc.com/

v6->v7:
1. Add Acked-by and Reviewed-by tags
2. Use 70574511f3f ("PCI: qcom: Add support for SC8280XP") in Fixes tag
3. Keep minItem of interrupt as 8 in buindings
4. Reword commit msg 
5. Remove [PATCH v6 5/8] clk: qcom: gcc-x1e80100: Fix halt_check for
   pipediv2 clocks as it was applied
6. Link to v6: https://lore.kernel.org/linux-pci/20241011104142.1181773-1-quic_qianyu@quicinc.com/

v5->v6:
1. Add Fixes tag
2. Split [PATCH v5 6/7] into two patches
3. Reword commit msg
4. Link to v5: https://lore.kernel.org/linux-pci/20241009091540.1446-1-quic_qianyu@quicinc.com/

v4->v5:
1. Add Reviewed-by tag
2. Expand and clarify usage of txz/rxz in commit message
3. Add comments that txz/rxz must be programmed before tx/rx
4. Change the sort order for phy register tbls
5. Use the order defined in struct qmp_phy_cfg_tbls for phy register tbls
   presented in x1e80100_qmp_gen4x8_pciephy_cfg
6. Add Fixes and CC stable tag
7. Fix ops for SC8280X and X1E80100
8. Document global interrupt in bindings
9. Link to v4: https://lore.kernel.org/all/20240924101444.3933828-1-quic_qianyu@quicinc.com/

v3->v4:
1. Reword commit msg of [PATCH v3 5/6]
2. Drop opp-table property from qcom,pcie-sm8450.yaml
3. Add Reviewed-by tag
4. Link to v3: https://lore.kernel.org/all/20240923125713.3411487-1-quic_qianyu@quicinc.com/

v2->v3:
1. Use 'Gen 4 x8' in commit msg
2. Move opp-table property to qcom,pcie-common.yaml
3. Add Reviewed-by tag
4. Add global interrupt and use GIC_SPI for the parent interrupt specifier
5. Use 0x0 in reg property and use pcie@ for pcie3 device node
6. Show different IP version v6.30 in commit msg
7. Add logic in controller driver to have new ops for x1e80100
8. Link to v2: https://lore.kernel.org/all/20240913083724.1217691-1-quic_qianyu@quicinc.com/

v2->v1:
1. Squash [PATCH 1/8], [PATCH 2/8],[PATCH 3/8] into one patch and make the
   indentation consistent.
2. Put dts patch at the end of the patchset.
3. Put dt-binding patch at the first of the patchset.
4. Add a new patch where opp-table is added in dt-binding to avoid dtbs
   checking error.
5. Remove GCC_PCIE_3_AUX_CLK, RPMH_CXO_CLK, put in TCSR_PCIE_8L_CLKREF_EN
   as ref.
6. Remove lane_broadcasting.
7. Add 64 bit bar, Remove GCC_PCIE_3_PIPE_CLK_SRC, 
   GCC_CFG_NOC_PCIE_ANOC_SOUTH_AHB_CLK is changed to
   GCC_CFG_NOC_PCIE_ANOC_NORTH_AHB_CLK.
8. Add Reviewed-by tag.
9. Remove [PATCH 7/8], [PATCH 8/8].
10. Link to v1: https://lore.kernel.org/all/20240827063631.3932971-1-quic_qianyu@quicinc.com/ 

Qiang Yu (5):
  dt-bindings: PCI: qcom: Move OPP table to qcom,pcie-common.yaml
  dt-bindings: PCI: qcom,pcie-x1e80100: Add 'global' interrupt
  PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC
  PCI: qcom: Disable ASPM L0s for X1E80100
  arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100

 .../bindings/pci/qcom,pcie-common.yaml        |   4 +
 .../bindings/pci/qcom,pcie-sm8450.yaml        |   4 -
 .../bindings/pci/qcom,pcie-x1e80100.yaml      |   9 +-
 arch/arm64/boot/dts/qcom/x1e80100.dtsi        | 204 +++++++++++++++++-
 drivers/pci/controller/dwc/pcie-qcom.c        |  14 +-
 5 files changed, 225 insertions(+), 10 deletions(-)

-- 
2.34.1


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

* [PATCH v8 1/5] dt-bindings: PCI: qcom: Move OPP table to qcom,pcie-common.yaml
  2024-11-01  3:08 [PATCH v8 0/5] Add support for PCIe3 on x1e80100 Qiang Yu
@ 2024-11-01  3:08 ` Qiang Yu
  2024-11-01  3:08 ` [PATCH v8 2/5] dt-bindings: PCI: qcom,pcie-x1e80100: Add 'global' interrupt Qiang Yu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Qiang Yu @ 2024-11-01  3:08 UTC (permalink / raw)
  To: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy
  Cc: dmitry.baryshkov, kw, lpieralisi, neil.armstrong, linux-arm-msm,
	linux-phy, linux-kernel, linux-pci, devicetree, linux-clk,
	johan+linaro, Qiang Yu, Krzysztof Kozlowski

OPP table is a generic property that is also required by other qcom
platforms. Hence move this property to qcom,pcie-common.yaml so that PCIe
on other qcom platforms is able to adjust power domain performance state
and ICC peak bw according to PCIe gen speed and link width.

Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml | 4 ++++
 Documentation/devicetree/bindings/pci/qcom,pcie-sm8450.yaml | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
index e18900c41576..0480c58f7d99 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
@@ -81,6 +81,10 @@ properties:
   vddpe-3v3-supply:
     description: PCIe endpoint power supply
 
+  operating-points-v2: true
+  opp-table:
+    type: object
+
 required:
   - reg
   - reg-names
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sm8450.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sm8450.yaml
index 46bd59eefadb..6e0a6d8f0ed0 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-sm8450.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sm8450.yaml
@@ -70,10 +70,6 @@ properties:
       - const: msi7
       - const: global
 
-  operating-points-v2: true
-  opp-table:
-    type: object
-
   resets:
     maxItems: 1
 
-- 
2.34.1


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

* [PATCH v8 2/5] dt-bindings: PCI: qcom,pcie-x1e80100: Add 'global' interrupt
  2024-11-01  3:08 [PATCH v8 0/5] Add support for PCIe3 on x1e80100 Qiang Yu
  2024-11-01  3:08 ` [PATCH v8 1/5] dt-bindings: PCI: qcom: Move OPP table to qcom,pcie-common.yaml Qiang Yu
@ 2024-11-01  3:08 ` Qiang Yu
  2024-11-01  3:09 ` [PATCH v8 3/5] PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC Qiang Yu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Qiang Yu @ 2024-11-01  3:08 UTC (permalink / raw)
  To: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy
  Cc: dmitry.baryshkov, kw, lpieralisi, neil.armstrong, linux-arm-msm,
	linux-phy, linux-kernel, linux-pci, devicetree, linux-clk,
	johan+linaro, Qiang Yu, Krzysztof Kozlowski

Qcom PCIe RC controllers are capable of generating 'global' SPI interrupt
to the host CPU. This interrupt can be used by the device driver to handle
PCIe link specific events such as Link up and Link down, which give the
driver a chance to start bus enumeration on its own when link is up and
initiate link training if link goes to a bad state. The PCIe driver can
still work without this interrupt but it will provide a nice user
experience when device gets plugged and removed.

Hence, document it in the binding along with the existing MSI interrupts.
Global interrupt is parsed as optional in driver, so adding it in bindings
will not break the ABI.

Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/pci/qcom,pcie-x1e80100.yaml      | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-x1e80100.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-x1e80100.yaml
index a9db0a231563..257068a18264 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-x1e80100.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-x1e80100.yaml
@@ -47,9 +47,10 @@ properties:
 
   interrupts:
     minItems: 8
-    maxItems: 8
+    maxItems: 9
 
   interrupt-names:
+    minItems: 8
     items:
       - const: msi0
       - const: msi1
@@ -59,6 +60,7 @@ properties:
       - const: msi5
       - const: msi6
       - const: msi7
+      - const: global
 
   resets:
     minItems: 1
@@ -130,9 +132,10 @@ examples:
                          <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
                          <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
                          <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
-                         <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+                         <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
             interrupt-names = "msi0", "msi1", "msi2", "msi3",
-                              "msi4", "msi5", "msi6", "msi7";
+                              "msi4", "msi5", "msi6", "msi7", "global";
             #interrupt-cells = <1>;
             interrupt-map-mask = <0 0 0 0x7>;
             interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
-- 
2.34.1


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

* [PATCH v8 3/5] PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC
  2024-11-01  3:08 [PATCH v8 0/5] Add support for PCIe3 on x1e80100 Qiang Yu
  2024-11-01  3:08 ` [PATCH v8 1/5] dt-bindings: PCI: qcom: Move OPP table to qcom,pcie-common.yaml Qiang Yu
  2024-11-01  3:08 ` [PATCH v8 2/5] dt-bindings: PCI: qcom,pcie-x1e80100: Add 'global' interrupt Qiang Yu
@ 2024-11-01  3:09 ` Qiang Yu
  2024-11-04 14:24   ` Johan Hovold
  2024-11-01  3:09 ` [PATCH v8 4/5] PCI: qcom: Disable ASPM L0s for X1E80100 Qiang Yu
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Qiang Yu @ 2024-11-01  3:09 UTC (permalink / raw)
  To: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy
  Cc: dmitry.baryshkov, kw, lpieralisi, neil.armstrong, linux-arm-msm,
	linux-phy, linux-kernel, linux-pci, devicetree, linux-clk,
	johan+linaro, Qiang Yu

The SC8280XP PCIe devicetree nodes do not specify an 'iommu-map' so the
config_sid() callback is effectively a no-op. Hence introduce a new ops
struct, namely ops_1_21_0 which is same as ops_1_9_0 except that it
doesn't have config_sid() callback to clean it up.

Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/pci/controller/dwc/pcie-qcom.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index ef44a82be058..52e3d71028d8 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1364,6 +1364,16 @@ static const struct qcom_pcie_ops ops_1_9_0 = {
 	.config_sid = qcom_pcie_config_sid_1_9_0,
 };
 
+/* Qcom IP rev.: 1.21.0  Synopsys IP rev.: 5.60a */
+static const struct qcom_pcie_ops ops_1_21_0 = {
+	.get_resources = qcom_pcie_get_resources_2_7_0,
+	.init = qcom_pcie_init_2_7_0,
+	.post_init = qcom_pcie_post_init_2_7_0,
+	.host_post_init = qcom_pcie_host_post_init_2_7_0,
+	.deinit = qcom_pcie_deinit_2_7_0,
+	.ltssm_enable = qcom_pcie_2_3_2_ltssm_enable,
+};
+
 /* Qcom IP rev.: 2.9.0  Synopsys IP rev.: 5.00a */
 static const struct qcom_pcie_ops ops_2_9_0 = {
 	.get_resources = qcom_pcie_get_resources_2_9_0,
@@ -1411,7 +1421,7 @@ static const struct qcom_pcie_cfg cfg_2_9_0 = {
 };
 
 static const struct qcom_pcie_cfg cfg_sc8280xp = {
-	.ops = &ops_1_9_0,
+	.ops = &ops_1_21_0,
 	.no_l0s = true,
 };
 
-- 
2.34.1


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

* [PATCH v8 4/5] PCI: qcom: Disable ASPM L0s for X1E80100
  2024-11-01  3:08 [PATCH v8 0/5] Add support for PCIe3 on x1e80100 Qiang Yu
                   ` (2 preceding siblings ...)
  2024-11-01  3:09 ` [PATCH v8 3/5] PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC Qiang Yu
@ 2024-11-01  3:09 ` Qiang Yu
  2024-11-04 14:29   ` Johan Hovold
  2024-11-01  3:09 ` [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100 Qiang Yu
  2024-11-03 21:04 ` [PATCH v8 0/5] " Krzysztof Wilczyński
  5 siblings, 1 reply; 17+ messages in thread
From: Qiang Yu @ 2024-11-01  3:09 UTC (permalink / raw)
  To: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy
  Cc: dmitry.baryshkov, kw, lpieralisi, neil.armstrong, linux-arm-msm,
	linux-phy, linux-kernel, linux-pci, devicetree, linux-clk,
	johan+linaro, Qiang Yu

Currently, the cfg_1_9_0 which is being used for X1E80100 doesn't disable
ASPM L0s. However, hardware team recommends to disable L0s as the PHY init
sequence is not tuned support L0s. Hence reuse cfg_sc8280xp for X1E80100.

Note that the config_sid() callback is not present in cfg_sc8280xp, don't
concern about this because config_sid() callback is originally a no-op
for X1E80100.

Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/pci/controller/dwc/pcie-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 52e3d71028d8..16af237663ec 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1853,7 +1853,7 @@ static const struct of_device_id qcom_pcie_match[] = {
 	{ .compatible = "qcom,pcie-sm8450-pcie0", .data = &cfg_1_9_0 },
 	{ .compatible = "qcom,pcie-sm8450-pcie1", .data = &cfg_1_9_0 },
 	{ .compatible = "qcom,pcie-sm8550", .data = &cfg_1_9_0 },
-	{ .compatible = "qcom,pcie-x1e80100", .data = &cfg_1_9_0 },
+	{ .compatible = "qcom,pcie-x1e80100", .data = &cfg_sc8280xp },
 	{ }
 };
 
-- 
2.34.1


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

* [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100
  2024-11-01  3:08 [PATCH v8 0/5] Add support for PCIe3 on x1e80100 Qiang Yu
                   ` (3 preceding siblings ...)
  2024-11-01  3:09 ` [PATCH v8 4/5] PCI: qcom: Disable ASPM L0s for X1E80100 Qiang Yu
@ 2024-11-01  3:09 ` Qiang Yu
  2024-11-04 14:35   ` Johan Hovold
  2024-11-03 21:04 ` [PATCH v8 0/5] " Krzysztof Wilczyński
  5 siblings, 1 reply; 17+ messages in thread
From: Qiang Yu @ 2024-11-01  3:09 UTC (permalink / raw)
  To: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy
  Cc: dmitry.baryshkov, kw, lpieralisi, neil.armstrong, linux-arm-msm,
	linux-phy, linux-kernel, linux-pci, devicetree, linux-clk,
	johan+linaro, Qiang Yu

Describe PCIe3 controller and PHY. Also add required system resources like
regulators, clocks, interrupts and registers configuration for PCIe3.

Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 204 ++++++++++++++++++++++++-
 1 file changed, 203 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 99f8bee10a38..c48fb505fb32 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -743,7 +743,7 @@ gcc: clock-controller@100000 {
 
 			clocks = <&bi_tcxo_div2>,
 				 <&sleep_clk>,
-				 <0>,
+				 <&pcie3_phy>,
 				 <&pcie4_phy>,
 				 <&pcie5_phy>,
 				 <&pcie6a_phy>,
@@ -2906,6 +2906,208 @@ mmss_noc: interconnect@1780000 {
 			#interconnect-cells = <2>;
 		};
 
+		pcie3: pcie@1bd0000 {
+			device_type = "pci";
+			compatible = "qcom,pcie-x1e80100";
+			reg = <0x0 0x01bd0000 0x0 0x3000>,
+			      <0x0 0x78000000 0x0 0xf1d>,
+			      <0x0 0x78000f40 0x0 0xa8>,
+			      <0x0 0x78001000 0x0 0x1000>,
+			      <0x0 0x78100000 0x0 0x100000>,
+			      <0x0 0x01bd3000 0x0 0x1000>;
+			reg-names = "parf",
+				    "dbi",
+				    "elbi",
+				    "atu",
+				    "config",
+				    "mhi";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			ranges = <0x01000000 0x0 0x00000000 0x0 0x78200000 0x0 0x100000>,
+				 <0x02000000 0x0 0x78300000 0x0 0x78300000 0x0 0x3d00000>,
+				 <0x03000000 0x7 0x40000000 0x7 0x40000000 0x0 0x40000000>;
+			bus-range = <0x00 0xff>;
+
+			dma-coherent;
+
+			linux,pci-domain = <3>;
+			num-lanes = <8>;
+
+			interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 769 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 836 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 671 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "msi0",
+					  "msi1",
+					  "msi2",
+					  "msi3",
+					  "msi4",
+					  "msi5",
+					  "msi6",
+					  "msi7",
+					  "global";
+
+			#interrupt-cells = <1>;
+			interrupt-map-mask = <0 0 0 0x7>;
+			interrupt-map = <0 0 0 1 &intc 0 0 GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
+					<0 0 0 2 &intc 0 0 GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>,
+					<0 0 0 3 &intc 0 0 GIC_SPI 237 IRQ_TYPE_LEVEL_HIGH>,
+					<0 0 0 4 &intc 0 0 GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
+
+			clocks = <&gcc GCC_PCIE_3_AUX_CLK>,
+				 <&gcc GCC_PCIE_3_CFG_AHB_CLK>,
+				 <&gcc GCC_PCIE_3_MSTR_AXI_CLK>,
+				 <&gcc GCC_PCIE_3_SLV_AXI_CLK>,
+				 <&gcc GCC_PCIE_3_SLV_Q2A_AXI_CLK>,
+				 <&gcc GCC_CFG_NOC_PCIE_ANOC_NORTH_AHB_CLK>,
+				 <&gcc GCC_CNOC_PCIE_NORTH_SF_AXI_CLK>;
+			clock-names = "aux",
+				      "cfg",
+				      "bus_master",
+				      "bus_slave",
+				      "slave_q2a",
+				      "noc_aggr",
+				      "cnoc_sf_axi";
+
+			assigned-clocks = <&gcc GCC_PCIE_3_AUX_CLK>;
+			assigned-clock-rates = <19200000>;
+
+			interconnects = <&pcie_south_anoc MASTER_PCIE_3 QCOM_ICC_TAG_ALWAYS
+					 &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+					<&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+					 &cnoc_main SLAVE_PCIE_3 QCOM_ICC_TAG_ALWAYS>;
+			interconnect-names = "pcie-mem",
+					     "cpu-pcie";
+
+			resets = <&gcc GCC_PCIE_3_BCR>,
+				 <&gcc GCC_PCIE_3_LINK_DOWN_BCR>;
+			reset-names = "pci",
+				      "link_down";
+
+			power-domains = <&gcc GCC_PCIE_3_GDSC>;
+
+			phys = <&pcie3_phy>;
+			phy-names = "pciephy";
+
+			operating-points-v2 = <&pcie3_opp_table>;
+
+			status = "disabled";
+
+			pcie3_opp_table: opp-table {
+				compatible = "operating-points-v2";
+
+				/* GEN 1 x1 */
+				opp-2500000 {
+					opp-hz = /bits/ 64 <2500000>;
+					required-opps = <&rpmhpd_opp_low_svs>;
+					opp-peak-kBps = <250000 1>;
+				};
+
+				/* GEN 1 x2 and GEN 2 x1 */
+				opp-5000000 {
+					opp-hz = /bits/ 64 <5000000>;
+					required-opps = <&rpmhpd_opp_low_svs>;
+					opp-peak-kBps = <500000 1>;
+				};
+
+				/* GEN 1 x4 and GEN 2 x2 */
+				opp-10000000 {
+					opp-hz = /bits/ 64 <10000000>;
+					required-opps = <&rpmhpd_opp_low_svs>;
+					opp-peak-kBps = <1000000 1>;
+				};
+
+				/* GEN 1 x8 and GEN 2 x4 */
+				opp-20000000 {
+					opp-hz = /bits/ 64 <20000000>;
+					required-opps = <&rpmhpd_opp_low_svs>;
+					opp-peak-kBps = <2000000 1>;
+				};
+
+				/* GEN 2 x8 */
+				opp-40000000 {
+					opp-hz = /bits/ 64 <40000000>;
+					required-opps = <&rpmhpd_opp_low_svs>;
+					opp-peak-kBps = <4000000 1>;
+				};
+
+				/* GEN 3 x1 */
+				opp-8000000 {
+					opp-hz = /bits/ 64 <8000000>;
+					required-opps = <&rpmhpd_opp_svs>;
+					opp-peak-kBps = <984500 1>;
+				};
+
+				/* GEN 3 x2 and GEN 4 x1 */
+				opp-16000000 {
+					opp-hz = /bits/ 64 <16000000>;
+					required-opps = <&rpmhpd_opp_svs>;
+					opp-peak-kBps = <1969000 1>;
+				};
+
+				/* GEN 3 x4 and GEN 4 x2 */
+				opp-32000000 {
+					opp-hz = /bits/ 64 <32000000>;
+					required-opps = <&rpmhpd_opp_svs>;
+					opp-peak-kBps = <3938000 1>;
+				};
+
+				/* GEN 3 x8 and GEN 4 x4 */
+				opp-64000000 {
+					opp-hz = /bits/ 64 <64000000>;
+					required-opps = <&rpmhpd_opp_svs>;
+					opp-peak-kBps = <7876000 1>;
+				};
+
+				/* GEN 4 x8 */
+				opp-128000000 {
+					opp-hz = /bits/ 64 <128000000>;
+					required-opps = <&rpmhpd_opp_svs>;
+					opp-peak-kBps = <15753000 1>;
+				};
+			};
+		};
+
+		pcie3_phy: phy@1be0000 {
+			compatible = "qcom,x1e80100-qmp-gen4x8-pcie-phy";
+			reg = <0 0x01be0000 0 0x10000>;
+
+			clocks = <&gcc GCC_PCIE_3_PHY_AUX_CLK>,
+				 <&gcc GCC_PCIE_3_CFG_AHB_CLK>,
+				 <&tcsr TCSR_PCIE_8L_CLKREF_EN>,
+				 <&gcc GCC_PCIE_3_PHY_RCHNG_CLK>,
+				 <&gcc GCC_PCIE_3_PIPE_CLK>,
+				 <&gcc GCC_PCIE_3_PIPEDIV2_CLK>;
+			clock-names = "aux",
+				      "cfg_ahb",
+				      "ref",
+				      "rchng",
+				      "pipe",
+				      "pipediv2";
+
+			resets = <&gcc GCC_PCIE_3_PHY_BCR>,
+				 <&gcc GCC_PCIE_3_NOCSR_COM_PHY_BCR>;
+			reset-names = "phy",
+				      "phy_nocsr";
+
+			assigned-clocks = <&gcc GCC_PCIE_3_PHY_RCHNG_CLK>;
+			assigned-clock-rates = <100000000>;
+
+			power-domains = <&gcc GCC_PCIE_3_PHY_GDSC>;
+
+			#clock-cells = <0>;
+			clock-output-names = "pcie3_pipe_clk";
+
+			#phy-cells = <0>;
+
+			status = "disabled";
+		};
+
 		pcie6a: pci@1bf8000 {
 			device_type = "pci";
 			compatible = "qcom,pcie-x1e80100";
-- 
2.34.1


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

* Re: [PATCH v8 0/5] Add support for PCIe3 on x1e80100
  2024-11-01  3:08 [PATCH v8 0/5] Add support for PCIe3 on x1e80100 Qiang Yu
                   ` (4 preceding siblings ...)
  2024-11-01  3:09 ` [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100 Qiang Yu
@ 2024-11-03 21:04 ` Krzysztof Wilczyński
  5 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-03 21:04 UTC (permalink / raw)
  To: Qiang Yu
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro

> This series add support for PCIe3 on x1e80100.
> 
> PCIe3 needs additional set of clocks, regulators and new set of PCIe QMP
> PHY configuration compare other PCIe instances on x1e80100. Hence add
> required resource configuration and usage for PCIe3.

Applied to controller/qcom, thank you!

[01/04] dt-bindings: PCI: qcom: Move OPP table to qcom,pcie-common.yaml
        https://git.kernel.org/pci/pci/c/39a06b55df6c

[02/04] dt-bindings: PCI: qcom,pcie-x1e80100: Add 'global' interrupt
        https://git.kernel.org/pci/pci/c/66dc205962c5

[03/04] PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC
        https://git.kernel.org/pci/pci/c/66cc06169fcf

[04/04] PCI: qcom: Disable ASPM L0s for X1E80100
        https://git.kernel.org/pci/pci/c/fc69fb202beb

	Krzysztof

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

* Re: [PATCH v8 3/5] PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC
  2024-11-01  3:09 ` [PATCH v8 3/5] PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC Qiang Yu
@ 2024-11-04 14:24   ` Johan Hovold
  2024-11-04 14:57     ` Krzysztof Wilczyński
  0 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2024-11-04 14:24 UTC (permalink / raw)
  To: Qiang Yu
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, kw, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro

On Thu, Oct 31, 2024 at 08:09:00PM -0700, Qiang Yu wrote:
> The SC8280XP PCIe devicetree nodes do not specify an 'iommu-map' so the
> config_sid() callback is effectively a no-op. Hence introduce a new ops

Would have been good to say something about why there are no 'iommu-map'
properties on sc8280xp (e.g. since it uses an SMMUv3) as Bjorn
suggested.

> struct, namely ops_1_21_0 which is same as ops_1_9_0 except that it
> doesn't have config_sid() callback to clean it up.
> 
> Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

I see that this patch has been picked up now. The above is already much
better and I guess this is good enough for now:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

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

* Re: [PATCH v8 4/5] PCI: qcom: Disable ASPM L0s for X1E80100
  2024-11-01  3:09 ` [PATCH v8 4/5] PCI: qcom: Disable ASPM L0s for X1E80100 Qiang Yu
@ 2024-11-04 14:29   ` Johan Hovold
  2024-11-04 14:59     ` Krzysztof Wilczyński
  0 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2024-11-04 14:29 UTC (permalink / raw)
  To: Qiang Yu
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, kw, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro

On Thu, Oct 31, 2024 at 08:09:01PM -0700, Qiang Yu wrote:
> Currently, the cfg_1_9_0 which is being used for X1E80100 doesn't disable
> ASPM L0s. However, hardware team recommends to disable L0s as the PHY init
> sequence is not tuned support L0s. Hence reuse cfg_sc8280xp for X1E80100.
> 
> Note that the config_sid() callback is not present in cfg_sc8280xp, don't
> concern about this because config_sid() callback is originally a no-op
> for X1E80100.
> 
> Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

This one should also have been marked for backporting:

Fixes: 6d0c39324c5f ("PCI: qcom: Add X1E80100 PCIe support")
Cc: stable@vger.kernel.org	# 6.9

Looks much better now either way:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

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

* Re: [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100
  2024-11-01  3:09 ` [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100 Qiang Yu
@ 2024-11-04 14:35   ` Johan Hovold
  2024-11-05  5:28     ` Qiang Yu
  0 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2024-11-04 14:35 UTC (permalink / raw)
  To: Qiang Yu
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, kw, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro

On Thu, Oct 31, 2024 at 08:09:02PM -0700, Qiang Yu wrote:
> Describe PCIe3 controller and PHY. Also add required system resources like
> regulators, clocks, interrupts and registers configuration for PCIe3.
> 
> Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
 
> +		pcie3: pcie@1bd0000 {
> +			device_type = "pci";
> +			compatible = "qcom,pcie-x1e80100";
> +			reg = <0x0 0x01bd0000 0x0 0x3000>,
> +			      <0x0 0x78000000 0x0 0xf1d>,
> +			      <0x0 0x78000f40 0x0 0xa8>,
> +			      <0x0 0x78001000 0x0 0x1000>,
> +			      <0x0 0x78100000 0x0 0x100000>,
> +			      <0x0 0x01bd3000 0x0 0x1000>;
> +			reg-names = "parf",
> +				    "dbi",
> +				    "elbi",
> +				    "atu",
> +				    "config",
> +				    "mhi";
> +			#address-cells = <3>;
> +			#size-cells = <2>;
> +			ranges = <0x01000000 0x0 0x00000000 0x0 0x78200000 0x0 0x100000>,
> +				 <0x02000000 0x0 0x78300000 0x0 0x78300000 0x0 0x3d00000>,

Can you double check the size here so that it is indeed correct and not
just copied from the other nodes which initially got it wrong:

	https://lore.kernel.org/lkml/20240710-topic-barman-v1-1-5f63fca8d0fc@linaro.org/

> +				 <0x03000000 0x7 0x40000000 0x7 0x40000000 0x0 0x40000000>;
> +			bus-range = <0x00 0xff>;

> +			clocks = <&gcc GCC_PCIE_3_AUX_CLK>,
> +				 <&gcc GCC_PCIE_3_CFG_AHB_CLK>,
> +				 <&gcc GCC_PCIE_3_MSTR_AXI_CLK>,
> +				 <&gcc GCC_PCIE_3_SLV_AXI_CLK>,
> +				 <&gcc GCC_PCIE_3_SLV_Q2A_AXI_CLK>,
> +				 <&gcc GCC_CFG_NOC_PCIE_ANOC_NORTH_AHB_CLK>,
> +				 <&gcc GCC_CNOC_PCIE_NORTH_SF_AXI_CLK>;
> +			clock-names = "aux",
> +				      "cfg",
> +				      "bus_master",
> +				      "bus_slave",
> +				      "slave_q2a",
> +				      "noc_aggr",
> +				      "cnoc_sf_axi";
> +
> +			assigned-clocks = <&gcc GCC_PCIE_3_AUX_CLK>;
> +			assigned-clock-rates = <19200000>;
> +
> +			interconnects = <&pcie_south_anoc MASTER_PCIE_3 QCOM_ICC_TAG_ALWAYS

This should be &pcie_north_anoc

> +					 &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
> +					<&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
> +					 &cnoc_main SLAVE_PCIE_3 QCOM_ICC_TAG_ALWAYS>;
> +			interconnect-names = "pcie-mem",
> +					     "cpu-pcie";

With the above addressed, feel free to keep my Reviewed-by tag.

Johan

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

* Re: [PATCH v8 3/5] PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC
  2024-11-04 14:24   ` Johan Hovold
@ 2024-11-04 14:57     ` Krzysztof Wilczyński
  0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-04 14:57 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Qiang Yu, manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro

Hello,

[...]
> Would have been good to say something about why there are no 'iommu-map'
> properties on sc8280xp (e.g. since it uses an SMMUv3) as Bjorn
> suggested.

Happy to update the commit log directly if there is a consensus about how
the final wording should look like.

> > struct, namely ops_1_21_0 which is same as ops_1_9_0 except that it
> > doesn't have config_sid() callback to clean it up.
> > 
> > Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> 
> I see that this patch has been picked up now. The above is already much
> better and I guess this is good enough for now:
> 
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

Added.  Thank you!

	Krzysztof

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

* Re: [PATCH v8 4/5] PCI: qcom: Disable ASPM L0s for X1E80100
  2024-11-04 14:29   ` Johan Hovold
@ 2024-11-04 14:59     ` Krzysztof Wilczyński
  0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-04 14:59 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Qiang Yu, manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro

Hello,

[...]
> This one should also have been marked for backporting:
> 
> Fixes: 6d0c39324c5f ("PCI: qcom: Add X1E80100 PCIe support")
> Cc: stable@vger.kernel.org	# 6.9

Added.

> Looks much better now either way:
> 
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

Also added.  Thank you!

	Krzysztof

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

* Re: [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100
  2024-11-04 14:35   ` Johan Hovold
@ 2024-11-05  5:28     ` Qiang Yu
  2024-11-11  3:44       ` Qiang Yu
  0 siblings, 1 reply; 17+ messages in thread
From: Qiang Yu @ 2024-11-05  5:28 UTC (permalink / raw)
  To: Johan Hovold
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, kw, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro


On 11/4/2024 10:35 PM, Johan Hovold wrote:
> On Thu, Oct 31, 2024 at 08:09:02PM -0700, Qiang Yu wrote:
>> Describe PCIe3 controller and PHY. Also add required system resources like
>> regulators, clocks, interrupts and registers configuration for PCIe3.
>>
>> Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
>   
>> +		pcie3: pcie@1bd0000 {
>> +			device_type = "pci";
>> +			compatible = "qcom,pcie-x1e80100";
>> +			reg = <0x0 0x01bd0000 0x0 0x3000>,
>> +			      <0x0 0x78000000 0x0 0xf1d>,
>> +			      <0x0 0x78000f40 0x0 0xa8>,
>> +			      <0x0 0x78001000 0x0 0x1000>,
>> +			      <0x0 0x78100000 0x0 0x100000>,
>> +			      <0x0 0x01bd3000 0x0 0x1000>;
>> +			reg-names = "parf",
>> +				    "dbi",
>> +				    "elbi",
>> +				    "atu",
>> +				    "config",
>> +				    "mhi";
>> +			#address-cells = <3>;
>> +			#size-cells = <2>;
>> +			ranges = <0x01000000 0x0 0x00000000 0x0 0x78200000 0x0 0x100000>,
>> +				 <0x02000000 0x0 0x78300000 0x0 0x78300000 0x0 0x3d00000>,
> Can you double check the size here so that it is indeed correct and not
> just copied from the other nodes which initially got it wrong:
>
> 	https://lore.kernel.org/lkml/20240710-topic-barman-v1-1-5f63fca8d0fc@linaro.org/
 From memory maps, region of PCIe3 is 64MB, the size here is correct.

Thanks,
Qiang Yu
>
>> +				 <0x03000000 0x7 0x40000000 0x7 0x40000000 0x0 0x40000000>;
>> +			bus-range = <0x00 0xff>;
>> +			clocks = <&gcc GCC_PCIE_3_AUX_CLK>,
>> +				 <&gcc GCC_PCIE_3_CFG_AHB_CLK>,
>> +				 <&gcc GCC_PCIE_3_MSTR_AXI_CLK>,
>> +				 <&gcc GCC_PCIE_3_SLV_AXI_CLK>,
>> +				 <&gcc GCC_PCIE_3_SLV_Q2A_AXI_CLK>,
>> +				 <&gcc GCC_CFG_NOC_PCIE_ANOC_NORTH_AHB_CLK>,
>> +				 <&gcc GCC_CNOC_PCIE_NORTH_SF_AXI_CLK>;
>> +			clock-names = "aux",
>> +				      "cfg",
>> +				      "bus_master",
>> +				      "bus_slave",
>> +				      "slave_q2a",
>> +				      "noc_aggr",
>> +				      "cnoc_sf_axi";
>> +
>> +			assigned-clocks = <&gcc GCC_PCIE_3_AUX_CLK>;
>> +			assigned-clock-rates = <19200000>;
>> +
>> +			interconnects = <&pcie_south_anoc MASTER_PCIE_3 QCOM_ICC_TAG_ALWAYS
> This should be &pcie_north_anoc
>
>> +					 &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
>> +					<&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
>> +					 &cnoc_main SLAVE_PCIE_3 QCOM_ICC_TAG_ALWAYS>;
>> +			interconnect-names = "pcie-mem",
>> +					     "cpu-pcie";
> With the above addressed, feel free to keep my Reviewed-by tag.
>
> Johan

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

* Re: [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100
  2024-11-05  5:28     ` Qiang Yu
@ 2024-11-11  3:44       ` Qiang Yu
  2024-11-12 17:29         ` Johan Hovold
  0 siblings, 1 reply; 17+ messages in thread
From: Qiang Yu @ 2024-11-11  3:44 UTC (permalink / raw)
  To: Johan Hovold
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, kw, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro


On 11/5/2024 1:28 PM, Qiang Yu wrote:
>
> On 11/4/2024 10:35 PM, Johan Hovold wrote:
>> On Thu, Oct 31, 2024 at 08:09:02PM -0700, Qiang Yu wrote:
>>> Describe PCIe3 controller and PHY. Also add required system 
>>> resources like
>>> regulators, clocks, interrupts and registers configuration for PCIe3.
>>>
>>> Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>>> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
>>> +        pcie3: pcie@1bd0000 {
>>> +            device_type = "pci";
>>> +            compatible = "qcom,pcie-x1e80100";
>>> +            reg = <0x0 0x01bd0000 0x0 0x3000>,
>>> +                  <0x0 0x78000000 0x0 0xf1d>,
>>> +                  <0x0 0x78000f40 0x0 0xa8>,
>>> +                  <0x0 0x78001000 0x0 0x1000>,
>>> +                  <0x0 0x78100000 0x0 0x100000>,
>>> +                  <0x0 0x01bd3000 0x0 0x1000>;
>>> +            reg-names = "parf",
>>> +                    "dbi",
>>> +                    "elbi",
>>> +                    "atu",
>>> +                    "config",
>>> +                    "mhi";
>>> +            #address-cells = <3>;
>>> +            #size-cells = <2>;
>>> +            ranges = <0x01000000 0x0 0x00000000 0x0 0x78200000 0x0 
>>> 0x100000>,
>>> +                 <0x02000000 0x0 0x78300000 0x0 0x78300000 0x0 
>>> 0x3d00000>,
>> Can you double check the size here so that it is indeed correct and not
>> just copied from the other nodes which initially got it wrong:
>>
>>     https://lore.kernel.org/lkml/20240710-topic-barman-v1-1-5f63fca8d0fc@linaro.org/
BTW, regions of PCIe6a, PCIe4, PCIe5 are 64MB, 32MB, 32MB, respectively.
Why range size is set to 0x1d00000 for PCIe6a, any issue is reported on 
PCIe6a?

Thanks,
Qiang Yu
> From memory maps, region of PCIe3 is 64MB, the size here is correct.
>
> Thanks,
> Qiang Yu
>>
>>> +                 <0x03000000 0x7 0x40000000 0x7 0x40000000 0x0 
>>> 0x40000000>;
>>> +            bus-range = <0x00 0xff>;
>>> +            clocks = <&gcc GCC_PCIE_3_AUX_CLK>,
>>> +                 <&gcc GCC_PCIE_3_CFG_AHB_CLK>,
>>> +                 <&gcc GCC_PCIE_3_MSTR_AXI_CLK>,
>>> +                 <&gcc GCC_PCIE_3_SLV_AXI_CLK>,
>>> +                 <&gcc GCC_PCIE_3_SLV_Q2A_AXI_CLK>,
>>> +                 <&gcc GCC_CFG_NOC_PCIE_ANOC_NORTH_AHB_CLK>,
>>> +                 <&gcc GCC_CNOC_PCIE_NORTH_SF_AXI_CLK>;
>>> +            clock-names = "aux",
>>> +                      "cfg",
>>> +                      "bus_master",
>>> +                      "bus_slave",
>>> +                      "slave_q2a",
>>> +                      "noc_aggr",
>>> +                      "cnoc_sf_axi";
>>> +
>>> +            assigned-clocks = <&gcc GCC_PCIE_3_AUX_CLK>;
>>> +            assigned-clock-rates = <19200000>;
>>> +
>>> +            interconnects = <&pcie_south_anoc MASTER_PCIE_3 
>>> QCOM_ICC_TAG_ALWAYS
>> This should be &pcie_north_anoc
>>
>>> +                     &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
>>> +                    <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
>>> +                     &cnoc_main SLAVE_PCIE_3 QCOM_ICC_TAG_ALWAYS>;
>>> +            interconnect-names = "pcie-mem",
>>> +                         "cpu-pcie";
>> With the above addressed, feel free to keep my Reviewed-by tag.
>>
>> Johan

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

* Re: [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100
  2024-11-11  3:44       ` Qiang Yu
@ 2024-11-12 17:29         ` Johan Hovold
  2024-11-13  3:15           ` Qiang Yu
  0 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2024-11-12 17:29 UTC (permalink / raw)
  To: Qiang Yu
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, kw, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro

On Mon, Nov 11, 2024 at 11:44:17AM +0800, Qiang Yu wrote:
> On 11/5/2024 1:28 PM, Qiang Yu wrote:
> > On 11/4/2024 10:35 PM, Johan Hovold wrote:
> >> On Thu, Oct 31, 2024 at 08:09:02PM -0700, Qiang Yu wrote:

> >>> +            ranges = <0x01000000 0x0 0x00000000 0x0 0x78200000 0x0 
> >>> 0x100000>,
> >>> +                 <0x02000000 0x0 0x78300000 0x0 0x78300000 0x0 
> >>> 0x3d00000>,

> >> Can you double check the size here so that it is indeed correct and not
> >> just copied from the other nodes which initially got it wrong:
> >>
> >>     https://lore.kernel.org/lkml/20240710-topic-barman-v1-1-5f63fca8d0fc@linaro.org/

> BTW, regions of PCIe6a, PCIe4, PCIe5 are 64MB, 32MB, 32MB, respectively.
> Why range size is set to 0x1d00000 for PCIe6a, any issue is reported on 
> PCIe6a?

Thanks for checking. It seems the patch linked to above was broken for
PCIe6a then.

We did see PCIe5 probe breaking due to the overlap with PCIe4 but the
patch predates PCIe5 support being posted and merged so it was probably
just based on inspection.

Could you send a fix for PCIe6a?

Johan

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

* Re: [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100
  2024-11-12 17:29         ` Johan Hovold
@ 2024-11-13  3:15           ` Qiang Yu
  2024-11-14 15:25             ` Konrad Dybcio
  0 siblings, 1 reply; 17+ messages in thread
From: Qiang Yu @ 2024-11-13  3:15 UTC (permalink / raw)
  To: Johan Hovold
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, kw, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro


On 11/13/2024 1:29 AM, Johan Hovold wrote:
> On Mon, Nov 11, 2024 at 11:44:17AM +0800, Qiang Yu wrote:
>> On 11/5/2024 1:28 PM, Qiang Yu wrote:
>>> On 11/4/2024 10:35 PM, Johan Hovold wrote:
>>>> On Thu, Oct 31, 2024 at 08:09:02PM -0700, Qiang Yu wrote:
>>>>> +            ranges = <0x01000000 0x0 0x00000000 0x0 0x78200000 0x0
>>>>> 0x100000>,
>>>>> +                 <0x02000000 0x0 0x78300000 0x0 0x78300000 0x0
>>>>> 0x3d00000>,
>>>> Can you double check the size here so that it is indeed correct and not
>>>> just copied from the other nodes which initially got it wrong:
>>>>
>>>>      https://lore.kernel.org/lkml/20240710-topic-barman-v1-1-5f63fca8d0fc@linaro.org/
>> BTW, regions of PCIe6a, PCIe4, PCIe5 are 64MB, 32MB, 32MB, respectively.
>> Why range size is set to 0x1d00000 for PCIe6a, any issue is reported on
>> PCIe6a?
> Thanks for checking. It seems the patch linked to above was broken for
> PCIe6a then.
>
> We did see PCIe5 probe breaking due to the overlap with PCIe4 but the
> patch predates PCIe5 support being posted and merged so it was probably
> just based on inspection.
>
> Could you send a fix for PCIe6a?
Sure, will send the fix.

Thanks,
Qiang Yu
>
> Johan

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

* Re: [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100
  2024-11-13  3:15           ` Qiang Yu
@ 2024-11-14 15:25             ` Konrad Dybcio
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Dybcio @ 2024-11-14 15:25 UTC (permalink / raw)
  To: Qiang Yu, Johan Hovold
  Cc: manivannan.sadhasivam, vkoul, kishon, robh, andersson,
	konradybcio, krzk+dt, conor+dt, mturquette, sboyd, abel.vesa,
	quic_msarkar, quic_devipriy, dmitry.baryshkov, kw, lpieralisi,
	neil.armstrong, linux-arm-msm, linux-phy, linux-kernel, linux-pci,
	devicetree, linux-clk, johan+linaro

On 13.11.2024 4:15 AM, Qiang Yu wrote:
> 
> On 11/13/2024 1:29 AM, Johan Hovold wrote:
>> On Mon, Nov 11, 2024 at 11:44:17AM +0800, Qiang Yu wrote:
>>> On 11/5/2024 1:28 PM, Qiang Yu wrote:
>>>> On 11/4/2024 10:35 PM, Johan Hovold wrote:
>>>>> On Thu, Oct 31, 2024 at 08:09:02PM -0700, Qiang Yu wrote:
>>>>>> +            ranges = <0x01000000 0x0 0x00000000 0x0 0x78200000 0x0
>>>>>> 0x100000>,
>>>>>> +                 <0x02000000 0x0 0x78300000 0x0 0x78300000 0x0
>>>>>> 0x3d00000>,
>>>>> Can you double check the size here so that it is indeed correct and not
>>>>> just copied from the other nodes which initially got it wrong:
>>>>>
>>>>>      https://lore.kernel.org/lkml/20240710-topic-barman-v1-1-5f63fca8d0fc@linaro.org/
>>> BTW, regions of PCIe6a, PCIe4, PCIe5 are 64MB, 32MB, 32MB, respectively.
>>> Why range size is set to 0x1d00000 for PCIe6a, any issue is reported on
>>> PCIe6a?
>> Thanks for checking. It seems the patch linked to above was broken for
>> PCIe6a then.
>>
>> We did see PCIe5 probe breaking due to the overlap with PCIe4 but the
>> patch predates PCIe5 support being posted and merged so it was probably
>> just based on inspection.
>>
>> Could you send a fix for PCIe6a?
> Sure, will send the fix.

So the patch I posted made it match the DSDT/Windows state. I assumed
there must have been something wrong as docs suggested the value that you
did.

But both work. In case any issues pop up, we can revisit this.

Konrad

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

end of thread, other threads:[~2024-11-14 15:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01  3:08 [PATCH v8 0/5] Add support for PCIe3 on x1e80100 Qiang Yu
2024-11-01  3:08 ` [PATCH v8 1/5] dt-bindings: PCI: qcom: Move OPP table to qcom,pcie-common.yaml Qiang Yu
2024-11-01  3:08 ` [PATCH v8 2/5] dt-bindings: PCI: qcom,pcie-x1e80100: Add 'global' interrupt Qiang Yu
2024-11-01  3:09 ` [PATCH v8 3/5] PCI: qcom: Remove BDF2SID mapping config for SC8280X family SoC Qiang Yu
2024-11-04 14:24   ` Johan Hovold
2024-11-04 14:57     ` Krzysztof Wilczyński
2024-11-01  3:09 ` [PATCH v8 4/5] PCI: qcom: Disable ASPM L0s for X1E80100 Qiang Yu
2024-11-04 14:29   ` Johan Hovold
2024-11-04 14:59     ` Krzysztof Wilczyński
2024-11-01  3:09 ` [PATCH v8 5/5] arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100 Qiang Yu
2024-11-04 14:35   ` Johan Hovold
2024-11-05  5:28     ` Qiang Yu
2024-11-11  3:44       ` Qiang Yu
2024-11-12 17:29         ` Johan Hovold
2024-11-13  3:15           ` Qiang Yu
2024-11-14 15:25             ` Konrad Dybcio
2024-11-03 21:04 ` [PATCH v8 0/5] " Krzysztof Wilczyński

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).