Shaojun Wang

i.MX25 3stack usb issue and fix

Discussion created by Shaojun Wang Employee on Apr 11, 2012

1. Remove 5V pulse in OTG VBUS when insmod ehci-hcd.ko

What's the issue

In mx25 3stack board, the sequence to insmod USBOTG driver is

insmod fsl_otg_arc.ko

insmod ehci-hcd.ko

insmod arcotg_udc.ko

insmod g_file_storage file=xxxx


when insmod ehci-hcd.ko, there is a 5V pulse in USB_5V_VBUS_OTG, this pulse will keep about 1 second.

Some customer don’t want this 5V pulse. They hope the output in USB_5V_VBUS_OTG is always 0, until usb disk is inserted to the OTG port.


Why there is a 5V pulse


Above picture is OTG VBUS connection in mx25 3stack schematic

The output of USB_5V_VBUS_OTG is decided by pin USBOTG_PWR, when USBOTG_PWR is low, there is a 5V in USB_5V_VBUS_OTG.

After insmod ehci-hcd.ko, in kernel driver, usb_hcd_fsl_probe() -> usb_add_hcd () and usb_hcd_fsl_probe() -> fsl_platform_set_vbus_power (), bit PORT_POWER of PORTSC1 is set to 1, which will pull pin USBOTG_PWR low, so there is a 5V out in pin USB_5V_VBUS_OTG.

If there is not a mini A cable connected to OTG port, ehci_fsl_drv_suspend will be called, bit PORT_POWER of PORTSC1 is set to 0 to pull USBOTG_PWR high, USB_5V_VBUS_OTG is pulled from 5V to 0. You will see a 5V pulse in USB_5V_VBUS_OTG for about 1 second.


How to remove it

Patch enable_usbotg_pwr_pin_after_host_init.patch can remove the 1 second 5V output. It will postpone the configure of GPIO_A to USBOTG_PWR from otg init to the end of usb_hcd_fsl_probe().


2. If insert USB disk before insmod all the usb dirver, USB disk cannot be recognize.

Patch 0001-Remove-usb-irq-disable-and-low-power-mode-in-fsl_udc.patch can fix the issue


3. If run USBOTG in usb slave mode, not enable the OTG mode, D- is high after insmod the slave driver.

Patch 0001-workaround-for-mx25-mx35-usbotg-auto-resume-issue.patch can fix the issue.

Original Attachment has been moved to:

Original Attachment has been moved to:

Original Attachment has been moved to: