Hi,
I have mx53 based hw running Linux (2.6.35.3) and usb otg port is configured to be used as a host. There is just one problem. It doesn't recognize when the usb device is plugged in. If I remove driver modules, plug the usb device in and load the driver modules the usb device is found and works ok. But if the driver modules are already loaded and I plug the usb device is, Linux doesn't see that usb device has been plugged in.
Is there something that should be done for the otg port or is this otg port feature or any clue what might be wrong?
For now, the ID pin is grounded, but the future plan would be able to use that port either host or device mode.
I disabled the udc driver (USB GADGET in Linux since UDC driver cannot be built as a module) and now detection seems to be working just fine. I can plug in the usb device and it get's detected properly also in OTG port.So thanks for the tip!
But I'm guessing that now I cannot use the OTG in device mode any more if I want to? For that I need the UDC/otg driver (and USB GADGET)?
ID pin is grounded properly in board-init ,so you otg port only can use host ,right? If yes,I suggest you that only select the otg host driver,not load otg and udc driver. If USB device plugged in to OTG port, there is a portsc interrupt to indicate that something happen.
If you want to debug the issue, I suggest you indacate that is there interrupt happen when you plug in your device to otg port.
It seems that I already have those patches.
I'm running out of ideas what could be wrong.
What that could indicate that kernel doesn't notice at all that the USB device has been plugged in to OTG port? And yet the same port works just fine and finds the same USB device if the device is plugged in while loading the drivers.
I have fsl_otg_arc and ehci_hcd drivers loaded. I compiled new kernel with CONFIG_USB_DEBUG=y and interestingly enough nothing gets printed to dmesg when I plug the USB mouse in.
What is udc driver? Is that a typo or what driver is that? I couldn't find any udc drivers.
Nope. Didn't help. Mouse wasn't recognized when I plugged in usb driver loaded. LED went on for short while and then turned off. Lsusb also didn't show any new usb device. When I unloaded the ehci_hcd driver and loaded it again the LED turned on and stayed on and and now the lsusb shows the mouse as well.
Nope. Didn't help. Mouse wasn't recognized when I plugged in usb driver loaded. LED went on for short while and then turned off. Lsusb also didn't show any new usb device. When I unloaded the ehci_hcd driver and loaded it again the LED turned on and stayed on and and now the lsusb shows the mouse as well.
ID pin is grounded properly in board-init. OTG - driver in Linux doesn't touch it. Also the system works okay if I load the driver while the USB device(USB memory stick to be precise) is connected.
I don't remember how does the usb detection work, does the plugged in device ground one of the data line when plugged in to get CPU's attention. The electrical connection is so simple and it's similar to Sabre board and I cannot find what's wrong with it, but if detection is done by grounding one data line then that would suggest that the problem is somewhere CPU either in OTG hw or Linux driver.
This could be caused by wrong USB plug or adapter that doesn't ground the ID pin on the OTG port properly.