From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
Cc: Mark Brown <broonie@kernel.org>,
Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Julian Braha <julianbraha@gmail.com>,
Vinod Koul <vkoul@kernel.org>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Luca Weiss <luca.weiss@fairphone.com>,
Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>,
Ravi Hothi <ravi.hothi@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 v2 1/2] ASoC: dt-bindings: add the Qualcomm WCD9378 audio codec
Date: Thu, 30 Jul 2026 09:09:48 +0200 [thread overview]
Message-ID: <20260730-impartial-angelic-harrier-ab9192@quoll> (raw)
In-Reply-To: <20260729000649.263426-2-jorijnvdgraaf@catcrafts.net>
On Wed, Jul 29, 2026 at 02:06:48AM +0200, 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.
> The WCD9378 has three ADCs and three mic bias supplies and thus no
> qcom,micbias4-microvolt, which the common schema required: move that
> requirement into the current users, keeping their status quo, and
> reject the property here.
>
> The slave devices enumerate with manufacturer ID 0x0217 and part ID
> 0x0110, hence the sdw20217011000 compatible. Compute platforms wire
> the same chip as a single aggregated slave in SDCA mode, which owns
> the codec resources itself and has no parent node. The slave binding
> covers both presentations: qcom,compute-mode marks the aggregated
> slave and gates the properties for the resources it owns,
> qcom,control-device marks the slave owning the control register space
> (the TX slave in mobile mode), and qcom,port-mapping carries the port
> map of either kind of slave.
>
> 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>
> ---
> v2:
> - squashed v1's separate qcom,wcd93xx-common patch into this one, as
> Krzysztof asked; no changes to that part.
> - one slave binding for both chip presentations, as agreed in the
> review of Srinivas's SDCA class series (link in the cover letter);
> Srinivas added as binding maintainer. The aggregated SDCA-mode slave
> is marked qcom,compute-mode, which gates the properties for the
> resources it owns (supplies, reset GPIO, mic-bias voltages,
> #sound-dai-cells).
> - the split qcom,{tx,rx}-port-mapping properties are replaced by a
> single qcom,port-mapping; with one name for both slaves, the new
> qcom,control-device flag marks the slave that owns the control
> register space. The mapping stays optional and loses the per-item
> enum, following qcom,wcd938x-sdw.yaml.
> - qcom,{tx,rx}-channel-mapping dropped, answering Srinivas's v1
> question: the slave-side map is fixed in the driver and no board
> needs to remap the master side; they can return with a board that
> does.
> - the codec binding's example drops the two slave-node examples
> duplicated from qcom,wcd9378-sdw.yaml, as Rob asked.
> - qcom,port-mapping length pinned per mode (5 mobile / 8 SDCA)
> through the existing if/then block.
>
> .../bindings/sound/qcom,wcd9378-codec.yaml | 54 ++++++
> .../bindings/sound/qcom,wcd9378-sdw.yaml | 182 ++++++++++++++++++
> .../bindings/sound/qcom,wcd937x.yaml | 1 +
> .../bindings/sound/qcom,wcd938x.yaml | 1 +
> .../bindings/sound/qcom,wcd939x.yaml | 1 +
> .../bindings/sound/qcom,wcd93xx-common.yaml | 1 -
> 6 files changed, 239 insertions(+), 1 deletion(-)
> 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..0b9d3394f77e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qcom,wcd9378-codec.yaml
> @@ -0,0 +1,54 @@
> +# 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. This node describes the mobile presentation, where the codec
> + appears as two SoundWire slaves on separate masters and this node owns
> + the resources they share; the control registers live in the SDCA control
> + address space reached through the TX slave. In SDCA mode the codec is a
> + single aggregated slave with no node of its own, see
> + qcom,wcd9378-sdw.yaml.
> +
> +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>;
> + };
As pointed out by RFC from Srini, this binding/node is not correct. It
is a fake node to solve (real) power sequencing issues, but Srini's SDCA
patchset points that this should be part of TX.
Bindings should be complete. It is fine to have them incomplete of
missing features and extend later, but it is not fine to have them with
incorrect and incompatible solution.
Therefore this needs to be sorted out for both patchset - this and SDCA
version of WCD9378 codec.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-07-30 7:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 0:06 [PATCH v2 0/2] ASoC: codecs: add the Qualcomm WCD9378 audio codec Jorijn van der Graaf
2026-07-29 0:06 ` [PATCH v2 1/2] ASoC: dt-bindings: " Jorijn van der Graaf
2026-07-30 7:09 ` Krzysztof Kozlowski [this message]
2026-07-29 0:06 ` [PATCH v2 2/2] ASoC: codecs: wcd9378: add TX/capture codec driver Jorijn van der Graaf
2026-07-29 0:20 ` sashiko-bot
2026-07-29 11:33 ` Pierre-Louis Bossart
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=20260730-impartial-angelic-harrier-ab9192@quoll \
--to=krzk@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jorijnvdgraaf@catcrafts.net \
--cc=julianbraha@gmail.com \
--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=pierre-louis.bossart@linux.dev \
--cc=ravi.hothi@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.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