From: sashiko-bot@kernel.org
To: "Qianhui Xu" <xiaqinghuan@mail.ustc.edu.cn>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v14 1/3] dt-bindings: usb: snps,dwc3: describe two connectors on one HS data bus
Date: Tue, 24 Nov 2026 05:04:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-230542@kernel.org> (raw)
In-Reply-To: <20261124045220.595001-2-xiaqinghuan@mail.ustc.edu.cn>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] dt-bindings: usb: snps,dwc3: incomplete endpoint schema under
port@0
- [Low] dt-bindings: usb: snps,dwc3: inter-version changelog above
tearline
--
commit a41b1c93c04ec4bc1b950cdd403b91ade72e5b65
Author: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
dt-bindings: usb: snps,dwc3: describe two connectors on one HS data bus
This commit updates the common DWC3 binding schema to describe two USB
connectors multiplexed onto a single High Speed data bus via a mux
controller and two OF graph endpoints under port@0.
> Signed-off-by: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
>
> Changes since v13:
> - [sashiko, 2026-11-23, Low] "missing maxItems: 1 on mux-controls".
> Accepted: the shared data bus is driven by one two-state multiplexer, so
> "mux-controls" now says "maxItems: 1" instead of leaving the number of
> mux controllers open.
[ ... ]
[Severity: Low]
Should the "Changes since v13:" revision log be moved below the "---"
tearline separator so that git am does not record it in the permanent
commit message?
> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> index 6c0b8b6538246..dcfa8c3a81c51 100644
> --- a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> @@ -26,8 +26,78 @@ allOf:
> $ref: usb.yaml#
> else:
> $ref: usb-xhci.yaml#
> + - if:
> + required: [mux-controls]
> + then:
> + # A multiplexed High Speed bus only makes sense when the controller is
> + # dual-role and both connectors can switch their role independently.
> + required: [ports, usb-role-switch]
> + properties:
> + dr_mode:
> + const: otg
> + ports:
> + required: [port@0]
> + properties:
> + port@0:
> + required: ['#address-cells', '#size-cells',
> + endpoint@0, endpoint@1]
> + # A mux'ed High Speed bus has exactly two connectors, as the
> + # two endpoints of this port; a plain "endpoint" or any further
> + # endpoint would be a third data stream and is not described.
> + properties:
> + endpoint: false
> + patternProperties:
> + '^endpoint@[01]$':
> + required: [usb-role-switch, mux-state]
> + '^endpoint@([2-9]|[1-9a-f][0-9a-f]+)$': false
[ ... ]
> + else:
> + # Without a mux the High Speed port keeps the generic graph port
> + # binding, so single-connector controllers are described as before and
> + # the per-connector properties have no meaning.
> + properties:
> + ports:
> + properties:
> + port@0:
> + patternProperties:
> + '^endpoint@[01]$':
> + properties:
> + usb-role-switch: false
> + mux-state: false
[ ... ]
> @@ -411,9 +481,37 @@ properties:
>
> properties:
> port@0:
> - $ref: /schemas/graph.yaml#/properties/port
> + # The High Speed port carries the controller's HS data stream. Two
> + # receptacles sharing one HS D+/D- pair are two mux'ed data streams of
> + # that one stream, so they are two endpoints of this port and not two
> + # ports. A single-connector controller describes the plain "endpoint"
> + # of the graph binding and is unaffected.
> + $ref: /schemas/graph.yaml#/$defs/port-base
> + unevaluatedProperties: false
> description: High Speed (HS) data bus.
>
> + patternProperties:
> + '^endpoint@[01]$':
> + $ref: /schemas/graph.yaml#/$defs/endpoint-base
> + unevaluatedProperties: false
[Severity: Low]
Does switching port@0 from /schemas/graph.yaml#/properties/port to
$defs/port-base leave plain port@0/endpoint (and endpoint@2+) without
unevaluatedProperties: false when mux-controls is absent?
In dtschema, $defs/port-base validates ^endpoint(@[0-9a-f]+)?$ against
$defs/endpoint-base, which intentionally omits unevaluatedProperties:
false so bindings can extend endpoint properties. Because port@0 only
sets unevaluatedProperties: false on ^endpoint@[01]$ and the else branch
only forbids usb-role-switch and mux-state on ^endpoint@[01]$, a single-
connector controller using a plain port@0/endpoint node silently accepts
undocumented properties (including usb-role-switch and mux-state).
Also, in the then branch, '^endpoint@([2-9]|[1-9a-f][0-9a-f]+)$': false
omits single-digit hexadecimal unit addresses a through f, allowing
endpoint@a through endpoint@f when mux-controls is present. Referencing
$ref: /schemas/graph.yaml#/properties/port under port@0 in the else
branch and changing [2-9] to [2-9a-f] in the then branch would close both
gaps.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124045220.595001-1-xiaqinghuan@mail.ustc.edu.cn?part=1
next prev parent reply other threads:[~2026-11-24 5:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 4:52 [PATCH v14 0/3] usb: dwc3: support two connectors sharing one HS data bus Qianhui Xu
2026-11-24 4:52 ` [PATCH v14 1/3] dt-bindings: usb: snps,dwc3: describe two connectors on " Qianhui Xu
2026-11-24 5:04 ` sashiko-bot [this message]
2026-11-24 4:52 ` [PATCH v14 2/3] usb: roles: look up role switches attached to a graph endpoint Qianhui Xu
2026-11-24 4:52 ` [PATCH v14 3/3] usb: dwc3: select the shared HS data bus with a mux controller Qianhui Xu
2026-11-24 4:54 ` [PATCH v14 0/3] usb: dwc3: support two connectors sharing one HS data bus Qianhui Xu
-- strict thread matches above, loose matches on Subject: below --
2026-11-24 1:49 Qianhui Xu
2026-11-24 1:50 ` [PATCH v14 1/3] dt-bindings: usb: snps,dwc3: describe two connectors on " Qianhui Xu
2026-11-24 2:02 ` sashiko-bot
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=sashiko-outbox-230542@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=xiaqinghuan@mail.ustc.edu.cn \
/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