Repository navigation
Shikra charger det 618y - #1590
Kriskura176767 wants to merge 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. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
|
Merge Check Failed: No Change Task Found No associated change tasks found for CR 4759581 on any of the following entities: Entities:
CR: 4759581 Please ensure the CR has a change task associated with at least one of the entities for this branch. |
PR #1590 — validate-patchPR: #1590
Final Summary
|
PR #1590 — checker-log-analyzerPR: #1590
Detailed report: Full report
|
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