Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31661d13 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

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: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 46d4e4a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment