.../qcs6490-rb3gen2-industrial-mezzanine.dtso | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+)
Add WCD playback and capture DAI link to sound node. Add WCD
codec node and corresponding soundwire nodes to perform
headset playback and record.
Signed-off-by: Karthik S <karthik.s@qss.qualcomm.com>
---
.../qcs6490-rb3gen2-industrial-mezzanine.dtso | 133 ++++++++++++++++++
1 file changed, 133 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
index 83908db335af..d2503fce352c 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
+++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
@@ -6,6 +6,7 @@
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/clock/qcom,gcc-sc7280.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
@@ -30,6 +31,29 @@ vreg_1p8: regulator-1v8 {
regulator-always-on;
regulator-boot-on;
};
+
+ wcd9370: audio-codec-0 {
+ compatible = "qcom,wcd9370-codec";
+
+ pinctrl-0 = <&wcd_default>;
+ pinctrl-names = "default";
+
+ reset-gpios = <&tlmm 83 GPIO_ACTIVE_LOW>;
+ vdd-buck-supply = <&vph_pwr>;
+ vdd-rxtx-supply = <&vph_pwr>;
+ vdd-px-supply = <&vph_pwr>;
+ vdd-mic-bias-supply = <&vph_pwr>;
+ qcom,micbias1-microvolt = <1800000>;
+ qcom,micbias2-microvolt = <1800000>;
+ qcom,micbias3-microvolt = <1800000>;
+ qcom,micbias4-microvolt = <1800000>;
+ qcom,hphl-jack-type-normally-closed = <1>;
+ qcom,ground-jack-type-normally-closed = <1>;
+ qcom,rx-device = <&wcd937x_rx>;
+ qcom,tx-device = <&wcd937x_tx>;
+
+ #sound-dai-cells = <1>;
+ };
};
&remoteproc_wpss {
@@ -283,8 +307,117 @@ pcie1_tc9563_resx_n: pcie1-tc9563-resx-state {
output-enable;
};
+ wcd_default: wcd-reset-n-active-state {
+ pins = "gpio83";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ };
+
};
&wifi {
status = "disabled";
};
+
+&swr0 {
+ status = "okay";
+
+ wcd937x_rx: codec@0,4 {
+ compatible = "sdw20217010a00";
+ reg = <0 4>;
+
+ /*
+ * WCD9370 RX Port 1 (HPH_L/R) <==> SWR1 Port 1 (HPH_L/R)
+ * WCD9370 RX Port 2 (CLSH) <==> SWR1 Port 2 (CLSH)
+ * WCD9370 RX Port 3 (COMP_L/R) <==> SWR1 Port 3 (COMP_L/R)
+ * WCD9370 RX Port 4 (LO) <==> SWR1 Port 4 (LO)
+ * WCD9370 RX Port 5 (DSD_L/R) <==> SWR1 Port 5 (DSD)
+ */
+ qcom,rx-port-mapping = <1 2 3 4 5>;
+
+ /*
+ * Static channels mapping between slave and master rx port channels.
+ * In the order of slave port channels, which is
+ * hph_l, hph_r, clsh, comp_l, comp_r, lo, dsd_r, dsd_l.
+ */
+ qcom,rx-channel-mapping = /bits/ 8 <1 2 1 1 2 1 1 2>;
+ };
+};
+
+&swr1 {
+ status = "okay";
+ wcd937x_tx: codec@0,3 {
+ compatible = "sdw20217010a00";
+ reg = <0 3>;
+
+ /*
+ * WCD9370 TX Port 1 (ADC1) <=> SWR2 Port 2
+ * WCD9370 TX Port 2 (ADC2, 3) <=> SWR2 Port 2
+ * WCD9370 TX Port 3 (DMIC0,1,2,3 & MBHC) <=> SWR2 Port 3
+ * WCD9370 TX Port 4 (DMIC4,5,6,7) <=> SWR2 Port 4
+ */
+ qcom,tx-port-mapping = <1 1 2 3>;
+
+ /*
+ * Static channel mapping between slave and master tx port channels.
+ * In the order of slave port channels which is adc1, adc2, adc3,
+ * mic0, dmic1, mbhc, dmic2, dmic3, dmci4, dmic5, dmic6, dmic7.
+ */
+ qcom,tx-channel-mapping = /bits/ 8 <1 2 1 1 2 3 3 4 1 2 3 4>;
+ };
+};
+
+&lpass_tx_macro {
+ status = "okay";
+};
+
+&lpass_rx_macro {
+ status = "okay";
+};
+
+&sound {
+ model = "qcs6490-rb3gen2-ia-snd-card";
+ audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
+ "SpkrRight IN", "WSA_SPK2 OUT",
+ "IN1_HPHL", "HPHL_OUT",
+ "IN2_HPHR", "HPHR_OUT",
+ "AMIC2", "MIC BIAS2",
+ "TX SWR_ADC1", "ADC2_OUTPUT",
+ "VA DMIC0", "vdd-micb",
+ "VA DMIC1", "vdd-micb",
+ "VA DMIC2", "vdd-micb",
+ "VA DMIC3", "vdd-micb";
+
+ wcd-capture-dai-link {
+ link-name = "WCD Capture";
+
+ codec {
+ sound-dai = <&wcd9370 1>, <&swr1 0>, <&lpass_tx_macro 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 = <&wcd9370 0>, <&swr0 0>, <&lpass_rx_macro 0>;
+ };
+
+ cpu {
+ sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+};
--
2.34.1
On 17/04/2026 11:33, Karthik S wrote:
> Add WCD playback and capture DAI link to sound node. Add WCD
> codec node and corresponding soundwire nodes to perform
> headset playback and record.
>
> Signed-off-by: Karthik S <karthik.s@qss.qualcomm.com>
> ---
> .../qcs6490-rb3gen2-industrial-mezzanine.dtso | 133 ++++++++++++++++++
> 1 file changed, 133 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
> index 83908db335af..d2503fce352c 100644
> --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
> +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
> @@ -6,6 +6,7 @@
> /dts-v1/;
> /plugin/;
> #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/sound/qcom,q6afe.h>
> #include <dt-bindings/clock/qcom,gcc-sc7280.h>
> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>
> @@ -30,6 +31,29 @@ vreg_1p8: regulator-1v8 {
> regulator-always-on;
> regulator-boot-on;
> };
> +
> + wcd9370: audio-codec-0 {
Why 'audio-codec' goes after 'regulator'? And is there audio-codec-1? If
so, where?
> + compatible = "qcom,wcd9370-codec";
> +
> + pinctrl-0 = <&wcd_default>;
> + pinctrl-names = "default";
> +
> + reset-gpios = <&tlmm 83 GPIO_ACTIVE_LOW>;
> + vdd-buck-supply = <&vph_pwr>;
> + vdd-rxtx-supply = <&vph_pwr>;
> + vdd-px-supply = <&vph_pwr>;
> + vdd-mic-bias-supply = <&vph_pwr>;
> + qcom,micbias1-microvolt = <1800000>;
> + qcom,micbias2-microvolt = <1800000>;
> + qcom,micbias3-microvolt = <1800000>;
> + qcom,micbias4-microvolt = <1800000>;
> + qcom,hphl-jack-type-normally-closed = <1>;
> + qcom,ground-jack-type-normally-closed = <1>;
> + qcom,rx-device = <&wcd937x_rx>;
> + qcom,tx-device = <&wcd937x_tx>;
> +
> + #sound-dai-cells = <1>;
> + };
> };
>
> &remoteproc_wpss {
> @@ -283,8 +307,117 @@ pcie1_tc9563_resx_n: pcie1-tc9563-resx-state {
> output-enable;
> };
>
> + wcd_default: wcd-reset-n-active-state {
Messed indentation.
> + pins = "gpio83";
> + function = "gpio";
> + drive-strength = <16>;
> + bias-disable;
> + };
> +
> };
>
> &wifi {
> status = "disabled";
> };
> +
> +&swr0 {
What sort of sorting is this?
> + status = "okay";
> +
> + wcd937x_rx: codec@0,4 {
> + compatible = "sdw20217010a00";
> + reg = <0 4>;
Even worse here.
And finally:
Please run scripts/checkpatch.pl on the patches and fix reported
warnings. After that, run also 'scripts/checkpatch.pl --strict' on the
patches and (probably) fix more warnings. Some warnings can be ignored,
especially from --strict run, but the code here looks like it needs a
fix. Feel free to get in touch if the warning is not clear.
Undocumented ABI (without any reference in changelog where to find
posted patch).
Best regards,
Krzysztof
On 17/04/2026 11:42, Krzysztof Kozlowski wrote: > > And finally: > > Please run scripts/checkpatch.pl on the patches and fix reported > warnings. After that, run also 'scripts/checkpatch.pl --strict' on the > patches and (probably) fix more warnings. Some warnings can be ignored, > especially from --strict run, but the code here looks like it needs a > fix. Feel free to get in touch if the warning is not clear. As you pointed correctly after offline talk, checkpatch does not report undocumented compatible for the sound card qcs6490-rb3gen2-ia-snd-card. Unfortunately this patch did not go through internal toolset fully (PatchWise), which could have flag the issue. Let's discuss it internally next week. > > Undocumented ABI (without any reference in changelog where to find > posted patch). You still need to solve the undocumented sound card ABI - new compatible. If it is already sent to mailing lists, then provide link in patch changelog (---). Best regards, Krzysztof
On Fri, Apr 17, 2026 at 12:12:46PM +0200, Krzysztof Kozlowski wrote: > On 17/04/2026 11:42, Krzysztof Kozlowski wrote: > > > > And finally: > > > > Please run scripts/checkpatch.pl on the patches and fix reported > > warnings. After that, run also 'scripts/checkpatch.pl --strict' on the > > patches and (probably) fix more warnings. Some warnings can be ignored, > > especially from --strict run, but the code here looks like it needs a > > fix. Feel free to get in touch if the warning is not clear. > > As you pointed correctly after offline talk, checkpatch does not report > undocumented compatible for the sound card qcs6490-rb3gen2-ia-snd-card. > > Unfortunately this patch did not go through internal toolset fully > (PatchWise), which could have flag the issue. Let's discuss it > internally next week. > > > > > Undocumented ABI (without any reference in changelog where to find > > posted patch). > You still need to solve the undocumented sound card ABI - new > compatible. If it is already sent to mailing lists, then provide link in > patch changelog (---). Which compatible is new there? I think it is a model and not compatible. > > Best regards, > Krzysztof -- With best wishes Dmitry
On 18/04/2026 01:06, Dmitry Baryshkov wrote: > On Fri, Apr 17, 2026 at 12:12:46PM +0200, Krzysztof Kozlowski wrote: >> On 17/04/2026 11:42, Krzysztof Kozlowski wrote: >>> >>> And finally: >>> >>> Please run scripts/checkpatch.pl on the patches and fix reported >>> warnings. After that, run also 'scripts/checkpatch.pl --strict' on the >>> patches and (probably) fix more warnings. Some warnings can be ignored, >>> especially from --strict run, but the code here looks like it needs a >>> fix. Feel free to get in touch if the warning is not clear. >> >> As you pointed correctly after offline talk, checkpatch does not report >> undocumented compatible for the sound card qcs6490-rb3gen2-ia-snd-card. >> >> Unfortunately this patch did not go through internal toolset fully >> (PatchWise), which could have flag the issue. Let's discuss it >> internally next week. >> >>> >>> Undocumented ABI (without any reference in changelog where to find >>> posted patch). >> You still need to solve the undocumented sound card ABI - new >> compatible. If it is already sent to mailing lists, then provide link in >> patch changelog (---). > > Which compatible is new there? I think it is a model and not compatible. Ahh, damn, you are right. It's not adding any new compatible. It's fine, I got confused, no new ABI here. Thanks Dmitry, for pointing this out. Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.