[PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema

Subsystems: open firmware and flattened device tree bindings, sound - soc layer / dynamic audio power management (asoc), the rest

STALE124d

5 messages, 4 authors, 2026-06-04 · open the first message on its own page

[PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema

From: John Madieu <john.madieu.xa@bp.renesas.com>
Date: 2026-06-03 20:28:49

Express the dvc/src/ssiu dma-names as an items list rather than an
allOf-wrapped single schema, and drop the now-redundant maxItems. Fix
the ports container to reference graph.yaml's ports definition instead
of port-base (a ports container is not itself a port), keeping
port-base on the port@N children, and constrain each playback/capture
phandle-array entry to a single phandle.

While at it, drop the unused top-level #address-cells/#size-cells since
no child node uses a unit address and the ports node provides its own,
require interrupts/dmas/dma-names on the src sub-nodes to match the
ssi/ssiu sub-nodes and the driver, pin clocks and resets to their fixed
counts (47 and 14) to match the clock-names/reset-names lists, and put
compatible and reg first in the example.

Fixes: a86fd3c20218 ("ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound")
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
---
 .../sound/renesas,r9a09g047-sound.yaml        | 71 +++++++++++--------
 1 file changed, 43 insertions(+), 28 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
index d7fa16554698..80670019d2f4 100644
--- a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
@@ -42,13 +42,8 @@ properties:
   "#clock-cells":
     const: 0
 
-  "#address-cells":
-    const: 1
-
-  "#size-cells":
-    const: 0
-
   clocks:
+    minItems: 47
     maxItems: 47
 
   clock-names:
@@ -105,6 +100,7 @@ properties:
     maxItems: 1
 
   resets:
+    minItems: 14
     maxItems: 14
 
   reset-names:
@@ -143,11 +139,12 @@ properties:
               through the list to find a free channel.
 
           dma-names:
-            maxItems: 5
-            allOf:
-              - items:
-                  enum:
-                    - tx
+            items:
+              - const: tx
+              - const: tx
+              - const: tx
+              - const: tx
+              - const: tx
 
         required:
           - dmas
@@ -203,12 +200,22 @@ properties:
               falls through the list to find a free channel.
 
           dma-names:
-            maxItems: 10
-            allOf:
-              - items:
-                  enum:
-                    - tx
-                    - rx
+            items:
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+
+        required:
+          - interrupts
+          - dmas
+          - dma-names
 
   ssiu:
     type: object
@@ -229,12 +236,17 @@ properties:
               falls through the list to find a free channel.
 
           dma-names:
-            maxItems: 10
-            allOf:
-              - items:
-                  enum:
-                    - tx
-                    - rx
+            items:
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
 
         required:
           - dmas
@@ -261,10 +273,9 @@ properties:
           - interrupts
 
   ports:
-    $ref: audio-graph-port.yaml#/definitions/port-base
-    unevaluatedProperties: false
+    $ref: /schemas/graph.yaml#/properties/ports
     patternProperties:
-      '^port@[0-9a-f]+$':
+      '^port(@[0-9a-f]+)?$':
         $ref: audio-graph-port.yaml#/definitions/port-base
         unevaluatedProperties: false
         properties:
@@ -276,6 +287,8 @@ properties:
             properties:
               playback:
                 $ref: /schemas/types.yaml#/definitions/phandle-array
+                items:
+                  maxItems: 1
                 description:
                   Ordered list of phandles to the in-SoC modules used
                   by this DAI in the playback direction. Each phandle
@@ -285,6 +298,8 @@ properties:
                   from CPU to off-SoC endpoint.
               capture:
                 $ref: /schemas/types.yaml#/definitions/phandle-array
+                items:
+                  maxItems: 1
                 description:
                   Ordered list of phandles to the in-SoC modules used
                   by this DAI in the capture direction. Each phandle
@@ -311,8 +326,6 @@ 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>,
@@ -320,6 +333,8 @@ examples:
             <0x13c31000 0x1f000>,
             <0x13c50000 0x10000>;
       reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+      #sound-dai-cells = <1>;
+      #clock-cells = <0>;
       clocks = <&cpg 245>,
                <&cpg 385>, <&cpg 386>,
                <&cpg 387>, <&cpg 388>,
-- 
2.25.1

Re: [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema

From: sashiko-bot@kernel.org
Date: 2026-06-03 20:39:50

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `dma-names` schema modification unintentionally converts variable-length arrays into strictly fixed-length tuples, enforcing exactly 5 or 10 items instead of allowing 1-5 or 1-10.
--

commit a5213139a119a047832e83895a5e3d493f04d666
Author: John Madieu [off-list ref]

ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema

Express the dvc/src/ssiu dma-names as an items list rather than an
allOf-wrapped single schema, and drop the now-redundant maxItems. Fix
the ports container to reference graph.yaml's ports definition instead
of port-base (a ports container is not itself a port), keeping
port-base on the port@N children, and constrain each playback/capture
phandle-array entry to a single phandle.
quoted hunk
diff --git a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
index d7fa165546985..80670019d2f45 100644
--- a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
[ ... ]
quoted hunk
@@ -143,11 +139,12 @@ properties:
               through the list to find a free channel.
 
           dma-names:
-            maxItems: 5
-            allOf:
-              - items:
-                  enum:
-                    - tx
+            items:
+              - const: tx
+              - const: tx
+              - const: tx
+              - const: tx
+              - const: tx
[Severity: Medium]
Does this unintentionally enforce exactly 5 items?

In dt-schema, specifying an items list without an explicit minItems property
defaults minItems to the length of the list. Since the property description
mentions "As many as 5 can be provided", should we add minItems: 1 here so
it doesn't reject valid device trees specifying fewer fallback channels?

[ ... ]
quoted hunk
@@ -203,12 +200,22 @@ properties:
               falls through the list to find a free channel.
 
           dma-names:
-            maxItems: 10
-            allOf:
-              - items:
-                  enum:
-                    - tx
-                    - rx
+            items:
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
[Severity: Medium]
Similarly for the ssi and ssiu nodes, does defining an items list of 10
elements without an explicit minItems implicitly set minItems: 10?

Could this break dtbs_check for valid hardware configurations that provide
fewer than 10 channels?

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

Re: [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2026-06-04 12:10:21

Hi John,

On Wed, 3 Jun 2026 at 22:28, John Madieu [off-list ref] wrote:
Express the dvc/src/ssiu dma-names as an items list rather than an
allOf-wrapped single schema, and drop the now-redundant maxItems. Fix
the ports container to reference graph.yaml's ports definition instead
of port-base (a ports container is not itself a port), keeping
port-base on the port@N children, and constrain each playback/capture
phandle-array entry to a single phandle.

While at it, drop the unused top-level #address-cells/#size-cells since
no child node uses a unit address and the ports node provides its own,
require interrupts/dmas/dma-names on the src sub-nodes to match the
ssi/ssiu sub-nodes and the driver, pin clocks and resets to their fixed
counts (47 and 14) to match the clock-names/reset-names lists, and put
compatible and reg first in the example.

Fixes: a86fd3c20218 ("ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound")
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
Thanks for your patch!
quoted hunk
--- a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
quoted hunk
@@ -320,6 +333,8 @@ examples:
             <0x13c31000 0x1f000>,
             <0x13c50000 0x10000>;
       reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+      #sound-dai-cells = <1>;
+      #clock-cells = <0>;
       clocks = <&cpg 245>,
                <&cpg 385>, <&cpg 386>,
                <&cpg 387>, <&cpg 388>,
What happened to the first clock cells (CPG_MOD)?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

RE: [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema

From: John Madieu <john.madieu.xa@bp.renesas.com>
Date: 2026-06-04 13:39:20

Hi Geert,

Thank you for your review.
-----Original Message-----
From: Geert Uytterhoeven <geert@linux-m68k.org>
Sent: Donnerstag, 4. Juni 2026 14:10
To: John Madieu <john.madieu.xa@bp.renesas.com>
Cc: lgirdwood@gmail.com; broonie@kernel.org; robh@kernel.org;
krzk+dt@kernel.org; conor+dt@kernel.org; magnus.damm
[off-list ref]; Kuninori Morimoto
[off-list ref]; linux-sound@vger.kernel.org;
devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-renesas-
soc@vger.kernel.org; john.madieu@gmail.com
Subject: Re: [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-
names list and ports schema

Hi John,

On Wed, 3 Jun 2026 at 22:28, John Madieu [off-list ref]
wrote:
quoted
Express the dvc/src/ssiu dma-names as an items list rather than an
allOf-wrapped single schema, and drop the now-redundant maxItems. Fix
the ports container to reference graph.yaml's ports definition instead
of port-base (a ports container is not itself a port), keeping
port-base on the port@N children, and constrain each playback/capture
phandle-array entry to a single phandle.

While at it, drop the unused top-level #address-cells/#size-cells
since no child node uses a unit address and the ports node provides
its own, require interrupts/dmas/dma-names on the src sub-nodes to
match the ssi/ssiu sub-nodes and the driver, pin clocks and resets to
their fixed counts (47 and 14) to match the clock-names/reset-names
lists, and put compatible and reg first in the example.

Fixes: a86fd3c20218 ("ASoC: dt-bindings: sound: Add DT binding for
RZ/G3E sound")
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
Thanks for your patch!
quoted
---
a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.
+++ yaml
quoted
@@ -320,6 +333,8 @@ examples:
             <0x13c31000 0x1f000>,
             <0x13c50000 0x10000>;
       reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+      #sound-dai-cells = <1>;
+      #clock-cells = <0>;
       clocks = <&cpg 245>,
                <&cpg 385>, <&cpg 386>,
                <&cpg 387>, <&cpg 388>,
What happened to the first clock cells (CPG_MOD)?
My bad. Next version of this patch will also re-establish it.

Regards,
John.

Re: [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema

From: Rob Herring <robh@kernel.org>
Date: 2026-06-04 14:11:37

On Wed, Jun 03, 2026 at 08:28:05PM +0000, John Madieu wrote:
Express the dvc/src/ssiu dma-names as an items list rather than an
allOf-wrapped single schema, and drop the now-redundant maxItems. Fix
the ports container to reference graph.yaml's ports definition instead
of port-base (a ports container is not itself a port), keeping
port-base on the port@N children, and constrain each playback/capture
phandle-array entry to a single phandle.

While at it, drop the unused top-level #address-cells/#size-cells since
no child node uses a unit address and the ports node provides its own,
require interrupts/dmas/dma-names on the src sub-nodes to match the
ssi/ssiu sub-nodes and the driver, pin clocks and resets to their fixed
counts (47 and 14) to match the clock-names/reset-names lists, and put
compatible and reg first in the example.

Fixes: a86fd3c20218 ("ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound")
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
---
 .../sound/renesas,r9a09g047-sound.yaml        | 71 +++++++++++--------
 1 file changed, 43 insertions(+), 28 deletions(-)
quoted hunk
@@ -143,11 +139,12 @@ properties:
               through the list to find a free channel.
 
           dma-names:
-            maxItems: 5
-            allOf:
-              - items:
-                  enum:
-                    - tx
+            items:
+              - const: tx
+              - const: tx
+              - const: tx
+              - const: tx
+              - const: tx
All you need is:

maxItems: 5
items:
  const: tx

(The schema form (vs. list form) of 'items' applies to all items.)
quoted hunk
 
         required:
           - dmas
@@ -203,12 +200,22 @@ properties:
               falls through the list to find a free channel.
 
           dma-names:
-            maxItems: 10
-            allOf:
-              - items:
-                  enum:
-                    - tx
-                    - rx
+            items:
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
maxItems: 10
items:
  enum: [ tx, rx ]
quoted hunk
+
+        required:
+          - interrupts
+          - dmas
+          - dma-names
 
   ssiu:
     type: object
@@ -229,12 +236,17 @@ properties:
               falls through the list to find a free channel.
 
           dma-names:
-            maxItems: 10
-            allOf:
-              - items:
-                  enum:
-                    - tx
-                    - rx
+            items:
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
+              - enum: [ tx, rx ]
And same here.

Rob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help