Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Oct 2016 08:55 AM by  Eric B
MUSB Host with Mainstream kernel
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Eric B
New Member
New Member
Posts:19


--
27 Oct 2016 03:45 PM

    I've been working on a development using a mainstream kernel build for a DM37370 wireless SOM. I've been using the MUSB/OTG with a couple of gadget drivers and it seems to work pretty well. I also need to be able to use the USB in host mode but I haven't had any success in getting this to work. When I plug in the mini-A to A  adapter that came with the devkit nothing happens. Plugging a flash drive into the dongle also does not create any events. On the old 2.4-4 BSP these steps put the port into host mode and enumerate the flash drive. I've tried this using:

    1. the demo images provided in the download section

    2. the mainstream build instructions with a 2.4.24 kernel and the provided config files

    3. the mainstream build instructions with a 2.4.27 kernel and the provided config files

    None of them seem to switch to USB host mode as expected. Is there a step I'm overlooking?

    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    28 Oct 2016 07:00 AM
    We're updating our documentation to reflect this, but in order to use the USB as a host, you need to enable a gadget. It's not intuitive at all. TI documents it, but it's hard to find. http://processors.wiki.ti...x.php/Usbgeneralpage

    I usually use g_zero, but any gadget will work.

    modprobe g_zero

    That will initialize the OTG controller and when the adapter is connected, it notifies the controller to switch to host mode.



    # modprobe g_zero
    [ 72.537933] zero gadget: Gadget Zero, version: Cinco de Mayo 2008
    [ 72.544738] zero gadget: zero ready

    (Connect Mouse) through OTG adapter

    [ 82.616394] musb-hdrc musb-hdrc.0.auto: configured as A device timeout
    [ 83.169372] usb 2-1: new low-speed USB device number 2 using musb-hdrc
    [ 83.318298] usb 2-1: New USB device found, idVendor=413c, idProduct=3016
    [ 83.325592] usb 2-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
    [ 83.333312] usb 2-1: Product: Dell Premium USB Optical Mouse
    [ 83.458465] input: Dell Premium USB Optical Mouse as /devices/platform/68000000.ocp/480ab000.usb_otg_hs/musb-hdrc.0.auto/usb2/2-1/2-1:1.0/0003:413C:3016.0001/input/input3
    [ 83.503326] hid-generic 0003:413C:3016.0001: input: USB HID v1.11 Mouse [Dell Premium USB Optical Mouse] on usb-musb-hdrc.0.auto-1/input0

    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    28 Oct 2016 07:14 AM
    For future reference, the instructions on TI's page is located under "Modular testing on MUSB" and it reads as follows:

    1. musb_hdrc.ko: The core controller module.
    2. cppi30dma.ko, cppi41dma.ko or musbhsdma.ko: The dma controller module.
    3. ti81xx.ko, am35x.ko or omap2430.ko: The platform glue module.
    4. g_file_storage.ko or g_ether.ko: The gadget controller module.

    All the above four modules need to be inserted sequentially for an OTG (both host and device) configured or gadget only configured kernel. Fourth module (gadget controller) would not be needed in a host only config.

    (Because their docs are for older kernels, the default doesn't load either of those, but the default kernel does have g_zero, and I've confirmed it works)

    adam
    Eric B
    New Member
    New Member
    Posts:19


    --
    28 Oct 2016 08:55 AM
    Perfect! THANK YOU!
    You are not authorized to post a reply.