I work on imx6d BSP, I find a usb otg issue.
On our imx6d board, otg VBUS is always on (5V). When I set USB_OTG_ID to high level and boot system, usb adb function can work.
But When I set USB_OTG_ID to high level then set to low level again. usb adb can't work. BTW USB host function is ok.
kernel output log: "[ 7.171516] wait otg vbus change timeout!"
Whether otg vbus must be controlled, when host mode, vbus is 5V, and device mode vbus is 0V ?
From Linux release notes :
“When building all the three USB drivers to modules (otg, host, and device), you must load
and unload the three modules together and in the correct sequence, because there is no
module dependency while function dependency exists. The loading sequence is:
fsl_otg_arc > ehci_hcd > arcotg_udc,
and unloading sequence is:
arcotg_udc > ehci_hcd > arcotg_udc.
Meanwhile, if a gadget module, such as g_mass_storage, needs to be installed and be removed
from the fly, all USB modules need to be installed or removed.”
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------