* [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema
@ 2026-06-03 20:28 John Madieu
2026-06-03 20:39 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: John Madieu @ 2026-06-03 20:28 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, John Madieu
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema
2026-06-03 20:28 [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema John Madieu
@ 2026-06-03 20:39 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-06-03 20:39 UTC (permalink / raw)
To: John Madieu; +Cc: devicetree, wsa+renesas, conor+dt, robh
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 <john.madieu.xa@bp.renesas.com>
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.
> 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
[ ... ]
> @@ -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?
[ ... ]
> @@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-03 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 20:28 [PATCH] ASoC: dt-bindings: sound: renesas,r9a09g047: Fix dma-names list and ports schema John Madieu
2026-06-03 20:39 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox