power: qpnp-smbcharger: fix restart with HVDCP
Restarting the phone with HVDCP plugged in causes the charger to
suspend. This is likely because D+/D- grounding by USB PHY during
restart puts the charger in a suspended state.
A workaround for this problem is to do the following when shutting down
if HVDCP is present
disable parallel charging
switch to 5V hvdcp
wait 500ms
disable hvdcp
fake a removal by setting the uv threshold to 9V
fake an insertion by setting the uv threshold to 5-9V
wait 1 second
continue with the shutdown
Upon restart when HLOS comes up it does this
if DCP
reduce ICL to 300mA
fake removal
wait 500ms
fake insertion
if (SDP is detected)
wait 500ms
fake removal
wait 500ms
fake insertion
restore ICL
It is observed that the HVDCP EN bit gets set by CSIR at power up.
However, HVDCP isn't detected, only DCP is detected. Hence HLOS reruns APSD
to initiate HVDCP mode.
CRs-Fixed: 917683
Change-Id: I442150a6549b8e13a7fdea286cb457582459562a
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment