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.

DRA7xx USB2 as Device mode operation problem.

Hi all,

I am trying to access USB2 in Device mode, in order to do that i am trying to insert g_mass_storage.ko module,
i am getting the following error when i am using the following command in terminal:
    "insmod g_mass_storage.ko file=/dev/mmcblk1p1"

Error:
[  119.620281] Number of LUNs=8
[  119.623335] Mass Storage Function, version: 2009/09/11
[  119.628871] LUN: removable file: (no medium)
[  119.633395] Number of LUNs=1
[  119.636537] LUN: file: /dev/mmcblk1p1
[  119.640397] Number of LUNs=1
[  119.643568] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[  119.650948] g_mass_storage gadget: userspace failed to provide iSerialNumber
[  119.658461] g_mass_storage gadget: g_mass_storage ready
[  119.664951] dwc3 488d0000.usb: failed to enable ep0out

And it hangs after that

I have already inserted te dependent kernel modules  usb_f_mass_storage,libcomposite.
Please help me to solve this problem...

Thanks in anticipation.

Regards,

Vijaykumar P

  • Hi Vijaykumar,
    what kernel are you using? Show us also what kernel config for the USB, specificly about the DUAL role support changes have you done.
    Regards,
    Boyko
  • Hi Boyko,
    Thanks for your response.
    We are using the prebuilt images from glsdk6.10. Kernel version is 3.12.25. We did not modify any thing specifically about DUAL role support. If we need to do so, please let me know the changes required to do.

    Thanks in anticipation.
    Rgds,
    Vijay
  • Hi Vijay
    Checkout this article about DRD.
    processors.wiki.ti.com/.../USB_General_Guide_Linux_v3.8
    Also see which USB drivers are enabled by default (HDR , OTG etc.). Use more detailed kernel logging to see how it hangs after the last message you posted. There is a chance of misbehavioral bug in the OTG driver itself which might prove really hard to fix , because it might not be fully integrated.
    Regards,
    Boyko
  • Hi Boyko,

    As of now, we are using Pre built images from glsdk6.10. We did not change any configuration or code. Please let me know if any changes required to do for enabling USB OTG. 

    We have the linux code in glsdk6.10 and we are suggested by ti people to use omap2plus_defconfig file if at all we compile kernal code. So after make omap2plus_defconfig, the USB related configuration is as followed below.

    --- USB support                                                                                               │ │  

     │ │                                       <*>   Support for Host-side USB                                                                               │ │  

     │ │                                       [ ]     USB verbose debug messages                                                                            │ │  

     │ │                                       [*]     USB announce new devices                                                                              │ │  

     │ │                                               *** Miscellaneous USB options ***                                                                     │ │  

     │ │                                       [*]     Enable USB persist by default                                                                         │ │  

     │ │                                       [ ]     Dynamic USB minor allocation                                                                          │ │  

     │ │                                       [ ]     OTG support                                                                                           │ │  

     │ │                                       [ ]     Rely on OTG Targeted Peripherals List                                                                 │ │  

     │ │                                       [ ]     Disable external hubs                                                                                 │ │  

     │ │                                       <*>     USB Monitor                                                                                           │ │  

     │ │                                       < >     Support WUSB Cable Based Association (CBA)                                                            │ │  

     │ │                                               *** USB Host Controller Drivers ***                                                                   │ │  

     │ │                                       < >     Cypress C67x00 HCD support                                                                            │ │  

     │ │                                       <*>     xHCI HCD (USB 3.0) support                                                                            │ │  

     │ │                                       <*>     EHCI HCD (USB 2.0) support                                                                            │ │  

     │ │                                       [ ]       Root Hub Transaction Translators                                                                    │ │  

     │ │                                       [*]       Improved Transaction Translator scheduling                                                          │ │  

     │ │                                       <*>     EHCI support for OMAP3 and later chips                                                                │ │  

     │ │                                       < >     Generic EHCI driver for a platform device                                                             │ │  

     │ │                                       < >     OXU210HP HCD support              

                                                    < >     ISP116X HCD support                                                                                   │ │  
      │ │                                       < >     ISP 1760 HCD support                                                                                  │ │  
      │ │                                       < >     ISP1362 HCD support                                                                                   │ │  
      │ │                                       < >     FUSBH200 HCD support                                                                                  │ │  
      │ │                                       < >     FOTG210 HCD support                                                                                   │ │  
      │ │                                       < >     OHCI HCD (USB 1.1) support                                                                            │ │  
      │ │                                       < >     UHCI HCD (most Intel and VIA) support                                                                 │ │  
      │ │                                       < >     SL811HS HCD support                                                                                   │ │  
      │ │                                       < >     R8A66597 HCD support                                                                                  │ │  
      │ │                                       [ ]     HCD test mode support                                                                                 │ │  
      │ │                                       <M>     Inventra Highspeed Dual Role Controller (TI, ADI, ...)                                                │ │  
      │ │                                                 MUSB Mode Selection (Dual Role mode)  --->                                                          │ │  
      │ │                                                 Platform Glue Layer                                                                                 │ │  
      │ │                                       < >         TUSB6010                                                                                          │ │  
      │ │                                       <M>         OMAP2430 and onwards                                                                              │ │  
      │ │                                       < >         AM35x                                                                                             │ │  
      │ │                                       <M>         TI DSPS platforms                                                                                 │ │  
      │ │                                       < >         Ux500 platforms                                                                                   │ │  
      │ │                                       <M>       Enable support for AM335x devices                                                                   │ │  
      │ │                                                 MUSB DMA mode (TI CPPI 4.1 (AM335x))  --->                                                          │ │  
      │ │                                       < >     Renesas USBHS controller

                                    *** USB Device Class drivers ***                                                                      │ │  
      │ │                                       < >     USB Modem (CDC ACM) support                                                                           │ │  
      │ │                                       < >     USB Printer support                                                                                   │ │  
      │ │                                       <*>     USB Wireless Device Management support                                                                │ │  
      │ │                                       < >     USB Test and Measurement Class support                                                                │ │  
      │ │                                               *** NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ***                                          │ │  
      │ │                                               *** also be needed; see USB_STORAGE Help for more info ***                                            │ │  
      │ │                                       <*>     USB Mass Storage support                                                                              │ │  
      │ │                                       [ ]       USB Mass Storage verbose debug                                                                      │ │  
      │ │                                       < >       Realtek Card Reader support                                                                         │ │  
      │ │                                       < >       Datafab Compact Flash Reader support                                                                │ │  
      │ │                                       < >       Freecom USB/ATAPI Bridge support                                                                    │ │  
      │ │                                       < >       ISD-200 USB/ATA Bridge support                                                                      │ │  
      │ │                                       < >       USBAT/USBAT02-based storage support                                                                 │ │  
      │ │                                       < >       SanDisk SDDR-09 (and other SmartMedia, including DPCM) support                                      │ │  
      │ │                                       < >       SanDisk SDDR-55 SmartMedia support                                                                  │ │  
      │ │                                       < >       Lexar Jumpshot Compact Flash Reader                                                                 │ │  
      │ │                                       < >       Olympus MAUSB-10/Fuji DPC-R1 support                                                                │ │  
      │ │                                       < >       Support OneTouch Button on Maxtor Hard Drives                                                       │ │  
      │ │                                       < >       Support for Rio Karma music player

                                                   < >       SAT emulation on Cypress USB/ATA Bridge with ATACB                                                  │ │  
      │ │                                       < >       USB ENE card reader support                                                                         │ │  
      │ │                                               *** USB Imaging devices ***                                                                           │ │  
      │ │                                       < >     USB Mustek MDC800 Digital Camera support                                                              │ │  
      │ │                                       < >     Microtek X6USB scanner support                                                                        │ │  
      │ │                                       <M>   DesignWare USB3 DRD Core Support                                                                        │ │  
      │ │                                               DWC3 Mode Selection (Dual Role mode)  --->                                                            │ │  
      │ │                                               *** Platform Glue Driver Support ***                                                                  │ │  
      │ │                                       <M>     Texas Instruments OMAP5 and similar Platforms                                                         │ │  
      │ │                                       < >     Samsung Exynos Platform                                                                               │ │  
      │ │                                       < >     PCIe-based Platforms                                                                                  │ │  
      │ │                                               *** Debugging features ***                                                                            │ │  
      │ │                                       [ ]     Enable Debugging Messages                                                                             │ │  
      │ │                                       < >   ChipIdea Highspeed Dual Role Controller                                                                 │ │  
      │ │                                             *** USB port drivers ***                                                                                │ │  
      │ │                                       < >   USB Serial Converter support  ----                                                                      │ │  
      │ │                                             *** USB Miscellaneous drivers ***                                                                       │ │  
      │ │                                       < >   EMI 6|2m USB Audio interface support                                                                    │ │  
      │ │                                       < >   EMI 2|6 USB Audio interface support                                                                     │ │  
      │ │                                       < >   ADU devices from Ontrak Control Systems                                                                 │ │  
      │ │                                       < >   USB 7-Segment LED Display

                                                   < >   USB Diamond Rio500 support                                                                              │ │  
      │ │                                       < >   USB Lego Infrared Tower support                                                                         │ │  
      │ │                                       < >   USB LCD driver support                                                                                  │ │  
      │ │                                       < >   USB LED driver support                                                                                  │ │  
      │ │                                       < >   Cypress CY7C63xxx USB driver support                                                                    │ │  
      │ │                                       < >   Cypress USB thermometer driver support                                                                  │ │  
      │ │                                       < >   Siemens ID USB Mouse Fingerprint sensor support                                                         │ │  
      │ │                                       < >   Elan PCMCIA CardBus Adapter USB Client                                                                  │ │  
      │ │                                       < >   Apple Cinema Display support                                                                            │ │  
      │ │                                       < >   USB 2.0 SVGA dongle support (Net2280/SiS315)                                                            │ │  
      │ │                                       < >   USB LD driver                                                                                           │ │  
      │ │                                       < >   PlayStation 2 Trance Vibrator driver support                                                            │ │  
      │ │                                       < >   IO Warrior driver support                                                                               │ │  
      │ │                                       <M>   USB testing driver                                                                                      │ │  
      │ │                                       < >   USB EHSET Test Fixture driver                                                                           │ │  
      │ │                                       < >   iSight firmware loading support                                                                         │ │  
      │ │                                       < >   USB YUREX driver support                                                                                │ │  
      │ │                                       < >   Functions for loading firmware on EZUSB chips                                                           │ │  
      │ │                                       < >   USB3503 HSIC to USB20 Driver                                                                            │ │  
      │ │                                             USB Physical Layer drivers  --->                                                                        │ │  
      │ │                                       <*>   USB Gadget Support  --->

    I have already tried with the given document processors.wiki.ti.com/.../USB_General_Guide_Linux_v3.8,

    I have mounted the debufs file system after to execute the following commands:

    echo "device" > /mnt/48890000.dwc3/mode.
    echo "device" > /mnt/488d0000.dwc3/mode.

    /mnt/48890000.dwc3 ,/mnt/488d0000.dwc3/ nodes are not created hence it is showing error that no such file/directory.
    So can u help me with this ...

    Thanks n Regards,

    Vijay