Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

LE910 USB Enumeration Problem

Other Parts Discussed in Thread: AM3352, AM3358, TPS63060

Hello,

We are running a custom debian jessie/4.4 linux build of RCN's beaglebone black
(BBB) as described here:

eewiki.net/.../BeagleBone Black

The board is based on the AM3352 and is patterned after the BBB with the addition
of a Telit le910-nvg cellular module.  We have interfaced the le910 as a usb device.
It also has a standard wired ethernet that shows up as eth0.

We are also using the qmi_wwan driver along with the libqmi library and the qmicli
utility.

When the eth0 is plugged in, we can get everything to work just fine.  Namely, the
le910 is enumerated on the usb bus, the /dev/ttyUSB0-4 ports show up, and the
/dev/cdc-wdm0 device appears.

The relevent logs that are reported when we power up the le910 with eth0 plugged
in are as follows:

[     40.153345]  usb  1-1:  new  high-speed  USB  device  number  2  using  musb-hdrc
[     40.320030]  usb  1-1:  New  USB  device  found,  idVendor=1bc7,  idProduct=1201
[     40.326851]  usb  1-1:  New  USB  device  strings:  Mfr=1,  Product=2,  SerialNumber=3
[     40.334100]  usb  1-1:  Product:  Android
[     40.337797]  usb  1-1:  Manufacturer:  Android
[     40.341931]  usb  1-1:  SerialNumber:  0123456789ABCDEF
[     40.414242]  usb-storage  1-1:1.7:  USB  Mass  Storage  device  detected
[     40.434361]  scsi  host0:  usb-storage  1-1:1.7
[     40.720544]  usbcore:  registered  new  interface  driver  usbserial
[     40.755550]  usbcore:  registered  new  interface  driver  uas
[     40.768456]  usbcore:  registered  new  interface  driver  usbserial_generic
[     40.782230]  usbcore:  registered  new  interface  driver  cdc_wdm
[     40.803178]  usbserial:  USB  Serial  support  registered  for  generic
[     40.850950]  qmi_wwan  1-1:1.2:  cdc-wdm0:  USB  WDM  device
[     40.905805]  usbcore:  registered  new  interface  driver  option
[     40.927892]  qmi_wwan  1-1:1.2  wwan0:  register  'qmi_wwan'  at  usb-musb-hdrc.1.auto-1,  WWAN/QMI  device,  0a:1*
 *2:01:0f:49:40
[     40.953774]  usbserial:  USB  Serial  support  registered  for  GSM  modem  (1-port)
[     41.002904]  usbcore:  registered  new  interface  driver  qmi_wwan
[     41.023821]  option  1-1:1.0:  GSM  modem  (1-port)  converter  detected
[     41.054860]  usb  1-1:  GSM  modem  (1-port)  converter  now  attached  to  ttyUSB0
[     41.074522]  option  1-1:1.3:  GSM  modem  (1-port)  converter  detected
[     41.094139]  usb  1-1:  GSM  modem  (1-port)  converter  now  attached  to  ttyUSB1
[     41.112012]  option  1-1:1.4:  GSM  modem  (1-port)  converter  detected
[     41.128789]  usb  1-1:  GSM  modem  (1-port)  converter  now  attached  to  ttyUSB2
[     41.147198]  option  1-1:1.5:  GSM  modem  (1-port)  converter  detected
[     41.173985]  usb  1-1:  GSM  modem  (1-port)  converter  now  attached  to  ttyUSB3
[     41.187082]  option  1-1:1.6:  GSM  modem  (1-port)  converter  detected
[     41.208943]  usb  1-1:  GSM  modem  (1-port)  converter  now  attached  to  ttyUSB4
[     41.440392]  scsi  0:0:0:0:  Direct-Access        Linux      File-CD  Gadget     0000  PQ:  0  ANSI:  2
[     41.481933]  sd  0:0:0:0:  [sda]  Attached  SCSI  removable  disk
[     41.651454]  sd  0:0:0:0:  Attached  scsi  generic  sg0  type  0

The problem we're having is that we can't get the le910 to enumerate, and thus
also cannot get the qmi driver to load, unless the eth0 is plugged in.

Without eth0 plugged in we get the following log message:

[     90.293338]  usb  1-1:  new  high-speed  USB  device  number  2  using  musb-hdrc

Thus it appears that the only thing that happens is the usb host controller (which
is built-in to the AM3352) is detecting the device, but the kernel and/or udev is
not properly enumerating it and loading the qmi driver as normal.

Any ideas on why this happening, and how to resolve it so that we can load the
qmi driver, are appreciated.

--Randy



                                                  2

  • More information: I am convinced our problem root cause is the USB babble interrupt discussed in this forum post:
    e2e.ti.com/.../484475.

    If we boot without the eth0 connected, we get a USB babble event. If we boot with eth0 connected, run the firmware so that the le910 is connected, then pull the eth0 plug, then we get a USB babble event. The root cause is the cause of the USB babble event.
  • I looked into the drivers/musb_core.c driver last night (very roughly) and it appears
    that the babble message comes from receiving a babble interrupt from the AM335x
    on-board USB peripheral.

    If that is the case, how can any patch or kernel version fix this problem? It appears
    what we need to do to fix our problem is understand what causes the AM335x USB
    peripheral to generate this interrupt, e.g., does it monitor power variations, DM/DP
    voltages, etc., or what?

    If so, does anyone at TI know the conditions which cause the AM335x USB peripheral
    to emit a babble interrupt?
  • Hi Randy,

    You've referenced another thread about USB babble interrupt: , on which I am still working.

    Also I see you use debian jessie/4.4 linux, with which I am not very well familiar, so I will reference the official TI SDK (kernel 4.1.13).

    Randy Yates said:
    If so, does anyone at TI know the conditions which cause the AM335x USB peripheral 
    to emit a babble interrupt?

     

    See this thread: https://e2e.ti.com/support/arm/sitara_arm/f/791/t/308549 According to usb specs : "Babble: Unexpected bus activity that persists beyond a specified point in a (micro)frame.". In my experience I've seen reports for babble interrupt when usb is "overly busy", upon hotplugging, when a usb hub with more than one device doing I/O, etc. 

    The workarounds, I've seen to have positive effect, are as stated in the thread you refer to earlier: https://e2e.ti.com/support/embedded/linux/f/354/t/484475 

    This is what I can comment on this problem. I hope it is of use to you. 


    Best Regards, 
    Yordan

  • Yordan,

    Thank you for your reply:  I appreciate it.

    Another idea we are pursuing is to force the musb into full-speed mode (12 MHz)
    instead of its current high-speed mode (480 MHz). There is only the one device (the
    LE910) on our USB bus and we have verified that it is compatible with full-speed
    mode.

    I found this document

    processors.wiki.ti.com/.../Usbgeneralpage

    on the web. We do apparently have the debug option com- piled into our
    kernel since the /sys/kernel/debug path exists and is populated.
    However, its structure is different than that specified in this
    document:

    We are using USB1. There is a /sys/kernel/debug/musb-hdrc.1.auto/testmode
    path there. I tried doing an echo  "force  full-speed"  >  /sys/kernel/debug/musb-hdrc.1.auto/testmode,
    but the lsusb -t command reveals the bus is still at 480 MHz:

    root@arm:~#  lsusb  -t
    /:   Bus  01.Port  1:  Dev  1,  class="root_hub",  Driver=musb-hdrc/1p,  480M
          |__  Port  1:  Dev  4,  If  0,  class="Vendor"  Specific  Class,  Driver=option,  480M
          |__  Port  1:  Dev  4,  If  1,  class="Vendor"  Specific  Class,  Driver=,  480M
          |__  Port  1:  Dev  4,  If  2,  class="Vendor"  Specific  Class,  Driver=qmi_wwan,  480M
          |__  Port  1:  Dev  4,  If  3,  class="Vendor"  Specific  Class,  Driver=option,  480M
          |__  Port  1:  Dev  4,  If  4,  class="Vendor"  Specific  Class,  Driver=option,  480M
          |__  Port  1:  Dev  4,  If  5,  class="Vendor"  Specific  Class,  Driver=option,  480M
          |__  Port  1:  Dev  4,  If  6,  class="Vendor"  Specific  Class,  Driver=option,  480M
          |__  Port  1:  Dev  4,  If  7,  class="Mass"  Storage,  Driver=usb-storage,  480M

    Further, we also need this to happen at boot time, before the first device is enu-
    merated.

    Do you have any suggestions on how to accomplish this?

  • This can be forced via DT:

    &usb1 {
            maximum-speed = "full-speed";
    };
    

  • Matt,

    Thank you, thank you, thank you!!! That fixed it! No more babble interrupts!

    --Randy

  • Update: That did not really solve the problem. It mitigated the problem greatly. Root cause will be posted next.

  • USB Babble Interrupt Resolution

    1 Introduction

    1.1 Hardware Overview

    Our board is a custom board based heavily on the beagle bone black. It
    uses the same or similar major components (an AM3352 instead of the
    BBB AM3358/9) and adds certain other components which are specific to
    our application. One such component is the Telit LE910 cellular modem
    module.

    Our application does not require any other USB interfaces besides that
    going to the on-board LE910, thus we removed all USB connectors and
    connected the DM, DP, and VBUS signals directly between the AM3352 and
    the LE910.

    It is crucial to note that our application also required a buck-boost
    converter ahead of the TPS65217C PMIC which generated the 5VDC into
    the PMIC. Our hardware engineer chose a TI TPS63060 for this purpose.

    For breadboard development, we included the wired ethernet interface.

    1.2 Software Overview

    The software build is a customized version of RCN's bb-kernel linux
    kernel. We made some changes to uboot as well as the device tree to
    support our custom hardware. Otherwise it is a fairly standard
    debian/linux build.

    Our custom application is using the libqmi library for interfacing
    with the LE910. We also use qmicli for testing.

    2 Problem Description

    2.1 Top Level

    The USB would never properly enumerate the LE910 when the ethernet was
    un- plugged! During systemd initialization, the musb driver would
    initialize and attempt to enumerate the devices on the bus, which
    would result in an immediate babble interrupt:

    [13314.062686] musb-hdrc musb-hdrc.1.auto: Babble

    With the ethernet plugged in, the LE910 would enumerate just fine.

    2.2 Troubleshooting Details

    Looking at the DM, DP, and VBUS signals with a 100 MHz scope, we found
    that the noise on these lines (and at almost every place else on the
    board) was very high, having large busts at 500 mVpp or greater at a
    variety of intervals depending input voltage. A typical interval was
    1/270 kHz (about 3.7 microseconds).

    We also found that pulling the ethernet plug caused the magnitude of
    the noise to increase, perhaps about 20 percent.

    The TPS63060 has a power-save mode which increases efficiency at low
    output currents. We had this mode enabled by tying pin 4 low.
    According to the datasheet, the device switches into power-save mode
    when the current is about 100 mA.

    We also noticed (via the power supply) that about 120 mA of current
    was being drawn with the ethernet plugged in and around 90 mA of
    current was being drawn with the ethernet unplugged.

    2.3 Workaround Attempts

    Thinking the problem may be a signal integrity issue on the dm/dp
    lines, we slowed down the USB bus to full-speed (12 MHz) from
    high-speed (480 MHz) via a device tree modification:

    &usb1 { maximum-speed = "full-speed"; };

    This had the effect of suppressing the babble interrupt, but
    introduced a new prob- lem: the LE910 module would unenumerate from
    the USB bus after a variable amount of time, from about 5 minutes to 3
    hours. Every time this happened, would would consistently get a flush
    problem message in kern.log:

    Feb 29 16:00:53 arm kernel: [ 288.655415] musb-hdrc musb-hdrc.1.auto:
    Could not flush host TX10 fifo: c* *sr: 2003

    3 Root Cause

    We modified the board to tie pin 4 high, thereby disabling power save
    mode on the TPS63060. The large noise spikes completely disappeared,
    both with and without the ethernet plugged in.

    Since, according to the datasheet, the device switches into power-save
    mode when the current is about 100 mA, we deduced that without the
    ethernet plugged in, the current was near enough to the
    straight/power-save threshold built into the TPS63060 to cause more
    severe switching between modes, thus more noise, and that this noise
    was (understandably) producing an error in the physical layer
    operation of the USB.

    Operating the unit with the ethernet plugged in added about 30 mA of
    current to the load, thus moving the TPS63060 far enough away from the
    mode switch threshold to produce less noise, and keep the noise small
    enough that the USB physical layer did experienced errors much, much
    less frequently.

    Also note that it is theorized that running the LE910 at high-speed,
    12 MHz mode was on the threshold of too slow (at times) for the data
    transfer occuring between the processor and the LE910, thus
    overflowing a TX fifo in the musb driver and causing a disconnect at a
    random time.