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.

How to enable DM3730's OTG as a device

Other Parts Discussed in Thread: DM3730, TPS65950

hi, all

    i want to use dm3730's otg as a device most like android's adb device.
    my linux version is 3.5-rc5.

   my question is:
   1. i can't find enough information in DM3730's spec, there are only 7 registers in spec's chapter 22.1, which describe the OTG
   2. is there anything i can refer?
    3. in android, how to enable otg as a device?
 
  thx.

    here is what i did:

    1.    in menuconfig, i enabled following configurations: 

    Device Drivers/USB Support

    USB Gadget support
          USB Peripheral Controller
               OMAP USB Device Controller
          USB Gadget Drivers
               Gadget zero

    2. then i build the kernel again. when i boot the new kernel, the zero driver said cann't find any udc.

    3. follow the Makefile, i found the source code for DM3730's udc: omap_udc.c, which is a platform device

    4. then i found the board init code in file: usb-fs.c. however the init entry function omap2_usbfs_init() is excluded by macro CONFIG_ARCH_OMAP2

    5. i also checked omap_usb.c, i guess this omap_usb doesn't support DM3730, as the registers' address mismatch.

   

 

  • no one knows? or i didn't describe the problem clearly?
    can anybody help me?

  • Bennett,

    I can answer your first two questions. 

    TI has integrated the USB IP from Mentor Graphics. So you might not find the detailed document from the DM3730 TRM. 

    I have seen android ADB working with DM3730 with USG OTG port long back with Eclair/Froyo. I'm not sure about your latest kernel on how to enable it. The quickest way to do this is to try to use the configuration for BeagleBoard-xM and see whether ADB works there. 

  • Hi, Renjith

    Thanks for your reply.

    I did use the configuration for Beagleboard-xm. When i connect PC and DM3730's otg with usb cable, i can see a unknow usb device on my PC's devices' manager, but it removed immediately.

    Maybe i should check a kernel used in Android, and find out the right driver.

    thank you again.

  • Bennett,

    In which boot phase are you seeing the unknown device getting detected? Is it u-boot or in kernel?

  • hi, renjith

      I think it is u-boot.

      If i press something make u-boot enter command line mode, the unknown device will disconnect;

      then i execute bootd in u-boot command line mode, during the kernel boot phase, the unknown device would not been detected again.

     PC could get the "unknown" device's vid and pid: USB\VID_0451&PID_D00E\5&3985650A&0&3

    I noticed TPS65950 has the same vid, but different pid, tps65950's pid is 0xC002

  • Did you check whether the  beagle kernel supports Android ADB gadget driver?

    Check this post. 

    https://groups.google.com/forum/?fromgroups=#!topic/android-porting/rPZYi6mSJcU

  • I wanna say hello to FBX's mother, Again and again.

    thanks to the GFW, i cann't open groups.google.com. You know, I'm in CHINA.

    Would you do me a favor to tell me the steps to check that?

    thank you very much.

  • FYI - a USB gadget driver for adb is now available:

    http://android.git.kernel.org/?p=kernel/common.git;a=commit;h=fc20ff5191502a6c0bb9e112cea56feea8d12f4e

    This should be useful to anyone porting android to non msm-7200 platforms, as it will allow you to run adbd on the device using the standard Linux USB gadget support.  On msm we are using a different approach that supports multiple USB interfaces (so we can run USB mass storage and adb simultaneously).  But we plan on cleaning that up and switching to the new composite gadget support when we move to the 2.6.27 kernel.

    -- 
    Mike Lockwood
    Google android team
    Benno 
     Join group to reply
    More message actions
    11/1/08
    - show quoted text -

    Thanks Mike, that is really helpful! Will try it out soon.

    Cheers,

    Benno

    Shivdas 
     Join group to reply
    More message actions
    11/24/08
    Hi Mike,

    Does this driver works with Linux, because as I see its enumerating as
    a Vendor specific device, with ProductId 0001 and Vendor Id 0x18d1

    Have you written any specific driver for Linux/windows at Host side to
    communicate with this?

    Regards,
    Shivdas

    - show quoted text -

    Mike Lockwod 
     Join group to reply
    More message actions
    11/24/08
    On Mon, Nov 24, 2008 at 8:57 AM, Shivdas <shivda...@gmail.com> wrote:
    > Hi Mike,
    >
    > Does this driver works with Linux, because as I see its enumerating as
    > a Vendor specific device, with ProductId 0001 and Vendor Id 0x18d1

    Yes, this driver works with Linux, Windows and Mac.  It works with the
    adb tool included in the android SDK or with the adb built from the
    android source code available from android.com.

    The 0x18d1 vendor ID belongs to Google.  If you ship your own device,
    you will need to get your own vendor ID from usb.org.  You will also
    need to modify the is_adb_interface() function in transport_usb.c in
    the adb source code.  The adb source code for adb is available at:
    http://android.git.kernel.org/?p=platform/system/core.git;a=tree;f=adb.
     This code includes both the host and device side adb.

    > Have you written any specific driver for Linux/windows at Host side to
    > communicate with this?

    No host side driver is necessary for Mac or Linux.  For Windows, a
    driver is available at
    http://dl.google.com/android/android_usb_windows.zip.  This driver is
    set up to communicate with the T-Mobile G1.  You will need to modify
    the *.inf file that comes with the driver to match VID/PID used by
    your device.

    Mike

    > Regards,
    > Shivdas
    >
    >
    > Mike Lockwood wrote:
    >> FYI - a USB gadget driver for adb is now available:
    >>
    >> http://android.git.kernel.org/?p=kernel/common.git;a=commit;h=fc20ff5191502a6c0bb9e112cea56feea8d12f4e
    >>
    >> This should be useful to anyone porting android to non msm-7200 platforms,
    >> as it will allow you to run adbd on the device using the standard Linux USB
    >> gadget support.  On msm we are using a different approach that supports
    >> multiple USB interfaces (so we can run USB mass storage and adb
    >> simultaneously).  But we plan on cleaning that up and switching to the new
    >> composite gadget support when we move to the 2.6.27 kernel.
    >>
    >> --
    >> Mike Lockwood
    >> Google android team
    >

    -- 
    Mike Lockwood
    Google android team