phy: rockchip-inno-usb2: fix dwc2 init failed due to core soft reset

timeout

Dwc2 controller will call phy init function during probe, Current code
will schedule otg_sm_work immediately after phy init, if we don't plug
in usb cable at this time, phy will power off soon after, this will
cause dwc2 do core soft reset failed.

To resolve this problem, We use typec_vbus_det property to distinguish
whether otg_sm_work needs to be executed immediately, If not needed,
delay 1 second.

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I191c8f2b83673e8712afea1d642224ae1ae2eb97
This commit is contained in:
Jianwei Zheng
2022-08-12 09:53:58 +08:00
committed by Tao Huang
parent cad6488ba3
commit 75572d37b6

View File

@@ -774,8 +774,8 @@ static int rockchip_usb2phy_init(struct phy *phy)
"failed to enable bvalid irq\n");
goto out;
}
schedule_delayed_work(&rport->otg_sm_work, 0);
schedule_delayed_work(&rport->otg_sm_work,
rport->typec_vbus_det ? 0 : OTG_SCHEDULE_DELAY);
}
} else if (rport->port_id == USB2PHY_PORT_HOST) {
if (rport->port_cfg->disfall_en.offset) {