From: "Anton D. Stavinskii" <stavinsky@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Chen Wang <unicorn_wang@outlook.com>,
Inochi Amaoto <inochiama@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
sophgo@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH v2 1/7] dt-bindings: sound: sophgo: add CV1800B I2S/TDM controller binding
Date: Sun, 18 Jan 2026 16:18:51 +0400 [thread overview]
Message-ID: <aWzMvqzh-QXWRTWP@anton.local> (raw)
In-Reply-To: <20260118-famous-magnificent-peccary-474ba8@quoll>
On Sun, Jan 18, 2026 at 11:14:34AM +0400, Krzysztof Kozlowski wrote:
> On Sun, Jan 18, 2026 at 12:18:53AM +0400, Anton D. Stavinskii wrote:
> > Purpose: introduce DT schema for the CPU driver
>
> Bindings are for hardware, not drivers. Drop the purpose.
Noted. Will do in v3
>
> > The driver uses dma to transfer data. The dma it self has 8 channels.
>
> Describe the hardware.
Will try to rephrase. Thanks.
>
>
> > Each channel can be connected only to a specific i2s node. But each
> > of dma channel can have multiple purposes so in order to save dma
> > channels the configurations allows to use tx and rx, only rx, only tx
> > or none channels. I2S controller without channels can be useful in
> > configuration where I2S is used as clock source only and doesn't
> > produce any data.
>
> Please use subject prefixes matching the subsystem. You can get them for
> example with 'git log --oneline -- DIRECTORY_OR_FILE' on the directory
> your patch is touching. For bindings, the preferred subjects are
> explained here:
> https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
I will do my best in V3. And will read provided links again.
>
> A nit, subject: drop second/last, redundant "binding". The
> "dt-bindings" prefix is already stating that these are bindings.
> See also:
> https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
>
> >
> > Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
> > ---
> > .../bindings/sound/sophgo,cv1800b-i2s.yaml | 75 ++++++++++++++++++++++
> > 1 file changed, 75 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/sophgo,cv1800b-i2s.yaml b/Documentation/devicetree/bindings/sound/sophgo,cv1800b-i2s.yaml
> > new file mode 100644
> > index 000000000000..cf30880a62da
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/sophgo,cv1800b-i2s.yaml
> > @@ -0,0 +1,75 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/sophgo,cv1800b-i2s.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Sophgo CV1800B I2S/TDM controller
> > +
> > +maintainers:
> > + - Anton D. Stavinskii <stavinsky@gmail.com>
> > +
> > +description: |
>
> Do not need '|' unless you need to preserve formatting.
noted. will be fixed.
>
> > + I2S/TDM controller found in CV1800B / Sophgo SG2002/SG2000 SoCs.
> > +
>
> Miss allOf with ref to dai-common.
>
> > +properties:
> > + compatible:
> > + const: sophgo,cv1800b-i2s
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + "#sound-dai-cells":
> > + const: 0
> > +
> > + clocks:
> > + minItems: 1
> > + maxItems: 2
>
> 1. Why is it flexible?
It's my mistake.
>
> 2. And then why names are not flexible. These should be synced in
> constraints.
>
> > +
> > + clock-names:
> > + items:
> > + - const: i2s
> > + - const: mclk
> > +
> > + dmas:
> > + maxItems: 2
> > +
> > + dma-names:
> > + description: |
> > + Names of DMA channels. May be omitted. If present, one entry
> > + selects a single direction, while two entries select RX and TX.
Will drop.
>
> Drop desription. Don't repeat constraints in free form text.
>
> > + minItems: 1
> > + maxItems: 2
>
> Again, messed constraints.
>
> > + items:
> > + enum: [rx, tx]
>
> No, it has to be a specific/fixed list.
Here is the question. Can you please help to understand how to describe
this properly. The idea is that TDM module is usable even without
specified dmas. Each TDM can work as clock source, only rx only tx or
both. I can force to use both channels but the user probably will want
to not consume all the channels for if it is not needed. DMA can provide
channels for something else like SPI/I2C/UART etc. I'm asking because
I'm afraid I will do some mess again here.
>
> > +
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 0
>
> Why? Drop these.
noted. Will remove.
>
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - clocks
> > + - clock-names
> > + - "#sound-dai-cells"
> > +
> > +additionalProperties: false
>
> unevaluatedProperties instead
Thanks.
>
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/clock/sophgo,cv1800.h>
> > +
> > + i2s1: i2s@4110000 {
>
> Drop unused label.
will be fixed. Thanks
>
> > + compatible = "sophgo,cv1800b-i2s";
> > + reg = <0x04110000 0x10000>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
>
> Drop useless properties.
>
> Best regards,
> Krzysztof
>
Sorry for the mess. It is my first ever patch. Thank you for your
review and your time. Will do my best to improve the patch series.
next prev parent reply other threads:[~2026-01-18 12:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-17 20:18 [PATCH v2 0/7] ASoC: sophgo: add CV1800 I2S controllers support Anton D. Stavinskii
2026-01-17 20:18 ` [PATCH v2 1/7] dt-bindings: sound: sophgo: add CV1800B I2S/TDM controller binding Anton D. Stavinskii
2026-01-18 10:14 ` Krzysztof Kozlowski
2026-01-18 12:18 ` Anton D. Stavinskii [this message]
2026-01-18 16:14 ` Krzysztof Kozlowski
2026-01-18 17:07 ` Anton D. Stavinskii
2026-01-18 17:32 ` Krzysztof Kozlowski
2026-01-18 17:55 ` Anton D. Stavinskii
2026-01-17 20:18 ` [PATCH v2 2/7] ASoC: sophgo: add CV1800B I2S/TDM controller driver Anton D. Stavinskii
2026-01-18 10:20 ` Krzysztof Kozlowski
2026-01-18 12:27 ` Anton D. Stavinskii
2026-01-18 10:29 ` kernel test robot
2026-01-18 10:29 ` kernel test robot
2026-01-17 20:18 ` [PATCH v2 3/7] dt-bindings: sound: sophgo: add CV1800B internal ADC codec Anton D. Stavinskii
2026-01-18 10:15 ` Krzysztof Kozlowski
2026-01-17 20:18 ` [PATCH v2 4/7] ASoC: sophgo: add CV1800B internal ADC codec driver Anton D. Stavinskii
2026-01-18 15:14 ` kernel test robot
2026-01-17 20:18 ` [PATCH v2 5/7] dt-bindings: sound: sophgo: add CV1800B internal DAC codec Anton D. Stavinskii
2026-01-18 10:16 ` Krzysztof Kozlowski
2026-01-18 12:38 ` Anton D. Stavinskii
2026-01-17 20:18 ` [PATCH v2 6/7] ASoC: sophgo: add CV1800B internal DAC codec driver Anton D. Stavinskii
2026-01-17 20:18 ` [PATCH v2 7/7] riscv: dts: sophgo: dts nodes for i2s tdm modules Anton D. Stavinskii
2026-01-18 10:16 ` Krzysztof Kozlowski
2026-01-18 12:40 ` Anton D. Stavinskii
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=aWzMvqzh-QXWRTWP@anton.local \
--to=stavinsky@gmail.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=perex@perex.cz \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=sophgo@lists.linux.dev \
--cc=tiwai@suse.com \
--cc=unicorn_wang@outlook.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