linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] pci: qcom: drop unrelated clock and add link_down reset for sa8775p
@ 2025-06-25  9:00 Ziyue Zhang
  2025-06-25  9:00 ` [PATCH v3 1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings Ziyue Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Ziyue Zhang @ 2025-06-25  9:00 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, linux-phy,
	qiang.yu, quic_krichai, quic_vbadigan, Ziyue Zhang

This series drop gcc_aux_clock in pcie phy, the pcie aux clock should 
be gcc_phy_aux_clock. And sa8775p platform support link_down reset in
hardware, so add it for both pcie0 and pcie1 to provide a better user
experience.

Have follwing changes:
  - Update pcie phy bindings for sa8775p.
  - Document link_down reset.
  - Remove aux clock from pcie phy.
  - Add link_down reset for pcie.

Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com>

Changes in v3:
- Update phy bindings, remove phy_aux clock (Johan)
- Update DT binding's description (Johan)
- Link to v2: https://lore.kernel.org/all/20250617021617.2793902-1-quic_ziyuzhan@quicinc.com/

Changes in v2:
- Change link_down reset from optional to mandatory(Konrad)
- Link to v1: https://lore.kernel.org/all/20250529035416.4159963-1-quic_ziyuzhan@quicinc.com/

Ziyue Zhang (4):
  dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings
  dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset
  arm64: dts: qcom: sa8775p: remove aux clock from pcie phy
  arm64: dts: qcom: sa8775p: add link_down reset for pcie

 .../bindings/pci/qcom,pcie-sa8775p.yaml       | 13 ++++--
 .../phy/qcom,sc8280xp-qmp-pcie-phy.yaml       |  7 ++--
 arch/arm64/boot/dts/qcom/sa8775p.dtsi         | 42 ++++++++++++-------
 3 files changed, 38 insertions(+), 24 deletions(-)


base-commit: 5d4809e25903ab8e74034c1f23c787fd26d52934
-- 
2.34.1


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

* [PATCH v3 1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings
  2025-06-25  9:00 [PATCH v3 0/4] pci: qcom: drop unrelated clock and add link_down reset for sa8775p Ziyue Zhang
@ 2025-06-25  9:00 ` Ziyue Zhang
  2025-06-27  9:27   ` Johan Hovold
  2025-06-25  9:00 ` [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset Ziyue Zhang
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: Ziyue Zhang @ 2025-06-25  9:00 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, linux-phy,
	qiang.yu, quic_krichai, quic_vbadigan, Ziyue Zhang

The gcc_aux_clk is required by the PCIe controller but not by the PCIe
PHY. In PCIe PHY, the source of aux_clk used in low-power mode should
be gcc_phy_aux_clk. Hence, remove gcc_aux_clk and replace it with
gcc_phy_aux_clk.

Removed the phy_aux clock from the PCIe PHY binding as it is no longer
used by any instance.

Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com>
---
 .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml           | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
index 2c6c9296e4c0..57b16444eb0e 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
@@ -54,7 +54,7 @@ properties:
 
   clocks:
     minItems: 5
-    maxItems: 7
+    maxItems: 6
 
   clock-names:
     minItems: 5
@@ -65,7 +65,6 @@ properties:
       - enum: [rchng, refgen]
       - const: pipe
       - const: pipediv2
-      - const: phy_aux
 
   power-domains:
     maxItems: 1
@@ -176,6 +175,8 @@ allOf:
           contains:
             enum:
               - qcom,qcs615-qmp-gen3x1-pcie-phy
+              - qcom,sa8775p-qmp-gen4x2-pcie-phy
+              - qcom,sa8775p-qmp-gen4x4-pcie-phy
               - qcom,sc8280xp-qmp-gen3x1-pcie-phy
               - qcom,sc8280xp-qmp-gen3x2-pcie-phy
               - qcom,sc8280xp-qmp-gen3x4-pcie-phy
@@ -197,8 +198,6 @@ allOf:
           contains:
             enum:
               - qcom,qcs8300-qmp-gen4x2-pcie-phy
-              - qcom,sa8775p-qmp-gen4x2-pcie-phy
-              - qcom,sa8775p-qmp-gen4x4-pcie-phy
     then:
       properties:
         clocks:
-- 
2.34.1


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

* [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset
  2025-06-25  9:00 [PATCH v3 0/4] pci: qcom: drop unrelated clock and add link_down reset for sa8775p Ziyue Zhang
  2025-06-25  9:00 ` [PATCH v3 1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings Ziyue Zhang
@ 2025-06-25  9:00 ` Ziyue Zhang
  2025-06-27  7:08   ` Krzysztof Kozlowski
  2025-06-27  9:28   ` Johan Hovold
  2025-06-25  9:00 ` [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy Ziyue Zhang
  2025-06-25  9:00 ` [PATCH v3 4/4] arm64: dts: qcom: sa8775p: add link_down reset for pcie Ziyue Zhang
  3 siblings, 2 replies; 16+ messages in thread
From: Ziyue Zhang @ 2025-06-25  9:00 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, linux-phy,
	qiang.yu, quic_krichai, quic_vbadigan, Ziyue Zhang

Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
document it.

Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com>
---
 .../devicetree/bindings/pci/qcom,pcie-sa8775p.yaml  | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
index 4b91b5608013..510c9e1c28e1 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
@@ -66,11 +66,14 @@ properties:
       - const: global
 
   resets:
-    maxItems: 1
+    items:
+      - description: PCIe controller reset
+      - description: PCIe link down reset
 
   reset-names:
     items:
-      - const: pci
+      - const: pci # PCIe core reset
+      - const: link_down # PCIe link down reset
 
 required:
   - interconnects
@@ -166,8 +169,10 @@ examples:
 
             power-domains = <&gcc PCIE_0_GDSC>;
 
-            resets = <&gcc GCC_PCIE_0_BCR>;
-            reset-names = "pci";
+            resets = <&gcc GCC_PCIE_0_BCR>,
+                     <&gcc GCC_PCIE_0_LINK_DOWN_BCR>;
+            reset-names = "pci",
+                          "link_down";
 
             perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
             wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
-- 
2.34.1


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

* [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy
  2025-06-25  9:00 [PATCH v3 0/4] pci: qcom: drop unrelated clock and add link_down reset for sa8775p Ziyue Zhang
  2025-06-25  9:00 ` [PATCH v3 1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings Ziyue Zhang
  2025-06-25  9:00 ` [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset Ziyue Zhang
@ 2025-06-25  9:00 ` Ziyue Zhang
  2025-06-27 14:50   ` Konrad Dybcio
  2025-06-25  9:00 ` [PATCH v3 4/4] arm64: dts: qcom: sa8775p: add link_down reset for pcie Ziyue Zhang
  3 siblings, 1 reply; 16+ messages in thread
From: Ziyue Zhang @ 2025-06-25  9:00 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, linux-phy,
	qiang.yu, quic_krichai, quic_vbadigan, Ziyue Zhang

gcc_aux_clk is used in PCIe RC and it is not required in pcie phy, in
pcie phy it should be gcc_phy_aux_clk, so remove gcc_aux_clk and
replace it with gcc_phy_aux_clk.

Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sa8775p.dtsi | 28 +++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index fed34717460f..731bd80fc806 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -7707,16 +7707,18 @@ pcie0_phy: phy@1c04000 {
 		compatible = "qcom,sa8775p-qmp-gen4x2-pcie-phy";
 		reg = <0x0 0x1c04000 0x0 0x2000>;
 
-		clocks = <&gcc GCC_PCIE_0_AUX_CLK>,
+		clocks = <&gcc GCC_PCIE_0_PHY_AUX_CLK>,
 			 <&gcc GCC_PCIE_0_CFG_AHB_CLK>,
 			 <&gcc GCC_PCIE_CLKREF_EN>,
 			 <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>,
 			 <&gcc GCC_PCIE_0_PIPE_CLK>,
-			 <&gcc GCC_PCIE_0_PIPEDIV2_CLK>,
-			 <&gcc GCC_PCIE_0_PHY_AUX_CLK>;
-
-		clock-names = "aux", "cfg_ahb", "ref", "rchng", "pipe",
-			      "pipediv2", "phy_aux";
+			 <&gcc GCC_PCIE_0_PIPEDIV2_CLK>;
+		clock-names = "aux",
+			      "cfg_ahb",
+			      "ref",
+			      "rchng",
+			      "pipe",
+			      "pipediv2";
 
 		assigned-clocks = <&gcc GCC_PCIE_0_PHY_RCHNG_CLK>;
 		assigned-clock-rates = <100000000>;
@@ -7873,16 +7875,18 @@ pcie1_phy: phy@1c14000 {
 		compatible = "qcom,sa8775p-qmp-gen4x4-pcie-phy";
 		reg = <0x0 0x1c14000 0x0 0x4000>;
 
-		clocks = <&gcc GCC_PCIE_1_AUX_CLK>,
+		clocks = <&gcc GCC_PCIE_1_PHY_AUX_CLK>,
 			 <&gcc GCC_PCIE_1_CFG_AHB_CLK>,
 			 <&gcc GCC_PCIE_CLKREF_EN>,
 			 <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>,
 			 <&gcc GCC_PCIE_1_PIPE_CLK>,
-			 <&gcc GCC_PCIE_1_PIPEDIV2_CLK>,
-			 <&gcc GCC_PCIE_1_PHY_AUX_CLK>;
-
-		clock-names = "aux", "cfg_ahb", "ref", "rchng", "pipe",
-			      "pipediv2", "phy_aux";
+			 <&gcc GCC_PCIE_1_PIPEDIV2_CLK>;
+		clock-names = "aux",
+			      "cfg_ahb",
+			      "ref",
+			      "rchng",
+			      "pipe",
+			      "pipediv2";
 
 		assigned-clocks = <&gcc GCC_PCIE_1_PHY_RCHNG_CLK>;
 		assigned-clock-rates = <100000000>;
-- 
2.34.1


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

* [PATCH v3 4/4] arm64: dts: qcom: sa8775p: add link_down reset for pcie
  2025-06-25  9:00 [PATCH v3 0/4] pci: qcom: drop unrelated clock and add link_down reset for sa8775p Ziyue Zhang
                   ` (2 preceding siblings ...)
  2025-06-25  9:00 ` [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy Ziyue Zhang
@ 2025-06-25  9:00 ` Ziyue Zhang
  3 siblings, 0 replies; 16+ messages in thread
From: Ziyue Zhang @ 2025-06-25  9:00 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, linux-phy,
	qiang.yu, quic_krichai, quic_vbadigan, Ziyue Zhang, Konrad Dybcio

SA8775p supports 'link_down' reset on hardware, so add it for both pcie0
and pcie1, which can provide a better user experience.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sa8775p.dtsi | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 731bd80fc806..d0a6303cb133 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -7635,8 +7635,11 @@ pcie0: pcie@1c00000 {
 		iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
 			    <0x100 &pcie_smmu 0x0001 0x1>;
 
-		resets = <&gcc GCC_PCIE_0_BCR>;
-		reset-names = "pci";
+		resets = <&gcc GCC_PCIE_0_BCR>,
+			 <&gcc GCC_PCIE_0_LINK_DOWN_BCR>;
+		reset-names = "pci",
+			      "link_down";
+
 		power-domains = <&gcc PCIE_0_GDSC>;
 
 		phys = <&pcie0_phy>;
@@ -7803,8 +7806,11 @@ pcie1: pcie@1c10000 {
 		iommu-map = <0x0 &pcie_smmu 0x0080 0x1>,
 			    <0x100 &pcie_smmu 0x0081 0x1>;
 
-		resets = <&gcc GCC_PCIE_1_BCR>;
-		reset-names = "pci";
+		resets = <&gcc GCC_PCIE_1_BCR>,
+			 <&gcc GCC_PCIE_1_LINK_DOWN_BCR>;
+		reset-names = "pci",
+			      "link_down";
+
 		power-domains = <&gcc PCIE_1_GDSC>;
 
 		phys = <&pcie1_phy>;
-- 
2.34.1


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

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset
  2025-06-25  9:00 ` [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset Ziyue Zhang
@ 2025-06-27  7:08   ` Krzysztof Kozlowski
  2025-07-11  8:26     ` Ziyue Zhang
  2025-06-27  9:28   ` Johan Hovold
  1 sibling, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2025-06-27  7:08 UTC (permalink / raw)
  To: Ziyue Zhang
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan

On Wed, Jun 25, 2025 at 05:00:46PM +0800, Ziyue Zhang wrote:
> Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
> document it.

This is an ABI break, so you need to clearly express it and explain the
impact. Following previous Qualcomm feedback we cannot give review to
imperfect commits, because this would be precedent to accept such
imperfectness in the future.

Therefore follow all standard rules about ABI.

Best regards,
Krzysztof


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

* Re: [PATCH v3 1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings
  2025-06-25  9:00 ` [PATCH v3 1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings Ziyue Zhang
@ 2025-06-27  9:27   ` Johan Hovold
  0 siblings, 0 replies; 16+ messages in thread
From: Johan Hovold @ 2025-06-27  9:27 UTC (permalink / raw)
  To: Ziyue Zhang
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan

On Wed, Jun 25, 2025 at 05:00:45PM +0800, Ziyue Zhang wrote:
> The gcc_aux_clk is required by the PCIe controller but not by the PCIe
> PHY. In PCIe PHY, the source of aux_clk used in low-power mode should
> be gcc_phy_aux_clk. Hence, remove gcc_aux_clk and replace it with
> gcc_phy_aux_clk.
> 
> Removed the phy_aux clock from the PCIe PHY binding as it is no longer
> used by any instance.

Please add the Fixes tags I mentioned earlier which identifies the
commits that added the bogus clock.

> Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com>
> ---
>  .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml           | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
> index 2c6c9296e4c0..57b16444eb0e 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
> @@ -54,7 +54,7 @@ properties:
>  
>    clocks:
>      minItems: 5
> -    maxItems: 7
> +    maxItems: 6

You remove the last user of the bogus clock (qcs8300) in a separate
series so you should keep it until then.

>    clock-names:
>      minItems: 5
> @@ -65,7 +65,6 @@ properties:
>        - enum: [rchng, refgen]
>        - const: pipe
>        - const: pipediv2
> -      - const: phy_aux
>  
>    power-domains:
>      maxItems: 1
> @@ -176,6 +175,8 @@ allOf:
>            contains:
>              enum:
>                - qcom,qcs615-qmp-gen3x1-pcie-phy
> +              - qcom,sa8775p-qmp-gen4x2-pcie-phy
> +              - qcom,sa8775p-qmp-gen4x4-pcie-phy
>                - qcom,sc8280xp-qmp-gen3x1-pcie-phy
>                - qcom,sc8280xp-qmp-gen3x2-pcie-phy
>                - qcom,sc8280xp-qmp-gen3x4-pcie-phy
> @@ -197,8 +198,6 @@ allOf:
>            contains:
>              enum:
>                - qcom,qcs8300-qmp-gen4x2-pcie-phy

                   ^

> -              - qcom,sa8775p-qmp-gen4x2-pcie-phy
> -              - qcom,sa8775p-qmp-gen4x4-pcie-phy

Johan

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

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset
  2025-06-25  9:00 ` [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset Ziyue Zhang
  2025-06-27  7:08   ` Krzysztof Kozlowski
@ 2025-06-27  9:28   ` Johan Hovold
  1 sibling, 0 replies; 16+ messages in thread
From: Johan Hovold @ 2025-06-27  9:28 UTC (permalink / raw)
  To: Ziyue Zhang
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan

On Wed, Jun 25, 2025 at 05:00:46PM +0800, Ziyue Zhang wrote:
> Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
> document it.

Please describe what this reset does here as I asked you to earlier.

> Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com>
> ---
>  .../devicetree/bindings/pci/qcom,pcie-sa8775p.yaml  | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
> index 4b91b5608013..510c9e1c28e1 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
> @@ -66,11 +66,14 @@ properties:
>        - const: global
>  
>    resets:
> -    maxItems: 1
> +    items:
> +      - description: PCIe controller reset
> +      - description: PCIe link down reset
>  
>    reset-names:
>      items:
> -      - const: pci
> +      - const: pci # PCIe core reset
> +      - const: link_down # PCIe link down reset

I think you can drop the comments since you already describe the resets
above.

Johan

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

* Re: [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy
  2025-06-25  9:00 ` [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy Ziyue Zhang
@ 2025-06-27 14:50   ` Konrad Dybcio
  2025-07-10  9:43     ` Johan Hovold
  0 siblings, 1 reply; 16+ messages in thread
From: Konrad Dybcio @ 2025-06-27 14:50 UTC (permalink / raw)
  To: Ziyue Zhang, andersson, konradybcio, robh, krzk+dt, conor+dt,
	jingoohan1, mani, lpieralisi, kwilczynski, bhelgaas, johan+linaro,
	vkoul, kishon, neil.armstrong, abel.vesa, kw
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-pci, linux-phy,
	qiang.yu, quic_krichai, quic_vbadigan

On 6/25/25 11:00 AM, Ziyue Zhang wrote:
> gcc_aux_clk is used in PCIe RC and it is not required in pcie phy, in
> pcie phy it should be gcc_phy_aux_clk, so remove gcc_aux_clk and
> replace it with gcc_phy_aux_clk.

GCC_PCIE_n_PHY_AUX_CLK is a downstream of the PHY's output..
are you sure the PHY should be **consuming** it too?

Konrad

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

* Re: [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy
  2025-06-27 14:50   ` Konrad Dybcio
@ 2025-07-10  9:43     ` Johan Hovold
  2025-07-10 10:24       ` Ziyue Zhang
  0 siblings, 1 reply; 16+ messages in thread
From: Johan Hovold @ 2025-07-10  9:43 UTC (permalink / raw)
  To: Konrad Dybcio, Ziyue Zhang
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan

On Fri, Jun 27, 2025 at 04:50:57PM +0200, Konrad Dybcio wrote:
> On 6/25/25 11:00 AM, Ziyue Zhang wrote:
> > gcc_aux_clk is used in PCIe RC and it is not required in pcie phy, in
> > pcie phy it should be gcc_phy_aux_clk, so remove gcc_aux_clk and
> > replace it with gcc_phy_aux_clk.
> 
> GCC_PCIE_n_PHY_AUX_CLK is a downstream of the PHY's output..
> are you sure the PHY should be **consuming** it too?

Could we get a reply here, please? 

A bunch of Qualcomm SoCs in mainline do exactly this currently even
though it may not be correct (and some downstream dts do not use these
clocks).

Johan

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

* Re: [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy
  2025-07-10  9:43     ` Johan Hovold
@ 2025-07-10 10:24       ` Ziyue Zhang
  2025-07-10 10:44         ` Johan Hovold
  2025-07-15 11:47         ` Konrad Dybcio
  0 siblings, 2 replies; 16+ messages in thread
From: Ziyue Zhang @ 2025-07-10 10:24 UTC (permalink / raw)
  To: Johan Hovold, Konrad Dybcio
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan


On 7/10/2025 5:43 PM, Johan Hovold wrote:
> On Fri, Jun 27, 2025 at 04:50:57PM +0200, Konrad Dybcio wrote:
>> On 6/25/25 11:00 AM, Ziyue Zhang wrote:
>>> gcc_aux_clk is used in PCIe RC and it is not required in pcie phy, in
>>> pcie phy it should be gcc_phy_aux_clk, so remove gcc_aux_clk and
>>> replace it with gcc_phy_aux_clk.
>> GCC_PCIE_n_PHY_AUX_CLK is a downstream of the PHY's output..
>> are you sure the PHY should be **consuming** it too?
> Could we get a reply here, please?
>
> A bunch of Qualcomm SoCs in mainline do exactly this currently even
> though it may not be correct (and some downstream dts do not use these
> clocks).
>
> Johan

Hi Johan

After reviewing the downstream platforms, it seems that GCC_PCIE_n_PHY_AUX_CLK
is generally needed. Would you mind letting us know if there are any platforms
where this clock is not required?


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

* Re: [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy
  2025-07-10 10:24       ` Ziyue Zhang
@ 2025-07-10 10:44         ` Johan Hovold
  2025-07-15 11:47         ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Johan Hovold @ 2025-07-10 10:44 UTC (permalink / raw)
  To: Ziyue Zhang
  Cc: Konrad Dybcio, andersson, konradybcio, robh, krzk+dt, conor+dt,
	jingoohan1, mani, lpieralisi, kwilczynski, bhelgaas, johan+linaro,
	vkoul, kishon, neil.armstrong, abel.vesa, kw, linux-arm-msm,
	devicetree, linux-kernel, linux-pci, linux-phy, qiang.yu,
	quic_krichai, quic_vbadigan

On Thu, Jul 10, 2025 at 06:24:57PM +0800, Ziyue Zhang wrote:
> 
> On 7/10/2025 5:43 PM, Johan Hovold wrote:
> > On Fri, Jun 27, 2025 at 04:50:57PM +0200, Konrad Dybcio wrote:
> >> On 6/25/25 11:00 AM, Ziyue Zhang wrote:
> >>> gcc_aux_clk is used in PCIe RC and it is not required in pcie phy, in
> >>> pcie phy it should be gcc_phy_aux_clk, so remove gcc_aux_clk and
> >>> replace it with gcc_phy_aux_clk.
> >> GCC_PCIE_n_PHY_AUX_CLK is a downstream of the PHY's output..
> >> are you sure the PHY should be **consuming** it too?
> > Could we get a reply here, please?
> >
> > A bunch of Qualcomm SoCs in mainline do exactly this currently even
> > though it may not be correct (and some downstream dts do not use these
> > clocks).

> After reviewing the downstream platforms, it seems that GCC_PCIE_n_PHY_AUX_CLK
> is generally needed. Would you mind letting us know if there are any platforms
> where this clock is not required?

Thanks for clarifying. I was think of sc8280xp where the downstream dt
did not use this clock (and therefore neither is the dt in mainline
currently). Looking again now it seems that clock may not even exist on
this platform?

Johan

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

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset
  2025-06-27  7:08   ` Krzysztof Kozlowski
@ 2025-07-11  8:26     ` Ziyue Zhang
  2025-07-11  8:44       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 16+ messages in thread
From: Ziyue Zhang @ 2025-07-11  8:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan


On 6/27/2025 3:08 PM, Krzysztof Kozlowski wrote:
> On Wed, Jun 25, 2025 at 05:00:46PM +0800, Ziyue Zhang wrote:
>> Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
>> document it.
> This is an ABI break, so you need to clearly express it and explain the
> impact. Following previous Qualcomm feedback we cannot give review to
> imperfect commits, because this would be precedent to accept such
> imperfectness in the future.
>
> Therefore follow all standard rules about ABI.
>
> Best regards,
> Krzysztof

Hi Krzysztof


This does not break the ABI. In the Qualcomm PCIe driver, we use the APIs
devm_reset_control_array_get_exclusive, reset_control_assert, and
reset_control_deassert to handle the resets defined in the device tree.
Regardless of how many resets are provided in the DTS, these three APIs
treat them as an array and operate on all of them collectively.
Therefore, adding a new reset does not affect the existing ABI behavior.

BRs
Ziyue


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

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset
  2025-07-11  8:26     ` Ziyue Zhang
@ 2025-07-11  8:44       ` Krzysztof Kozlowski
  2025-07-11  9:57         ` Konrad Dybcio
  0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-11  8:44 UTC (permalink / raw)
  To: Ziyue Zhang
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan

On 11/07/2025 10:26, Ziyue Zhang wrote:
> 
> On 6/27/2025 3:08 PM, Krzysztof Kozlowski wrote:
>> On Wed, Jun 25, 2025 at 05:00:46PM +0800, Ziyue Zhang wrote:
>>> Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
>>> document it.
>> This is an ABI break, so you need to clearly express it and explain the
>> impact. Following previous Qualcomm feedback we cannot give review to
>> imperfect commits, because this would be precedent to accept such
>> imperfectness in the future.
>>
>> Therefore follow all standard rules about ABI.
>>
>> Best regards,
>> Krzysztof
> 
> Hi Krzysztof
> 
> 
> This does not break the ABI. In the Qualcomm PCIe driver, we use the APIs
> devm_reset_control_array_get_exclusive, reset_control_assert, and

I see in the binding requirement of 1 reset before and after your patch:
requirement of two reset lines.

This is an ABI change. My entire comment stays valid, so don't just
deflect it but resolve it.

Best regards,
Krzysztof

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

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset
  2025-07-11  8:44       ` Krzysztof Kozlowski
@ 2025-07-11  9:57         ` Konrad Dybcio
  0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-07-11  9:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Ziyue Zhang
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan

On 7/11/25 10:44 AM, Krzysztof Kozlowski wrote:
> On 11/07/2025 10:26, Ziyue Zhang wrote:
>>
>> On 6/27/2025 3:08 PM, Krzysztof Kozlowski wrote:
>>> On Wed, Jun 25, 2025 at 05:00:46PM +0800, Ziyue Zhang wrote:
>>>> Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
>>>> document it.
>>> This is an ABI break, so you need to clearly express it and explain the
>>> impact. Following previous Qualcomm feedback we cannot give review to
>>> imperfect commits, because this would be precedent to accept such
>>> imperfectness in the future.
>>>
>>> Therefore follow all standard rules about ABI.
>>>
>>> Best regards,
>>> Krzysztof
>>
>> Hi Krzysztof
>>
>>
>> This does not break the ABI. In the Qualcomm PCIe driver, we use the APIs
>> devm_reset_control_array_get_exclusive, reset_control_assert, and
> 
> I see in the binding requirement of 1 reset before and after your patch:
> requirement of two reset lines.
> 
> This is an ABI change. My entire comment stays valid, so don't just
> deflect it but resolve it.

Ziyue, the change is good, but it needs a better explanation.

Try something like:

SA8775P PCIe RCs include two reset lines: a core one ("pci") used
to reset most of the block, and a "link_down" one, used to ABCDXYZ.

As the latter was omitted with the initial submisison, describe it.
Because ABCDXYZ is not required for most of the block's functionality,
devicetrees lacking it will not see much of a difference - it is
however required to ensure maximum robustness when shutting down the
core.

----

Note that there are physically more reset lines going to/near the RC,
but many of them are either inaccessible to the OS, or very much
should never ever be. This is the case with most hw blocks, so don't
be surprised if you see a list with more than these two. I believe
"pci" and "link_down" are the only ones intended for OS consumption.

You can see some of that bleeding out to Linux on e.g. some IPQ
platforms that don't have a separate MCU (some flavor of RPM) that
would do the bus management.

Konrad

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

* Re: [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy
  2025-07-10 10:24       ` Ziyue Zhang
  2025-07-10 10:44         ` Johan Hovold
@ 2025-07-15 11:47         ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-07-15 11:47 UTC (permalink / raw)
  To: Ziyue Zhang, Johan Hovold
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, jingoohan1, mani,
	lpieralisi, kwilczynski, bhelgaas, johan+linaro, vkoul, kishon,
	neil.armstrong, abel.vesa, kw, linux-arm-msm, devicetree,
	linux-kernel, linux-pci, linux-phy, qiang.yu, quic_krichai,
	quic_vbadigan

On 7/10/25 12:24 PM, Ziyue Zhang wrote:
> 
> On 7/10/2025 5:43 PM, Johan Hovold wrote:
>> On Fri, Jun 27, 2025 at 04:50:57PM +0200, Konrad Dybcio wrote:
>>> On 6/25/25 11:00 AM, Ziyue Zhang wrote:
>>>> gcc_aux_clk is used in PCIe RC and it is not required in pcie phy, in
>>>> pcie phy it should be gcc_phy_aux_clk, so remove gcc_aux_clk and
>>>> replace it with gcc_phy_aux_clk.
>>> GCC_PCIE_n_PHY_AUX_CLK is a downstream of the PHY's output..
>>> are you sure the PHY should be **consuming** it too?
>> Could we get a reply here, please?
>>
>> A bunch of Qualcomm SoCs in mainline do exactly this currently even
>> though it may not be correct (and some downstream dts do not use these
>> clocks).
>>
>> Johan
> 
> Hi Johan
> 
> After reviewing the downstream platforms, it seems that GCC_PCIE_n_PHY_AUX_CLK
> is generally needed. Would you mind letting us know if there are any platforms
> where this clock is not required?

Do you base this on "downstream has it", or did you check with the
relevant folks internally? I'm still unconvinced by the clock looping back
to the PHY.

Konrad

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

end of thread, other threads:[~2025-07-15 11:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-25  9:00 [PATCH v3 0/4] pci: qcom: drop unrelated clock and add link_down reset for sa8775p Ziyue Zhang
2025-06-25  9:00 ` [PATCH v3 1/4] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings Ziyue Zhang
2025-06-27  9:27   ` Johan Hovold
2025-06-25  9:00 ` [PATCH v3 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document link_down reset Ziyue Zhang
2025-06-27  7:08   ` Krzysztof Kozlowski
2025-07-11  8:26     ` Ziyue Zhang
2025-07-11  8:44       ` Krzysztof Kozlowski
2025-07-11  9:57         ` Konrad Dybcio
2025-06-27  9:28   ` Johan Hovold
2025-06-25  9:00 ` [PATCH v3 3/4] arm64: dts: qcom: sa8775p: remove aux clock from pcie phy Ziyue Zhang
2025-06-27 14:50   ` Konrad Dybcio
2025-07-10  9:43     ` Johan Hovold
2025-07-10 10:24       ` Ziyue Zhang
2025-07-10 10:44         ` Johan Hovold
2025-07-15 11:47         ` Konrad Dybcio
2025-06-25  9:00 ` [PATCH v3 4/4] arm64: dts: qcom: sa8775p: add link_down reset for pcie Ziyue Zhang

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