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.

AM3894 USB issue

Other Parts Discussed in Thread: AM3894

Hi,

The custom board which we have built with AM3894 processor keep having the USB D+ line going high and the USB D- stays at low right after u-boot, when it is at kernel mode where some form of configuration are going on.

From what I have mentioned above, it looks to me that our CPU is behaving more like in device mode rather than host mode. Upon checking with the linux configuration menu, it shows that the build is set to compile the USB code as host mode. This kernel code was brought over to run on the EVM but does not exhibit any problem of detecting a USB device.

Anyone has seen this before, care to share with me your findings?

Thanks and regards,

poh boon

  • Hello,

    Please check here:

    http://processors.wiki.ti.com/index.php/Usbgeneralpage

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_USB_Driver_User_Guide

    Regards,

    Pavel

  • Hi Poh Boon,

    I am not sure, but I think this is normal, I think the default behaviour of the OTG controller is as peripheral and once (configured in Host mode) the kernel driver is loaded the behaviour starts to be as expected.

    BR

    Vladimir

  • Pon

    What is problem you are facing? What is the mode you want to configure either HOST mode or device mode? Refer to User's Guide links as mentioned in thread to configure kernel in the desired mode. Let us know what is the difficulty.

    Regards

    Ravi B

  • Hi Ravi,

    First and foremost, I am not the one doing the firmware and I am posting this question on behalf of the firmware engineer.

    We are trying to configure the kernel to run the USB in host mode.

    These are the things which we have done:

    1) write a 1 to bit 21 of USB0 PHY UTMI Register to disable OTG

    2) Write a 0 to bit 8 of USB0 mode Register to select type A

    but when we read back USB0 device control register, we keep getting a 1 at bit 7, meaning that the USB port is configure as type B even though we have set it to type A.

    Where did we go wrong? Kindly advise.

    Thank you.

  • Are you using Linux PSP or customer firmware code to bringup USB?

    Regards

    Ravi B

  • typo

    is it custom firmware to bringup USB in host mode?

    Regard

    Ravi B

  • Android rowboat, version 2.6.37+

  • Hi

    I have checked on AM389x using PSP releases, host and device mode works. You can refer to drivers/usb/musb/ti81xx.c w.r.t to UTMI register programming. I am not sure from Android perspective what is missing? Check whether USB PHY is configured correctly?

    Regards

    Ravi B

  • HI Ravi,

    I have include the log of the usb registers dump for both evm and our custom board.

    Other than the DevCtl which has different value, the rest looks the same.

    Please see whether you can get something out of these files and advise.

    Thanks and regards,

    poh boon

    FAddr       : 00
    Power       : e0
    Frame       : 0000
    Index       : 0f
    Testmode    : 00
    TxMaxPp     : 0000
    TxCSRp      : 0000
    RxMaxPp     : 0000
    RxCSR       : 0000
    RxCount     : 0000
    ConfigData  : 33
    DevCtl      : 91
    MISC        : 00
    TxFIFOsz    : 07
    RxFIFOsz    : 07
    TxFIFOadd   : 0780
    RxFIFOadd   : 0780
    VControl    : 00000000
    HWVers      : 0800
    EPInfo      : ff
    RAMInfo     : 0d
    LinkInfo    : 5c
    VPLen       : 3c
    HS_EOF1     : 80
    FS_EOF1     : 77
    LS_EOF1     : 72
    SOFT_RST    : 00
    DMA_CNTLch0 : 0000
    DMA_ADDRch0 : 00000000
    DMA_COUNTch0: 00000000
    DMA_CNTLch1 : 0000
    DMA_ADDRch1 : 00000000
    DMA_COUNTch1: 00000000
    DMA_CNTLch2 : 0000
    DMA_ADDRch2 : 00000000
    DMA_COUNTch2: 00000000
    DMA_CNTLch3 : 0000
    DMA_ADDRch3 : 00000000
    DMA_COUNTch3: 00000000
    DMA_CNTLch4 : 0000
    DMA_ADDRch4 : 00000000
    DMA_COUNTch4: 00000000
    DMA_CNTLch5 : 0000
    DMA_ADDRch5 : 00000000
    DMA_COUNTch5: 00000000
    DMA_CNTLch6 : 0000
    DMA_ADDRch6 : 00000000
    DMA_COUNTch6: 00000000
    DMA_CNTLch7 : 0000
    DMA_ADDRch7 : 00000000
    DMA_COUNTch7: 00000000
    

    MUSB (M)HDRC Register Dump
    FAddr       : 00
    Power       : e0
    Frame       : 0000
    Index       : 0f
    Testmode    : 00
    TxMaxPp     : 0000
    TxCSRp      : 0000
    RxMaxPp     : 0000
    RxCSR       : 0000
    RxCount     : 0000
    ConfigData  : 33
    DevCtl      : 19
    MISC        : 00
    TxFIFOsz    : 07
    RxFIFOsz    : 07
    TxFIFOadd   : 0780
    RxFIFOadd   : 0780
    VControl    : 00000000
    HWVers      : 0800
    EPInfo      : ff
    RAMInfo     : 0d
    LinkInfo    : 5c
    VPLen       : 3c
    HS_EOF1     : 80
    FS_EOF1     : 77
    LS_EOF1     : 72
    SOFT_RST    : 00
    DMA_CNTLch0 : 0000
    DMA_ADDRch0 : 00000000
    DMA_COUNTch0: 00000000
    DMA_CNTLch1 : 0000
    DMA_ADDRch1 : 00000000
    DMA_COUNTch1: 00000000
    DMA_CNTLch2 : 0000
    DMA_ADDRch2 : 00000000
    DMA_COUNTch2: 00000000
    DMA_CNTLch3 : 0000
    DMA_ADDRch3 : 00000000
    DMA_COUNTch3: 00000000
    DMA_CNTLch4 : 0000
    DMA_ADDRch4 : 00000000
    DMA_COUNTch4: 00000000
    DMA_CNTLch5 : 0000
    DMA_ADDRch5 : 00000000
    DMA_COUNTch5: 00000000
    DMA_CNTLch6 : 0000
    DMA_ADDRch6 : 00000000
    DMA_COUNTch6: 00000000
    DMA_CNTLch7 : 0000
    DMA_ADDRch7 : 00000000
    DMA_COUNTch7: 00000000