mbox series

[v4,0/8] Enable audio on qcs6490-RB3Gen2 and qcm6490-idp boards

Message ID 20250527111227.2318021-1-quic_pkumpatl@quicinc.com
Headers show
Series Enable audio on qcs6490-RB3Gen2 and qcm6490-idp boards | expand

Message

Prasad Kumpatla May 27, 2025, 11:12 a.m. UTC
From: Mohammad Rafi Shaik <quic_mohs@quicinc.com>

Audio support is now enabled on the qcs6490-RB3Gen2 and qcm6490-idp boards.
The updates include adding the necessary audio device tree support and the required
dependencies.

Both the qcs6490-RB3Gen2 and qcm6490-idp boards are derived from the same SoC 
platform. Therefore, the audio support changes are included in a single patch 
set for consistency and ease of maintenance.

Changes in [v4]:
	- Fix DT binding errors by adding dt-binding clock changes for ADSP base platform.
	- Link to V3 : https://lore.kernel.org/linux-arm-msm/20250520062618.2765109-1-quic_pkumpatl@quicinc.com/

Changes in [v3]:
	- Added protection-domain in gpr services.
	- Addressed the review commnets from Konrad Dybcio.
	- Fix DT binding errors reported by Rob Herring.
	- Link to V2 : https://lore.kernel.org/linux-arm-msm/20250429092430.21477-1-quic_pkumpatl@quicinc.com/

Changes in [v2]:
	- Created dtsi file to handle common audio nodes to support Audioreach.
	- Addressed the review comments.
	- Link to V1 : https://lore.kernel.org/linux-arm-msm/20250317054151.6095-2-quic_pkumpatl@quicinc.com/

Mohammad Rafi Shaik (8):
  arm64: dts: qcom: qcs6490-audioreach: Add gpr node
  ASoC: dt-bindings: qcom: Manage clock settings for ADSP solution
  arm64: dts: qcom: sc7280: Add WSA SoundWire and LPASS support
  arm64: dts: qcom: qcs6490-audioreach: Modify LPASS macros clock
    settings for audioreach
  arm64: dts: qcom: qcs6490-rb3gen2: Add WSA8830 speakers amplifier
  arm64: dts: qcom: qcs6490-rb3gen2: Add sound card
  arm64: dts: qcom: qcm6490-idp: Add WSA8830 speakers and WCD9370
    headset codec
  arm64: dts: qcom: qcm6490-idp: Add sound card

 .../qcom,sc7280-lpass-lpi-pinctrl.yaml        |  10 +
 .../bindings/sound/qcom,lpass-va-macro.yaml   |  12 +-
 .../bindings/sound/qcom,lpass-wsa-macro.yaml  |  24 ++-
 arch/arm64/boot/dts/qcom/qcm6490-idp.dts      | 180 ++++++++++++++++++
 .../boot/dts/qcom/qcs6490-audioreach.dtsi     | 158 +++++++++++++++
 arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts  |  80 ++++++++
 arch/arm64/boot/dts/qcom/sc7280.dtsi          |  78 +++++++-
 7 files changed, 535 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi


base-commit: 176e917e010cb7dcc605f11d2bc33f304292482b

Comments

Konrad Dybcio May 31, 2025, 6:27 p.m. UTC | #1
On 5/27/25 1:12 PM, Prasad Kumpatla wrote:
> From: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
> 
> Modify and enable WSA, VA, RX and TX lpass macros and lpass_tlmm clock
> settings. For audioreach solution mclk, npl and fsgen clocks are enabled
> through the q6prm clock driver.
> 
> For qcs6490 RX drives clk from TX CORE which is mandated from DSP side,
> Unlike dedicated core clocks. Core TX clk is used for both RX and
> WSA as per DSP recommendations.
> 
> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
> Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
> Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad
Prasad Kumpatla June 1, 2025, 12:52 p.m. UTC | #2
On 5/27/2025 5:29 PM, Krzysztof Kozlowski wrote:
> On 27/05/2025 13:12, Prasad Kumpatla wrote:
>> +	left_spkr: speaker@0,1 {
>> +		compatible = "sdw10217020200";
>> +		reg = <0 1>;
>> +		powerdown-gpios = <&tlmm 158 GPIO_ACTIVE_LOW>;
>> +		#sound-dai-cells = <0>;
>> +		sound-name-prefix = "SpkrLeft";
>> +		#thermal-sensor-cells = <0>;
>> +		vdd-supply = <&vreg_l18b_1p8>;
>> +		qcom,port-mapping = <1 2 3 7>;
>> +	};
>> +
>> +	right_spkr: speaker@0,2 {
>> +		compatible = "sdw10217020200";
>> +		reg = <0 2>;
>> +		powerdown-gpios = <&tlmm 158 GPIO_ACTIVE_LOW>;
> 
> 
> This will fail during runtime. You never booted your DTS.

No, its working fine, didn't seen any issues for far. Please help to 
provide at which point of line seen issue or provide more context to 
understand for me?

Thanks,
Prasad>
> Best regards,
> Krzysztof
Prasad Kumpatla June 1, 2025, 12:56 p.m. UTC | #3
On 5/27/2025 5:30 PM, Krzysztof Kozlowski wrote:
> On 27/05/2025 13:12, Prasad Kumpatla wrote:
>> From: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
>>
>> Add the sound card node with tested playback over WSA8835 speakers
>> and digital on-board mics.
>>
>> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
>> Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
>> Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> ---
>>   arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 45 ++++++++++++++++++++
>>   1 file changed, 45 insertions(+)
> 
> 
> Don't add one-node per patch. Add entire sound for this board.

Ack, Will takecare in upcoming platforms.

Thanks,
Prasad>
> Best regards,
> Krzysztof
Prasad Kumpatla June 1, 2025, 1:01 p.m. UTC | #4
On 5/27/2025 7:47 PM, Alexey Klimov wrote:
> On Tue May 27, 2025 at 12:12 PM BST, Prasad Kumpatla wrote:
>> From: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
>>
>> Audio support is now enabled on the qcs6490-RB3Gen2 and qcm6490-idp boards.
>> The updates include adding the necessary audio device tree support and the required
>> dependencies.
> 
> Do you have topology file and mixers commands (or UCM profile) to test this?
> 
> I already asked but I don't see any replies. How this can be tested?

please use these below UCM config files
https://github.com/mohsRafi/alsa-ucm-conf/blob/qcs6490_qcm6490_hifi/ucm2/Qualcomm/qcs6490/QCS6490-RB3Gen2/HiFi.conf

https://github.com/mohsRafi/alsa-ucm-conf/blob/qcs6490_qcm6490_hifi/ucm2/Qualcomm/qcm6490/QCM6490-IDP/HiFi.conf

Thanks,
Prasad

> 
> Thanks,
> Alexey
Krzysztof Kozlowski June 1, 2025, 2:54 p.m. UTC | #5
On 01/06/2025 14:52, Prasad Kumpatla wrote:
> 
> 
> On 5/27/2025 5:29 PM, Krzysztof Kozlowski wrote:
>> On 27/05/2025 13:12, Prasad Kumpatla wrote:
>>> +	left_spkr: speaker@0,1 {
>>> +		compatible = "sdw10217020200";
>>> +		reg = <0 1>;
>>> +		powerdown-gpios = <&tlmm 158 GPIO_ACTIVE_LOW>;
>>> +		#sound-dai-cells = <0>;
>>> +		sound-name-prefix = "SpkrLeft";
>>> +		#thermal-sensor-cells = <0>;
>>> +		vdd-supply = <&vreg_l18b_1p8>;
>>> +		qcom,port-mapping = <1 2 3 7>;
>>> +	};
>>> +
>>> +	right_spkr: speaker@0,2 {
>>> +		compatible = "sdw10217020200";
>>> +		reg = <0 2>;
>>> +		powerdown-gpios = <&tlmm 158 GPIO_ACTIVE_LOW>;
>>
>>
>> This will fail during runtime. You never booted your DTS.
> 
> No, its working fine, didn't seen any issues for far. Please help to 
> provide at which point of line seen issue or provide more context to 
> understand for me?
Okay, so the driver uses non-exclusive GPIO. Well, this should be really
fixed now. There is no excuse now "cannot work", because I fixed WSA884x
so new DTS using this method should not be allowed. Non-exclusive in
this driver is buggy and works by pure coincidence. You should see clear
warnings and issues during probe, because working device WILL be reset
by the other device.

Best regards,
Krzysztof
Dmitry Baryshkov June 4, 2025, 8:20 a.m. UTC | #6
On Tue, May 27, 2025 at 04:42:24PM +0530, Prasad Kumpatla wrote:
> From: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
> 
> Add nodes for WSA8830 speakers amplifier on qcs6490-rb3gen2 board.
> 
> Enable lpass_wsa and lpass_va macros along with pinctrl settings
> for audio.
> 
> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
> Co-developed-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
> Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
> ---
>  .../boot/dts/qcom/qcs6490-audioreach.dtsi     | 18 ++++++++++
>  arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts  | 35 +++++++++++++++++++
>  2 files changed, 53 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi b/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
> index 4111091f77b2..542a39ca72bb 100644
> --- a/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
> @@ -11,6 +11,24 @@
>  #include <dt-bindings/sound/qcom,q6afe.h>
>  #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
>  
> +&lpass_dmic01_clk {
> +	drive-strength = <8>;
> +	bias-disable;
> +};
> +
> +&lpass_dmic01_data {
> +	bias-pull-down;
> +};
> +
> +&lpass_dmic23_clk {
> +	drive-strength = <8>;
> +	bias-disable;
> +};
> +
> +&lpass_dmic23_data {
> +	bias-pull-down;
> +};
> +
>  &lpass_rx_macro {
>  	/delete-property/ power-domains;
>  	/delete-property/ power-domain-names;
> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
> index 5fbcd48f2e2d..21cb392c36fa 100644
> --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
> +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
> @@ -19,6 +19,7 @@
>  #include "pm7325.dtsi"
>  #include "pm8350c.dtsi"
>  #include "pmk8350.dtsi"
> +#include "qcs6490-audioreach.dtsi"
>  
>  /delete-node/ &ipa_fw_mem;
>  /delete-node/ &rmtfs_mem;
> @@ -765,6 +766,14 @@ redriver_usb_con_sbu: endpoint {
>  	};
>  };
>  
> +&lpass_va_macro {

[   10.942165] va_macro 3370000.codec: qcom,dmic-sample-rate dt entry missing


> +	status = "okay";
> +};
> +
> +&lpass_wsa_macro {
> +	status = "okay";
> +};
> +
>  &mdss {
>  	status = "okay";
>  };
> @@ -1039,6 +1048,32 @@ &sdhc_2 {
>  	status = "okay";
>  };
>  
> +&swr2 {
> +	status = "okay";
> +
> +	left_spkr: speaker@0,1 {
> +		compatible = "sdw10217020200";
> +		reg = <0 1>;
> +		powerdown-gpios = <&tlmm 158 GPIO_ACTIVE_LOW>;
> +		#sound-dai-cells = <0>;
> +		sound-name-prefix = "SpkrLeft";
> +		#thermal-sensor-cells = <0>;
> +		vdd-supply = <&vreg_l18b_1p8>;
> +		qcom,port-mapping = <1 2 3 7>;
> +	};
> +
> +	right_spkr: speaker@0,2 {
> +		compatible = "sdw10217020200";
> +		reg = <0 2>;
> +		powerdown-gpios = <&tlmm 158 GPIO_ACTIVE_LOW>;
> +		#sound-dai-cells = <0>;
> +		sound-name-prefix = "SpkrRight";
> +		#thermal-sensor-cells = <0>;
> +		vdd-supply = <&vreg_l18b_1p8>;
> +		qcom,port-mapping = <4 5 6 8>;
> +	};
> +};
> +
>  &tlmm {
>  	gpio-reserved-ranges = <32 2>, /* ADSP */
>  			       <48 4>; /* NFC */
> -- 
> 2.34.1
>