Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ryan Chen" <ryan_chen@aspeedtech.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: usb: Add Aspeed AST2700 DWC3 controller
Date: Tue, 07 Jul 2026 06:26:38 +0000	[thread overview]
Message-ID: <20260707062638.D81181F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260707-xhci-v1-1-b202b9b3274e@aspeedtech.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The AST2700 DWC3 binding lists `clocks` and `clock-names` as required properties but fails to explicitly define strict constraints for them in the `properties:` block, relying on a loose generic schema.
--

--- Patch [1]: [PATCH] dt-bindings: usb: Add Aspeed AST2700 DWC3 controller ---
commit e94cba741ea120f96563c784f28513d593ede326
Author: Ryan Chen <ryan_chen@aspeedtech.com>

dt-bindings: usb: Add Aspeed AST2700 DWC3 controller

This commit adds a new device tree binding for the Aspeed AST2700 DWC3
controller. It uses a dedicated YAML file that references the generic
snps,dwc3.yaml schema and adds SoC-specific constraints such as a
mandatory USB3 PHY.

> Because reg, clocks and clock-names are only defined indirectly through
> the $ref, they still appear in the required list, the same approach as
> apple,dwc3.yaml.

[Severity: Low]
This isn't a bug, but is this description of apple,dwc3.yaml accurate?

Looking at apple,dwc3.yaml, it explicitly overrides reg in its properties:
block to enforce strict bounds, rather than relying on an indirect
definition through the $ref.

> diff --git a/Documentation/devicetree/bindings/usb/aspeed,dwc3.yaml b/Documentation/devicetree/bindings/usb/aspeed,dwc3.yaml
> new file mode 100644
> index 0000000000000..976f80b87e24c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/aspeed,dwc3.yaml
[ ... ]
> +properties:
> +  compatible:
> +    items:
> +      - const: aspeed,ast2700-xhci
> +      - const: snps,dwc3
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  resets:
> +    maxItems: 1
> +
> +  phys:
> +    maxItems: 1
> +
> +  phy-names:
> +    const: usb3-phy

[Severity: Low]
Since clocks and clock-names are listed as required properties below, should
they be explicitly constrained here in the properties: block?

Without strict constraints defined here, device trees with an incorrect
number of clocks or invalid clock names for the AST2700 could silently pass
schema validation by falling back to the loosely defined generic schema in
snps,dwc3.yaml.

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - resets
> +  - phys
> +  - phy-names

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260707-xhci-v1-1-b202b9b3274e@aspeedtech.com?part=1

  reply	other threads:[~2026-07-07  6:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07  6:12 [PATCH] dt-bindings: usb: Add Aspeed AST2700 DWC3 controller Ryan Chen
2026-07-07  6:26 ` sashiko-bot [this message]
2026-07-08 10:48 ` Krzysztof Kozlowski
2026-07-09  6:12   ` Ryan Chen

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=20260707062638.D81181F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=ryan_chen@aspeedtech.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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