From: Krzysztof Kozlowski <krzk@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Conor Dooley <conor+dt@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Jaroslav Kysela <perex@perex.cz>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Takashi Iwai <tiwai@suse.com>,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-sound@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH 5/7] ASoC: renesas: add MSIOF sound Documentation
Date: Wed, 9 Apr 2025 08:37:03 +0200 [thread overview]
Message-ID: <bd15c145-c175-468d-a1ac-1ad157358aea@kernel.org> (raw)
In-Reply-To: <87y0wa9mb2.wl-kuninori.morimoto.gx@renesas.com>
On 09/04/2025 03:05, Kuninori Morimoto wrote:
> Renesas MSIOF (Clock-Synchronized Serial Interface with FIFO) can work as
> both SPI and I2S. MSIOF-I2S will use Audio Graph Card/Card2 driver which
> uses Of-Graph in DT.
>
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
A nit, subject: drop second/last, redundant "Documentation". The
"dt-bindings" prefix is already stating that these are documentation.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
> MSIOF-SPI/I2S are using same DT compatible properties.
> MSIOF-I2S uses Of-Graph for Audio-Graph-Card/Card2,
> MSIOF-SPI doesn't use Of-Graph.
>
> Adds MSIOF-I2S documentation for Sound.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> .../bindings/sound/renesas,msiof.yaml | 112 ++++++++++++++++++
> 1 file changed, 112 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/renesas,msiof.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/renesas,msiof.yaml b/Documentation/devicetree/bindings/sound/renesas,msiof.yaml
> new file mode 100644
> index 000000000000..5173e80698fb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/renesas,msiof.yaml
> @@ -0,0 +1,112 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/renesas,msiof.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas MSIOF I2S controller
> +
> +maintainers:
> + - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> +
> +# sharing with MSIOF SPI
> +# see
> +# ${LINUX}/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> +select:
> + properties:
> + compatible:
> + contains:
> + pattern: "renesas,.*-msiof"
> + required:
> + - compatible
> + - port
Drop entire select.
> +
> +properties:
> + compatible:
> + items:
> + - const: renesas,msiof-r8a779g0 # R-Car V4H
Use expected format of all soc compatibles. It has been always: SoC-module.
> + - const: renesas,rcar-gen4-msiof # generic R-Car Gen4
If you have duplicated compatibles then:
1. It rarely makes sense because you claim that two different devices
are using the same compatible. Different device, different compatible.
2. Or if this is really same device, then only one schema.
> +
> + reg:
> + minItems: 1
> + maxItems: 2
Drop these two.
> + oneOf:
Why is this flexible?
> + - items:
> + - description: CPU and DMA engine registers
> + - items:
> + - description: CPU registers
> + - description: DMA engine registers
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + power-domains:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + dmas:
> + minItems: 2
> + maxItems: 4
Why flexible?
> +
> + dma-names:
> + minItems: 2
> + maxItems: 4
> + items:
> + enum: [ tx, rx ]
How would that work? tx rx tx rx? And then driver requests 'tx' (by
name) and what is supposed to be returned?
> +
> + port:
> + $ref: audio-graph-port.yaml#/definitions/port-base
> + unevaluatedProperties: false
> + patternProperties:
> + "^endpoint(@[0-9a-f]+)?":
> + $ref: audio-graph-port.yaml#/definitions/endpoint-base
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - power-domains
> + - port
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/r8a779g0-cpg-mssr.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/power/r8a779g0-sysc.h>
> +
> + dummy-codec {
> + compatible = "test-codec";
> +
> + port {
> + codec_ep: endpoint {
> + remote-endpoint = <&msiof1_snd_ep>;
> + };
> + };
> + };
Drop, not related to the binding.
> +
> + msiof1: serial@e6ea0000 {
serial means UART controller. You need name matching the class of the
device.
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + compatible = "renesas,msiof-r8a779g0",
> + "renesas,rcar-gen4-msiof";
> + reg = <0 0xe6ea0000 0 0x0064>;
> + interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cpg CPG_MOD 619>;
> + dmas = <&dmac0 0x43>, <&dmac0 0x42>,
> + <&dmac1 0x43>, <&dmac1 0x42>;
> + dma-names = "tx", "rx", "tx", "rx";
So test it now - get DMA by name 'tx'. What do you get?
Also schema should fail here.
> + power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
> + resets = <&cpg 619>;
> +
> + port {
> + msiof1_snd_ep: endpoint {
> + remote-endpoint = <&codec_ep>;
> + };
> + };
> + };
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-04-09 6:37 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 1:04 [PATCH 0/7] ASoC: add Renesas MSIOF sound driver Kuninori Morimoto
2025-03-18 2:06 ` [PATCH 1/7] spi: renesas,sh-msiof: Living separately from MSIOF I2S Sound Kuninori Morimoto
2025-04-09 6:31 ` Krzysztof Kozlowski
2025-04-09 23:19 ` Kuninori Morimoto
2025-04-10 5:48 ` Krzysztof Kozlowski
2025-04-09 1:05 ` [PATCH 2/7] spi: sh-msiof: ignore driver probing if it was MSIOF Sound Kuninori Morimoto
2025-04-09 7:09 ` Geert Uytterhoeven
2025-04-09 23:31 ` Kuninori Morimoto
2025-04-09 1:05 ` [PATCH 3/7] ASoC: rsnd: allow to use ADG only Kuninori Morimoto
2025-04-09 1:05 ` [PATCH 4/7] ASoC: rsnd: enable to use "adg" clock Kuninori Morimoto
2025-04-09 1:05 ` [PATCH 5/7] ASoC: renesas: add MSIOF sound Documentation Kuninori Morimoto
2025-04-09 6:37 ` Krzysztof Kozlowski [this message]
2025-04-09 7:01 ` Geert Uytterhoeven
2025-04-09 7:52 ` Krzysztof Kozlowski
2025-04-09 8:09 ` Geert Uytterhoeven
2025-04-09 12:08 ` Krzysztof Kozlowski
2025-04-09 7:41 ` Krzysztof Kozlowski
2025-04-10 0:49 ` Kuninori Morimoto
2025-04-10 5:46 ` Krzysztof Kozlowski
2025-04-10 7:02 ` Kuninori Morimoto
2025-04-09 1:05 ` [PATCH 6/7] ASoC: renesas: add MSIOF sound support Kuninori Morimoto
2025-04-09 6:38 ` Krzysztof Kozlowski
2025-04-09 23:25 ` Kuninori Morimoto
2025-04-10 5:45 ` Krzysztof Kozlowski
2025-04-10 6:29 ` Kuninori Morimoto
2025-04-10 6:33 ` Krzysztof Kozlowski
2025-04-09 7:28 ` Geert Uytterhoeven
2025-04-09 23:45 ` Kuninori Morimoto
2025-04-10 2:37 ` Kuninori Morimoto
2025-04-10 7:39 ` Geert Uytterhoeven
2025-04-10 23:04 ` Kuninori Morimoto
2025-04-10 7:47 ` Geert Uytterhoeven
2025-04-10 23:08 ` Kuninori Morimoto
2025-04-09 1:05 ` [PATCH 7/7] arm64: dts: renesas: sparrow hawk: Add MSIOF Sound support Kuninori Morimoto
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=bd15c145-c175-468d-a1ac-1ad157358aea@kernel.org \
--to=krzk@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=krzk+dt@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).