devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add missing A2NoC QoS clocks for SDM660 interconnect driver
@ 2021-08-24  4:34 Shawn Guo
  2021-08-24  4:34 ` [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks Shawn Guo
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Shawn Guo @ 2021-08-24  4:34 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: AngeloGioacchino Del Regno, Bjorn Andersson, Dmitry Baryshkov,
	Rob Herring, devicetree, linux-arm-msm, linux-pm, Shawn Guo

The series updates SDM660 interconnect bindings, driver and device tree
to add A2NoC clocks required for QoS registers programming per downstream
kernel[1].  Otherwise, qcom_icc_noc_set_qos_priority() call on mas_ufs or
mas_usb_hs node will simply result in a hardware hang on SDM660 SoC.

Changes for v2:
- Fix dt_binding_check issues
- Drop 'reg' change from DTS patch
- Add Tested-by tag from Bjorn

[1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43

Shawn Guo (3):
  dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks
  interconnect: qcom: sdm660: Add missing a2noc qos clocks
  arm64: dts: qcom: sdm630: Add missing a2noc qos clocks

 .../bindings/interconnect/qcom,sdm660.yaml    | 46 +++++++++++++++++--
 arch/arm64/boot/dts/qcom/sdm630.dtsi          | 15 +++++-
 drivers/interconnect/qcom/sdm660.c            | 14 ++++++
 3 files changed, 69 insertions(+), 6 deletions(-)

-- 
2.17.1


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

* [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks
  2021-08-24  4:34 [PATCH v2 0/3] Add missing A2NoC QoS clocks for SDM660 interconnect driver Shawn Guo
@ 2021-08-24  4:34 ` Shawn Guo
  2021-08-24 16:54   ` Rob Herring
  2021-09-01 14:55   ` AngeloGioacchino Del Regno
  2021-08-24  4:34 ` [PATCH v2 2/3] interconnect: qcom: " Shawn Guo
  2021-08-24  4:34 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: " Shawn Guo
  2 siblings, 2 replies; 13+ messages in thread
From: Shawn Guo @ 2021-08-24  4:34 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: AngeloGioacchino Del Regno, Bjorn Andersson, Dmitry Baryshkov,
	Rob Herring, devicetree, linux-arm-msm, linux-pm, Shawn Guo

It adds the missing a2noc clocks required for QoS registers programming
per downstream kernel[1].

[1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 .../bindings/interconnect/qcom,sdm660.yaml    | 46 +++++++++++++++++--
 1 file changed, 42 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml b/Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml
index 29de7807df54..bcd41e491f1d 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml
@@ -31,11 +31,11 @@ properties:
 
   clocks:
     minItems: 1
-    maxItems: 3
+    maxItems: 7
 
   clock-names:
     minItems: 1
-    maxItems: 3
+    maxItems: 7
 
 required:
   - compatible
@@ -72,6 +72,32 @@ allOf:
           contains:
             enum:
               - qcom,sdm660-a2noc
+    then:
+      properties:
+        clocks:
+          items:
+            - description: Bus Clock.
+            - description: Bus A Clock.
+            - description: IPA Clock.
+            - description: UFS AXI Clock.
+            - description: Aggregate2 UFS AXI Clock.
+            - description: Aggregate2 USB3 AXI Clock.
+            - description: Config NoC USB2 AXI Clock.
+        clock-names:
+          items:
+            - const: bus
+            - const: bus_a
+            - const: ipa
+            - const: ufs_axi
+            - const: aggre2_ufs_axi
+            - const: aggre2_usb3_axi
+            - const: cfg_noc_usb2_axi
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
               - qcom,sdm660-bimc
               - qcom,sdm660-cnoc
               - qcom,sdm660-gnoc
@@ -91,6 +117,7 @@ examples:
   - |
       #include <dt-bindings/clock/qcom,rpmcc.h>
       #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
+      #include <dt-bindings/clock/qcom,gcc-sdm660.h>
 
       bimc: interconnect@1008000 {
               compatible = "qcom,sdm660-bimc";
@@ -123,9 +150,20 @@ examples:
               compatible = "qcom,sdm660-a2noc";
               reg = <0x01704000 0xc100>;
               #interconnect-cells = <1>;
-              clock-names = "bus", "bus_a";
+              clock-names = "bus",
+                            "bus_a",
+                            "ipa",
+                            "ufs_axi",
+                            "aggre2_ufs_axi",
+                            "aggre2_usb3_axi",
+                            "cfg_noc_usb2_axi";
               clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
-                       <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>;
+                       <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
+                       <&rpmcc RPM_SMD_IPA_CLK>,
+                       <&gcc GCC_UFS_AXI_CLK>,
+                       <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
+                       <&gcc GCC_AGGRE2_USB3_AXI_CLK>,
+                       <&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
       };
 
       mnoc: interconnect@1745000 {
-- 
2.17.1


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

* [PATCH v2 2/3] interconnect: qcom: sdm660: Add missing a2noc qos clocks
  2021-08-24  4:34 [PATCH v2 0/3] Add missing A2NoC QoS clocks for SDM660 interconnect driver Shawn Guo
  2021-08-24  4:34 ` [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks Shawn Guo
@ 2021-08-24  4:34 ` Shawn Guo
  2021-09-01 15:00   ` AngeloGioacchino Del Regno
  2021-09-24 14:33   ` Bjorn Andersson
  2021-08-24  4:34 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: " Shawn Guo
  2 siblings, 2 replies; 13+ messages in thread
From: Shawn Guo @ 2021-08-24  4:34 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: AngeloGioacchino Del Regno, Bjorn Andersson, Dmitry Baryshkov,
	Rob Herring, devicetree, linux-arm-msm, linux-pm, Shawn Guo

It adds the missing a2noc clocks required for QoS registers programming
per downstream kernel[1].  Otherwise, qcom_icc_noc_set_qos_priority()
call on mas_ufs or mas_usb_hs node will simply result in a hardware hang
on SDM660 SoC.

[1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/interconnect/qcom/sdm660.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom/sdm660.c
index c89c991a80a0..661eb3635d21 100644
--- a/drivers/interconnect/qcom/sdm660.c
+++ b/drivers/interconnect/qcom/sdm660.c
@@ -174,6 +174,16 @@ static const struct clk_bulk_data bus_mm_clocks[] = {
 	{ .id = "iface" },
 };
 
+static const struct clk_bulk_data bus_a2noc_clocks[] = {
+	{ .id = "bus" },
+	{ .id = "bus_a" },
+	{ .id = "ipa" },
+	{ .id = "ufs_axi" },
+	{ .id = "aggre2_ufs_axi" },
+	{ .id = "aggre2_usb3_axi" },
+	{ .id = "cfg_noc_usb2_axi" },
+};
+
 /**
  * struct qcom_icc_provider - Qualcomm specific interconnect provider
  * @provider: generic interconnect provider
@@ -811,6 +821,10 @@ static int qnoc_probe(struct platform_device *pdev)
 		qp->bus_clks = devm_kmemdup(dev, bus_mm_clocks,
 					    sizeof(bus_mm_clocks), GFP_KERNEL);
 		qp->num_clks = ARRAY_SIZE(bus_mm_clocks);
+	} else if (of_device_is_compatible(dev->of_node, "qcom,sdm660-a2noc")) {
+		qp->bus_clks = devm_kmemdup(dev, bus_a2noc_clocks,
+					    sizeof(bus_a2noc_clocks), GFP_KERNEL);
+		qp->num_clks = ARRAY_SIZE(bus_a2noc_clocks);
 	} else {
 		if (of_device_is_compatible(dev->of_node, "qcom,sdm660-bimc"))
 			qp->is_bimc_node = true;
-- 
2.17.1


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

* [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add missing a2noc qos clocks
  2021-08-24  4:34 [PATCH v2 0/3] Add missing A2NoC QoS clocks for SDM660 interconnect driver Shawn Guo
  2021-08-24  4:34 ` [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks Shawn Guo
  2021-08-24  4:34 ` [PATCH v2 2/3] interconnect: qcom: " Shawn Guo
@ 2021-08-24  4:34 ` Shawn Guo
  2021-09-01 15:01   ` AngeloGioacchino Del Regno
                     ` (2 more replies)
  2 siblings, 3 replies; 13+ messages in thread
From: Shawn Guo @ 2021-08-24  4:34 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: AngeloGioacchino Del Regno, Bjorn Andersson, Dmitry Baryshkov,
	Rob Herring, devicetree, linux-arm-msm, linux-pm, Shawn Guo

It adds the missing a2noc clocks required for QoS registers programming
per downstream kernel[1].

[1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 9153e6616ba4..9c7f87e42fcc 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -654,9 +654,20 @@
 			compatible = "qcom,sdm660-a2noc";
 			reg = <0x01704000 0xc100>;
 			#interconnect-cells = <1>;
-			clock-names = "bus", "bus_a";
+			clock-names = "bus",
+				      "bus_a",
+				      "ipa",
+				      "ufs_axi",
+				      "aggre2_ufs_axi",
+				      "aggre2_usb3_axi",
+				      "cfg_noc_usb2_axi";
 			clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
-				 <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>;
+				 <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
+				 <&rpmcc RPM_SMD_IPA_CLK>,
+				 <&gcc GCC_UFS_AXI_CLK>,
+				 <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
+				 <&gcc GCC_AGGRE2_USB3_AXI_CLK>,
+				 <&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
 		};
 
 		mnoc: interconnect@1745000 {
-- 
2.17.1


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

* Re: [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks
  2021-08-24  4:34 ` [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks Shawn Guo
@ 2021-08-24 16:54   ` Rob Herring
  2021-09-01 14:55   ` AngeloGioacchino Del Regno
  1 sibling, 0 replies; 13+ messages in thread
From: Rob Herring @ 2021-08-24 16:54 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-pm, Dmitry Baryshkov, Rob Herring,
	AngeloGioacchino Del Regno, Bjorn Andersson, Georgi Djakov,
	linux-arm-msm, devicetree

On Tue, 24 Aug 2021 12:34:33 +0800, Shawn Guo wrote:
> It adds the missing a2noc clocks required for QoS registers programming
> per downstream kernel[1].
> 
> [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  .../bindings/interconnect/qcom,sdm660.yaml    | 46 +++++++++++++++++--
>  1 file changed, 42 insertions(+), 4 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks
  2021-08-24  4:34 ` [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks Shawn Guo
  2021-08-24 16:54   ` Rob Herring
@ 2021-09-01 14:55   ` AngeloGioacchino Del Regno
  1 sibling, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2021-09-01 14:55 UTC (permalink / raw)
  To: Shawn Guo, Georgi Djakov
  Cc: Bjorn Andersson, Dmitry Baryshkov, Rob Herring, devicetree,
	linux-arm-msm, linux-pm

Il 24/08/21 06:34, Shawn Guo ha scritto:
> It adds the missing a2noc clocks required for QoS registers programming
> per downstream kernel[1].
> 
> [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>

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

* Re: [PATCH v2 2/3] interconnect: qcom: sdm660: Add missing a2noc qos clocks
  2021-08-24  4:34 ` [PATCH v2 2/3] interconnect: qcom: " Shawn Guo
@ 2021-09-01 15:00   ` AngeloGioacchino Del Regno
  2021-09-24 14:33   ` Bjorn Andersson
  1 sibling, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2021-09-01 15:00 UTC (permalink / raw)
  To: Shawn Guo, Georgi Djakov
  Cc: Bjorn Andersson, Dmitry Baryshkov, Rob Herring, devicetree,
	linux-arm-msm, linux-pm

Il 24/08/21 06:34, Shawn Guo ha scritto:
> It adds the missing a2noc clocks required for QoS registers programming
> per downstream kernel[1].  Otherwise, qcom_icc_noc_set_qos_priority()
> call on mas_ufs or mas_usb_hs node will simply result in a hardware hang
> on SDM660 SoC.
> 
> [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>

My Xperia devices are not locking up on any call to qos priority setting, but 
that's surely because such clocks are left on by the bootloader before booting 
Linux... and then after booting my USB is up, which is probably why I still don't 
experience any hang, I guess.

In any case, I do recognize that the a2noc does effectively need these clocks to be 
on in order to be reachable, as also reported in the downstream dtsi.

Thank you!

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>

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

* Re: [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add missing a2noc qos clocks
  2021-08-24  4:34 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: " Shawn Guo
@ 2021-09-01 15:01   ` AngeloGioacchino Del Regno
  2021-09-24 13:15   ` Georgi Djakov
  2021-09-24 22:44   ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2021-09-01 15:01 UTC (permalink / raw)
  To: Shawn Guo, Georgi Djakov
  Cc: Bjorn Andersson, Dmitry Baryshkov, Rob Herring, devicetree,
	linux-arm-msm, linux-pm

Il 24/08/21 06:34, Shawn Guo ha scritto:
> It adds the missing a2noc clocks required for QoS registers programming
> per downstream kernel[1].
> 
> [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>

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

* Re: [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add missing a2noc qos clocks
  2021-08-24  4:34 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: " Shawn Guo
  2021-09-01 15:01   ` AngeloGioacchino Del Regno
@ 2021-09-24 13:15   ` Georgi Djakov
  2021-09-24 22:44   ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 13+ messages in thread
From: Georgi Djakov @ 2021-09-24 13:15 UTC (permalink / raw)
  To: Shawn Guo, Bjorn Andersson
  Cc: AngeloGioacchino Del Regno, Dmitry Baryshkov, Rob Herring,
	devicetree, linux-arm-msm, linux-pm

On 24.08.21 7:34, Shawn Guo wrote:
> It adds the missing a2noc clocks required for QoS registers programming
> per downstream kernel[1].
> 
> [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: Georgi Djakov <djakov@kernel.org>

> ---
>   arch/arm64/boot/dts/qcom/sdm630.dtsi | 15 +++++++++++++--
>   1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
> index 9153e6616ba4..9c7f87e42fcc 100644
> --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
> @@ -654,9 +654,20 @@
>   			compatible = "qcom,sdm660-a2noc";
>   			reg = <0x01704000 0xc100>;
>   			#interconnect-cells = <1>;
> -			clock-names = "bus", "bus_a";
> +			clock-names = "bus",
> +				      "bus_a",
> +				      "ipa",
> +				      "ufs_axi",
> +				      "aggre2_ufs_axi",
> +				      "aggre2_usb3_axi",
> +				      "cfg_noc_usb2_axi";
>   			clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
> -				 <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>;
> +				 <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
> +				 <&rpmcc RPM_SMD_IPA_CLK>,
> +				 <&gcc GCC_UFS_AXI_CLK>,
> +				 <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
> +				 <&gcc GCC_AGGRE2_USB3_AXI_CLK>,
> +				 <&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
>   		};
>   
>   		mnoc: interconnect@1745000 {
> 


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

* Re: [PATCH v2 2/3] interconnect: qcom: sdm660: Add missing a2noc qos clocks
  2021-08-24  4:34 ` [PATCH v2 2/3] interconnect: qcom: " Shawn Guo
  2021-09-01 15:00   ` AngeloGioacchino Del Regno
@ 2021-09-24 14:33   ` Bjorn Andersson
  2021-09-24 14:58     ` Georgi Djakov
  1 sibling, 1 reply; 13+ messages in thread
From: Bjorn Andersson @ 2021-09-24 14:33 UTC (permalink / raw)
  To: Shawn Guo, Georgi Djakov
  Cc: AngeloGioacchino Del Regno, Dmitry Baryshkov, Rob Herring,
	devicetree, linux-arm-msm, linux-pm

On Mon 23 Aug 23:34 CDT 2021, Shawn Guo wrote:

> It adds the missing a2noc clocks required for QoS registers programming
> per downstream kernel[1].  Otherwise, qcom_icc_noc_set_qos_priority()
> call on mas_ufs or mas_usb_hs node will simply result in a hardware hang
> on SDM660 SoC.
> 
> [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Georgi, do you intend to pull this patch in for v5.15-rc?

I.e. should I pick up the dts change for v5.15 as well.

Regards,
Bjorn

> ---
>  drivers/interconnect/qcom/sdm660.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom/sdm660.c
> index c89c991a80a0..661eb3635d21 100644
> --- a/drivers/interconnect/qcom/sdm660.c
> +++ b/drivers/interconnect/qcom/sdm660.c
> @@ -174,6 +174,16 @@ static const struct clk_bulk_data bus_mm_clocks[] = {
>  	{ .id = "iface" },
>  };
>  
> +static const struct clk_bulk_data bus_a2noc_clocks[] = {
> +	{ .id = "bus" },
> +	{ .id = "bus_a" },
> +	{ .id = "ipa" },
> +	{ .id = "ufs_axi" },
> +	{ .id = "aggre2_ufs_axi" },
> +	{ .id = "aggre2_usb3_axi" },
> +	{ .id = "cfg_noc_usb2_axi" },
> +};
> +
>  /**
>   * struct qcom_icc_provider - Qualcomm specific interconnect provider
>   * @provider: generic interconnect provider
> @@ -811,6 +821,10 @@ static int qnoc_probe(struct platform_device *pdev)
>  		qp->bus_clks = devm_kmemdup(dev, bus_mm_clocks,
>  					    sizeof(bus_mm_clocks), GFP_KERNEL);
>  		qp->num_clks = ARRAY_SIZE(bus_mm_clocks);
> +	} else if (of_device_is_compatible(dev->of_node, "qcom,sdm660-a2noc")) {
> +		qp->bus_clks = devm_kmemdup(dev, bus_a2noc_clocks,
> +					    sizeof(bus_a2noc_clocks), GFP_KERNEL);
> +		qp->num_clks = ARRAY_SIZE(bus_a2noc_clocks);
>  	} else {
>  		if (of_device_is_compatible(dev->of_node, "qcom,sdm660-bimc"))
>  			qp->is_bimc_node = true;
> -- 
> 2.17.1
> 

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

* Re: [PATCH v2 2/3] interconnect: qcom: sdm660: Add missing a2noc qos clocks
  2021-09-24 14:33   ` Bjorn Andersson
@ 2021-09-24 14:58     ` Georgi Djakov
  2021-09-24 15:20       ` Bjorn Andersson
  0 siblings, 1 reply; 13+ messages in thread
From: Georgi Djakov @ 2021-09-24 14:58 UTC (permalink / raw)
  To: Bjorn Andersson, Shawn Guo
  Cc: AngeloGioacchino Del Regno, Dmitry Baryshkov, Rob Herring,
	devicetree, linux-arm-msm, linux-pm

On 24.09.21 17:33, Bjorn Andersson wrote:
> On Mon 23 Aug 23:34 CDT 2021, Shawn Guo wrote:
> 
>> It adds the missing a2noc clocks required for QoS registers programming
>> per downstream kernel[1].  Otherwise, qcom_icc_noc_set_qos_priority()
>> call on mas_ufs or mas_usb_hs node will simply result in a hardware hang
>> on SDM660 SoC.
>>
>> [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
>>
>> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
>> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> 
> Georgi, do you intend to pull this patch in for v5.15-rc?
> 
> I.e. should I pick up the dts change for v5.15 as well.

Yes, i have just sent a pull request with this included, so please
pull the dts change as a fix for v5.15-rc. Sorry for not mentioning
it explicitly.
I assume that not all bootloaders are leaving the qos clocks enabled,
so if this is fixing a hardware hang, should we also backport it into
stable? This is probably more of a question to the people actively
using this board?

Thanks,
Georgi

> Regards,
> Bjorn
> 
>> ---
>>   drivers/interconnect/qcom/sdm660.c | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom/sdm660.c
>> index c89c991a80a0..661eb3635d21 100644
>> --- a/drivers/interconnect/qcom/sdm660.c
>> +++ b/drivers/interconnect/qcom/sdm660.c
>> @@ -174,6 +174,16 @@ static const struct clk_bulk_data bus_mm_clocks[] = {
>>   	{ .id = "iface" },
>>   };
>>   
>> +static const struct clk_bulk_data bus_a2noc_clocks[] = {
>> +	{ .id = "bus" },
>> +	{ .id = "bus_a" },
>> +	{ .id = "ipa" },
>> +	{ .id = "ufs_axi" },
>> +	{ .id = "aggre2_ufs_axi" },
>> +	{ .id = "aggre2_usb3_axi" },
>> +	{ .id = "cfg_noc_usb2_axi" },
>> +};
>> +
>>   /**
>>    * struct qcom_icc_provider - Qualcomm specific interconnect provider
>>    * @provider: generic interconnect provider
>> @@ -811,6 +821,10 @@ static int qnoc_probe(struct platform_device *pdev)
>>   		qp->bus_clks = devm_kmemdup(dev, bus_mm_clocks,
>>   					    sizeof(bus_mm_clocks), GFP_KERNEL);
>>   		qp->num_clks = ARRAY_SIZE(bus_mm_clocks);
>> +	} else if (of_device_is_compatible(dev->of_node, "qcom,sdm660-a2noc")) {
>> +		qp->bus_clks = devm_kmemdup(dev, bus_a2noc_clocks,
>> +					    sizeof(bus_a2noc_clocks), GFP_KERNEL);
>> +		qp->num_clks = ARRAY_SIZE(bus_a2noc_clocks);
>>   	} else {
>>   		if (of_device_is_compatible(dev->of_node, "qcom,sdm660-bimc"))
>>   			qp->is_bimc_node = true;
>> -- 
>> 2.17.1
>>


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

* Re: [PATCH v2 2/3] interconnect: qcom: sdm660: Add missing a2noc qos clocks
  2021-09-24 14:58     ` Georgi Djakov
@ 2021-09-24 15:20       ` Bjorn Andersson
  0 siblings, 0 replies; 13+ messages in thread
From: Bjorn Andersson @ 2021-09-24 15:20 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: Shawn Guo, AngeloGioacchino Del Regno, Dmitry Baryshkov,
	Rob Herring, devicetree, linux-arm-msm, linux-pm

On Fri 24 Sep 07:58 PDT 2021, Georgi Djakov wrote:

> On 24.09.21 17:33, Bjorn Andersson wrote:
> > On Mon 23 Aug 23:34 CDT 2021, Shawn Guo wrote:
> > 
> > > It adds the missing a2noc clocks required for QoS registers programming
> > > per downstream kernel[1].  Otherwise, qcom_icc_noc_set_qos_priority()
> > > call on mas_ufs or mas_usb_hs node will simply result in a hardware hang
> > > on SDM660 SoC.
> > > 
> > > [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
> > > 
> > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > 
> > Georgi, do you intend to pull this patch in for v5.15-rc?
> > 
> > I.e. should I pick up the dts change for v5.15 as well.
> 
> Yes, i have just sent a pull request with this included, so please
> pull the dts change as a fix for v5.15-rc. Sorry for not mentioning
> it explicitly.
> I assume that not all bootloaders are leaving the qos clocks enabled,
> so if this is fixing a hardware hang, should we also backport it into
> stable? This is probably more of a question to the people actively
> using this board?
> 

Devices that needed this change wouldn't boot on that older kernel
anyways, so I think it's safe to assume that we don't have any users on
an old kernel that would benefit from this change.

So v5.15 is probably sufficient.

Regards,
Bjorn

> Thanks,
> Georgi
> 
> > Regards,
> > Bjorn
> > 
> > > ---
> > >   drivers/interconnect/qcom/sdm660.c | 14 ++++++++++++++
> > >   1 file changed, 14 insertions(+)
> > > 
> > > diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom/sdm660.c
> > > index c89c991a80a0..661eb3635d21 100644
> > > --- a/drivers/interconnect/qcom/sdm660.c
> > > +++ b/drivers/interconnect/qcom/sdm660.c
> > > @@ -174,6 +174,16 @@ static const struct clk_bulk_data bus_mm_clocks[] = {
> > >   	{ .id = "iface" },
> > >   };
> > > +static const struct clk_bulk_data bus_a2noc_clocks[] = {
> > > +	{ .id = "bus" },
> > > +	{ .id = "bus_a" },
> > > +	{ .id = "ipa" },
> > > +	{ .id = "ufs_axi" },
> > > +	{ .id = "aggre2_ufs_axi" },
> > > +	{ .id = "aggre2_usb3_axi" },
> > > +	{ .id = "cfg_noc_usb2_axi" },
> > > +};
> > > +
> > >   /**
> > >    * struct qcom_icc_provider - Qualcomm specific interconnect provider
> > >    * @provider: generic interconnect provider
> > > @@ -811,6 +821,10 @@ static int qnoc_probe(struct platform_device *pdev)
> > >   		qp->bus_clks = devm_kmemdup(dev, bus_mm_clocks,
> > >   					    sizeof(bus_mm_clocks), GFP_KERNEL);
> > >   		qp->num_clks = ARRAY_SIZE(bus_mm_clocks);
> > > +	} else if (of_device_is_compatible(dev->of_node, "qcom,sdm660-a2noc")) {
> > > +		qp->bus_clks = devm_kmemdup(dev, bus_a2noc_clocks,
> > > +					    sizeof(bus_a2noc_clocks), GFP_KERNEL);
> > > +		qp->num_clks = ARRAY_SIZE(bus_a2noc_clocks);
> > >   	} else {
> > >   		if (of_device_is_compatible(dev->of_node, "qcom,sdm660-bimc"))
> > >   			qp->is_bimc_node = true;
> > > -- 
> > > 2.17.1
> > > 
> 

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

* Re: (subset) [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add missing a2noc qos clocks
  2021-08-24  4:34 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: " Shawn Guo
  2021-09-01 15:01   ` AngeloGioacchino Del Regno
  2021-09-24 13:15   ` Georgi Djakov
@ 2021-09-24 22:44   ` Bjorn Andersson
  2 siblings, 0 replies; 13+ messages in thread
From: Bjorn Andersson @ 2021-09-24 22:44 UTC (permalink / raw)
  To: Shawn Guo, Georgi Djakov
  Cc: devicetree, Rob Herring, AngeloGioacchino Del Regno,
	linux-arm-msm, Dmitry Baryshkov, linux-pm

On Tue, 24 Aug 2021 12:34:35 +0800, Shawn Guo wrote:
> It adds the missing a2noc clocks required for QoS registers programming
> per downstream kernel[1].
> 
> [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/sdm660-bus.dtsi?h=LA.UM.8.2.r1-04800-sdm660.0#n43
> 
> 

Applied, thanks!

[3/3] arm64: dts: qcom: sdm630: Add missing a2noc qos clocks
      commit: 1878f4b7ec9ed013da8a7efb63fed1fbae0215ae

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

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

end of thread, other threads:[~2021-09-24 22:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  4:34 [PATCH v2 0/3] Add missing A2NoC QoS clocks for SDM660 interconnect driver Shawn Guo
2021-08-24  4:34 ` [PATCH v2 1/3] dt-bindings: interconnect: sdm660: Add missing a2noc qos clocks Shawn Guo
2021-08-24 16:54   ` Rob Herring
2021-09-01 14:55   ` AngeloGioacchino Del Regno
2021-08-24  4:34 ` [PATCH v2 2/3] interconnect: qcom: " Shawn Guo
2021-09-01 15:00   ` AngeloGioacchino Del Regno
2021-09-24 14:33   ` Bjorn Andersson
2021-09-24 14:58     ` Georgi Djakov
2021-09-24 15:20       ` Bjorn Andersson
2021-08-24  4:34 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: " Shawn Guo
2021-09-01 15:01   ` AngeloGioacchino Del Regno
2021-09-24 13:15   ` Georgi Djakov
2021-09-24 22:44   ` (subset) " Bjorn Andersson

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