ENGR00212232-02 USB:fix otg can not work without phy power if VBUS removed
- There is no VBUS supply or not supply for USBPHY power 3p0,the USB mouse
enumeration fail during the board booting with a USB mouse connected to
otg port.During system booting ,some error message appear like below :
"usb 1-1: device not accepting address 5, error -71
hub 1-0:1.0: unable to enumerate USB device on port 1"
The otg phy power is needed during normal USB transmitting ,the otg phy
power should be on before calling the usb_add_hcd. So should make sure
usb_add_hcd is called after otg_set_host is called in usb_hcd_fsl_probe().
- Before switch the otg mode form Host mode to Device mode,we must call
dr_discharge_line() to make sure no abnormal usb wakeup interrupt happen.
- Some user case ,the BM_USBPHY_CTRL_ENHOSTDISCONDETECT bit is cleared by
mistake. For example,the otg port connect a extern USB hub and a USB device
connected to the USB hub.Unplug the USB device,the Hub will enter auto suspend
mode,then plug in the device, hub will auto resume by the device plug in ,the
BM_USBPHY_CTRL_ENHOSTDISCONDETECT bit is cleared by mistake.So the function
platform_set_disconnect_det() should be called after usb_disconnect.