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.

AM3356 USB0 OTG port issue

Other Parts Discussed in Thread: AM3356

Hi,


We have an custom board based on AM3356.

In this OTG port is not working as it expected to be. if i configure the port as an permanent host then it works. If I configure the port as an OTG port in software then, it will not even recognize the device connected/Enumeration is not happening.


Case 1: I tested by connecting the ID pin to ground(1K pulldown resistor) and configured as Host  mode.

In this case host mode works always. I can connect the mass storage device.

Case 2: Connect the ID pin to VCC(1K pullup resistor) and configured as device mode.

In this case device mode works always. I can connect it to PC and do TFTP.

Case 3 : Connected the IP pin to VCC(1K pullup resistor) and configured as OTG mode.

In this case once after linux is up if I use the converter cable which will ground the ID pin and make as host. Then no enumeration will happens.

I probed the ID pin signal it is held low when connect the cable.


One more hint is,

We are not using the Power control it means always 5 Volt is present. Also we found in musb_dsps.c(We are using SDK7.0) following comments, is this mean by USB controller is not getting proper ID pin IRQ?

/*
     * DRVVBUS IRQs are the only proxy we have (a very poor one!) for
     * DSPS IP's missing ID change IRQ.  We need an ID change IRQ to
     * switch appropriately between halves of the OTG state machine.
     * Managing DEVCTL.SESSION per Mentor docs requires that we know its
     * value but DEVCTL.BDEVICE is invalid without DEVCTL.SESSION set.
     * Also, DRVVBUS pulses for SRP (but not at 5V) ...
     */

Rgds

chandra.

  • Hi,

    I've asked the factory team to look into your issue.

    Best regards,
    Miroslav

  • Thanks,

    I will be waiting for reply..

    Rgds,

    chandra

  • Hi Miroslav,

    I have small confusion,

    If valid supply is present on USB0_VBUS then USB0_DRVVBUS should be held high correct?(if we configure the GPIO as 0x21C (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */)

    And held low if USB0_VBUS is < 4Volts.


    Rgds,

    chandra

  • Case #1: Replace the 1K resistor with a 0 Ohm resistor. This pin should be strapped directly to ground for Host-only operation.

    Case #2 + Case #3: The ID pin should never be connected to a voltage source...doing so could damage the part. For Device/OTG mode, leave the ID pin floating.

    re: Hint: When in Host mode, the controller expects to be in control of VBUS via the DRVVBUS pin. If you have hard-tied VBUS to 5V rather than follow the recommendations regarding power delivery and control present in the TRM, you will need to apply a SW patch to allow Host operation. It's possible you already have this patch applied given that Case #1 appears to be functional.

  • Thanks DK,

    I changed the hardware board(Because you mentioned that it may damage and using new board) and did connected ID pin direct;y from USB mini A connector to AM335x pin now. We will use Mini A to host converter cable which will make ID pin low when we connect it.(Irrespective of ID pin 5V_USB is always present).


    Can you please confirm is dynamic role switch from Host to device using ID pin is supported with AM335x? Or is it uses some other control for this role switch?

    If it is supported then what is the exact configuration we need to do in software? I tested it with TI Am335x EVM in this also dynamic role switch is not happening in USB0 port.

    Note: Still 5Volt power is always present in both the case of Host converter cable(Host mode) and Device cable connected(Id pin floating). We are not using DRVVBUS pin.


    Rgds,

    chandra

  • Chandra,

    Chandrashekhar V1 said:
    Can you please confirm is dynamic role switch from Host to device using ID pin is supported with AM335x? Or is it uses some other control for this role switch?

    Yes, dynamic role switching based on the USB cable insertion is supported on AM335x with SDK 6.0 or 7.0 kernel. The USB0 port (micro-AB receptacle) on AM335x GP EVM demonstrates this feature.

    Chandrashekhar V1 said:
    If it is supported then what is the exact configuration we need to do in software? I tested it with TI Am335x EVM in this also dynamic role switch is not happening in USB0 port.

    If you use SDK6.0 kernel, build the kernel with tisdk_am335x-evm_defconfig, or if you use SDK7.0 kernel, build the kernel with omap2plus_defconfig, without any manuconfig changes on USB related, then this feature should work.

    Which AM335x EVM have you tested? Please note that only the GP EVM USB0 port supports this feature. The USB0 port on StarterKit EVM or Beaglebone Black is in device-only mode.