arm64: dts: qcom: x1e80100-crd: add WSA8845 speakers
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 14 Dec 2023 13:10:16 +0000 (14:10 +0100)
committerBjorn Andersson <andersson@kernel.org>
Tue, 6 Feb 2024 20:58:43 +0000 (14:58 -0600)
Add nodes for four WSA8845 speakers.  Unlike previous boards like
SM8550-QRD, this board has four speakers spread over two Soundwire buses
instead of two speakers on one bus.  Each pair of speakers shares the
reset GPIO thus pinctrl property is only in one of them.

Cc: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231214131016.30502-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/x1e80100-crd.dts

index 4a273c118193323bb66ed26f051a802c4df84431..12abc9287a750e1f7096e5ed24da37654ce7c344 100644 (file)
        };
 };
 
+&lpass_tlmm {
+       spkr_01_sd_n_active: spkr-01-sd-n-active-state {
+               pins = "gpio12";
+               function = "gpio";
+               drive-strength = <16>;
+               bias-disable;
+               output-low;
+       };
+
+       spkr_23_sd_n_active: spkr-23-sd-n-active-state {
+               pins = "gpio13";
+               function = "gpio";
+               drive-strength = <16>;
+               bias-disable;
+               output-low;
+       };
+};
+
 &mdss {
        status = "okay";
 };
        status = "okay";
 };
 
+&swr0 {
+       status = "okay";
+
+       /* 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>;
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "WooferLeft";
+               vdd-1p8-supply = <&vreg_l15b_1p8>;
+               vdd-io-supply = <&vreg_l12b_1p2>;
+       };
+
+       /* WSA8845, Left Tweeter */
+       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>;
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TwitterLeft";
+               vdd-1p8-supply = <&vreg_l15b_1p8>;
+               vdd-io-supply = <&vreg_l12b_1p2>;
+       };
+};
+
 &swr1 {
        status = "okay";
 
        };
 };
 
+&swr3 {
+       status = "okay";
+
+       /* 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>;
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "WooferRight";
+               vdd-1p8-supply = <&vreg_l15b_1p8>;
+               vdd-io-supply = <&vreg_l12b_1p2>;
+       };
+
+       /* WSA8845, Right Tweeter */
+       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>;
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TwitterRight";
+               vdd-1p8-supply = <&vreg_l15b_1p8>;
+               vdd-io-supply = <&vreg_l12b_1p2>;
+       };
+};
+
 &tlmm {
        gpio-reserved-ranges = <34 2>, /* Unused */
                               <44 4>, /* SPI (TPM) */