From fc9b20c17a99e184a0d561b79e5c144cbc367d43 Mon Sep 17 00:00:00 2001 From: Frank Wang Date: Tue, 31 May 2022 15:30:23 +0800 Subject: [PATCH] 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 Signed-off-by: William Wu Change-Id: Ie677ee7f5c62b1c26fb38080ce46ea0a6cabbbc7 --- drivers/usb/dwc3/drd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c index a290ea0339dc..adcdf9ad66c7 100644 --- a/drivers/usb/dwc3/drd.c +++ b/drivers/usb/dwc3/drd.c @@ -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) {