linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: usb: usb-device: make "compatible" optional
@ 2023-02-28 18:29 Rafał Miłecki
  2023-03-08 19:10 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Rafał Miłecki @ 2023-02-28 18:29 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, Florian Fainelli, linux-usb, devicetree,
	Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

This binding was originally meant to describe hard-wired USB devices but
in some situations we need to describe USB ports. That is needed e.g. if
USB port is meant to be used as a trigger source but it can have any
device plugged. It's a common case for home routers which have USB ports
(with no hard-wired devices) and USB LEDs to indicate ports state.

There is no point (and no easy way) to add separate binding covering
just USB ports. Adjust existing devices binding to allow describing
ports.

This fixes:
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: port@1: 'compatible' is a required property
        From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: port@2: 'compatible' is a required property
        From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'port@1', 'port@2' were unexpected)
        From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: port@1: 'compatible' is a required property
        From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: port@2: 'compatible' is a required property
        From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'port@1', 'port@2' were unexpected)
        From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@23000: port@1: 'compatible' is a required property
        From schema: Documentation/devicetree/bindings/usb/generic-xhci.yaml
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@23000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'phy-names', 'phys', 'port@1' were unexpected)
        From schema: Documentation/devicetree/bindings/usb/generic-xhci.yaml

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
I tried to add USB port binding but it didn't work because of $nodename.
Rob suggested to just make "compatible" optional:
[PATCH robh next] dt-bindings: usb: add USB controller port
https://www.spinics.net/lists/linux-usb/msg209553.html
---
 Documentation/devicetree/bindings/usb/usb-device.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/usb-device.yaml b/Documentation/devicetree/bindings/usb/usb-device.yaml
index 7a771125ec76..da890ee60ce6 100644
--- a/Documentation/devicetree/bindings/usb/usb-device.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-device.yaml
@@ -76,7 +76,6 @@ patternProperties:
         maxItems: 1
 
 required:
-  - compatible
   - reg
 
 additionalProperties: true
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: usb: usb-device: make "compatible" optional
  2023-02-28 18:29 [PATCH] dt-bindings: usb: usb-device: make "compatible" optional Rafał Miłecki
@ 2023-03-08 19:10 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2023-03-08 19:10 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Florian Fainelli, Greg Kroah-Hartman, Krzysztof Kozlowski,
	Rob Herring, Rafał Miłecki, linux-usb, devicetree


On Tue, 28 Feb 2023 19:29:09 +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This binding was originally meant to describe hard-wired USB devices but
> in some situations we need to describe USB ports. That is needed e.g. if
> USB port is meant to be used as a trigger source but it can have any
> device plugged. It's a common case for home routers which have USB ports
> (with no hard-wired devices) and USB LEDs to indicate ports state.
> 
> There is no point (and no easy way) to add separate binding covering
> just USB ports. Adjust existing devices binding to allow describing
> ports.
> 
> This fixes:
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: port@1: 'compatible' is a required property
>         From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: port@2: 'compatible' is a required property
>         From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'port@1', 'port@2' were unexpected)
>         From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: port@1: 'compatible' is a required property
>         From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: port@2: 'compatible' is a required property
>         From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'port@1', 'port@2' were unexpected)
>         From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@23000: port@1: 'compatible' is a required property
>         From schema: Documentation/devicetree/bindings/usb/generic-xhci.yaml
> arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@23000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'phy-names', 'phys', 'port@1' were unexpected)
>         From schema: Documentation/devicetree/bindings/usb/generic-xhci.yaml
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> I tried to add USB port binding but it didn't work because of $nodename.
> Rob suggested to just make "compatible" optional:
> [PATCH robh next] dt-bindings: usb: add USB controller port
> https://www.spinics.net/lists/linux-usb/msg209553.html
> ---
>  Documentation/devicetree/bindings/usb/usb-device.yaml | 1 -
>  1 file changed, 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

end of thread, other threads:[~2023-03-08 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 18:29 [PATCH] dt-bindings: usb: usb-device: make "compatible" optional Rafał Miłecki
2023-03-08 19:10 ` 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).