Repository navigation
Shikra charger v1 - bindings and driver changes - #2416
Merged
Pratham Pratap (ppratap-liveroot) merged 2 commits intoNov 26, 2026
Merged
Pratham Pratap (ppratap-liveroot) merged 2 commits into
Pratham Pratap (ppratap-liveroot) merged 2 commits into
Conversation
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. Link: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/ Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
QUSB2 Phy is capable of performing BC.1.2 Charger detection by controlling the dp/dm lines. On platforms where the PMIC isn't capable of performing charger detection, the responsibility is delegated to the phy. On Shikra CQM/CQS platforms, the PM4125 relies on QUSB2 Phy to perform charger detection. As part of this, the following changes are being done: a) Refactor phy enable/disable calls to control regulators and clocks. b) Let the usb-role information coming from PM4125 to pass through the phy so that when a vbus active signal is detected, the phy can check if its SDP/CDP/DCP and pass on the role to controller only when the charger is SDP/CDP. In case of host mode, the role is forwarded without any charger detection. c) Since the controller probe relies on phy probe to be completed first, during phy probe, it won't be possible to get role-switch handle of the controller. Hence check for controller role switch whenever a role info is obtained from the connector node. Link: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-2-5a9d919c66b5@oss.qualcomm.com/ Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
|
Change Requests Validation Check No CR numbers found in the pull request description. Please add CR numbers in the format: Example: |
Pratham Pratap (ppratap-liveroot)
merged commit Nov 26, 2026
50118ec
into
qualcomm-linux:tech/bus/usb/all
3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Also the driver changes do the following:
a) Refactor phy enable/disable calls to control regulators and clocks.
b) Let the usb-role information coming from PM4125 to pass through the phy
so that when a vbus active signal is detected, the phy can check if its
SDP/CDP/DCP and pass on the role to controller only when the charger is
SDP/CDP. In case of host mode, the role is forwarded without any charger
detection.
c) Since the controller probe relies on phy probe to be completed first,
during phy probe, it won't be possible to get role-switch handle of the
controller. Hence check for controller role switch whenever a role info
is obtained from the connector node.
Link: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-0-5a9d919c66b5@oss.qualcomm.com/
CRs-Fixed: 4759581