Re: [PATCH 2/4] arm64: dts: qcom: c630: Enable audio support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 05 Mar 06:53 PST 2020, Srinivas Kandagatla wrote:

> This patch add support to audio via WSA881x Speakers and Headset.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
> ---
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 91 +++++++++++++++++++
>  1 file changed, 91 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> index b255be3a4a0a..99f5836b9331 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -8,6 +8,8 @@
>  /dts-v1/;
>  
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include <dt-bindings/sound/qcom,q6afe.h>
> +#include <dt-bindings/sound/qcom,q6asm.h>
>  #include "sdm845.dtsi"
>  #include "pm8998.dtsi"
>  
> @@ -353,6 +355,95 @@
>  	status = "okay";
>  };
>  
> +&slim_msm {
> +	ngd@1 {
> +		wcd9340: codec@1{

Afaict this extends the &wcd9340 defined in sdm845.dtsi, so you should
be able to just reference &wcd9340 here instead.

> +			clock-names = "extclk";
> +			clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
> +			vdd-buck-supply = <&vreg_s4a_1p8>;
> +			vdd-buck-sido-supply = <&vreg_s4a_1p8>;
> +			vdd-tx-supply = <&vreg_s4a_1p8>;
> +			vdd-rx-supply = <&vreg_s4a_1p8>;
> +			vdd-io-supply = <&vreg_s4a_1p8>;
> +			swm: swm@c85 {

This too extends the node from sdm845.dtsi, so reference it by label
(and perhaps give it a label to indicate that this is the wcd9340_swm?

> +				left_spkr:wsa8810-left{

Space after ':', unit address on the node name and then perhaps just
give the node a more generic name? Something like:

left_spkr: amplifier@0 {

> +					compatible = "sdw10217211000";
> +					reg = <0 3>;
> +					powerdown-gpios = <&wcdpinctrl 2 0>;

s/0/GPIO_ACTIVE_HIGH/

> +					#thermal-sensor-cells = <0>;
> +					sound-name-prefix = "SpkrLeft";
> +					#sound-dai-cells = <0>;
> +				};
> +
> +				right_spkr:wsa8810-right{
> +					compatible = "sdw10217211000";
> +					powerdown-gpios = <&wcdpinctrl 3 0>;
> +					reg = <0 4>;
> +					#thermal-sensor-cells = <0>;
> +					sound-name-prefix = "SpkrRight";
> +					#sound-dai-cells = <0>;
> +				};
> +			};
> +
> +		};
> +	};
> +};

Regards,
Bjorn



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux