AM3351: USB0 in "oc suspend" with no device attached

Part Number: AM3351

Attempting to bring up USB on AM335x-based custom board. The USB port is latched in "oc suspend" with no device attached.The design does not connect USB0_VBUS for isolation. Is it OK to leave USB0_VBUS sense pin floating?

In the AM335x Schematic Checklist (SPRABN2A) :

Typical connections for a USB peripheral:   USBx_VBUS should be connected directly to the VBUS pin on the USB connector 

Typical connections for a USB host: USBx_VBUS should be connected to the output of the 5 V VBUS power source 

Guidelines state "should" and not "must". Is the OC caused by USB0_VBUS not sensing any voltage? If so, how can we bring up USB0 without USB0_VBUS connection?

Below are output from lsusb -v and dmesg

[   80.764720] usb usb1-port1: over-current condition
[   80.905195] musb-hdrc musb-hdrc.0: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #1, port1 0000010c
[   81.057622] musb-hdrc musb-hdrc.0: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #2, port1 0000010c
[   81.210062] musb-hdrc musb-hdrc.0: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #3, port1 0000010c
[   81.362484] musb-hdrc musb-hdrc.0: VBUS_ERROR in a_wait_vrise (80, <SessEnd), retry #3, port1 0008010c
lsusb -v
lsusb -v

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            6.01
  iManufacturer           3 Linux 6.1.46 musb-hcd
  iProduct                2 MUSB HDRC host driver
  iSerial                 1 musb-hdrc.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0011
    Per-port power switching
    No overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood        5 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.010c power oc suspend
Device Status:     0x0001
  Self Powered
  • Hi Glen,

    The AM335x USB won't be functional if its USB_VBUS pin is not connected. "Should" in the document means "must".

  • As always, Bin comes through.
    I did find your PPT on USB config helpful.

    Thank you.

  • Hi Glen,

    I am glad it helps.

    I will talk to the CheckList document owner to see if the description can be improved to avoid the confusion.

  • Hi Bin,

    I work with Glen on the hardware side.  I have some additional questions please.

    This design is isolated USB.  There is a 2KV isolation barrier between the physical USB connector and the AM3351.  There is no way to bring VBUS across the isolation barrier... the AM3351 is galvanically isolated from the USB connector and the 5V VBUS rail.

    From the hardware manual section 16.2.2, "Pullup/PullDown Resistors" I might infer that the VBUS pin voltage is required for the internal pullup or pulldown resistors.  Can you please correct me if this interpretation is wrong?

    Since we cannot get VBUS from the connector, across the isolation barrier to the AM3351 VBUS pin, can we tie the Sitara VBUS pin to ground and under software control ONLY allow Host mode?

    The hardware manual also seems to suggest the USB ID pin is optional... is that correct?  Can we tie the VBUS pin to ground to get proper pulldown on the data lines, then under software control write USBnMODE [Bit7=IDDIG_MUX] to be host?

    Can we eliminate / not connect the USB ID signal pin and instead control it fully under SW?

    Thanks in advance for your help.  We were going for full dual role OTG USB, but it sounds like that is not easily accomplished for an isolated design.  So now we are tryign to see how we can possibly support host only mode, without VBUS coming across the barrier.

    Best regards,

    Tom

  • Tom,

    Does the AM335x USB controller work in host-only mode, peripheral-only mode, or dual-role mode in your design?

  • We were going for full dual role OTG USB, but it sounds like that is not easily accomplished for an isolated design.  So now we are tryign to see how we can possibly support host only mode, without VBUS coming across the barrier.

    Sorry, I didn't read your full message, now just realized you have provided the answer to my question.

    Anyway, I am a software guy and don't have much knowledge about analog in board design. But I am not sure if you can achieve your USB design goal if the AM335x USB controller has to work in dual role mode.

    If you can change your design to be USB host-only mode, the USB VBUS pin doesn't have to go to the USB connector, the pin can just connect to a 5V rail on the board. 

  • Hi Bin,

    Thank you. We will work with this and come back with any additional SW questions.  

    Meanwhile, the datasheet does not specify the current or input impedance on the VBUS pin.  I will ask this in a separate post and then proceed trying to make this work.  

  • Hi Tom,

    As far as I know, the inside of the VBUS pin is a voltage comparator, so no current requirement.

  • In the past, I have customers directly tied the VBUS pin to the 5V rail when the controller works in host-only mode.

  • Thanks Bin,

    Understood: VBUS is a high impedance input. We will directly connect 5V to that pin.

    Following up on one last question above:  

    Assuming host-only mode with 5V tied to the Sitara VBUS pin, do we need to connect the USB ID pin to anything?  Or can we let USB ID pin float and handle that part in software by setting the correct bits in a control register?

  • Hi Tom,

    When the USB controller to be in host-only mode, the kernel devicetree should set dr_mode = "host" in the USB node, then the physical USB ID pin is ignored, the USB IDDIG MUX is used in software, so you can leave the USB ID pin unconnected/float.

  • Many thanks Bin.  This sounds like the approach we will use.

  • Hi Bin,

    Sorry.  I have a follow up question.

    With AM3351 VBUS pin connected to a 5V rail and the USB_ID connected to AM3351 pin, does that allow the Sitara to be both host and client?

    We understand there are intricate physical layer and logical layer negotiations that happen with USB to function.  The AM3351 with Linux drivers take care of that thankfully.  We are trying to get the board design to cover as much functionality as possible.  Given that 5V on VBUS is required whether host or client, it begs the question "can we do both host and client with 5V on VBUS and USB ID connected?"

    Many thanks!

    Tom

  • Hi Tom,

    USB_ID connected to AM3351 pin

    I guess you mean the AM335x USB ID pin is connected to the ID pin of the USB connector.

    With AM3351 VBUS pin connected to a 5V rail and the USB_ID connected to AM3351 pin, does that allow the Sitara to be both host and client?

    No. Once the VBUS pin is permanently tied to 5V rail, the USB controller can only works in host-only mode. For client/device mode, the controller should know when the VBUS presents (from the USB host) and when the VBUS is absence, this is required for the state machine inside the USB controller to be able to switch between host and client mode.