[PATCH 3/7] arm64: dts: qcom: mahua-t14s: enable WCD9378 headset codec
From: Srinivas Kandagatla
Date: Thu Nov 26 2026 - 13:38:42 EST
Enable the WCD9378 SDCA-compliant headset codec on SoundWire,
matching the Glymur CRD wiring. swr2 is the SDCA primary and swr1
is a DATA-only multi-master dependent (lanes 2/3); the WCD Playback
and WCD Capture DAI links run through the LPASS RX/TX macros.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
---
.../mahua-lenovo-thinkpad-t14s-gen7-lcd.dts | 83 ++++++++++++++++++-
1 file changed, 82 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts b/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
index bad49ba5443f..84be12c07f6b 100644
--- a/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
+++ b/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
@@ -254,7 +254,10 @@ sound {
audio-routing = "SpkrLeft IN", "WSA WSA_SPK1 OUT",
"SpkrRight IN", "WSA WSA_SPK2 OUT",
"VA DMIC0", "vdd-micb",
- "VA DMIC1", "vdd-micb";
+ "VA DMIC1", "vdd-micb",
+ "IT 41 Playback", "HPHL_OUT",
+ "IT 41 Playback", "HPHR_OUT",
+ "TX SWR_INPUT1", "OT 36 Capture";
wsa-dai-link {
link-name = "WSA Playback";
@@ -273,6 +276,38 @@ platform {
};
};
+ wcd-playback-dai-link {
+ link-name = "WCD Playback";
+
+ cpu {
+ sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
+ };
+
+ codec {
+ sound-dai = <&wcd9378c 0>, <&swr2 0>, <&lpass_rxmacro 0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ wcd-capture-dai-link {
+ link-name = "WCD Capture";
+
+ cpu {
+ sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
+ };
+
+ codec {
+ sound-dai = <&wcd9378c 18>, <&swr2 1>, <&lpass_txmacro 0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
va-dai-link {
link-name = "VA Capture";
@@ -760,6 +795,44 @@ right_spkr: speaker@0,1 {
};
};
+/* WCD9378 multi-master: swr2 primary + swr1 dependent (DATA lanes 2/3). */
+&swr1 {
+ qcom,multi-master-mode = "dependent";
+ qcom,multi-master-peer = <&swr2 0>;
+ num-lanes = <2>;
+
+ status = "okay";
+};
+
+&swr2 {
+ qcom,multi-master-mode = "primary";
+ qcom,multi-master-peer = <&swr1 5>;
+ num-lanes = <2>;
+
+ status = "okay";
+
+ wcd9378c: codec@3,0 {
+ compatible = "sdw20217011000";
+ reg = <0 3>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&wcd_default>;
+
+ qcom,sdca-compliant;
+
+ qcom,port-mapping = <2 2 3 4 5 6 7 8>;
+
+ reset-gpios = <&tlmm 191 GPIO_ACTIVE_LOW>;
+
+ vdd-buck-supply = <&vreg_l15b0>;
+ vdd-rxtx-supply = <&vreg_l15b0>;
+ vdd-io-supply = <&vreg_l18b0>;
+ vdd-mic-bias-supply = <&vreg_bob1_e0>;
+
+ #sound-dai-cells = <1>;
+ };
+};
+
&tlmm {
gpio-reserved-ranges = <4 4>, /* EC TZ Secure I3C */
<10 2>, /* OOB UART */
@@ -881,6 +954,14 @@ tpad_default: tpad-default-state {
bias-disable;
};
+ wcd_default: wcd-reset-n-active-state {
+ pins = "gpio191";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ output-low;
+ };
+
wcn_wlan_bt_en: wcn-wlan-bt-en-state {
pins = "gpio116", "gpio117";
function = "gpio";
--
2.53.0