Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "John Madieu" <john.madieu.xa@bp.renesas.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, wsa+renesas@sang-engineering.com
Subject: Re: [PATCH v6 01/16] ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound
Date: Wed, 13 May 2026 23:45:35 +0000	[thread overview]
Message-ID: <20260513234535.9B8FFC19425@smtp.kernel.org> (raw)
In-Reply-To: <20260512182631.3842065-2-john.madieu.xa@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] The binding omits provider cell properties (`#clock-cells` and `#sound-dai-cells`) from the `required` list despite exposing these capabilities.
- [High] The schema allows and the example uses repeated strings (e.g., multiple `"tx"`) in the `dma-names` arrays, which breaks standard DMA API lookup.
- [Medium] The `ssi` subnodes define `dmas: true` and `dma-names: true` which bypasses all validation and contradicts the hardware's operational mode.
- [Low] The device tree example contains multiple unresolved phandle references that will cause `dt_binding_check` to fail.
--

commit 2000fc3ecea1872cd8c0d174d7a5e3c5c89282e9
Author: John Madieu <john.madieu.xa@bp.renesas.com>

ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound

Add a standalone device tree binding for the Renesas RZ/G3E (R9A09G047)
sound controller. The RZ/G3E sound IP is based on R-Car Sound but adds
extended DMA channel support, additional clock domains, and resets.

> diff --git a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
> new file mode 100644
> index 0000000000000..0b651214bd613
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
[ ... ]
> +  dvc:
> +    type: object
> +    additionalProperties: false
> +    patternProperties:
> +      "^dvc-[0-1]$":
> +        type: object
> +        additionalProperties: false
> +        properties:
> +          dmas:
> +            maxItems: 5
> +          dma-names:
> +            maxItems: 5
> +            allOf:
> +              - items:
> +                  enum:
> +                    - tx

The commit message explicitly notes allowing multiple DMA entries with
repeated channel names in SSIU, SRC and DVC sub-nodes. However, will this
regression break the standard DMA API lookup?

The of_dma_request_slave_channel() function relies on
of_property_match_string() to resolve DMA channels by name, which strictly
returns the index of the first match.

If multiple entries use the same name, any DMA channels listed after the first
tx or rx will be inaccessible. To support fallback or alternative
channels, shouldn't they have unique names like tx0 and tx1?

[ ... ]
> +  ssi:
> +    type: object
> +    additionalProperties: false
> +    patternProperties:
> +      "^ssi-[0-9]$":
> +        type: object
> +        additionalProperties: false
> +        properties:
> +          interrupts:
> +            maxItems: 1
> +          dmas: true
> +          dma-names: true

Does defining dmas and dma-names as true bypass schema validation for
these properties?

This seems inconsistent with the strict constraints applied to src and
dvc.

Additionally, the commit message states that SSI operates exclusively in BUSIF
mode, which usually implies DMA is handled by the SSIU, not the SSI directly
(as reflected by the omission of DMA properties in the ssi example nodes).
Should these properties be constrained or removed entirely from the ssi
subnodes?

[ ... ]
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - clocks
> +  - clock-names
> +  - resets
> +  - reset-names

Should #clock-cells and #sound-dai-cells be included in this list?

The schema defines #clock-cells: const: 0 and #sound-dai-cells: const: 1
in the properties block, indicating the hardware acts as a clock and DAI
provider.

According to device tree binding guidelines, when a hardware binding supports
provider capabilities, the corresponding cell-count properties must be
mandated in the required list to prevent incomplete device tree nodes from
passing schema validation.

[ ... ]
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    sound@13c00000 {
> +      #sound-dai-cells = <1>;
> +      #clock-cells = <0>;
> +      compatible = "renesas,r9a09g047-sound";
> +      reg = <0x13c00000 0x10000>,
> +            <0x13c20000 0x10000>,
> +            <0x13c30000 0x1000>,
> +            <0x13c31000 0x1f000>,
> +            <0x13c50000 0x10000>;
> +      reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
> +      clocks = <&cpg 245>,

Are there definitions for external labels like <&cpg 245>, <&dmac0>, and
<&codec_endpoint> in the example snippet?

When dt_binding_check compiles the example using dtc, unresolved phandle
references will cause syntax errors for referencing non-existent nodes or
labels.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260512182631.3842065-1-john.madieu.xa@bp.renesas.com?part=1

  reply	other threads:[~2026-05-13 23:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 18:26 [PATCH v6 00/16] ASoC: rsnd: Add RZ/G3E audio driver support John Madieu
2026-05-12 18:26 ` [PATCH v6 01/16] ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound John Madieu
2026-05-13 23:45   ` sashiko-bot [this message]
2026-05-12 18:26 ` [PATCH v6 02/16] ASoC: rsnd: Fix RSND_SOC_MASK width to single nibble John Madieu
2026-05-12 18:26 ` [PATCH v6 03/16] ASoC: rsnd: Add reset controller support to rsnd_mod John Madieu
2026-05-14  0:07   ` sashiko-bot
2026-05-12 18:26 ` [PATCH v6 04/16] ASoC: rsnd: Support hyphen or dot in indexed clock and reset names John Madieu
2026-05-14  0:45   ` Mark Brown
2026-05-12 18:26 ` [PATCH v6 05/16] ASoC: rsnd: Add RZ/G3E SoC probing and register map John Madieu
2026-05-14  0:51   ` sashiko-bot
2026-05-12 18:26 ` [PATCH v6 06/16] ASoC: rsnd: Add audmacpp clock and reset support for RZ/G3E John Madieu
2026-05-14  1:11   ` sashiko-bot
2026-05-12 18:26 ` [PATCH v6 07/16] ASoC: rsnd: Refactor DMA address tables with named structs John Madieu
2026-05-12 18:26 ` [PATCH v6 08/16] ASoC: rsnd: Add RZ/G3E DMA address calculation support John Madieu
2026-05-12 18:26 ` [PATCH v6 09/16] ASoC: rsnd: ssui: Add RZ/G3E SSIU BUSIF support John Madieu
2026-05-13  0:35   ` Kuninori Morimoto
2026-05-13  5:04     ` John Madieu
2026-05-13 23:02       ` Kuninori Morimoto
2026-05-13  9:41   ` Geert Uytterhoeven
2026-05-13 15:30     ` John Madieu
2026-05-12 18:26 ` [PATCH v6 10/16] ASoC: rsnd: Add SSI reset support for RZ/G3E platform John Madieu
2026-05-12 18:26 ` [PATCH v6 11/16] ASoC: rsnd: Add ADG reset support for RZ/G3E John Madieu
2026-05-12 18:26 ` [PATCH v6 12/16] ASoC: rsnd: adg: Add per-SSI ADG and SSIF supply clock management John Madieu
2026-05-12 18:26 ` [PATCH v6 13/16] ASoC: rsnd: adg: Look up RZ/G3E clkin under audio-clk{a,b,c,i} John Madieu
2026-05-12 18:26 ` [PATCH v6 14/16] ASoC: rsnd: src: Add SRC reset and clock support for RZ/G3E John Madieu
2026-05-13  0:44   ` Kuninori Morimoto
2026-05-13  5:17     ` John Madieu
2026-05-12 18:26 ` [PATCH v6 15/16] ASoC: rsnd: Support unprefixed DT node names " John Madieu
2026-05-12 18:26 ` [PATCH v6 16/16] ASoC: rsnd: Add system suspend/resume support John Madieu
2026-05-14  0:46   ` Mark Brown

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=20260513234535.9B8FFC19425@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=john.madieu.xa@bp.renesas.com \
    --cc=krzk+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.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