Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Elson Serrao" <elson.serrao@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v5 1/9] dt-bindings: soc: qcom: eud: Add per-path child nodes for UTMI routing
Date: Mon, 03 Aug 2026 03:23:45 +0000	[thread overview]
Message-ID: <20260803032345.BC6F21F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260803031534.2942628-2-elson.serrao@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `oneOf` block fails to strictly enforce mutual exclusivity and compatible-specific requirements, allowing mixed and invalid configurations.
--

--- Patch [1]: [PATCH v5 1/9] dt-bindings: soc: qcom: eud: Add per-path child nodes for UTMI routing ---
commit d07ffdab4981374b8db10b3e58b93f23b98e8107
Author: Elson Serrao <elson.serrao@oss.qualcomm.com>

dt-bindings: soc: qcom: eud: Add per-path child nodes for UTMI routing

The Qualcomm Embedded USB Debugger (EUD) can intercept one or two
High-Speed UTMI paths depending on the SoC. For example, SC7280 supports
EUD on the primary UTMI path only, while SM8350 supports EUD on both
primary and secondary UTMI paths.

> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
> index 84218636c0d8d..6fef958487c8d 100644
> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
[ ... ]
>  required:
>    - compatible
>    - reg
> -  - ports
> +
> +oneOf:
> +  - required:
> +      - ports
> +  - allOf:
> +      - if:
> +          properties:
> +            compatible:
> +              contains:
> +                const: qcom,sc7280-eud
> +        then:
> +          required:
> +            - eud-path@0
> +          properties:
> +            eud-path@1: false
> +      - if:
> +          properties:
> +            compatible:
> +              contains:
> +                const: qcom,sm8350-eud
> +        then:
> +          required:
> +            - eud-path@0
> +            - eud-path@1

[Severity: Medium]
Does this oneOf block introduce a regression by allowing mixed or invalid
configurations to pass schema validation?

Since oneOf validates if exactly one of its branches passes, a device tree
could provide both the legacy ports property and invalid eud-path nodes
(such as eud-path@1 on qcom,sc7280-eud).

The input would satisfy the first branch (required: ports) but fail the
second branch's constraints. Because exactly one branch passes, the
validation would incorrectly succeed.

Could we restructure this to strictly enforce mutual exclusivity between the
legacy and new representations?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260803031534.2942628-1-elson.serrao@oss.qualcomm.com?part=1

  reply	other threads:[~2026-08-03  3:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  3:15 [PATCH v5 0/9] Improve Qualcomm EUD driver and platform support Elson Serrao
2026-08-03  3:15 ` [PATCH v5 1/9] dt-bindings: soc: qcom: eud: Add per-path child nodes for UTMI routing Elson Serrao
2026-08-03  3:23   ` sashiko-bot [this message]
2026-08-03  3:15 ` [PATCH v5 2/9] usb: misc: qcom_eud: add sysfs attribute for port selection Elson Serrao
2026-08-03  3:25   ` sashiko-bot
2026-08-03  3:15 ` [PATCH v5 3/9] usb: misc: qcom_eud: add per-path High-Speed PHY control Elson Serrao
2026-08-03  3:28   ` sashiko-bot
2026-08-03  3:15 ` [PATCH v5 4/9] usb: misc: qcom_eud: add per-path role switch support Elson Serrao
2026-08-03  3:30   ` sashiko-bot
2026-08-03  9:37   ` Peter Chen
2026-08-03  3:15 ` [PATCH v5 5/9] usb: misc: qcom_eud: improve enable_store API Elson Serrao
2026-08-03  3:25   ` sashiko-bot
2026-08-03  3:15 ` [PATCH v5 6/9] usb: misc: qcom_eud: add role-based EUD control Elson Serrao
2026-08-03  3:27   ` sashiko-bot
2026-08-03  9:50   ` Peter Chen
2026-08-03  3:15 ` [PATCH v5 7/9] usb: misc: qcom_eud: fix virtual attach/detach event handling Elson Serrao
2026-08-03  3:26   ` sashiko-bot
2026-08-03  3:15 ` [PATCH v5 8/9] arm64: dts: qcom: kodiak: Describe EUD UTMI path using child node Elson Serrao
2026-08-03  3:54   ` sashiko-bot
2026-08-03  3:15 ` [PATCH v5 9/9] arm64: dts: qcom: Map USB connector to EUD on Kodiak boards Elson Serrao

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=20260803032345.BC6F21F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=elson.serrao@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --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