Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Marek Vasut" <marek.vasut+renesas@mailbox.org>
Cc: wsa+renesas@sang-engineering.com, conor+dt@kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: usb: dwc3: Document Renesas R-Car Gen5 DWC3 xHCI USB controller
Date: Thu, 06 Aug 2026 05:14:39 +0000	[thread overview]
Message-ID: <20260806051440.549081F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260806050422.324435-1-marek.vasut+renesas@mailbox.org>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The compatible string list does not include the generic 'snps,dwc3' fallback required for the generic platform driver to probe.
- [Medium] The flat DWC3 controller binding fails to reference the common DWC3 schema and incorrectly uses `additionalProperties: false`, which explicitly rejects standard DWC3 and USB properties.
- [Low] The `phy-names` property uses a scalar `enum` on an array type, which causes a JSON schema type mismatch.
--

--- Patch [1]: [PATCH v2 1/2] dt-bindings: usb: dwc3: Document Renesas R-Car Gen5 DWC3 xHCI USB controller ---
commit 4cc09ce41f0476bc2f778f2624aafad6ed1dfffc
Author: Marek Vasut <marek.vasut+renesas@mailbox.org>

dt-bindings: usb: dwc3: Document Renesas R-Car Gen5 DWC3 xHCI USB controller

This commit introduces the device tree binding documentation for the Renesas 
R-Car Gen5 DWC3 USB controller. It specifies the properties required for the 
glue logic and the controller itself, using a flat binding approach.

> diff --git a/Documentation/devicetree/bindings/usb/renesas,rcar-gen5-dwc3.yaml b/Documentation/devicetree/bindings/usb/renesas,rcar-gen5-dwc3.yaml
> new file mode 100644
> index 0000000000000..9f48f90d6df85
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/renesas,rcar-gen5-dwc3.yaml
> @@ -0,0 +1,79 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/renesas,rcar-gen5-dwc3.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas R-Car Gen5 DWC3 xHCI USB controller
> +
> +maintainers:
> +  - Marek Vasut <marek.vasut+renesas@mailbox.org>
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: renesas,r8a78000-dwc3
> +      - const: renesas,rcar-gen5-dwc3

[Severity: High]
Is the generic snps,dwc3 fallback required in this compatible string list?

The commit message notes this is a flat binding for the generic platform
driver, but omitting the mandatory snps,dwc3 fallback restricts the schema
to exactly these two items.

Without the generic fallback, the generic DWC3 driver in
drivers/usb/dwc3/core.c will not recognize the Renesas-specific compatible
string. This regression will cause the USB controller to silently fail to
probe when booting with this schema.

[ ... ]

> +  phys:
> +    maxItems: 1
> +
> +  phy-names:
> +    enum: [ usb2-phy, usb3-phy ]

[Severity: Low]
Will applying a scalar enum directly to the phy-names property cause a JSON
schema type mismatch during validation?

Because phy-names is typed as a string-array by the core device tree schemas,
limiting its items with a direct enum implies the array itself must identically
match one of the string elements. This type mismatch introduces a regression
leading to validation errors during dt_binding_check.

Should this be defined using items: enum: [ usb2-phy, usb3-phy ] instead?

[ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - clocks
> +  - interrupts
> +  - maximum-speed
> +  - phys
> +  - phy-names
> +  - power-domains
> +  - resets
> +
> +additionalProperties: false

[Severity: Medium]
By setting additionalProperties to false without a reference to the core DWC3
schema, are we blocking all standard DWC3 and USB properties?

If a device tree attempts to use standard DWC3 properties like
snps,dis_u2_susphy_quirk or usb-role-switch, the schema validation phase
(dt_binding_check) will reject them because only explicitly listed properties
are allowed.

Could a reference like $ref: snps,dwc3.yaml# be missing here to allow the
flat binding to accept generic properties?

> +
> +examples:

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260806050422.324435-1-marek.vasut+renesas@mailbox.org?part=1

      parent reply	other threads:[~2026-08-06  5:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  5:03 [PATCH v2 1/2] dt-bindings: usb: dwc3: Document Renesas R-Car Gen5 DWC3 xHCI USB controller Marek Vasut
2026-08-06  5:03 ` [PATCH v2 2/2] usb: dwc3: dwc3-generic-plat: Add Renesas R-Car Gen5 DWC3 xHCI USB controller glue Marek Vasut
2026-08-06  5:13   ` sashiko-bot
2026-08-06  5:14 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260806051440.549081F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox