usb: dwc3: set the usb role to usb2 phy

Concurrently set the USB role to the USB2 PHY when we received
role_switch set from the TCPM (Type-C Port Manager).

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ie677ee7f5c62b1c26fb38080ce46ea0a6cabbbc7
This commit is contained in:
Frank Wang
2022-05-31 15:30:23 +08:00
committed by Tao Huang
parent 3ff4580f86
commit fc9b20c17a

View File

@@ -508,6 +508,7 @@ static int dwc3_usb_role_switch_set(struct usb_role_switch *sw,
#if defined(CONFIG_ARCH_ROCKCHIP) && defined(CONFIG_NO_GKI)
dwc->desired_role_sw_mode = role;
phy_set_mode_ext(dwc->usb2_generic_phy, PHY_MODE_USB_OTG, role);
#endif
switch (role) {