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.

USB Babble Interrupt in AM3352 connected to Microchip USB2513B hub

Other Parts Discussed in Thread: AM3352

This thread is in connection to the ongoing discussion with TI regarding the occurrence of USB babble interrupt when AM3352 was designed with USB2513B.

Brief Overview

The USB2513B upstream port is routed directly to USB1 port of AM3352.  2 downstreams are allocated as user interface while the 3rd downstream connects to a fixed module.  Each downstream have dedicated 5V supply.  Board design already passed EMC test and Eye diagram.  Protocol analysis had been made and one finding was that the issue is related to the suspend and resume function.  USB2513B generated the resume K signal but AM3352 failed to resume.  It was also found that AM3352 entered into an unknown status and no status was found from the analyzer trace.  When hub USB2513B drives the resume signal for around 15ms, AM3352 is supposed to drive it for at least 20ms after it detects the first resume. For some reason however, AM3352 failed.

A TI team in Shanghai, China had been working to address this issue since October 2014. Support request was escalated to TI US a month after then.  Lately, we are advised that a team in Dallas has reproduced the same issue and is working on this issue.

Due to the sensitivity of the project, we cannot elaborate and provide the details here.  The reason why this thread is created is for TI to simplify the tracking and management of the findings that had been provided to TI, allows us to have direct access to technical support team and as well as to expedite the escalation process.

  • Hi Joebel,

    I will forward this to the support team, but since you say the project is sensitive it would be best to exchange information with them via e-mail.

  • Hi Biser,

    Thanks for the prompt response. I agree. If they can send me an email, I can link them up to the discussion with the existing TI team who are supporting us right now. 

  • Thanks.
    We have been working on this issue offline and Doug sent this to my attention.
    We will address on and offline as needed.
    Regards
    Mukul
  • Mukul,

    I'd presume Doug have as well forwarded to you the trail of email discussions.  You may reply to that for the offline discussion or you can send me an email privately so I can link your team.  You will also find there some scope captures as well as snippets of the protocol analysis we've done together with local TI and Microchip support team.

    We would like to set a tentative end date for the resolution of this issue or at least identify the root cause so that our pending design could move forward.  Do you think you can provide that?

  • Joebel,

    I'm the engineer directly responsible for working this issue currently. I'm looped into the email discussions and have access to the referenced scope captures and protocol analysis.

    I have been able to repro the issue locally and am working to provide the items you request here, but unfortunately I cannot provide a schedule for these. This is a previously unreported issue so driving to root-cause just isn't something I (or anyone) can put a time frame on. I can say that this issue is a priority for me/us and that we are working it as such. I'll be in touch when we have more.

    -DK

  • DK,

    I'm glad that we are now aligned with the previous findings from our side related to this issue.  In the meantime, we look forward to your updates and eventually the closure of this investigation.

  • Joebel,

    We believe we have identified root cause and have a fix in place that looks very promising from our side (100% pass rate). Could you implement and verify on your side?

    Bin will post the SW patch to this thread in a few minutes.

    -DK

  • Here is the patch:

    diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
    index 85f7257..2c28a30 100644
    --- a/drivers/usb/musb/musb_core.c
    +++ b/drivers/usb/musb/musb_core.c
    @@ -2366,7 +2366,7 @@ static int musb_runtime_resume(struct device *dev)
            if (musb->need_finish_resume) {
                    musb->need_finish_resume = 0;
                    schedule_delayed_work(&musb->finish_resume_work,
    -                               msecs_to_jiffies(20));
    +                               msecs_to_jiffies(40));
            }
     
            return 0;
    
  • Joebel,

    Sorry, I think I sent this patch too quick.

    The patch above very likely will not be directly applicable to you, it is based on TI 3.14 kernel, and a patch I submitted to mainline (3.20) a couple weeks ago.

    First could you please remind me which SDK/kernel version do you use? I will make a patch for your specific kernel version.

  • Liu Bin,
    The kernel we use was taken from TI kernel tree version 3.12.17
  • Hi Joebel,

    While back porting this patch to TI 3.12 kernel, I found that even with the host driving the resume signal for 20+ ms, the babble condition still happens when the bus comes out of autosuspend. I also noticed in 3.14 kernel before fixing the <20ms resume signaling issue, babble does not happen. So obviously the short resume signaling (<20ms) is not the root cause of the babble condition, even it violates the USB Specs.

    In further investigation I noticed 3.14 kernel has many USB power management related patches added since 3.12 kernel by the community. Backpointing these patches to 3.12 kernel to fix the resume babble issue will take some time to ensure it does not break anything else.

    So I think the best option for you is to move to the latest and greatest 3.14 kernel. Is this possible for your project?
  • Joebel,

    The following patch fixes the resume issue for SDK7.0 kernel.

    diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
    index 96f2c92..6781b93 100644
    --- a/drivers/usb/musb/musb_core.c
    +++ b/drivers/usb/musb/musb_core.c
    @@ -509,7 +509,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
                                                    (USB_PORT_STAT_C_SUSPEND << 16)
                                                    | MUSB_PORT_STAT_RESUME;
                                    musb->rh_timer = jiffies
    -                                               + msecs_to_jiffies(20);
    +                                               + msecs_to_jiffies(40);
     
                                    musb->xceiv->state = OTG_STATE_A_HOST;
                                    musb->is_active = 1;
    

    Joebel Sorioso said:
    The kernel we use was taken from TI kernel tree version 3.12.17

    Can you please provide the commit ID from which you checked out the 3.12.17 kernel? Is it "2acf1c2 Linux 3.12.17"? We will only support the kernels in TI official SDK releases, not intermediate commit in TI kernel tree. The tree has many merges from upstream kernels, so very likely any intermediate commit could point to the upstream which does not have any TI submitted patches.

  • Liu Bin,
    Commit id is f0d4672: Merge tag 'v3.12.17'
  • Joebel,

    Joebel Sorioso said:
    Commit id is f0d4672: Merge tag 'v3.12.17'

    Ok, then my patch above for sdk7.0 should fix the issue. Please validate it.

  • Liu Bin,
    In connection to earlier response of DK that TI had already found the root cause and the patch you provided seems to work so far, please provide us the details of the root cause.
  • Joebel,

    It is software problem. The driver sets the timer, which drives the resume signal, timeout threshold to be exact 20ms, but very often the timer is triggered shorter than 20ms.