usb: phy: Reset PHY while disabling dpdm regulator
Currently PHY driver relies on regulators(vdd, 1p8, 3p1) to be
disabled for the PHY to come out of high-Z state when charger
driver is done with APSD. This works for the platforms having
single instance of PHY.
Consider a case where there are two instances of the same phy
(primary and secondary) and both are sharing the same resources
(regulators - vdd, 1p8, 3p1). If the platform is configured in
such a way that the secondary instance is always powered on
(e.g. host mode) and booted up with charger(DCP) connected on
the primary port, when charger is disconnected after bootup,
dpdm_regulator_disable will be called from charger driver which
will disable regulator but the regulators will not be disabled
since the secondary instance still has vote for regulators.
This will lead the primary instance to be in high-Z state even
though nothing is connected and causes extra power consumption.
Fix this by resetting the phy before turning off the regulators
in dpdm_regulator_disable for snps/qusb phys.
Change-Id: If96a878448144e446d12acf136c9c6d8fa9432cb
Signed-off-by:
Pratham Pratap <prathampratap@codeaurora.org>
Loading
Please register or sign in to comment