From: David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org>
To: Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
David Rhodes <drhodes@opensource.cirrus.com>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com,
devicetree@vger.kernel.org, phone-devel@vger.kernel.org,
David Heidelberg <david@ixit.cz>
Subject: [PATCH v3 8/8] arm64: dts: qcom: sdm845-google: Add WCD9340 codec and microphone capture
Date: Thu, 24 Sep 2026 14:46:52 +0200 [thread overview]
Message-ID: <20260924-pixel3-audio-v3-8-5d06460fc8a9@ixit.cz> (raw)
In-Reply-To: <20260924-pixel3-audio-v3-0-5d06460fc8a9@ixit.cz>
From: David Heidelberg <david@ixit.cz>
The Pixel 3 sound card so far only drove the two CS35L36 speaker
amplifiers. Wire in the WCD9340 codec , add a SLIMbus capture link
for it and route the three digital microphones
Based on work done by Casey Tunturi.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 63 ++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
index cf87b582e3997..5393aee0370ac 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi
@@ -4,18 +4,20 @@
#include <dt-bindings/arm/qcom,ids.h>
#include <dt-bindings/dma/qcom-gpi.h>
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
+#include <dt-bindings/sound/qcom,wcd934x.h>
#include "sdm845.dtsi"
+#include "sdm845-wcd9340.dtsi"
#include "pm8998.dtsi"
#include "pmi8998.dtsi"
/delete-node/ &mpss_region;
/delete-node/ &venus_mem;
/delete-node/ &cdsp_mem;
/delete-node/ &mba_region;
/delete-node/ &slpi_mem;
@@ -510,16 +512,20 @@ dai@72 {
qcom,tdm-data-align = <0>;
};
};
&q6asmdai {
dai@0 {
reg = <MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
+
+ dai@1 {
+ reg = <MSM_FRONTEND_DAI_MULTIMEDIA2>;
+ };
};
&qupv3_id_0 {
status = "okay";
};
&qupv3_id_1 {
status = "okay";
@@ -537,40 +543,81 @@ &qup_uart9_tx {
&sound {
compatible = "qcom,sdm845-sndcard";
model = "blueline";
pinctrl-0 = <&quat_mi2s_active>, <&quat_mi2s_sd0_active>,
<&quat_mi2s_sd1_active>;
pinctrl-names = "default";
+ audio-routing = "DMIC0", "MCLK", /* Top mic */
+ "DMIC0", "MIC BIAS1",
+ "DMIC3", "MCLK", /* Top-edge mic */
+ "DMIC3", "MIC BIAS3",
+ "DMIC4", "MCLK", /* Bottom mic */
+ "DMIC4", "MIC BIAS4";
+
/* mm[0-9]-dai-link nodes must be positioned first regardless of sorting */
mm1-dai-link {
link-name = "MultiMedia1";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};
+ mm2-dai-link {
+ link-name = "MultiMedia2";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
+ };
+ };
+
cs35l36-dai-link {
link-name = "Speaker Playback";
codec {
sound-dai = <&cs35l36_bottom>, <&cs35l36_top>;
};
cpu {
sound-dai = <&q6afedai QUATERNARY_TDM_RX_0>;
};
platform {
sound-dai = <&q6routing>;
};
};
+
+ slimcap-dai-link {
+ link-name = "SLIM Capture 1";
+
+ codec {
+ sound-dai = <&wcd9340 AIF1_CAP>;
+ };
+
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_0_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ };
+};
+
+&swm {
+ /*
+ * Nothing hangs off the codec's SoundWire bus on this board: the
+ * speakers are CS35L36 amplifiers on QUAT_TDM. With an empty bus the
+ * controller reports port mismatches and frame-generator timeouts on
+ * every boot.
+ */
+ status = "disabled";
};
&tlmm {
gpio-reserved-ranges = < 0 4>, /* SPI (Intel MNH Pixel Visual Core) */
<81 4>; /* SPI (most likely Fingerprint Cards FPC1075) */
nfc_int_default: nfc-int-default-state {
pins = "gpio63";
@@ -706,16 +753,32 @@ &usb_1_qmpphy {
};
&venus {
firmware-name = "qcom/sdm845/Google/blueline/venus.mbn";
status = "okay";
};
+&wcd9340 {
+ /*
+ * PM8998 LN_BB_CLK2 feeds the Pixel Visual Core on this board; the
+ * codec MCLK comes from LN_BB_CLK3. With the wrong buffer the codec
+ * never sees 19.2 MHz: eFuse sensing times out and every capture
+ * path reads zeros while SLIMbus control traffic still works.
+ */
+ clocks = <&rpmhcc RPMH_LN_BB_CLK3>;
+ reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
+ 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>;
+};
+
&wifi {
vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
vdd-1.8-xo-supply = <&vreg_pmu_xo>;
vdd-1.3-rfa-supply = <&vreg_pmu_rf>;
vdd-3.3-ch0-supply = <&vreg_pmu_ch0>;
qcom,snoc-host-cap-8bit-quirk;
--
2.55.0
next prev parent reply other threads:[~2026-09-24 12:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 12:46 [PATCH v3 0/8] Speakers for Pixel 3 / 3 XL David Heidelberg via B4 Relay
2026-09-24 12:46 ` [PATCH v3 1/8] ASoC: qcom: sdm845: Demystify TDM masks a bit David Heidelberg via B4 Relay
2026-09-24 12:55 ` sashiko-bot
2026-09-24 12:46 ` [PATCH v3 2/8] ASoC: qcom: sdm845: use DSP_A format for TDM codec DAIs David Heidelberg via B4 Relay
2026-09-24 12:46 ` [PATCH v3 3/8] ASoC: qcom: sdm845: Use per-speaker RX masks for TDM slot assignment David Heidelberg via B4 Relay
2026-09-24 12:46 ` [PATCH v3 4/8] ASoC: qcom: sdm845: Set codec dai and component sysclk during startup David Heidelberg via B4 Relay
2026-09-24 12:46 ` [PATCH v3 5/8] ASoC: cs35l36: Implement set_tdm_slot to program RX and TX slots David Heidelberg via B4 Relay
2026-09-24 13:03 ` sashiko-bot
2026-09-24 12:46 ` [PATCH v3 6/8] arm64: dts: qcom: sdm845-google: Add basic audio support David Heidelberg via B4 Relay
2026-09-24 12:46 ` [PATCH v3 7/8] slimbus: qcom-ngd-ctrl: Remove data channels on stream disable David Heidelberg via B4 Relay
2026-09-24 12:46 ` David Heidelberg via B4 Relay [this message]
2026-09-24 13:04 ` [PATCH v3 0/8] Speakers for Pixel 3 / 3 XL Mark Brown
2026-09-24 13:25 ` David Heidelberg
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=20260924-pixel3-audio-v3-8-5d06460fc8a9@ixit.cz \
--to=devnull+david.ixit.cz@kernel.org \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=david@ixit.cz \
--cc=devicetree@vger.kernel.org \
--cc=drhodes@opensource.cirrus.com \
--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=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=phone-devel@vger.kernel.org \
--cc=rf@opensource.cirrus.com \
--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