* [PATCH 1/2] dt-bindings: usb: parade,ps5511: Disallow unevaluated properties
@ 2026-01-12 9:01 Krzysztof Kozlowski
2026-01-12 9:01 ` [PATCH 2/2] dt-bindings: usb: realtek,rts5411: " Krzysztof Kozlowski
2026-01-12 20:20 ` [PATCH 1/2] dt-bindings: usb: parade,ps5511: " Rob Herring
0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-12 9:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Pin-yen Lin, Matthias Kaehlcke, linux-usb,
devicetree, linux-kernel
Cc: Krzysztof Kozlowski, stable
Review given to v2 [1] of commit fc259b024cb3 ("dt-bindings: usb: Add
binding for PS5511 hub controller") asked to use unevaluatedProperties,
but this was ignored by the author probably because current dtschema
does not allow to use both additionalProperties and
unevaluatedProperties. As an effect, this binding does not end with
unevaluatedProperties and allows any properties to be added.
Fix this by reverting the approach suggested at v2 review and using
simpler definition of "reg" constraints.
Link: https://lore.kernel.org/r/20250416180023.GB3327258-robh@kernel.org/ [1]
Fixes: fc259b024cb3 ("dt-bindings: usb: Add binding for PS5511 hub controller")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
.../devicetree/bindings/usb/parade,ps5511.yaml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/parade,ps5511.yaml b/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
index 10d002f09db8..154d779e507a 100644
--- a/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
+++ b/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
@@ -15,6 +15,10 @@ properties:
- usb1da0,5511
- usb1da0,55a1
+ reg:
+ minimum: 1
+ maximum: 5
+
reset-gpios:
items:
- description: GPIO specifier for RESETB pin.
@@ -41,12 +45,6 @@ properties:
minimum: 1
maximum: 5
-additionalProperties:
- properties:
- reg:
- minimum: 1
- maximum: 5
-
required:
- peer-hub
@@ -67,6 +65,8 @@ allOf:
patternProperties:
'^.*@5$': false
+unevaluatedProperties: false
+
examples:
- |
usb {
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] dt-bindings: usb: realtek,rts5411: Disallow unevaluated properties
2026-01-12 9:01 [PATCH 1/2] dt-bindings: usb: parade,ps5511: Disallow unevaluated properties Krzysztof Kozlowski
@ 2026-01-12 9:01 ` Krzysztof Kozlowski
2026-01-12 20:20 ` [PATCH 1/2] dt-bindings: usb: parade,ps5511: " Rob Herring
1 sibling, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-12 9:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Pin-yen Lin, Matthias Kaehlcke, linux-usb,
devicetree, linux-kernel
Cc: Krzysztof Kozlowski, stable
Review given to v2 [1] of commit 76cbb3eabf0b ("dt-bindings: usb:
realtek,rts5411: Adapt usb-hub.yaml") asked to use
unevaluatedProperties, but this was ignored by the author probably
because current dtschema does not allow to use both additionalProperties
and unevaluatedProperties. As an effect, this binding does not end with
unevaluatedProperties and allows any properties to be added.
Fix this by reverting the approach suggested at v2 review and using
simpler definition of "reg" constraints.
Link: https://lore.kernel.org/r/20250416180023.GB3327258-robh@kernel.org/ [1]
Fixes: 76cbb3eabf0b ("dt-bindings: usb: realtek,rts5411: Adapt usb-hub.yaml")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
.../devicetree/bindings/usb/realtek,rts5411.yaml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
index a020afaf2d6e..a86afa8fdc91 100644
--- a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
+++ b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml
@@ -19,6 +19,10 @@ properties:
- usbbda,5411
- usbbda,411
+ reg:
+ minimum: 1
+ maximum: 4
+
vdd-supply:
description:
phandle to the regulator that provides power to the hub.
@@ -37,17 +41,13 @@ properties:
minimum: 1
maximum: 4
-additionalProperties:
- properties:
- reg:
- minimum: 1
- maximum: 4
-
required:
- peer-hub
- compatible
- reg
+unevaluatedProperties: false
+
examples:
- |
usb {
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] dt-bindings: usb: parade,ps5511: Disallow unevaluated properties
2026-01-12 9:01 [PATCH 1/2] dt-bindings: usb: parade,ps5511: Disallow unevaluated properties Krzysztof Kozlowski
2026-01-12 9:01 ` [PATCH 2/2] dt-bindings: usb: realtek,rts5411: " Krzysztof Kozlowski
@ 2026-01-12 20:20 ` Rob Herring
2026-01-12 23:17 ` Rob Herring
2026-01-16 7:55 ` Krzysztof Kozlowski
1 sibling, 2 replies; 6+ messages in thread
From: Rob Herring @ 2026-01-12 20:20 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Pin-yen Lin, Matthias Kaehlcke, linux-usb, devicetree,
linux-kernel, stable
On Mon, Jan 12, 2026 at 10:01:50AM +0100, Krzysztof Kozlowski wrote:
> Review given to v2 [1] of commit fc259b024cb3 ("dt-bindings: usb: Add
> binding for PS5511 hub controller") asked to use unevaluatedProperties,
> but this was ignored by the author probably because current dtschema
> does not allow to use both additionalProperties and
> unevaluatedProperties. As an effect, this binding does not end with
> unevaluatedProperties and allows any properties to be added.
>
> Fix this by reverting the approach suggested at v2 review and using
> simpler definition of "reg" constraints.
>
> Link: https://lore.kernel.org/r/20250416180023.GB3327258-robh@kernel.org/ [1]
> Fixes: fc259b024cb3 ("dt-bindings: usb: Add binding for PS5511 hub controller")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> .../devicetree/bindings/usb/parade,ps5511.yaml | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/parade,ps5511.yaml b/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
> index 10d002f09db8..154d779e507a 100644
> --- a/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
> +++ b/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
> @@ -15,6 +15,10 @@ properties:
> - usb1da0,5511
> - usb1da0,55a1
>
> + reg:
> + minimum: 1
> + maximum: 5
> +
This 'reg' would be the upstream USB port. We have no idea what its
constraints are for the value.
> reset-gpios:
> items:
> - description: GPIO specifier for RESETB pin.
> @@ -41,12 +45,6 @@ properties:
> minimum: 1
> maximum: 5
>
> -additionalProperties:
> - properties:
> - reg:
> - minimum: 1
> - maximum: 5
Removing this is wrong. This is defining the number of downstream USB
ports for this hub.
What's wrong here is 'type: object' is missing, so any property that's
not a object passes (no, 'properties' doesn't imply it's an object).
We should fix dtschema to allow additionalProperties when not a
boolean property to coexist with unevaluatedProperties. I'll look into
it.
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] dt-bindings: usb: parade,ps5511: Disallow unevaluated properties
2026-01-12 20:20 ` [PATCH 1/2] dt-bindings: usb: parade,ps5511: " Rob Herring
@ 2026-01-12 23:17 ` Rob Herring
2026-01-16 7:55 ` Krzysztof Kozlowski
1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2026-01-12 23:17 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Pin-yen Lin, Matthias Kaehlcke, linux-usb, devicetree,
linux-kernel, stable
On Mon, Jan 12, 2026 at 2:20 PM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Jan 12, 2026 at 10:01:50AM +0100, Krzysztof Kozlowski wrote:
> > Review given to v2 [1] of commit fc259b024cb3 ("dt-bindings: usb: Add
> > binding for PS5511 hub controller") asked to use unevaluatedProperties,
> > but this was ignored by the author probably because current dtschema
> > does not allow to use both additionalProperties and
> > unevaluatedProperties. As an effect, this binding does not end with
> > unevaluatedProperties and allows any properties to be added.
> >
> > Fix this by reverting the approach suggested at v2 review and using
> > simpler definition of "reg" constraints.
> >
> > Link: https://lore.kernel.org/r/20250416180023.GB3327258-robh@kernel.org/ [1]
> > Fixes: fc259b024cb3 ("dt-bindings: usb: Add binding for PS5511 hub controller")
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> > ---
> > .../devicetree/bindings/usb/parade,ps5511.yaml | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/parade,ps5511.yaml b/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
> > index 10d002f09db8..154d779e507a 100644
> > --- a/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
> > +++ b/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
> > @@ -15,6 +15,10 @@ properties:
> > - usb1da0,5511
> > - usb1da0,55a1
> >
> > + reg:
> > + minimum: 1
> > + maximum: 5
> > +
>
> This 'reg' would be the upstream USB port. We have no idea what its
> constraints are for the value.
>
> > reset-gpios:
> > items:
> > - description: GPIO specifier for RESETB pin.
> > @@ -41,12 +45,6 @@ properties:
> > minimum: 1
> > maximum: 5
> >
> > -additionalProperties:
> > - properties:
> > - reg:
> > - minimum: 1
> > - maximum: 5
>
> Removing this is wrong. This is defining the number of downstream USB
> ports for this hub.
>
> What's wrong here is 'type: object' is missing, so any property that's
> not a object passes (no, 'properties' doesn't imply it's an object).
>
> We should fix dtschema to allow additionalProperties when not a
> boolean property to coexist with unevaluatedProperties. I'll look into
> it.
Actually, allowing both wouldn't make sense here.
If you rely on usb-hub.yaml (via usb-device.yaml) to define 'reg', the
additionalProperties schema is still going to be applied to 'reg' as
unevaluatedProperties has no impact on it. That would happen to work
since there's no 'type: object'.
I think the additionalProperties should be a patternProperties instead
because we need to define the unit-address format:
patternProperties:
'@[1-5$':
type: object
...
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] dt-bindings: usb: parade,ps5511: Disallow unevaluated properties
2026-01-12 20:20 ` [PATCH 1/2] dt-bindings: usb: parade,ps5511: " Rob Herring
2026-01-12 23:17 ` Rob Herring
@ 2026-01-16 7:55 ` Krzysztof Kozlowski
2026-01-16 7:58 ` Krzysztof Kozlowski
1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-16 7:55 UTC (permalink / raw)
To: Rob Herring
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Pin-yen Lin, Matthias Kaehlcke, linux-usb, devicetree,
linux-kernel, stable
On 12/01/2026 21:20, Rob Herring wrote:
> On Mon, Jan 12, 2026 at 10:01:50AM +0100, Krzysztof Kozlowski wrote:
>> Review given to v2 [1] of commit fc259b024cb3 ("dt-bindings: usb: Add
>> binding for PS5511 hub controller") asked to use unevaluatedProperties,
>> but this was ignored by the author probably because current dtschema
>> does not allow to use both additionalProperties and
>> unevaluatedProperties. As an effect, this binding does not end with
>> unevaluatedProperties and allows any properties to be added.
>>
>> Fix this by reverting the approach suggested at v2 review and using
>> simpler definition of "reg" constraints.
>>
>> Link: https://lore.kernel.org/r/20250416180023.GB3327258-robh@kernel.org/ [1]
>> Fixes: fc259b024cb3 ("dt-bindings: usb: Add binding for PS5511 hub controller")
>> Cc: <stable@vger.kernel.org>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
>> ---
>> .../devicetree/bindings/usb/parade,ps5511.yaml | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/parade,ps5511.yaml b/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
>> index 10d002f09db8..154d779e507a 100644
>> --- a/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
>> +++ b/Documentation/devicetree/bindings/usb/parade,ps5511.yaml
>> @@ -15,6 +15,10 @@ properties:
>> - usb1da0,5511
>> - usb1da0,55a1
>>
>> + reg:
>> + minimum: 1
>> + maximum: 5
>> +
>
> This 'reg' would be the upstream USB port. We have no idea what its
> constraints are for the value.
Indeed.
>
>> reset-gpios:
>> items:
>> - description: GPIO specifier for RESETB pin.
>> @@ -41,12 +45,6 @@ properties:
>> minimum: 1
>> maximum: 5
>>
>> -additionalProperties:
>> - properties:
>> - reg:
>> - minimum: 1
>> - maximum: 5
>
> Removing this is wrong. This is defining the number of downstream USB
> ports for this hub.
>
> What's wrong here is 'type: object' is missing, so any property that's
> not a object passes (no, 'properties' doesn't imply it's an object).
>
> We should fix dtschema to allow additionalProperties when not a
> boolean property to coexist with unevaluatedProperties. I'll look into
> it.
I see your commit. I will send v2 of this.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] dt-bindings: usb: parade,ps5511: Disallow unevaluated properties
2026-01-16 7:55 ` Krzysztof Kozlowski
@ 2026-01-16 7:58 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-16 7:58 UTC (permalink / raw)
To: Rob Herring
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Pin-yen Lin, Matthias Kaehlcke, linux-usb, devicetree,
linux-kernel, stable
On 16/01/2026 08:55, Krzysztof Kozlowski wrote:
>>
>> Removing this is wrong. This is defining the number of downstream USB
>> ports for this hub.
>>
>> What's wrong here is 'type: object' is missing, so any property that's
>> not a object passes (no, 'properties' doesn't imply it's an object).
>>
>> We should fix dtschema to allow additionalProperties when not a
>> boolean property to coexist with unevaluatedProperties. I'll look into
>> it.
>
> I see your commit. I will send v2 of this.
Ah no, that commit from 13th Jan was for interrupts. So later then :)
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-16 7:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12 9:01 [PATCH 1/2] dt-bindings: usb: parade,ps5511: Disallow unevaluated properties Krzysztof Kozlowski
2026-01-12 9:01 ` [PATCH 2/2] dt-bindings: usb: realtek,rts5411: " Krzysztof Kozlowski
2026-01-12 20:20 ` [PATCH 1/2] dt-bindings: usb: parade,ps5511: " Rob Herring
2026-01-12 23:17 ` Rob Herring
2026-01-16 7:55 ` Krzysztof Kozlowski
2026-01-16 7:58 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox