Devicetree
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names and ports schema
@ 2026-06-05 20:05 John Madieu
  2026-06-05 21:29 ` Rob Herring (Arm)
  0 siblings, 1 reply; 4+ messages in thread
From: John Madieu @ 2026-06-05 20:05 UTC (permalink / raw)
  To: lgirdwood, broonie, robh, krzk+dt, conor+dt, geert+renesas,
	magnus.damm
  Cc: kuninori.morimoto.gx, linux-sound, devicetree, linux-kernel,
	linux-renesas-soc, john.madieu, biju.das.jz, John Madieu

Replace the allOf-wrapped enum in the dvc/src/ssiu dma-names with a plain
scalar items schema bounded by minItems/maxItems and point the ports
container at graph.yaml's ports definition instead of port-base (a ports
container is not itself a port).

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, and pin clocks and resets to their fixed counts
(47 and 14) to match the clock-names/reset-names lists. In the example, put
compatible and reg first, include renesas,r9a09g047-cpg.h, and restore the
CPG_MOD cell on the clock specifiers.

Fixes: a86fd3c20218 ("ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound")
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
---

Changes:

v2:
 - dma-names: drop the per-position items list in favour of a scalar items
   schema with minItems/maxItems. The list form forced exactly N entries,
   and a scalar items schema needs both bounds to satisfy string-array.yaml
   (Rob Herring, sashiko-bot).
 - Example: restore the CPG_MOD cell on the clock specifiers and add the
   renesas,r9a09g047-cpg.h include (Geert Uytterhoeven).

v1:
 - https://lore.kernel.org/r/20260603202805.3530046-1-john.madieu.xa@bp.renesas.com

 .../sound/renesas,r9a09g047-sound.yaml        | 100 +++++++++---------
 1 file changed, 50 insertions(+), 50 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
index d7fa16554698..933edc729f6c 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,10 @@ properties:
               through the list to find a free channel.
 
           dma-names:
+            minItems: 1
             maxItems: 5
-            allOf:
-              - items:
-                  enum:
-                    - tx
+            items:
+              const: tx
 
         required:
           - dmas
@@ -203,12 +198,15 @@ properties:
               falls through the list to find a free channel.
 
           dma-names:
+            minItems: 1
             maxItems: 10
-            allOf:
-              - items:
-                  enum:
-                    - tx
-                    - rx
+            items:
+              enum: [ tx, rx ]
+
+        required:
+          - interrupts
+          - dmas
+          - dma-names
 
   ssiu:
     type: object
@@ -229,12 +227,10 @@ properties:
               falls through the list to find a free channel.
 
           dma-names:
+            minItems: 1
             maxItems: 10
-            allOf:
-              - items:
-                  enum:
-                    - tx
-                    - rx
+            items:
+              enum: [ tx, rx ]
 
         required:
           - dmas
@@ -261,10 +257,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 +271,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 +282,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
@@ -308,11 +307,10 @@ unevaluatedProperties: false
 
 examples:
   - |
+    #include <dt-bindings/clock/renesas,r9a09g047-cpg.h>
     #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,31 +318,33 @@ examples:
             <0x13c31000 0x1f000>,
             <0x13c50000 0x10000>;
       reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
-      clocks = <&cpg 245>,
-               <&cpg 385>, <&cpg 386>,
-               <&cpg 387>, <&cpg 388>,
-               <&cpg 389>, <&cpg 390>,
-               <&cpg 391>, <&cpg 392>,
-               <&cpg 393>, <&cpg 394>,
-               <&cpg 372>, <&cpg 373>,
-               <&cpg 374>, <&cpg 375>,
-               <&cpg 376>, <&cpg 377>,
-               <&cpg 378>, <&cpg 379>,
-               <&cpg 380>, <&cpg 381>,
-               <&cpg 370>, <&cpg 371>,
-               <&cpg 370>, <&cpg 371>,
-               <&cpg 368>, <&cpg 369>,
-               <&cpg 251>, <&cpg 252>,
-               <&cpg 253>, <&cpg 250>,
-               <&cpg 384>,
-               <&cpg 246>, <&cpg 247>,
-               <&cpg 382>,
-               <&cpg 352>, <&cpg 353>,
-               <&cpg 354>, <&cpg 355>,
-               <&cpg 356>, <&cpg 357>,
-               <&cpg 358>, <&cpg 359>,
-               <&cpg 360>, <&cpg 361>,
-               <&cpg 248>, <&cpg 249>;
+      #sound-dai-cells = <1>;
+      #clock-cells = <0>;
+      clocks = <&cpg CPG_MOD 245>,
+               <&cpg CPG_MOD 385>, <&cpg CPG_MOD 386>,
+               <&cpg CPG_MOD 387>, <&cpg CPG_MOD 388>,
+               <&cpg CPG_MOD 389>, <&cpg CPG_MOD 390>,
+               <&cpg CPG_MOD 391>, <&cpg CPG_MOD 392>,
+               <&cpg CPG_MOD 393>, <&cpg CPG_MOD 394>,
+               <&cpg CPG_MOD 372>, <&cpg CPG_MOD 373>,
+               <&cpg CPG_MOD 374>, <&cpg CPG_MOD 375>,
+               <&cpg CPG_MOD 376>, <&cpg CPG_MOD 377>,
+               <&cpg CPG_MOD 378>, <&cpg CPG_MOD 379>,
+               <&cpg CPG_MOD 380>, <&cpg CPG_MOD 381>,
+               <&cpg CPG_MOD 370>, <&cpg CPG_MOD 371>,
+               <&cpg CPG_MOD 370>, <&cpg CPG_MOD 371>,
+               <&cpg CPG_MOD 368>, <&cpg CPG_MOD 369>,
+               <&cpg CPG_MOD 251>, <&cpg CPG_MOD 252>,
+               <&cpg CPG_MOD 253>, <&cpg CPG_MOD 250>,
+               <&cpg CPG_MOD 384>,
+               <&cpg CPG_MOD 246>, <&cpg CPG_MOD 247>,
+               <&cpg CPG_MOD 382>,
+               <&cpg CPG_MOD 352>, <&cpg CPG_MOD 353>,
+               <&cpg CPG_MOD 354>, <&cpg CPG_MOD 355>,
+               <&cpg CPG_MOD 356>, <&cpg CPG_MOD 357>,
+               <&cpg CPG_MOD 358>, <&cpg CPG_MOD 359>,
+               <&cpg CPG_MOD 360>, <&cpg CPG_MOD 361>,
+               <&cpg CPG_MOD 248>, <&cpg CPG_MOD 249>;
       clock-names = "ssi-all",
                     "ssi-0", "ssi-1",
                     "ssi-2", "ssi-3",
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names and ports schema
  2026-06-05 20:05 [PATCH v2] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names and ports schema John Madieu
@ 2026-06-05 21:29 ` Rob Herring (Arm)
  2026-06-07 20:50   ` John Madieu
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring (Arm) @ 2026-06-05 21:29 UTC (permalink / raw)
  To: John Madieu
  Cc: devicetree, linux-renesas-soc, biju.das.jz, lgirdwood,
	magnus.damm, linux-sound, linux-kernel, john.madieu,
	geert+renesas, krzk+dt, kuninori.morimoto.gx, broonie, conor+dt


On Fri, 05 Jun 2026 20:05:26 +0000, John Madieu wrote:
> Replace the allOf-wrapped enum in the dvc/src/ssiu dma-names with a plain
> scalar items schema bounded by minItems/maxItems and point the ports
> container at graph.yaml's ports definition instead of port-base (a ports
> container is not itself a port).
> 
> 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, and pin clocks and resets to their fixed counts
> (47 and 14) to match the clock-names/reset-names lists. In the example, put
> compatible and reg first, include renesas,r9a09g047-cpg.h, and restore the
> CPG_MOD cell on the clock specifiers.
> 
> Fixes: a86fd3c20218 ("ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound")
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
> ---
> 
> Changes:
> 
> v2:
>  - dma-names: drop the per-position items list in favour of a scalar items
>    schema with minItems/maxItems. The list form forced exactly N entries,
>    and a scalar items schema needs both bounds to satisfy string-array.yaml
>    (Rob Herring, sashiko-bot).
>  - Example: restore the CPG_MOD cell on the clock specifiers and add the
>    renesas,r9a09g047-cpg.h include (Geert Uytterhoeven).
> 
> v1:
>  - https://lore.kernel.org/r/20260603202805.3530046-1-john.madieu.xa@bp.renesas.com
> 
>  .../sound/renesas,r9a09g047-sound.yaml        | 100 +++++++++---------
>  1 file changed, 50 insertions(+), 50 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.example.dtb: sound@13c00000 (renesas,r9a09g047-sound): ports:port@0:endpoint:capture:0: [6, 7, 8] is too long
	from schema $id: http://devicetree.org/schemas/sound/renesas,r9a09g047-sound.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.example.dtb: sound@13c00000 (renesas,r9a09g047-sound): ports:port@0:endpoint:playback:0: [3, 4, 5] is too long
	from schema $id: http://devicetree.org/schemas/sound/renesas,r9a09g047-sound.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/20260605200526.683577-1-john.madieu.xa@bp.renesas.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names and ports schema
  2026-06-05 21:29 ` Rob Herring (Arm)
@ 2026-06-07 20:50   ` John Madieu
  2026-06-08 14:12     ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: John Madieu @ 2026-06-07 20:50 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Biju Das, lgirdwood@gmail.com, magnus.damm,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	john.madieu@gmail.com, geert+renesas@glider.be,
	krzk+dt@kernel.org, Kuninori Morimoto, broonie@kernel.org,
	conor+dt@kernel.org

Hi Rob,

Thanks for your review.

> -----Original Message-----
> From: Rob Herring (Arm) <robh@kernel.org>
> Sent: Freitag, 5. Juni 2026 23:29
> To: John Madieu <john.madieu.xa@bp.renesas.com>
> Subject: Re: [PATCH v2] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix
> dma-names and ports schema

[...]

> >
> >  .../sound/renesas,r9a09g047-sound.yaml        | 100 +++++++++---------
> >  1 file changed, 50 insertions(+), 50 deletions(-)
> >
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-
> ci/linux/Documentation/devicetree/bindings/sound/renesas,r9a09g047-
> sound.example.dtb: sound@13c00000 (renesas,r9a09g047-sound):
> ports:port@0:endpoint:capture:0: [6, 7, 8] is too long
> 	from schema $id:
> http://devicetree.org/schemas/sound/renesas,r9a09g047-sound.yaml
> /builds/robherring/dt-review-
> ci/linux/Documentation/devicetree/bindings/sound/renesas,r9a09g047-
> sound.example.dtb: sound@13c00000 (renesas,r9a09g047-sound):
> ports:port@0:endpoint:playback:0: [3, 4, 5] is too long
> 	from schema $id:
> http://devicetree.org/schemas/sound/renesas,r9a09g047-sound.yaml

This is the 'items: maxItems: 1' I added on playback/capture per your v7
Comment [1] on the original audio driver series. These phandles point at
the ssi-N/src-N/dvc-N sub-nodes, which aren't specifier providers and
have no #*-cells, so the list isn't split per-entry and the constraint
trips.

Would you prefer I drop it and keep them as a bare phandle-array, as
renesas,rsnd.yaml does, or is there a form you'd rather see here?

[1] https://lore.kernel.org/all/20260602145527.GA211368-robh@kernel.org/

Regards,
John



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names and ports schema
  2026-06-07 20:50   ` John Madieu
@ 2026-06-08 14:12     ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2026-06-08 14:12 UTC (permalink / raw)
  To: John Madieu
  Cc: devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Biju Das, lgirdwood@gmail.com, magnus.damm,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	john.madieu@gmail.com, geert+renesas@glider.be,
	krzk+dt@kernel.org, Kuninori Morimoto, broonie@kernel.org,
	conor+dt@kernel.org

On Sun, Jun 07, 2026 at 08:50:49PM +0000, John Madieu wrote:
> Hi Rob,
> 
> Thanks for your review.
> 
> > -----Original Message-----
> > From: Rob Herring (Arm) <robh@kernel.org>
> > Sent: Freitag, 5. Juni 2026 23:29
> > To: John Madieu <john.madieu.xa@bp.renesas.com>
> > Subject: Re: [PATCH v2] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix
> > dma-names and ports schema
> 
> [...]
> 
> > >
> > >  .../sound/renesas,r9a09g047-sound.yaml        | 100 +++++++++---------
> > >  1 file changed, 50 insertions(+), 50 deletions(-)
> > >
> > 
> > My bot found errors running 'make dt_binding_check' on your patch:
> > 
> > yamllint warnings/errors:
> > 
> > dtschema/dtc warnings/errors:
> > /builds/robherring/dt-review-
> > ci/linux/Documentation/devicetree/bindings/sound/renesas,r9a09g047-
> > sound.example.dtb: sound@13c00000 (renesas,r9a09g047-sound):
> > ports:port@0:endpoint:capture:0: [6, 7, 8] is too long
> > 	from schema $id:
> > http://devicetree.org/schemas/sound/renesas,r9a09g047-sound.yaml
> > /builds/robherring/dt-review-
> > ci/linux/Documentation/devicetree/bindings/sound/renesas,r9a09g047-
> > sound.example.dtb: sound@13c00000 (renesas,r9a09g047-sound):
> > ports:port@0:endpoint:playback:0: [3, 4, 5] is too long
> > 	from schema $id:
> > http://devicetree.org/schemas/sound/renesas,r9a09g047-sound.yaml
> 
> This is the 'items: maxItems: 1' I added on playback/capture per your v7
> Comment [1] on the original audio driver series. These phandles point at
> the ssi-N/src-N/dvc-N sub-nodes, which aren't specifier providers and
> have no #*-cells, so the list isn't split per-entry and the constraint
> trips.
> 
> Would you prefer I drop it and keep them as a bare phandle-array, as
> renesas,rsnd.yaml does, or is there a form you'd rather see here?

The problem lies in renesas,rsnd.yaml having no constraints. That 
should have the same constraints. However, you really shouldn't be 
redefining these properties again here, but refactor whatever is common 
into a common schema.

I suppose for fixing the rest of the issues, you can drop 'items: 
maxItems: 1' constraint on this patch and address that separately.

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-08 14:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-05 20:05 [PATCH v2] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names and ports schema John Madieu
2026-06-05 21:29 ` Rob Herring (Arm)
2026-06-07 20:50   ` John Madieu
2026-06-08 14:12     ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox