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.

AM5746: USB pinmux issue

Part Number: AM5746

Hi,

My customer has found a problem of USB driver.
They assigned VBUS to GPIO through PinMux because they only use USB device mode. (gpio6_13)

We think Device mode don't need VBUS.(Host mode need VBUS.)

However, usbPhyOn function change the VBUS(GPIO) assignment.

C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\usb\soc\am574x\usb_wrapper.c
usbPhyOn()
 HW_WR_REG32(CTRL_CORE_PAD_USB2_DRVVBUS, 0x000C0000U);

Info:4118.e2e.pdf

Question 1:
Would you tell us the appropriate fix?

Question 2:
Customers are concerned about similar issues.
For example, PCIe EP/RC, I2C Master/Slave, SPI Master/Slave.
Could you see if they have the same problem when switching modes?

AM5746 Customer's board
bios_6_76_00_08
pdk_am57xx_1_0_11

  • Hi Rei,

    For AM57xx, the VBUS is needed for the USB device mode to work, because of the following:

    1. In high speed mode, VBUS is needed to inform the core that the cable is unplugged, so that the core can do the tear down

    2. In super speed mode, the VBUS is necessary for the USB state machine updating.

    Ming 

  • Part Number: AM5746

    Hi,

    I accidentally set my post "Resolved".

    C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\usb\soc\am574x\usb_wrapper.c
    usbPhyOn()
    HW_WR_REG32(CTRL_CORE_PAD_USB2_DRVVBUS, 0x000C0000U;

    My post is confusing. What is set is VBUS “drive”.
    "Drive" is not required in Device mode. (compete with Host)

    If customers try to comment out this description, it is working properly.
    Customers think VBUS drive is unnecessary.

    Is this description incorrect?

    Regards, Rei

  • Hi Rei,

    The VBUS is used by the USB device to detect the cable unplugged, so that the USB device can tear down the connection and other things. If it is pinmuxed to GPIO, then the USB device will not able to tell the cable is unplugged or not, therefore it is needed.

    It may works as long as the cable is connected to the USB host.

    Ming 

  • Hi Ming,

    We understand that VBUS is necessary. The problem is VBUS "Drive" setting. Is it normal that both Host and Device(AM5746) are driving? We are asking this question because VBUS signal seems to collision on the customer's board.

    Regards, Rei

  • Hi Rei,

    You are correct. The VBUS in USB device mode is input only.

    Ming 

  • Hi Ming,

    Thank you for your reply. Is this code set to "Drive"?

    HW_WR_REG32(CTRL_CORE_PAD_USB2_DRVVBUS, 0x000C0000U;

    Regards, Rei

  • Hi Rei,

    According to the AM57x TRM, CTRL_CORE_PAD_USB2_DRVVBUS (0x4A00 3684)

    Bit 19 USB2_DRVVBUS_SLEWCONTR

    0x0: Fast slew is selected RW 0x1

    0x1: Slow slew is selected

    Bit 18 USB2_DRVVBUS_INPUTENABL

    0x0: Receive mode is disabled RW 0x1

    0x1: Receive mode is enabled

    It sets the VBUS to input (receive mode). It is OK for USB device mode.

    Ming

  • Hi Ming,

    Thank you for everything. The USB issue has been resolved. We had missed TRM. (P.6325 Figure 25-155)
    www.tij.co.jp/.../spruih8b.pdf

    USB2_DRVVBUS is open.

    We can also detect plug/unplug from PMIC.

    We apologize for the inconvenience.

    Thank you.