From: Srinivas Kandagatla <srini@kernel.org>
To: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>,
Mark Brown <broonie@kernel.org>
Cc: Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Luca Weiss <luca.weiss@fairphone.com>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>,
linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] ASoC: dt-bindings: add the Qualcomm WCD9378 audio codec
Date: Mon, 6 Jul 2026 22:17:56 +0100 [thread overview]
Message-ID: <958c9287-b606-497b-9de5-e73984b0f70b@kernel.org> (raw)
In-Reply-To: <20260706192229.144137-3-jorijnvdgraaf@catcrafts.net>
On 7/6/26 8:22 PM, Jorijn van der Graaf wrote:
> The Qualcomm WCD9378 is a standalone audio codec IC found on SM7635
> boards such as the Fairphone 6. Like the WCD937x/938x/939x codecs it
> presents RX and TX SoundWire slave devices controlled by a common
> parent node, so the parent binding references qcom,wcd93xx-common.yaml;
> unlike those codecs it has three ADCs and three mic bias supplies
> rather than four, hence qcom,micbias4-microvolt is rejected.
>
> The slave devices enumerate with manufacturer ID 0x0217 and part ID
> 0x0110, hence the sdw20217011000 compatible. The TX slave carries five
> device ports (ADC1, ADC2, ADC3, DMIC0/1 plus MBHC, DMIC2-5) and the RX
> slave the usual five (HPH, CLSH, COMP, LO, DSD).
>
> The -codec suffix in the parent compatible follows the existing
> qcom,wcd93xx/pm4125 family compatibles and matches the compatible
> shipped by production devicetrees for this chip.
>
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
> ---
> .../bindings/sound/qcom,wcd9378-codec.yaml | 76 +++++++++++
> .../bindings/sound/qcom,wcd9378-sdw.yaml | 122 ++++++++++++++++++
> 2 files changed, 198 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9378-codec.yaml
> create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9378-sdw.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd9378-codec.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd9378-codec.yaml
> new file mode 100644
> index 000000000000..32554541b279
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qcom,wcd9378-codec.yaml
> @@ -0,0 +1,76 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/qcom,wcd9378-codec.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm WCD9378 Audio Codec
> +
> +maintainers:
> + - Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
> +
> +description:
> + The Qualcomm WCD9378 is a standalone Hi-Fi audio codec IC with three
> + ADCs, three mic bias supplies, headphone/earpiece/line outputs and
> + MBHC. It has RX and TX SoundWire slave devices; the control registers
> + live in the SDCA control address space accessed through the TX slave.
> +
> +allOf:
> + - $ref: dai-common.yaml#
> + - $ref: qcom,wcd93xx-common.yaml#
> +
> +properties:
> + compatible:
> + const: qcom,wcd9378-codec
> +
> + qcom,micbias4-microvolt: false
> +
> +required:
> + - compatible
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + audio-codec {
> + compatible = "qcom,wcd9378-codec";
> + reset-gpios = <&tlmm 162 GPIO_ACTIVE_LOW>;
> + vdd-buck-supply = <&vreg_l8b>;
> + vdd-rxtx-supply = <&vreg_l7b>;
> + vdd-io-supply = <&vreg_l7b>;
> + vdd-mic-bias-supply = <&vreg_bob>;
> + qcom,micbias1-microvolt = <1800000>;
> + qcom,micbias2-microvolt = <1800000>;
> + qcom,micbias3-microvolt = <1800000>;
> + qcom,rx-device = <&wcd9378_rx>;
> + qcom,tx-device = <&wcd9378_tx>;
> + #sound-dai-cells = <1>;
> + };
> +
> + /* ... */
> +
> + soundwire@3210000 {
> + reg = <0x03210000 0x2000>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> +
> + wcd9378_rx: audio-codec@0,4 {
> + compatible = "sdw20217011000";
> + reg = <0 4>;
> + qcom,rx-port-mapping = <1 2 3 4 5>;
> + };
> + };
> +
> + soundwire@33b0000 {
> + reg = <0x033b0000 0x2000>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> +
> + wcd9378_tx: audio-codec@0,3 {
> + compatible = "sdw20217011000";
> + reg = <0 3>;
> + qcom,tx-port-mapping = <1 1 1 2 3>;
> + };
> + };
> +...
> diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd9378-sdw.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd9378-sdw.yaml
> new file mode 100644
> index 000000000000..a46938338f90
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qcom,wcd9378-sdw.yaml
> @@ -0,0 +1,122 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/qcom,wcd9378-sdw.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm SoundWire Slave devices on WCD9378
> +
> +maintainers:
> + - Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
> +
> +description:
> + The Qualcomm WCD9378 codec has RX and TX SoundWire slave devices.
> + This binding is for the slave devices.
> +
> +properties:
> + compatible:
> + const: sdw20217011000
Interestingly this same codec with same compatible is wiredup
differently on compute devices like Glymur but only with one slave,
rather than tx and rx. This is how the codec works in SDCA mode.
So these binding would need some room to accommodate those changes.
> +
> + reg:
> + maxItems: 1
> +
> + qcom,tx-port-mapping:
> + description: |
> + Specifies static port mapping between device and host tx ports.
> + In the order of the device port index, which is adc1_port,
> + adc2_port, adc3_port, dmic01_mbhc_port, dmic25_port.
> +
> + WCD9378 TX Port 1 (ADC1) <=> SWR master Port 1
> + WCD9378 TX Port 2 (ADC2) <=> SWR master Port 1
> + WCD9378 TX Port 3 (ADC3) <=> SWR master Port 1
> + WCD9378 TX Port 4 (DMIC0,1 & MBHC) <=> SWR master Port 2
> + WCD9378 TX Port 5 (DMIC2,3,4,5) <=> SWR master Port 3
> +
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 5
> + maxItems: 5
> + items:
> + enum: [1, 2, 3, 4]
> +
> + qcom,rx-port-mapping:
> + description: |
> + Specifies static port mapping between device and host rx ports.
> + In the order of the device port index, which is hph_port,
> + clsh_port, comp_port, lo_port, dsd_port.
> +
> + WCD9378 RX Port 1 (HPH_L/R) <=> SWR master Port 1
> + WCD9378 RX Port 2 (CLSH) <=> SWR master Port 2
> + WCD9378 RX Port 3 (COMP_L/R) <=> SWR master Port 3
> + WCD9378 RX Port 4 (LO) <=> SWR master Port 4
> + WCD9378 RX Port 5 (DSD_L/R) <=> SWR master Port 5
> +
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 5
> + maxItems: 5
> + items:
> + enum: [1, 2, 3, 4, 5]
> +
> + qcom,tx-channel-mapping:
Do you need these channel mapping(both tx and rx), are they different to
what slave ch-map is?
> + description: |
> + Specifies static channel mapping between slave and master tx port
> + channels.
> + In the order of slave port channels, which is adc1, adc2, adc3,
> + dmic0, dmic1, mbhc, dmic2, dmic3, dmic4, dmic5.
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + minItems: 10
> + maxItems: 10
> + items:
> + enum:
> + - 1 # WCD9378_SWRM_CH1
> + - 2 # WCD9378_SWRM_CH2
> + - 3 # WCD9378_SWRM_CH3
> + - 4 # WCD9378_SWRM_CH4
What is this enum imply? channel mask? or ch-index?
> +
> + qcom,rx-channel-mapping:
> + description: |
> + Specifies static channel 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_l, dsd_r.
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + minItems: 8
> + maxItems: 8
> + items:
> + enum:
> + - 1 # WCD9378_SWRM_CH1
> + - 2 # WCD9378_SWRM_CH2
> + - 3 # WCD9378_SWRM_CH3
> + - 4 # WCD9378_SWRM_CH4
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + soundwire@3210000 {
> + reg = <0x03210000 0x2000>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> +
> + wcd9378_rx: audio-codec@0,4 {
> + compatible = "sdw20217011000";
> + reg = <0 4>;
> + qcom,rx-port-mapping = <1 2 3 4 5>;
> + };
> + };
> +
> + soundwire@33b0000 {
> + reg = <0x033b0000 0x2000>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> +
> + wcd9378_tx: audio-codec@0,3 {
> + compatible = "sdw20217011000";
> + reg = <0 3>;
> + qcom,tx-port-mapping = <1 1 1 2 3>;
> + };
> + };
> +...
next prev parent reply other threads:[~2026-07-06 21:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 19:22 [PATCH 0/3] ASoC: codecs: add the Qualcomm WCD9378 audio codec Jorijn van der Graaf
2026-07-06 19:22 ` [PATCH 1/3] ASoC: dt-bindings: qcom,wcd93xx-common: don't require micbias4 Jorijn van der Graaf
2026-07-06 19:22 ` [PATCH 2/3] ASoC: dt-bindings: add the Qualcomm WCD9378 audio codec Jorijn van der Graaf
2026-07-06 21:17 ` Srinivas Kandagatla [this message]
2026-07-06 22:22 ` Jorijn van der Graaf
2026-07-06 19:22 ` [PATCH 3/3] ASoC: codecs: wcd9378: add TX/capture codec driver Jorijn van der Graaf
2026-07-06 19:38 ` sashiko-bot
2026-07-06 20:35 ` Jorijn van der Graaf
2026-07-06 21:41 ` Srinivas Kandagatla
2026-07-06 22:22 ` Jorijn van der Graaf
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=958c9287-b606-497b-9de5-e73984b0f70b@kernel.org \
--to=srini@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jorijnvdgraaf@catcrafts.net \
--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=luca.weiss@fairphone.com \
--cc=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=perex@perex.cz \
--cc=robh@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