Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Krishna Kurapati" <krishna.kurapati@oss.qualcomm.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
	neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH 1/2] dt-bindings: phy: qcom,qusb2: Add support for remote endpoints
Date: Wed, 11 Nov 2026 19:03:38 +0000	[thread overview]
Message-ID: <sashiko-outbox-209524@kernel.org> (raw)
In-Reply-To: <20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: phy: qcom,qusb2: usb-role-switch overloaded for
  BC1.2 detection
- [Low] dt-bindings: phy: qcom,qusb2: incomplete usb-role-switch and
  ports schema
--

commit fd796c127a8188028d89719a01ee3f717ede3073
Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>

dt-bindings: phy: qcom,qusb2: Add support for remote endpoints

This commit adds OF graph ports and the usb-role-switch property to the
Qualcomm QUSB2 PHY Devicetree binding to support BC1.2 charger detection
and role notification routing.

> diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> index 001fd0ccc9852..0b6b2933dd98b 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> @@ -159,6 +159,29 @@ properties:
>      maximum: 3
>      default: 0
>  
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    description:
> +      Those ports can be used with any connector/pmic node that is able to
> +      provide role switch notifications for charger detection purposes.
> +
> +    properties:
> +      port@0:
> +        $ref: /schemas/graph.yaml#/properties/port
> +        description: Connector Data bus
> +
> +      port@1:
> +        $ref: /schemas/graph.yaml#/properties/port
> +        description: Controller data bus.
> +
> +  usb-role-switch:
> +    description:
> +      In the context of usb-phy, it denotes the capability to perform charger
> +      detection. Although phy is not the one responsible for switching mode, it
> +      is the one responsible to take a call on whether controller must switch
> +      mode or not. In case of SDP/CDT, the phy would inform the controller to
> +      switch to device and in case of DCP, role switch doesn't need to happen.
> +

[Severity: Medium]
Should usb-role-switch be used on the QUSB2 PHY node to represent BC1.2
charger detection and role notification forwarding?

In Documentation/devicetree/bindings/usb/usb-drd.yaml, usb-role-switch
indicates that a device is capable of assigning the USB data role, which
on these platforms is the USB controller rather than the PHY.  Using it
here to make fwnode_usb_role_switch_get() match the PHY endpoint encodes
Linux driver notification routing into the Devicetree ABI, while BC1.2
detection capability is already implied by the PHY compatible string and
the DP/DM routing is already described by ports.

[Severity: Low]
Does this schema need type and port constraints for dtbs_check validation?

Because usb-role-switch is defined here without referencing usb-drd.yaml,
it is missing type: boolean.  In addition, since the PHY does not permit a
child usb-connector node and requires both port@0 (incoming notification)
and port@1 (outgoing notification to the controller) when intercepting
role switches, ports should list port@0 and port@1 under required and a
dependencies entry should require ports when usb-role-switch is present.
Also, the description has a typo ("SDP/CDT" instead of "SDP/CDP").

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261111-shikra-qusb2-charger-det-v1-0-5a9d919c66b5@oss.qualcomm.com?part=1

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-11-11 19:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 17:31 [PATCH 0/2] Add charger detection support for Shikra Krishna Kurapati
2026-11-11 17:31 ` [PATCH 1/2] dt-bindings: phy: qcom,qusb2: Add support for remote endpoints Krishna Kurapati
2026-11-11 19:03   ` sashiko-bot [this message]
2026-11-11 17:31 ` [PATCH 2/2] phy: qcom: qusb2: Add charger detection support Krishna Kurapati
2026-11-11 19:23   ` sashiko-bot
2026-11-12  0:40   ` kernel test robot

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-209524@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krishna.kurapati@oss.qualcomm.com \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /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