Re: [PATCH 2/6] dt-bindings: usb: cdns,usb3: support USB devices in DT

From: Rob Herring
Date: Mon Dec 29 2025 - 18:35:20 EST


On Thu, Dec 18, 2025 at 04:20:49PM +0100, Alexander Stein wrote:
> Reference usb-hxci.yaml in host mode in order to support on-board USB
> hubs.
>
> Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
> ---
> Documentation/devicetree/bindings/usb/cdns,usb3.yaml | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
> index f454ddd9bbaa6..1f7f0adc3b1ed 100644
> --- a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
> +++ b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
> @@ -85,6 +85,17 @@ required:
>
> allOf:
> - $ref: usb-drd.yaml#
> + - if:
> + properties:
> + dr_mode:
> + const: peripheral
> +
> + required:
> + - dr_mode
> + then:
> + $ref: usb.yaml#
> + else:
> + $ref: usb-xhci.yaml#

I would just do:

allOf:
- $ref: usb-drd.yaml#
- $ref: usb-xhci.yaml# (includes usb.yaml)

2 reasons:

As I remember, 'dr_mode' is at least typically what the default mode is
rather than the only mode the h/w supports.

Even if you are peripheral only, I don't think it is too important to
disallow otherwise valid properties. (It's random, unspecified
properties I care about.)

Rob