This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[OMAP3530] Missing OTG conenct interrupt in Linux on Logic LV SOM

I'm runing a 2.6.28-rc8 kernel based on the linux-omap git tree, and have the MUSB configured for OTG.

The problem I'm runing into is if I boot my board with nothing attached ot hte OTG, it boots up, then when I connect an OTG cable/hub/thumdrive, I get the CONNECT interrupt from the OTG after the twl4030 interrupt indicating connection, and everything works.

When I disconnect the OTG cable from the port, I get hte twl4030 disconnect and OTG disconnect interrupts.

If I plug in the OTG cabel again, I do *NOT* get an OTG CONNECT interrrupt, but do get the twl4030 connect interrupt.

If I plug in a device cable attached to my PC, I get a connect interrupt from the OTG, and it negotiates properly for B-device.  I can disconnect/reconnect the B-device cable and everything is happy.  If i plug in the OTG cable, after the first OTG disconnect, I don't get an OTG connect interrupt.  So I know the OTG controller is setup and ready for interrupts (INTRUSB = 0x00, INTRUSBE = 0xf7 so only SOF is masked, all interrupts are acknowledged).

What can cause the OTG controller to not signal a CONNECT interrupt?

Any help is appreciated!

 

  • Vbus power is switched off whenever a device is disconnected and there is no new device connected within 1.1ms.This is causing the issue you are facing.

    Below are the two solutions.

    1. Re-start the session (request for vBus on) but as of now there is no such facility in linux-omap code base.Earlier it was being done using procfs entry. You can use the attached patch and start session ussing below command.

    $ echo 1 > /sys/devices/platform/musb_hdrc/session

    2. Remove the power switch off code in disconnect path (use patch below).

    ========================== Soln#2 =======================

    diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
    index 8f4f779..6e6125d 100644
    --- a/drivers/usb/musb/musb_core.c
    +++ b/drivers/usb/musb/musb_core.c
    @@ -793,9 +793,6 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
                    case OTG_STATE_A_SUSPEND:
                            usb_hcd_resume_root_hub(musb_to_hcd(musb));
                            musb_root_disconnect(musb);
    -                       if (musb->a_wait_bcon != 0 && is_otg_enabled(musb))
    -                               musb_platform_try_idle(musb, jiffies
    -                                       + msecs_to_jiffies(musb->a_wait_bcon));
                            break;
     #endif /* HOST */
     #ifdef CONFIG_USB_MUSB_OTG

    ========================================================

    Regards,

    Ajay