imx6-dongle / linux-imx

Linux kernel for GK802/HI802, i.MX6 based HDMI-dongle/tv-stick computers
Other
28 stars 22 forks source link

USB host mode doesn't work if compiled with OTG support #6

Open abrasive opened 11 years ago

abrasive commented 11 years ago

In a kernel with OTG support built as a module (so it defaults to host mode), plugging in a USB device causes an unhandled interrupt 75. This causes the interrupt to be disabled and stops the dual-role port from working at all.

This is probably due to something (uboot?) leaving an interrupt source enabled that is normally handled by the device controller (arcotg_udc).

Demonstrated when building using imx6_hdmidongle_usb_defconfig

rzk commented 11 years ago

We need to test this u-boot http://www.hiapad.com/?p=2064 and see if it will have same problem.

abrasive commented 11 years ago

I suspect adding

UOG_OTSC = 0;

to the end of mx6_usb_dr_init in arch/arm/mach-mx6/usb_dr.c would fix it, although it'd probably be better off in the board file. I'll try it out tonight.

abrasive commented 11 years ago

This is a wakeup issue. A lot of the code assumes that if OTG is enabled then the UDC is enabled too. Fiddled with it for a while; no progress. Easier just to disable device mode entirely.