* [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties
@ 2025-10-07 3:18 Wolfram Sang
2025-10-07 8:44 ` Geert Uytterhoeven
0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2025-10-07 3:18 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, devicetree
Allow additional properties to enable devices attached to the bus.
Fixes warnings like these:
arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: bus@fec10000 (renesas,bsc-sh73a0): Unevaluated properties are not allowed ('ethernet@10000000' was unexpected)
arch/arm/boot/dts/renesas/r8a73a4-ape6evm.dtb: bus@fec10000 (renesas,bsc-r8a73a4): Unevaluated properties are not allowed ('ethernet@8000000', 'flash@0' were unexpected)
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Copied this from 'bus/allwinner,sun50i-a64-de2.yaml' which seemed to me
like the most specific patternProperties for a bus.
Passes dt_binding_check and fixes the above warnings without regressing.
.../devicetree/bindings/bus/renesas,bsc.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Documentation/devicetree/bindings/bus/renesas,bsc.yaml b/Documentation/devicetree/bindings/bus/renesas,bsc.yaml
index f53a37785413..24732c5e24e1 100644
--- a/Documentation/devicetree/bindings/bus/renesas,bsc.yaml
+++ b/Documentation/devicetree/bindings/bus/renesas,bsc.yaml
@@ -41,6 +41,18 @@ properties:
interrupts:
maxItems: 1
+patternProperties:
+ # All other properties should be child nodes with unit-address and 'reg'
+ "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
+ type: object
+ additionalProperties: true
+ properties:
+ reg:
+ maxItems: 1
+
+ required:
+ - reg
+
required:
- reg
--
2.47.2
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties
2025-10-07 3:18 [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties Wolfram Sang
@ 2025-10-07 8:44 ` Geert Uytterhoeven
2025-10-07 21:30 ` Wolfram Sang
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2025-10-07 8:44 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, devicetree
Hi Wolfram,
On Tue, 7 Oct 2025 at 05:22, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Allow additional properties to enable devices attached to the bus.
> Fixes warnings like these:
>
> arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: bus@fec10000 (renesas,bsc-sh73a0): Unevaluated properties are not allowed ('ethernet@10000000' was unexpected)
> arch/arm/boot/dts/renesas/r8a73a4-ape6evm.dtb: bus@fec10000 (renesas,bsc-r8a73a4): Unevaluated properties are not allowed ('ethernet@8000000', 'flash@0' were unexpected)
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thanks for your patch!
> index f53a37785413..24732c5e24e1 100644
> --- a/Documentation/devicetree/bindings/bus/renesas,bsc.yaml
> +++ b/Documentation/devicetree/bindings/bus/renesas,bsc.yaml
> @@ -41,6 +41,18 @@ properties:
> interrupts:
> maxItems: 1
>
> +patternProperties:
> + # All other properties should be child nodes with unit-address and 'reg'
> + "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
I take it the "\\-" means escaped dash, to avoid it being interpreted
as a range? I usually put the dash at the end, so it needs no escaping,
but I am not sure that would work in yaml.
I would drop the "A-F", as upper-case hex in unit addresses is very
rare, and non-existent in *upstream) Renesas DTS files.
> + type: object
> + additionalProperties: true
> + properties:
> + reg:
> + maxItems: 1
> +
> + required:
> + - reg
> +
> required:
> - reg
I guess we can indeed have no child nodes without reg properties.
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties
2025-10-07 8:44 ` Geert Uytterhoeven
@ 2025-10-07 21:30 ` Wolfram Sang
2025-10-08 9:56 ` Geert Uytterhoeven
0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2025-10-07 21:30 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-renesas-soc, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, devicetree
[-- Attachment #1: Type: text/plain, Size: 786 bytes --]
Hi Geert,
> > +patternProperties:
> > + # All other properties should be child nodes with unit-address and 'reg'
> > + "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
>
> I take it the "\\-" means escaped dash, to avoid it being interpreted
> as a range? I usually put the dash at the end, so it needs no escaping,
> but I am not sure that would work in yaml.
>
> I would drop the "A-F", as upper-case hex in unit addresses is very
> rare, and non-existent in *upstream) Renesas DTS files.
As said, I copied this from 'bus/allwinner,sun50i-a64-de2.yaml', so this
got reviewed already. I have no strong opinions on your suggestions
above. But whatever we agree on, it should be reused for all busses, I'd
say. So, we should put it where it can be referenced?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties
2025-10-07 21:30 ` Wolfram Sang
@ 2025-10-08 9:56 ` Geert Uytterhoeven
2025-10-08 10:02 ` Wolfram Sang
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2025-10-08 9:56 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, devicetree
Hi Wolfram,
On Tue, 7 Oct 2025 at 23:30, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > > +patternProperties:
> > > + # All other properties should be child nodes with unit-address and 'reg'
> > > + "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
> >
> > I take it the "\\-" means escaped dash, to avoid it being interpreted
> > as a range? I usually put the dash at the end, so it needs no escaping,
> > but I am not sure that would work in yaml.
> >
> > I would drop the "A-F", as upper-case hex in unit addresses is very
> > rare, and non-existent in *upstream) Renesas DTS files.
>
> As said, I copied this from 'bus/allwinner,sun50i-a64-de2.yaml', so this
> got reviewed already. I have no strong opinions on your suggestions
> above. But whatever we agree on, it should be reused for all busses, I'd
> say. So, we should put it where it can be referenced?
In my defense, this is a DT bindings file for Renesas BSC, so we can
(and IMHO should) add restrictions.
If you want to go the fully generic way: as per the device tree
specification, a unit-address can take all characters from the same
set as a node name...
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties
2025-10-08 9:56 ` Geert Uytterhoeven
@ 2025-10-08 10:02 ` Wolfram Sang
2025-10-08 22:42 ` Rob Herring
0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2025-10-08 10:02 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-renesas-soc, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, devicetree
[-- Attachment #1: Type: text/plain, Size: 791 bytes --]
> > As said, I copied this from 'bus/allwinner,sun50i-a64-de2.yaml', so this
> > got reviewed already. I have no strong opinions on your suggestions
> > above. But whatever we agree on, it should be reused for all busses, I'd
> > say. So, we should put it where it can be referenced?
>
> In my defense, this is a DT bindings file for Renesas BSC, so we can
> (and IMHO should) add restrictions.
>
> If you want to go the fully generic way: as per the device tree
> specification, a unit-address can take all characters from the same
> set as a node name...
Well, I think consistency makes sense, but I don't even have a strong
opinion on that. If DT maintainers are fine with having multiple
patternProperties for busses, I will include the restriction you
suggested.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties
2025-10-08 10:02 ` Wolfram Sang
@ 2025-10-08 22:42 ` Rob Herring
2025-10-09 6:43 ` Wolfram Sang
0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2025-10-08 22:42 UTC (permalink / raw)
To: Wolfram Sang
Cc: Geert Uytterhoeven, linux-renesas-soc, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, devicetree
On Wed, Oct 08, 2025 at 12:02:29PM +0200, Wolfram Sang wrote:
>
> > > As said, I copied this from 'bus/allwinner,sun50i-a64-de2.yaml', so this
> > > got reviewed already. I have no strong opinions on your suggestions
> > > above. But whatever we agree on, it should be reused for all busses, I'd
> > > say. So, we should put it where it can be referenced?
> >
> > In my defense, this is a DT bindings file for Renesas BSC, so we can
> > (and IMHO should) add restrictions.
> >
> > If you want to go the fully generic way: as per the device tree
> > specification, a unit-address can take all characters from the same
> > set as a node name...
>
> Well, I think consistency makes sense, but I don't even have a strong
> opinion on that. If DT maintainers are fine with having multiple
> patternProperties for busses, I will include the restriction you
> suggested.
>
There's always examples not to follow...
Adding back context:
> + "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
The node name pattern before the '@' is just what's a valid node name.
That is checked by the core schema on *every* node already. Even ',',
'.', '+', and '_' are allowed which have long been deprecated. (Do you
know how long it took to get QCom to stop with the 'qcom,' node name
prefixes...).
The unit-address is the only part a bus schema should define. And there,
lowercase hex is standard unless you have distinct fields (e.g. chip
select and offset).
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties
2025-10-08 22:42 ` Rob Herring
@ 2025-10-09 6:43 ` Wolfram Sang
2025-10-09 12:41 ` Rob Herring
0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2025-10-09 6:43 UTC (permalink / raw)
To: Rob Herring
Cc: Geert Uytterhoeven, linux-renesas-soc, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, devicetree
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
Hi Rob,
> There's always examples not to follow...
Sure. The good thing is that I could fix the bad examples, once I learnt
how to do it properly.
> The unit-address is the only part a bus schema should define. And there,
> lowercase hex is standard unless you have distinct fields (e.g. chip
> select and offset).
Okay, so, the proper pattern is: ""^.*@[0-9a-f]+$"" which is what most
busses are using. Will fix.
Thanks and happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties
2025-10-09 6:43 ` Wolfram Sang
@ 2025-10-09 12:41 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2025-10-09 12:41 UTC (permalink / raw)
To: Wolfram Sang
Cc: Geert Uytterhoeven, linux-renesas-soc, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, devicetree
On Thu, Oct 9, 2025 at 1:43 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Hi Rob,
>
> > There's always examples not to follow...
>
> Sure. The good thing is that I could fix the bad examples, once I learnt
> how to do it properly.
Much appreciated.
> > The unit-address is the only part a bus schema should define. And there,
> > lowercase hex is standard unless you have distinct fields (e.g. chip
> > select and offset).
>
> Okay, so, the proper pattern is: ""^.*@[0-9a-f]+$"" which is what most
> busses are using. Will fix.
You can drop the '^.*' part. We have a mixture of both though...
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-10-09 12:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-07 3:18 [PATCH] dt-bindings: bus: renesas-bsc: allow additional properties Wolfram Sang
2025-10-07 8:44 ` Geert Uytterhoeven
2025-10-07 21:30 ` Wolfram Sang
2025-10-08 9:56 ` Geert Uytterhoeven
2025-10-08 10:02 ` Wolfram Sang
2025-10-08 22:42 ` Rob Herring
2025-10-09 6:43 ` Wolfram Sang
2025-10-09 12:41 ` Rob Herring
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).