Hi,
I am using linux-03.00.01.06 on AM3517 based customized hardware. This kernel does not support hot-plug detection of USB-OTG i.e. host or gadget mode (use-case described below). I made few changes in the USB driver and now I am able to operate it without manually inserting or removing host/gadget drivers.
My use-case is as follows:
- When I connect USB memory stick to OTG port of AM3517 it should be detected automatically (no need of any manual operation/command)
- When I connect AM3517 based board to PC it should be identified as mass storage device in PC
With this I am facing following strange problems:
- When nothing is connected to the USB port, I see on VBUS a very strange behavior i.e. spikes from the Sitara USB0_VBUS pin.
- When connecting the USB_OTG cable only with no gadget on it and then disconnect it, the 5V on the USB connector remains on. Only if a gadget was connected and disconnected, then the VBUS will drop back to 0V (with the strange behavior mentioned in point #1). If the user only plugs the USB-OTG cable and then disconnects it and connected a PC to our unit, then we have two 5V power supplies (one from PC and one from am3517 board) connected in parallel. This is not healthy scenario. Basically I want to turn off the VBUS power when I disconnect the USB-OTG cable (no matter gadget is attached with OTG cable or not).
I check patch from latest git tree - http://arago-project.org/git/projects/?p=linux-omap3.git;a=commit;h=20c003f2f024d9f50f59edf9f1b8f5f035fb15b8 which controls the vbus power still I see same behavior as mentioned above.
USB experts, I will appreciate your inputs to understand root-cause of this behavior and its possible solution.
Regards,
Krunal