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.

am3517 usb otg

Other Parts Discussed in Thread: AM3517

hi,I use am3517 to design Products,I use  AM35x-OMAP35x-LINUX-PSP-04.02.00.07 BSP, the usb device worked at high speed mode default,but i want to use full speed mode,I found am3517 have no registers to change  usb device to work at full speed mode,how can i do? thank you for answer.

  • Dear Dapan Sun,

         i am facing problem with usb OTG(device and host) in my AM3517 EVM board. following are the setting in menuconfig  what i had done

    I am using AM3517 sitara controller.  I am facing a problem with USB-OTG. I had made necessary changes in menuconfig following PSP Userguide from following link
    "http://processors.wiki.ti.com/index.php/UserGuideUsbDriver_PSP_04_02_00_07#Gadget_Mode_Applications

    "

    Following is what i have done along with schematic.

    Configuration for USB controller and CDC/RNDIS Gadget in Makemenuconfig

        USB phy selection for MUSB OTG port
        Please select NOP USB transceiver for MUSB support.

         Device Drivers --->
         USB support --->
         *** OTG and related infrastructure ***
         [ ] GPIO based peripheral-only VBUS sensing 'transceiver'
         [ ] Philips ISP1301 with OMAP OTG
         [ ] TWL4030 USB Transceiver Driver
         [*] NOP USB Transceiver Driver

        Device Drivers --->
        USB support --->
        <*> Support for USB Gadgets
        USB Peripheral Controller (Inventra HDRC Peripheral (TI, ...)) --->
        <M> USB Gadget Drivers
        <M> Ethernet Gadget
        [*]   RNDIS support (EXPERIMENTAL) (NEW)


           <*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
               **** Platform Glue Layer ***
           <>     TUSB6010
           <*>     OMAP2430 and onwards
           <>     AM35x 
               Driver Mode (USB Peripheral (gadget stack)) --->
           [ ] Disable DMA (always use PIO)
           [*] Use System DMA for Mentor DMA workaround
           [*] Enable debugging messages

     
     make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage
     make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
     make ARCH=arm modules_install INSTALL_MOD_PATH=/media/46fe61eb-d3ea-4813-9e18-45bf7cd72a18/


    Dmesg after booting of system.

    [    1.427398] usbcore: registered new interface driver cdc_ether
    [    1.433807] usbcore: registered new interface driver cdc_eem
    [    1.439788] usbmon: debugfs is not available
    [    1.444305] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [    1.451293] usbcore: registered new interface driver cdc_acm
    [    1.457244] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
    [    1.466430] usbcore: registered new interface driver cdc_wdm
    [    1.472625] usbcore: registered new interface driver uas
    [    1.478240] Initializing USB Mass Storage driver...
    [    1.483612] usbcore: registered new interface driver usb-storage
    [    1.489898] USB Mass Storage support registered.

    when i tried to insert the module.
    root@devkit:~# insmod /lib/modules/2.6.37/kernel/drivers/usb/gadget/g_ether.ko
    insmod: can't insert '/lib/modules/2.6.37/kernel/drivers/usb/gadget/g_ether.ko': No such device

    root@devkit:~# lsmod
    Module                  Size  Used by    Tainted: G 
    bufferclass_ti          4883  0
    omaplfb                 8134  0
    pvrsrvkm              153648  2 bufferclass_ti,omaplfb
    libertas_sdio         134576  0
    root@devkit:~#
     Please find the attachment for USB schematic

  • Can you please provide /proc/config.gz? It seems the uImage you are running is not the one along with g_either.ko.

  • BIN LIU,

    Thank you for your response. i had sorted out the problem by correctly configuring the kernel. 

    Removed OMAP2430 and selected AM35x and also NOP USB transceiver driver.

    <*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
               **** Platform Glue Layer ***
           <>     TUSB6010
           <>     OMAP2430 and onwards
           <*>     AM35x 
               Driver Mode (USB Peripheral (gadget stack)) --->
           [ ] Disable DMA (always use PIO)
           [*] Use System DMA for Mentor DMA workaround
           [*] Enable debugging messages

    I dont have a file named config.gz in the directory  /proc/

    root@devkit:~# ls /proc/c
    cmdline  cpu/     cpuinfo  crypto

    What i mean is config.gz is not in the directory of /proc/. what exactly is that we can get from config.gz.

    Regards,

    Rajeev.

  • To enable /proc/config.gz, add the following to .config and rebuild the uImage.

    CONFIG_IKCONFIG=y
    CONFIG_IKCONFIG_PROC=y

    config.gz is compressed .config used to build the kernel. It can be used to check the configuration of the running kernel.

  • Bin Liu,

    I had rebuilt the kernel with configuring

    CONFIG_IKCONFIG=y
    CONFIG_IKCONFIG_PROC=y

    But how can we read the content in config.gz, when i tried to open with cat command, content is in different format.

    find the attachment,

    4606.config.gz

  • Bin Liu,

    Thank you for the quick response and patience . Can you clear one more doubt for me.

    In my evaluation board AM3517 there is a  USB HUB  for 4 extra USB_HOSTS. With USB_HUB its working fine but when I try to connect directly without hub, i am unable to get detected my pendrive. can you please suggest me any link bat how to config the kernel.

    Thanks in advance

    Rajeev.

  • I am not sure about the USB HUB, I dont use it on am3517.

    If you directly connect the pendrive to am3517, and do 'echo F > /proc/driver/musb_hdrc.0' in the serial console, does the pendrive get enumerated?

  • Bin Liu,

    When i connected pendrive (4GB HP) without any hub, following are the debug messages on serial port. I think i should configure kernel to get detect the pendrive without HUB(GL850G IC)

     root@devkit:~# [  396.993164] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    [  400.071380] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    [  403.149566] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    [  406.228149] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    [  406.235870] ehci-omap ehci-omap.0: port 1 cannot be enabled
    [  406.241729] ehci-omap ehci-omap.0: Maybe your device is not a high speed device?
    [  406.249511] ehci-omap ehci-omap.0: USB host (EHCI) controller does not support full speed or low speed device on it's root port.
    [  406.261688] ehci-omap ehci-omap.0: Please connect full/low speed device via a high speed hub.
    [  406.270660] hub 2-0:1.0: unable to enumerate USB device on port 1

    root@devkit:~# echo F > /proc/driver/musb_hdrc.0

  • Bin Liu,

    The error i posted is due to  DP and DM pin connections swapping, "Error: Maybe the USB cable is bad?"

    Following is the error after correct hardware connections.

    root@devkit:~# [   49.269653] usb 1-1: new high speed USB device using ehci-omap and address 2
    [   49.434631] usb 1-1: device descriptor read/all, error -75
    [   49.558715] usb 1-1: new high speed USB device using ehci-omap and address 3
    [   49.723876] usb 1-1: device descriptor read/all, error -75
    [   49.847778] usb 1-1: new high speed USB device using ehci-omap and address 4
    [   50.269653] usb 1-1: device not accepting address 4, error -71
    [   50.394653] usb 1-1: new high speed USB device using ehci-omap and address 5
    [   50.427368] usb 1-1: device descriptor read/all, error -75
    [   50.433197] ehci-omap ehci-omap.0: port 1 cannot be enabled
    [   50.439086] ehci-omap ehci-omap.0: Maybe your device is not a high speed device?
    [   50.446868] ehci-omap ehci-omap.0: USB host (EHCI) controller does not support full speed or low speed device on it's root port.
    [   50.459014] ehci-omap ehci-omap.0: Please connect full/low speed device via a high speed hub.
    [   50.467987] hub 1-0:1.0: unable to enumerate USB device on port 1

    USB is not enumarated on port 1 is the debug mesg.

    when i run following command no error or mesg is displayed

    root@devkit:~# echo "F" > /proc/driver/musb_hdrc.0
    root@devkit:~# echo $?
    0

    Thnaks,

    Rajeev.



  • I guess I am confused:

    >> [   50.446868] ehci-omap ehci-omap.0: USB host (EHCI) controller does not support full speed or low speed device on it's root port.
    >> [   50.459014] ehci-omap ehci-omap.0: Please connect full/low speed device via a high speed hub.

    You are not using the OTG, but the EHCI which only supports high speed devices.

    You said you use the TI EVM, why DP/DM is swapped? You have done any h/w mod?

  • Bin Liu,

    Yes i had Designed my own baseboard on that DP and DM are wrongly connected, I made that correction and tested with pendrive, i got errors.

    Please find the attachment for error log.

    Thanks,

    Rajeev.0880.usb_host_errror.txt