arm64: dts: qcom: x1e80100-crd: switch WSA8845 speakers to shared reset-gpio
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 27 Feb 2024 14:27:24 +0000 (15:27 +0100)
committerBjorn Andersson <andersson@kernel.org>
Mon, 18 Mar 2024 02:28:43 +0000 (21:28 -0500)
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>
Link: https://lore.kernel.org/r/20240227142725.625561-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/x1e80100-crd.dts

index 6a0a54532e5feb494606f5da814cf1090256c725..dfdb31227e8bd6f6b4ca03a8489b679c9e22ee57 100644 (file)
 &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>;
        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>;
 &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>;
        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>;