Devicetree
 help / color / mirror / Atom feed
From: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
To: Srinivas Kandagatla <srini@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: Abel Vesa <abelvesa@kernel.org>,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Subject: [PATCH v1 5/8] arm64: dts: qcom: hawi-mtp: enable audio playback and capture
Date: Wed, 23 Sep 2026 14:16:24 +0530	[thread overview]
Message-ID: <20260923084627.748920-6-prasad.kumpatla@oss.qualcomm.com> (raw)
In-Reply-To: <20260923084627.748920-1-prasad.kumpatla@oss.qualcomm.com>

Wire up the audio use cases on the Hawi MTP board on top of the LPASS
nodes added to the SoC dtsi.

Add the sound card (qcom,hawi-sndcard) with the TDM playback, WCD
playback/capture and VA DMIC capture DAI links and the associated audio
routing. Describe the WCD9395 codec, enable the RX and TX SoundWire
controllers with their WCD RX/TX satellite ports, and add the WSA8855
speaker amplifier on i2c3. Configure the VA macro DMIC supply and the
required TLMM pin states (WCD reset, WSA IRQ, WSA shutdown).

Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/hawi-mtp.dts | 206 ++++++++++++++++++++++++++
 1 file changed, 206 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/hawi-mtp.dts b/arch/arm64/boot/dts/qcom/hawi-mtp.dts
index b7346e20bf02..6da4c242dae4 100644
--- a/arch/arm64/boot/dts/qcom/hawi-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/hawi-mtp.dts
@@ -5,10 +5,12 @@
 
 /dts-v1/;
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
 
 #include "hawi.dtsi"
 
@@ -127,6 +129,122 @@ pmic_glink_dp_out: endpoint {
 		};
 	};
 
+	hawi_sound: sound {
+		compatible = "qcom,hawi-sndcard", "qcom,sm8450-sndcard";
+		model = "HAWI-MTP";
+
+		audio-routing = "IN1_HPHL", "HPHL_OUT",
+				"IN2_HPHR", "HPHR_OUT",
+				"AMIC2", "MIC BIAS2",
+				"VA DMIC0", "MIC BIAS1",
+				"VA DMIC1", "MIC BIAS1",
+				"VA DMIC2", "MIC BIAS3",
+				"VA DMIC3", "MIC BIAS3",
+				"TX SWR_INPUT", "ADC2_OUTPUT";
+
+		pinctrl-names = "default", "sleep";
+		pinctrl-0 = <&lpi_i2s1_active>;
+		pinctrl-1 = <&lpi_i2s1_sleep>;
+
+		va-dmic-dai-link {
+			link-name = "VA DMIC Capture";
+
+			codec {
+				sound-dai = <&lpass_vamacro 0>;
+			};
+
+			cpu {
+				sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
+			};
+
+			platform {
+				sound-dai = <&q6apm>;
+			};
+		};
+
+		wcd-capture-dai-link {
+			link-name = "WCD Capture";
+
+			codec {
+				sound-dai = <&wcd939x 1>, <&swr2 0>, <&lpass_txmacro 0>;
+			};
+
+			cpu {
+				sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
+			};
+
+			platform {
+				sound-dai = <&q6apm>;
+			};
+		};
+
+		wcd-playback-dai-link {
+			link-name = "WCD Playback";
+
+			codec {
+				sound-dai = <&wcd939x 0>, <&swr1 0>, <&lpass_rxmacro 0>;
+			};
+
+			cpu {
+				sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
+			};
+
+			platform {
+				sound-dai = <&q6apm>;
+			};
+		};
+
+		wsa-playback-dai-link {
+			link-name = "WSA Playback";
+
+			codec {
+				sound-dai = <&wsa885x>;
+				dai-tdm-slot-num = <2>;
+				dai-tdm-slot-width = <32>;
+				dai-tdm-slot-rx-mask = <1 1>;
+			};
+
+			cpu {
+				sound-dai = <&q6apmbedai AIF_TDM_RX_1>;
+				dai-tdm-slot-num = <2>;
+				dai-tdm-slot-width = <32>;
+				dai-tdm-slot-rx-mask = <1 1>;
+			};
+
+			platform {
+				sound-dai = <&q6apm>;
+			};
+		};
+	};
+
+	wcd939x: audio-codec {
+		compatible = "qcom,wcd9395-codec", "qcom,wcd9390-codec";
+
+		pinctrl-0 = <&wcd_default>;
+		pinctrl-names = "default";
+
+		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000
+							 500000 500000 500000 500000>;
+		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
+		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
+		qcom,micbias1-microvolt = <1800000>;
+		qcom,micbias2-microvolt = <1800000>;
+		qcom,micbias3-microvolt = <1800000>;
+		qcom,micbias4-microvolt = <1800000>;
+		qcom,rx-device = <&wcd_rx>;
+		qcom,tx-device = <&wcd_tx>;
+
+		reset-gpios = <&tlmm 161 GPIO_ACTIVE_LOW>;
+
+		vdd-buck-supply = <&vreg_l15b_1p8>;
+		vdd-io-supply = <&vreg_l15b_1p8>;
+		vdd-mic-bias-supply = <&vreg_bob1>;
+		vdd-px-supply = <&vreg_l3i_1p2>;
+		vdd-rxtx-supply = <&vreg_l15b_1p8>;
+
+		#sound-dai-cells = <1>;
+	};
+
 	sdcard_vdd_3p0: sdcard-vdd-3p0 {
 		compatible = "regulator-fixed";
 
@@ -145,6 +263,70 @@ sdcard_vdd_3p0: sdcard-vdd-3p0 {
 	};
 };
 
+&lpass_vamacro {
+	pinctrl-0 = <&dmic01_default>, <&dmic23_default>;
+	pinctrl-names = "default";
+
+	vdd-micb-supply = <&vreg_l10b_1p8>;
+	qcom,dmic-sample-rate = <4800000>;
+};
+
+
+&q6apmbedai {
+	dai@40 {
+		reg = <AIF_TDM_RX_1>;
+		clocks = <&q6prmcc LPASS_CLK_ID_QAIF_IF1_IBIT
+			  LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+		clock-names = "bclk";
+	};
+};
+
+&i2c3 {
+	status = "okay";
+
+	wsa885x: speaker@c {
+		compatible = "qcom,wsa8855";
+		reg = <0x0c>;
+
+		interrupt-parent = <&tlmm>;
+		interrupts = <77 IRQ_TYPE_EDGE_FALLING>;
+
+		pinctrl-0 = <&wsa885x_spkr_sd_n &wsa885x_irq_gpio>;
+		pinctrl-names = "default";
+
+		powerdown-gpios = <&pmh0110_f_e0_gpios 11 GPIO_ACTIVE_LOW>;
+
+		vdd-1p8-supply = <&vreg_l2g_1p8>;
+		vdd-io-supply = <&vreg_l1g_1p2>;
+
+		qcom,battery-config = "1s";
+
+		#sound-dai-cells = <0>;
+
+		status = "okay";
+	};
+};
+
+&swr1 {
+	status = "okay";
+	wcd_rx: codec@0,4 {
+		compatible = "sdw20217010e00";
+		reg = <0 4>;
+
+		qcom,rx-port-mapping = <1 2 3 4 5 9>;
+	};
+};
+
+&swr2 {
+	status = "okay";
+
+	wcd_tx: codec@0,3 {
+		compatible = "sdw20217010e00";
+		reg = <0 3>;
+		qcom,tx-port-mapping = <3 3 3 4>;
+	};
+};
+
 &apps_rsc {
 	regulators-0 {
 		compatible = "qcom,pmh0101-rpmh-regulators";
@@ -813,6 +995,16 @@ &pcie1_port0 {
 	reset-gpios = <&tlmm 220 GPIO_ACTIVE_LOW>;
 };
 
+&pmh0110_f_e0_gpios {
+	wsa885x_spkr_sd_n: wsa885x-spkr-sd-n-state {
+		pins = "gpio11";
+		function = "normal";
+		input-disable;
+		output-enable;
+		power-source = <1>; /* 1.8V */
+	};
+};
+
 &pmh0101_flash {
 	status = "okay";
 
@@ -937,6 +1129,20 @@ &tlmm {
 			       <119 2>, /* SoCCP */
 			       <144 2>; /* CXM UART */
 
+	wcd_default: wcd-reset-n-active-state {
+		pins = "gpio161";
+		function = "gpio";
+		drive-strength = <16>;
+		bias-disable;
+	};
+
+	wsa885x_irq_gpio: wsa885x-irq-state {
+		pins = "gpio77";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	key_vol_up_default: key-vol-up-default-state {
 		pins = "gpio101";
 		function = "gpio";
-- 
2.34.1


  parent reply	other threads:[~2026-09-23  8:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23  8:46 [PATCH v1 0/8] ASoC: qcom: Add audio support for Hawi and Maili platforms Prasad Kumpatla
2026-09-23  8:46 ` [PATCH v1 1/8] ASoC: codecs: wsa885x: Reset registers on teardown for B2B playback Prasad Kumpatla
2026-09-23  8:46 ` [PATCH v1 2/8] ASoC: qcom: sc8280xp: add Maili sound card configuration Prasad Kumpatla
2026-09-23  8:46 ` [PATCH v1 3/8] ASoC: dt-bindings: qcom: Add Maili LPASS macro codecs Prasad Kumpatla
2026-09-23  8:51   ` Krzysztof Kozlowski
2026-09-23  8:46 ` [PATCH v1 4/8] arm64: dts: qcom: hawi: add LPASS audio subsystem nodes Prasad Kumpatla
2026-09-23  8:46 ` Prasad Kumpatla [this message]
2026-09-24  4:57   ` [PATCH v1 5/8] arm64: dts: qcom: hawi-mtp: enable audio playback and capture Ajay Kumar Nandam
2026-09-23  8:46 ` [PATCH v1 6/8] arm64: dts: qcom: maili: add LPASS audio subsystem nodes Prasad Kumpatla
2026-09-23  8:46 ` [PATCH v1 7/8] arm64: dts: qcom: maili-mtp: enable audio playback and capture Prasad Kumpatla
2026-09-24  5:21   ` Ajay Kumar Nandam
2026-09-23  8:46 ` [PATCH v1 8/8] arm64: defconfig: Enable Hawi LPASS LPI pinctrl driver Prasad Kumpatla
2026-09-23 15:32 ` [PATCH v1 0/8] ASoC: qcom: Add audio support for Hawi and Maili platforms Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260923084627.748920-6-prasad.kumpatla@oss.qualcomm.com \
    --to=prasad.kumpatla@oss.qualcomm.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox