Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets
@ 2024-06-24 13:32 Srinivas Kandagatla
  2024-06-24 13:32 ` [PATCH v2 1/3] dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller Srinivas Kandagatla
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2024-06-24 13:32 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

Soundwire resets are missing in the existing dts, add resets for all the 4
instances of Soundwire controllers (WSA, WSA2, RX, TX).

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Changes in v2:
- fixed dt bindings.
- Link to v1: https://lore.kernel.org/r/20240624-x1e-swr-reset-v1-0-da326d0733d4@linaro.org

---
Srinivas Kandagatla (3):
      dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller
      dt-bindings: clock: Add x1e80100 LPASSCC reset controller
      arm64: dts: qcom: x1e80100: add soundwire controller resets

 .../bindings/clock/qcom,sc8280xp-lpasscc.yaml      | 13 +++++++++---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi             | 23 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 3 deletions(-)
---
base-commit: 781025f172e19ca5682d7bfc5243e7aa74c4977f
change-id: 20240624-x1e-swr-reset-0196fbf7b8f9

Best regards,
-- 
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>


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

* [PATCH v2 1/3] dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller
  2024-06-24 13:32 [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets Srinivas Kandagatla
@ 2024-06-24 13:32 ` Srinivas Kandagatla
  2024-06-24 14:38   ` Krzysztof Kozlowski
  2024-06-24 13:32 ` [PATCH v2 2/3] dt-bindings: clock: Add x1e80100 LPASSCC " Srinivas Kandagatla
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Srinivas Kandagatla @ 2024-06-24 13:32 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

X1E80100 LPASS (Low Power Audio Subsystem) Audio clock controller
provides reset support when it is under the control of Q6DSP.

Add x1e80100 compatible to the existing sc8280xp as these reset
controllers have same reg layout and compatible.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml      | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
index 3326dcd6766c..c33bf4c5af7d 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
@@ -18,10 +18,13 @@ description: |
 
 properties:
   compatible:
-    enum:
-      - qcom,sc8280xp-lpassaudiocc
-      - qcom,sc8280xp-lpasscc
-
+    oneOf:
+      - enum:
+          - qcom,sc8280xp-lpassaudiocc
+          - qcom,sc8280xp-lpasscc
+      - items:
+          - const: qcom,x1e80100-lpassaudiocc
+          - const: qcom,sc8280xp-lpassaudiocc
   reg:
     maxItems: 1
 

-- 
2.25.1


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

* [PATCH v2 2/3] dt-bindings: clock: Add x1e80100 LPASSCC reset controller
  2024-06-24 13:32 [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets Srinivas Kandagatla
  2024-06-24 13:32 ` [PATCH v2 1/3] dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller Srinivas Kandagatla
@ 2024-06-24 13:32 ` Srinivas Kandagatla
  2024-06-24 14:39   ` Krzysztof Kozlowski
  2024-06-24 13:32 ` [PATCH v2 3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets Srinivas Kandagatla
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Srinivas Kandagatla @ 2024-06-24 13:32 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

X1E80100 LPASS (Low Power Audio Subsystem) clock controller provides reset
support when it is under the control of Q6DSP.

Add x1e80100 compatible to the existing sc8280xp as these reset
controllers have same reg layout and compatible.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
index c33bf4c5af7d..273d66e245c5 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
@@ -25,6 +25,10 @@ properties:
       - items:
           - const: qcom,x1e80100-lpassaudiocc
           - const: qcom,sc8280xp-lpassaudiocc
+      - items:
+          - const: qcom,x1e80100-lpasscc
+          - const: qcom,sc8280xp-lpasscc
+
   reg:
     maxItems: 1
 

-- 
2.25.1


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

* [PATCH v2 3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets
  2024-06-24 13:32 [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets Srinivas Kandagatla
  2024-06-24 13:32 ` [PATCH v2 1/3] dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller Srinivas Kandagatla
  2024-06-24 13:32 ` [PATCH v2 2/3] dt-bindings: clock: Add x1e80100 LPASSCC " Srinivas Kandagatla
@ 2024-06-24 13:32 ` Srinivas Kandagatla
  2024-06-24 14:02   ` Konrad Dybcio
  2024-06-24 14:40   ` Krzysztof Kozlowski
  2024-06-24 15:15 ` [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add " Dmitry Baryshkov
  2024-08-15 20:40 ` (subset) " Bjorn Andersson
  4 siblings, 2 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2024-06-24 13:32 UTC (permalink / raw)
  To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

Soundwire controllers (WSA, WSA2, RX, TX) require reset lines to enable
switching clock control from hardware to software.

Add them along with the reset control providers.

Without this reset we might hit fifo under/over run when we try to write to
soundwire device registers.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 09fd6c8e53bb..fa28dbdd1419 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
 #include <dt-bindings/clock/qcom,x1e80100-dispcc.h>
 #include <dt-bindings/clock/qcom,x1e80100-gcc.h>
 #include <dt-bindings/clock/qcom,x1e80100-tcsr.h>
@@ -3177,6 +3178,8 @@ swr3: soundwire@6ab0000 {
 
 			pinctrl-0 = <&wsa2_swr_active>;
 			pinctrl-names = "default";
+			resets = <&lpass_audiocc LPASS_AUDIO_SWR_WSA2_CGCR>;
+			reset-names = "swr_audio_cgcr";
 
 			qcom,din-ports = <4>;
 			qcom,dout-ports = <9>;
@@ -3225,6 +3228,8 @@ swr1: soundwire@6ad0000 {
 			pinctrl-0 = <&rx_swr_active>;
 			pinctrl-names = "default";
 
+			resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>;
+			reset-names = "swr_audio_cgcr";
 			qcom,din-ports = <1>;
 			qcom,dout-ports = <11>;
 
@@ -3289,6 +3294,8 @@ swr0: soundwire@6b10000 {
 
 			pinctrl-0 = <&wsa_swr_active>;
 			pinctrl-names = "default";
+			resets = <&lpass_audiocc LPASS_AUDIO_SWR_WSA_CGCR>;
+			reset-names = "swr_audio_cgcr";
 
 			qcom,din-ports = <4>;
 			qcom,dout-ports = <9>;
@@ -3309,6 +3316,13 @@ swr0: soundwire@6b10000 {
 			status = "disabled";
 		};
 
+		lpass_audiocc: clock-controller@6b6c000 {
+			compatible = "qcom,x1e80100-lpassaudiocc", "qcom,sc8280xp-lpassaudiocc";
+			reg = <0 0x06b6c000 0 0x1000>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
 		swr2: soundwire@6d30000 {
 			compatible = "qcom,soundwire-v2.0.0";
 			reg = <0 0x06d30000 0 0x10000>;
@@ -3318,6 +3332,8 @@ swr2: soundwire@6d30000 {
 				     <GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-names = "core", "wakeup";
 			label = "TX";
+			resets = <&lpasscc LPASS_AUDIO_SWR_TX_CGCR>;
+			reset-names = "swr_audio_cgcr";
 
 			pinctrl-0 = <&tx_swr_active>;
 			pinctrl-names = "default";
@@ -3474,6 +3490,13 @@ data-pins {
 			};
 		};
 
+		lpasscc: clock-controller@6ea0000 {
+			compatible = "qcom,x1e80100-lpasscc", "qcom,sc8280xp-lpasscc";
+			reg = <0 0x06ea0000 0 0x12000>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
 		lpass_ag_noc: interconnect@7e40000 {
 			compatible = "qcom,x1e80100-lpass-ag-noc";
 			reg = <0 0x7e40000 0 0xE080>;

-- 
2.25.1


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

* Re: [PATCH v2 3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets
  2024-06-24 13:32 ` [PATCH v2 3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets Srinivas Kandagatla
@ 2024-06-24 14:02   ` Konrad Dybcio
  2024-06-24 14:40   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2024-06-24 14:02 UTC (permalink / raw)
  To: Srinivas Kandagatla, Bjorn Andersson, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel



On 6/24/24 15:32, Srinivas Kandagatla wrote:
> Soundwire controllers (WSA, WSA2, RX, TX) require reset lines to enable
> switching clock control from hardware to software.
> 
> Add them along with the reset control providers.
> 
> Without this reset we might hit fifo under/over run when we try to write to
> soundwire device registers.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH v2 1/3] dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller
  2024-06-24 13:32 ` [PATCH v2 1/3] dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller Srinivas Kandagatla
@ 2024-06-24 14:38   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-24 14:38 UTC (permalink / raw)
  To: Srinivas Kandagatla, Bjorn Andersson, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Konrad Dybcio
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel

On 24/06/2024 15:32, Srinivas Kandagatla wrote:
> X1E80100 LPASS (Low Power Audio Subsystem) Audio clock controller
> provides reset support when it is under the control of Q6DSP.
> 
> Add x1e80100 compatible to the existing sc8280xp as these reset
> controllers have same reg layout and compatible.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  .../devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml      | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
> index 3326dcd6766c..c33bf4c5af7d 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
> @@ -18,10 +18,13 @@ description: |
>  
>  properties:
>    compatible:
> -    enum:
> -      - qcom,sc8280xp-lpassaudiocc
> -      - qcom,sc8280xp-lpasscc
> -
> +    oneOf:
> +      - enum:
> +          - qcom,sc8280xp-lpassaudiocc
> +          - qcom,sc8280xp-lpasscc
> +      - items:
> +          - const: qcom,x1e80100-lpassaudiocc
> +          - const: qcom,sc8280xp-lpassaudiocc

Please keep here blank line. With this:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

>    reg:
>      maxItems: 1
>  
> 

Best regards,
Krzysztof


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

* Re: [PATCH v2 2/3] dt-bindings: clock: Add x1e80100 LPASSCC reset controller
  2024-06-24 13:32 ` [PATCH v2 2/3] dt-bindings: clock: Add x1e80100 LPASSCC " Srinivas Kandagatla
@ 2024-06-24 14:39   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-24 14:39 UTC (permalink / raw)
  To: Srinivas Kandagatla, Bjorn Andersson, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Konrad Dybcio
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel

On 24/06/2024 15:32, Srinivas Kandagatla wrote:
> X1E80100 LPASS (Low Power Audio Subsystem) clock controller provides reset
> support when it is under the control of Q6DSP.
> 
> Add x1e80100 compatible to the existing sc8280xp as these reset
> controllers have same reg layout and compatible.
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2 3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets
  2024-06-24 13:32 ` [PATCH v2 3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets Srinivas Kandagatla
  2024-06-24 14:02   ` Konrad Dybcio
@ 2024-06-24 14:40   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-24 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla, Bjorn Andersson, Michael Turquette,
	Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Konrad Dybcio
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel

On 24/06/2024 15:32, Srinivas Kandagatla wrote:
> Soundwire controllers (WSA, WSA2, RX, TX) require reset lines to enable
> switching clock control from hardware to software.
> 
> Add them along with the reset control providers.
> 
> Without this reset we might hit fifo under/over run when we try to write to
> soundwire device registers.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets
  2024-06-24 13:32 [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets Srinivas Kandagatla
                   ` (2 preceding siblings ...)
  2024-06-24 13:32 ` [PATCH v2 3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets Srinivas Kandagatla
@ 2024-06-24 15:15 ` Dmitry Baryshkov
  2024-08-15 20:40 ` (subset) " Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2024-06-24 15:15 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, linux-arm-msm,
	linux-clk, devicetree, linux-kernel

On Mon, Jun 24, 2024 at 02:32:35PM GMT, Srinivas Kandagatla wrote:
> Soundwire resets are missing in the existing dts, add resets for all the 4
> instances of Soundwire controllers (WSA, WSA2, RX, TX).
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> Changes in v2:
> - fixed dt bindings.
> - Link to v1: https://lore.kernel.org/r/20240624-x1e-swr-reset-v1-0-da326d0733d4@linaro.org

Thanks!

Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


-- 
With best wishes
Dmitry

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

* Re: (subset) [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets
  2024-06-24 13:32 [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets Srinivas Kandagatla
                   ` (3 preceding siblings ...)
  2024-06-24 15:15 ` [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add " Dmitry Baryshkov
@ 2024-08-15 20:40 ` Bjorn Andersson
  4 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2024-08-15 20:40 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Konrad Dybcio, Srinivas Kandagatla
  Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel


On Mon, 24 Jun 2024 14:32:35 +0100, Srinivas Kandagatla wrote:
> Soundwire resets are missing in the existing dts, add resets for all the 4
> instances of Soundwire controllers (WSA, WSA2, RX, TX).
> 
> 

Applied, thanks!

[3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets
      commit: 8c7dbbed27723c4324c81e78fe239ce134aa8f58

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

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

end of thread, other threads:[~2024-08-15 20:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 13:32 [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add soundwire controller resets Srinivas Kandagatla
2024-06-24 13:32 ` [PATCH v2 1/3] dt-bindings: clock: Add x1e80100 LPASS AUDIOCC reset controller Srinivas Kandagatla
2024-06-24 14:38   ` Krzysztof Kozlowski
2024-06-24 13:32 ` [PATCH v2 2/3] dt-bindings: clock: Add x1e80100 LPASSCC " Srinivas Kandagatla
2024-06-24 14:39   ` Krzysztof Kozlowski
2024-06-24 13:32 ` [PATCH v2 3/3] arm64: dts: qcom: x1e80100: add soundwire controller resets Srinivas Kandagatla
2024-06-24 14:02   ` Konrad Dybcio
2024-06-24 14:40   ` Krzysztof Kozlowski
2024-06-24 15:15 ` [PATCH v2 0/3] arm64: dts: qcom: x1e80100: Add " Dmitry Baryshkov
2024-08-15 20:40 ` (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