phy: phy-rockchip-typec: fix usb connect failed after diconnect dp
authorMeng Dongyang <daniel.meng@rock-chips.com>
Mon, 24 Oct 2016 09:19:18 +0000 (17:19 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 26 Oct 2016 07:06:04 +0000 (15:06 +0800)
commit25748c0e0144ac4f89c4f1d4592bff66a03c484c
tree2c413bb0f3c860cdfb761e1da9deb911cabd4754
parentabda71220e727633ad5dd404e0e09f04f0eb2d1b
phy: phy-rockchip-typec: fix usb connect failed after diconnect dp

In 4 lane dp mode, the dwc3 controller need to config to usb2.0
only mode, while the dwc3 controller must finish config between usb3.0
and usb2.0 only mode, otherwise if will be failed when connect with usb
device. In current code, the config process is done in typec phy init
function, and is called durling dwc3 controller init, so it is too late
for dwc3 controller to config. This patch config usb2.0 only mode when
usb phy power on and config to usb3.0 when usb phy power off if it is
dp mode only. Finish change to usb3.0 before dwc3 controller reinit to
usb3.0 mode.

Change-Id: Iad69dc730408a88bb5f3b9d9bd366754f82db182
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
drivers/phy/phy-rockchip-typec.c