[PATCH 1/2] dt-bindings: phy: qcom,qusb2: Add support for remote endpoints

From: Krishna Kurapati

Date: Wed Nov 11 2026 - 12:39:05 EST


QUSB2 Phy HW is capable of doing BC.1.2 charger detection. On most of the
platforms, the charger detection is done by PMIC. But on Shikra CQM/CQS
platforms, the PM4125 doesn't have ability to do charger detection and
that responsibility is delegated to QUSB2 Phy which acts on the DP/DM
lines in its control to get the job done.

During process of charger detection, if the controller is supposed to
enter device mode, the charger is detected as SDP/CDP/DCP. The controller
must enter device mode only if the detected charger is SDP/CDP. In case of
DCP, the phy can be turned off after detection. If the controller must
enter host mode, charger detection can be skipped and hence the phy must
know the role before the controller so that appropriate decision can be
taken whether the controller must enter device/host mode or not.

Intention of adding remote endpoints and usb-role-switch property binding
support is as follows:

a) The DP/DM lines do go through the phy to the controller i.e., the phy
exists between connector and controller. Hence adding remote endpoints
depicting the same.

b) Although the usb2 phy is not the entity doing role switching, it still
does need to decide which mode the controller must move into and hence
adding usb-role-switch property to allow role notifications from charger
to go to controller via phy.

Signed-off-by: Krishna Kurapati <krishna.kurapati@xxxxxxxxxxxxxxxx>
---
.../devicetree/bindings/phy/qcom,qusb2-phy.yaml | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
index 001fd0ccc985..0b6b2933dd98 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.
+
required:
- compatible
- reg

--
2.34.1