devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode
@ 2024-02-27 14:27 Krzysztof Kozlowski
  2024-02-27 14:27 ` [PATCH 2/3] arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-27 14:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Catalin Marinas, Will Deacon, linux-arm-msm,
	devicetree, linux-kernel, linux-arm-kernel
  Cc: Krzysztof Kozlowski

Correct the SWR1 Soundwire controller port block pack mode to match
reference code.  Not sure if this has any impact.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index c6b025503f4f..be4d2674151a 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -3430,7 +3430,7 @@ swr1: soundwire@6ad0000 {
 			qcom,ports-hstart =		/bits/ 8 <0xff 0x03 0x00 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
 			qcom,ports-hstop =		/bits/ 8 <0xff 0x06 0x0f 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
 			qcom,ports-word-length =	/bits/ 8 <0x01 0x07 0x04 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
-			qcom,ports-block-pack-mode =	/bits/ 8 <0xff 0x00 0x01 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
+			qcom,ports-block-pack-mode =	/bits/ 8 <0xff 0xff 0x01 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
 			qcom,ports-block-group-count =	/bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
 			qcom,ports-lane-control =	/bits/ 8 <0x01 0x00 0x00 0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff 0xff>;
 
-- 
2.34.1


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

* [PATCH 2/3] arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio
  2024-02-27 14:27 [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode Krzysztof Kozlowski
@ 2024-02-27 14:27 ` Krzysztof Kozlowski
  2024-03-02  0:02   ` Konrad Dybcio
  2024-02-27 14:27 ` [PATCH 3/3] arm64: defconfig: enable reset-gpio driver as module Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-27 14:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Catalin Marinas, Will Deacon, linux-arm-msm,
	devicetree, linux-kernel, linux-arm-kernel
  Cc: Krzysztof Kozlowski

Each pair of WSA8845 speakers share the powerdown SD_N GPIO, thus this
GPIO is specified twice in each WSA8845 device node.  Such DTS was added
hoping non-exclusive GPIO usage would be accepted, but it turned out
otherwise: it is not supported by the Linux kernel.

Linux kernel however supports sharing reset GPIOs, when used bia the
reset controller framework as implemented in commit 26c8a435fce6 ("ASoC:
dt-bindings: qcom,wsa8840: Add reset-gpios for shared line") and
commit c721f189e89c ("reset: Instantiate reset GPIO controller for
shared reset-gpios").

Convert the property with shutdown GPIO to "reset-gpios" to use
mentioned Linux kernel feature.  This allows to bring all four speakers
out of reset.

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

---

Dependencies merged by respective maintainers for next release:
1. ASoC: commit 26c8a435fce6 ("ASoC: dt-bindings: qcom,wsa8840: Add
   reset-gpios for shared line")
2. reset: commit c721f189e89c ("reset: Instantiate reset GPIO controller
   for shared reset-gpios").
---
 arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
index d7ba45953277..266a461f4882 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
@@ -802,13 +802,14 @@ &smb2360_2_eusb2_repeater {
 &swr0 {
 	status = "okay";
 
+	pinctrl-0 = <&wsa_swr_active>, <&spkr_01_sd_n_active>;
+	pinctrl-names = "default";
+
 	/* WSA8845, Left Woofer */
 	left_woofer: speaker@0,0 {
 		compatible = "sdw20217020400";
 		reg = <0 0>;
-		pinctrl-0 = <&spkr_01_sd_n_active>;
-		pinctrl-names = "default";
-		powerdown-gpios = <&lpass_tlmm 12 GPIO_ACTIVE_LOW>;
+		reset-gpios = <&lpass_tlmm 12 GPIO_ACTIVE_LOW>;
 		#sound-dai-cells = <0>;
 		sound-name-prefix = "WooferLeft";
 		vdd-1p8-supply = <&vreg_l15b_1p8>;
@@ -819,8 +820,7 @@ left_woofer: speaker@0,0 {
 	left_tweeter: speaker@0,1 {
 		compatible = "sdw20217020400";
 		reg = <0 1>;
-		/* pinctrl in left_woofer node because of sharing the GPIO*/
-		powerdown-gpios = <&lpass_tlmm 12 GPIO_ACTIVE_LOW>;
+		reset-gpios = <&lpass_tlmm 12 GPIO_ACTIVE_LOW>;
 		#sound-dai-cells = <0>;
 		sound-name-prefix = "TwitterLeft";
 		vdd-1p8-supply = <&vreg_l15b_1p8>;
@@ -853,13 +853,14 @@ wcd_tx: codec@0,3 {
 &swr3 {
 	status = "okay";
 
+	pinctrl-0 = <&wsa2_swr_active>, <&spkr_23_sd_n_active>;
+	pinctrl-names = "default";
+
 	/* WSA8845, Right Woofer */
 	right_woofer: speaker@0,0 {
 		compatible = "sdw20217020400";
 		reg = <0 0>;
-		pinctrl-0 = <&spkr_23_sd_n_active>;
-		pinctrl-names = "default";
-		powerdown-gpios = <&lpass_tlmm 13 GPIO_ACTIVE_LOW>;
+		reset-gpios = <&lpass_tlmm 13 GPIO_ACTIVE_LOW>;
 		#sound-dai-cells = <0>;
 		sound-name-prefix = "WooferRight";
 		vdd-1p8-supply = <&vreg_l15b_1p8>;
@@ -870,8 +871,7 @@ right_woofer: speaker@0,0 {
 	right_tweeter: speaker@0,1 {
 		compatible = "sdw20217020400";
 		reg = <0 1>;
-		/* pinctrl in right_woofer node because of sharing the GPIO*/
-		powerdown-gpios = <&lpass_tlmm 13 GPIO_ACTIVE_LOW>;
+		reset-gpios = <&lpass_tlmm 13 GPIO_ACTIVE_LOW>;
 		#sound-dai-cells = <0>;
 		sound-name-prefix = "TwitterRight";
 		vdd-1p8-supply = <&vreg_l15b_1p8>;
-- 
2.34.1


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

* [PATCH 3/3] arm64: defconfig: enable reset-gpio driver as module
  2024-02-27 14:27 [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode Krzysztof Kozlowski
  2024-02-27 14:27 ` [PATCH 2/3] arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio Krzysztof Kozlowski
@ 2024-02-27 14:27 ` Krzysztof Kozlowski
  2024-03-02  0:02   ` Konrad Dybcio
  2024-03-02  0:01 ` [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode Konrad Dybcio
  2024-03-19  2:48 ` (subset) " Bjorn Andersson
  3 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-27 14:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Catalin Marinas, Will Deacon, linux-arm-msm,
	devicetree, linux-kernel, linux-arm-kernel
  Cc: Krzysztof Kozlowski

Qualcomm X1E80100-CRD board uses shared reset GPIOs for speakers: each
pair out of four speakers share the GPIO.  Enable the reset-gpio driver
which handles such case seamlessly.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 3f44aebafda8..746ea4499e72 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -1473,6 +1473,7 @@ CONFIG_PWM_VISCONTI=m
 CONFIG_SL28CPLD_INTC=y
 CONFIG_QCOM_PDC=y
 CONFIG_QCOM_MPM=y
+CONFIG_RESET_GPIO=m
 CONFIG_RESET_IMX7=y
 CONFIG_RESET_QCOM_AOSS=y
 CONFIG_RESET_QCOM_PDC=m
-- 
2.34.1


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

* Re: [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode
  2024-02-27 14:27 [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode Krzysztof Kozlowski
  2024-02-27 14:27 ` [PATCH 2/3] arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio Krzysztof Kozlowski
  2024-02-27 14:27 ` [PATCH 3/3] arm64: defconfig: enable reset-gpio driver as module Krzysztof Kozlowski
@ 2024-03-02  0:01 ` Konrad Dybcio
  2024-03-19  2:48 ` (subset) " Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-03-02  0:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon,
	linux-arm-msm, devicetree, linux-kernel, linux-arm-kernel

On 27.02.2024 15:27, Krzysztof Kozlowski wrote:
> Correct the SWR1 Soundwire controller port block pack mode to match
> reference code.  Not sure if this has any impact.

Probably it falls into the "undebuggable if present" kind of issues..

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

I'm assuming your new source is correct-er

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

Konrad

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

* Re: [PATCH 2/3] arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio
  2024-02-27 14:27 ` [PATCH 2/3] arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio Krzysztof Kozlowski
@ 2024-03-02  0:02   ` Konrad Dybcio
  0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-03-02  0:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon,
	linux-arm-msm, devicetree, linux-kernel, linux-arm-kernel

On 27.02.2024 15:27, Krzysztof Kozlowski wrote:
> Each pair of WSA8845 speakers share the powerdown SD_N GPIO, thus this
> GPIO is specified twice in each WSA8845 device node.  Such DTS was added
> hoping non-exclusive GPIO usage would be accepted, but it turned out
> otherwise: it is not supported by the Linux kernel.
> 
> Linux kernel however supports sharing reset GPIOs, when used bia the
> reset controller framework as implemented in commit 26c8a435fce6 ("ASoC:
> dt-bindings: qcom,wsa8840: Add reset-gpios for shared line") and
> commit c721f189e89c ("reset: Instantiate reset GPIO controller for
> shared reset-gpios").
> 
> Convert the property with shutdown GPIO to "reset-gpios" to use
> mentioned Linux kernel feature.  This allows to bring all four speakers
> out of reset.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---

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

Konrad

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

* Re: [PATCH 3/3] arm64: defconfig: enable reset-gpio driver as module
  2024-02-27 14:27 ` [PATCH 3/3] arm64: defconfig: enable reset-gpio driver as module Krzysztof Kozlowski
@ 2024-03-02  0:02   ` Konrad Dybcio
  0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-03-02  0:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Catalin Marinas, Will Deacon,
	linux-arm-msm, devicetree, linux-kernel, linux-arm-kernel

On 27.02.2024 15:27, Krzysztof Kozlowski wrote:
> Qualcomm X1E80100-CRD board uses shared reset GPIOs for speakers: each
> pair out of four speakers share the GPIO.  Enable the reset-gpio driver
> which handles such case seamlessly.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

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

Konrad

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

* Re: (subset) [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode
  2024-02-27 14:27 [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2024-03-02  0:01 ` [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode Konrad Dybcio
@ 2024-03-19  2:48 ` Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2024-03-19  2:48 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Catalin Marinas, Will Deacon, linux-arm-msm, devicetree,
	linux-kernel, linux-arm-kernel, Krzysztof Kozlowski


On Tue, 27 Feb 2024 15:27:23 +0100, Krzysztof Kozlowski wrote:
> Correct the SWR1 Soundwire controller port block pack mode to match
> reference code.  Not sure if this has any impact.
> 
> 

Applied, thanks!

[3/3] arm64: defconfig: enable reset-gpio driver as module
      commit: cf30987a9ae9a8a430f957f8516b2092f6bab29d

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

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

end of thread, other threads:[~2024-03-19  2:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-27 14:27 [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode Krzysztof Kozlowski
2024-02-27 14:27 ` [PATCH 2/3] arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio Krzysztof Kozlowski
2024-03-02  0:02   ` Konrad Dybcio
2024-02-27 14:27 ` [PATCH 3/3] arm64: defconfig: enable reset-gpio driver as module Krzysztof Kozlowski
2024-03-02  0:02   ` Konrad Dybcio
2024-03-02  0:01 ` [PATCH 1/3] arm64: dts: qcom: x1e80100: correct SWR1 pack mode Konrad Dybcio
2024-03-19  2:48 ` (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).