mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
phy: rockchip: inno_usb2: only reset phy if deassert iddq for rk3588
The current code always reset the usb2 phy in the rk3588_usb2phy_tuning(), this cause the usb core reset the device which connected to the usb2 host interface during pm resume. Actually, it only needs to reset the phy when it exit from iddq mode, so add this patch to reset phy more reasonably, and avoid reset usb device during pm resume. Signed-off-by: William Wu <william.wu@rock-chips.com> Change-Id: I296636321d0cbe6b7ee7be9bd1614237a34312e9
This commit is contained in:
@@ -2692,18 +2692,26 @@ static int rk3568_vbus_detect_control(struct rockchip_usb2phy *rphy, bool en)
|
||||
|
||||
static int rk3588_usb2phy_tuning(struct rockchip_usb2phy *rphy)
|
||||
{
|
||||
unsigned int reg;
|
||||
int ret = 0;
|
||||
|
||||
/* Deassert SIDDQ to power on analog block */
|
||||
ret = regmap_write(rphy->grf, 0x0008,
|
||||
GENMASK(29, 29) | 0x0000);
|
||||
/* Read the SIDDQ control register */
|
||||
ret = regmap_read(rphy->grf, 0x0008, ®);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Do reset after exit IDDQ mode */
|
||||
ret = rockchip_usb2phy_reset(rphy);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (reg & BIT(13)) {
|
||||
/* Deassert SIDDQ to power on analog block */
|
||||
ret = regmap_write(rphy->grf, 0x0008,
|
||||
GENMASK(29, 29) | 0x0000);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Do reset after exit IDDQ mode */
|
||||
ret = rockchip_usb2phy_reset(rphy);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (rphy->phy_cfg->reg == 0x0000) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user