logo

Could not compile stylesheet for simplistic. Using last compiled stylesheet.

USB OTG in HOST mode

posted in Uncategorized
Thursday, March 18 2010, 05:02 PM
marc
marc
Offline
0
Hello, I\\\'m using an IGEPv2 board with poky linux and kernel 2.6.28.10. I would like to use the OTG port in host mode in order to attach directly USB 1.1 devices, I\\\'ve tried plugging a mini-B conector but the system doesn\\\'t detect anything. I\\\'ve checked and the kernel is built with the \"Both host and periferial\" option. I\\\'ve found in the beagleboard list that doing: echo host > /sys/devices/platform/musb_hdrc/mode gets it working. I\\\'ve also tried connecting the cable before booting the board. Any clues on what I can do or I\\\'m doing wrong?
Responses (20)
  • Accepted Answer

    Thursday, March 18 2010, 07:16 PM - #permalink
    0
    I\\\'m guessing your USB device needs more power then the OTG port can supply. You could try adding a powered hub between your device and the board, to see if this solves the issue.
    The reply is currently minimized Show
  • Accepted Answer

    marc
    marc
    Offline
    Friday, March 19 2010, 12:07 AM - #permalink
    0
    Hi buZztiaan, I\\\'m just trying to attach a USB-serial converter and the whole point of trying OTG is not having to use a hub :-) ) I don\\\'t think power is the issue, any other ideas?
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Friday, March 19 2010, 08:25 AM - #permalink
    0
    Hi, Try it using a USB 2.0 serial converter or use a hub 2.0 ... Best Regards Manel
    The reply is currently minimized Show
  • Accepted Answer

    marc
    marc
    Offline
    Tuesday, April 13 2010, 04:59 PM - #permalink
    0
    Hello Manel, I\\\'m trying to avoid having to use another piece of equipment, also I can\\\'t find any USB 2.0 serial converters. Is there any way to use the OTG port? Thank\\\'s
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 15 2010, 02:40 PM - #permalink
    0
    marc: I got the otg working in host mode by shorting pins 4 and 5 on a mini usb-b connector. Obviously this isn\\\'t a great solution but I believe you can buy them with it preshorted. Oh and I made quite a mess of the plastic while I did it, they are quite small.
    The reply is currently minimized Show
  • Accepted Answer

    geiman
    geiman
    Offline
    Friday, May 21 2010, 07:48 PM - #permalink
    0
    Instead of shorting the pins, you can just buy a USB mini-a cable; they already have the pin shorted if I remember correctly. You can snag adapters that change a USB cable to USB mini-a off Digikey, as well as actual cables.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 21 2010, 04:49 PM - #permalink
    0
    While in host mode what current is it capable of outputting? In the kernel it is currently set at 200mA with the ability to set it to 500mA. Can this be done safely and will it work? John Banks
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Monday, June 21 2010, 05:13 PM - #permalink
    0
    The Max Output current it\\\'s 100mA. Manel
    The reply is currently minimized Show
  • Accepted Answer

    vly
    vly
    Offline
    Friday, October 01 2010, 04:10 PM - #permalink
    0
    Hi Manel, By chance, would there be a HW trick which would allow us to gather more than 100mA from this OTG connector ? Veranith
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Friday, October 01 2010, 04:54 PM - #permalink
    0
    Hi Veranith, it\\\'s not possible due the max output current be from TPS65950 and it\\\'s 100mA. [url=http://focus.ti.com/lit/ds/symlink/tps65950.pdf]http://focus.ti.com/lit/ds/symlink/tps65950.pdf[/url] Page: 55 Cheers Manel
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 09 2011, 07:01 PM - #permalink
    0
    Manel, But is it possible to provide power directly to the USB peripheral? I mean with my own regulator and bypassing USB VDD from the board? Is there a software/hardware issue if USB VDD is left unconnected? Thanks for your help. Regards, Guillaume.
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Friday, February 11 2011, 08:50 PM - #permalink
    0
    I will take a look ... :) Manel
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Monday, February 14 2011, 07:30 PM - #permalink
    0
    Yes it\\\'s possible. a) Configure the kernel (board-igep0020.c) as OTG = HOST Mode. b) You should connect the 5V directly in the PAD: TP834 c) You must remove the resistor R603. Cheers Manel
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 15 2011, 08:48 AM - #permalink
    0
    Thanks for your help Manel. Guillaume.
    The reply is currently minimized Show
  • Accepted Answer

    klopilot
    klopilot
    Offline
    Monday, February 21 2011, 12:51 PM - #permalink
    0
    Hello Manel,
    Yes it\\\'s possible. a) Configure the kernel (board-igep0020.c) as OTG = HOST Mode. b) You should connect the 5V directly in the PAD: TP834 c) You must remove the resistor R603. Cheers Manel
    what is resistor R603 for? Is it possible to take a look at the schematics, i can` t find any under the user downloads. Regards, Bastian.
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Monday, February 21 2011, 01:29 PM - #permalink
    0
    what is resistor R603 for?
    USB OTG TPS65950 VBUS signal. R603 = 0 Ohms resistor. Manel
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Monday, January 09 2012, 05:54 PM - #permalink
    0
    A little bump on this subject... I\\\'m trying to enable USB OTG host on the IGEPv2 RevB board in order to be able to plug in a USB key. I have the kernel 2.6.37 and have enabled the following options in the kernel: CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DEBUG_FS=y CONFIG_USB_GADGET_VBUS_DRAW=100 CONFIG_USB_GADGET_SELECTED=y CONFIG_USB_GADGET_DUALSPEED=y CONFIG_USB_ETH=m CONFIG_USB_ETH_RNDIS=y CONFIG_USB_GADGETFS=m CONFIG_USB_FILE_STORAGE=m CONFIG_USB_MASS_STORAGE=m CONFIG_USB_CDC_COMPOSITE=m I loaded the g_cdc module, but when plugging in a USB key, I get the following messages: [code] [ 185.987792] g_cdc gadget: using random self ethernet address [ 185.993865] g_cdc gadget: using random host ethernet address [ 186.000457] usb0: MAC 5a:d8:c6:3a:77:66 [ 186.004577] usb0: HOST MAC 8a:22:33:9c:e5:fc [ 186.009613] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008 [ 186.017547] g_cdc gadget: g_cdc ready [ 186.021423] musb-hdrc musb-hdrc.0: MUSB HDRC host driver [ 186.027130] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2 [ 186.042724] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 [ 186.049987] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 186.057617] usb usb2: Product: MUSB HDRC host driver [ 186.062835] usb usb2: Manufacturer: Linux 2.6.37+ musb-hcd [ 186.068603] usb usb2: SerialNumber: musb-hdrc.0 [ 186.074188] hub 2-0:1.0: USB hub found [ 186.078186] hub 2-0:1.0: 1 port detected [ 186.539947] usb 2-1: new high speed USB device using musb-hdrc and address 2 [ 186.707305] usb 2-1: device v13fe p1f00 is not supported [ 186.712982] usb 2-1: New USB device found, idVendor=13fe, idProduct=1f00 [ 186.720031] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 186.727539] usb 2-1: Product: USB DISK 2.0 [ 186.731842] usb 2-1: Manufacturer: [ 186.736267] usb 2-1: SerialNumber: 07961302B7E60010 [ 186.741882] usb 2-1: rejected 1 configuration due to insufficient available bus power [ 186.750183] usb 2-1: no configuration chosen from 1 choice [/code] I know the thread above was about the insufficient power, but I find that strange for a plain USB key: 100mA should be enough... Is there anything I need to do or that I am doing wrong ? Thanks !
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Wednesday, January 11 2012, 04:19 PM - #permalink
    0
    Anyone has an idea how to enable USB OTG in HOST mode ?... Thanks for any help
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Wednesday, January 11 2012, 04:25 PM - #permalink
    0
    You should plug the right cable (mini-A) before power up the board Cheers Manel
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Wednesday, January 11 2012, 05:11 PM - #permalink
    0
    Hi Manel, Indeed, it works this way. I was also using a USB key trying to get 200mA out of the port (seems strange that a dumb USB key would need that much power but anyway...) So, there, it works with a USB key that needs less than 100mA (may be checked in the output of lsusb -v). However... ... hotplug does not work on that port. - I can plug in a USB key through the cable after boot: this works - But when I unplug it, I get all sorts of error messages (even if I unmount it first) - When plugging it back in again, the USB key is not picked up Here are the messages I get when unplugging the USB key (I have a USB to serial converter plugged in the main USB port through a hub, so that explains part of the messages): [code] root@igep0020:/media# [ 141.092895] usb 2-1: USB disconnect, address 2 [ 141.111938] usb 1-1: clear tt 1 (9031) error -71 [ 141.564788] usb 2-1: new high speed USB device using musb-hdrc and address 3 [ 141.808258] usb 2-1: device v058f p6387 is not supported [ 141.813842] usb 2-1: New USB device found, idVendor=058f, idProduct=6387 [ 141.820861] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 141.828308] usb 2-1: Product: Mass Storage [ 141.832580] usb 2-1: Manufacturer: Generic [ 141.836853] usb 2-1: SerialNumber: 7DD60FC9 [ 141.852905] scsi1 : usb-storage 2-1:1.0 [ 141.859069] hub 1-0:1.0: port 1 disabled by hub (EMI?), re-enabling... [ 141.865966] usb 1-1: USB disconnect, address 2 [ 141.870635] usb 1-1.4: USB disconnect, address 3 [ 141.876098] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 [ 141.885162] ftdi_sio 1-1.4:1.0: device disconnected [ 142.088195] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0b402c [ 142.096191] Internal error: : 1028 [#1] [ 142.100158] last sysfs file: /sys/devices/platform/uevent [ 142.105804] Modules linked in: libertas_sdio ftdi_sio twl4030_wdt libertas usbserial omap_wdt [ 142.114685] CPU: 0 Not tainted (2.6.37+ #1) [ 142.119415] PC is at omap_hsmmc_enable_sdio_irq+0x1c/0x7c [ 142.125030] LR is at sdio_irq_thread+0x1d8/0x23c [ 142.129852] pc : [] lr : [] psr: 20000093 [ 142.129852] sp : d708ff70 ip : 00000000 fp : d708e000 [ 142.141784] r10: d831c01c r9 : 7fffffff r8 : 20000013 [ 142.147216] r7 : d831c000 r6 : 00000001 r5 : 00000000 r4 : d831ca40 [ 142.154022] r3 : fa0b4000 r2 : 00000001 r1 : 00000001 r0 : d831c800 [ 142.160797] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 142.168487] Control: 10c5387d Table: 97af4019 DAC: 00000017 [ 142.174468] Process ksdioirqd/mmc1 (pid: 1232, stack limit = 0xd708e2f0) [ 142.181457] Stack: (0xd708ff70 to 0xd7090000) [ 142.185974] ff60: ffffff92 00000000 d831c800 d831c000 [ 142.194488] ff80: 00000008 c034ebcc 00000000 d708ff9f d831ca04 00000002 00000001 0234e9f4 [ 142.203002] ffa0: 00000000 d708ffd4 d7059d2c d831c800 c034e9f4 00000000 00000000 00000000 [ 142.211517] ffc0: 00000000 c0080a64 c00442bc 00000000 d831c800 00000000 d708ffd8 d708ffd8 [ 142.220031] ffe0: 00000000 d7059d2c c00809e4 c00442bc 00000013 c00442bc 00000000 40020000 [ 142.228546] [] (omap_hsmmc_enable_sdio_irq+0x1c/0x7c) from [] (sdio_irq_thread+0x1d8/0x23c) [ 142.239074] [] (sdio_irq_thread+0x1d8/0x23c) from [] (kthread+0x80/0x88) [ 142.247863] [] (kthread+0x80/0x88) from [] (kernel_thread_exit+0x0/0x8) [ 142.256561] Code: e10f8000 f10c0080 e5943044 e3510000 (e593702c) [ 142.263000] ---[ end trace 80255241dfb4de28 ]--- [ 142.330444] usb 1-1: new high speed USB device using ehci-omap and address 4 [ 142.487152] usb 1-1: New USB device found, idVendor=0409, idProduct=005a [ 142.494140] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 142.505035] hub 1-1:1.0: USB hub found [ 142.509399] hub 1-1:1.0: 4 ports detected [ 142.523681] usb 2-1: USB disconnect, address 3 [ 142.807159] usb 1-1.4: new full speed USB device using ehci-omap and address 5 [ 142.939300] usb 1-1.4: New USB device found, idVendor=0403, idProduct=6001 [ 142.946533] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 142.954193] usb 1-1.4: Product: USB-RS485 Cable [ 142.958923] usb 1-1.4: Manufacturer: FTDI [ 142.963134] usb 1-1.4: SerialNumber: FTRYOR9F [ 142.973175] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected [ 142.980529] usb 1-1.4: Detected FT232RL [ 142.984558] usb 1-1.4: Number of endpoints 2 [ 142.989074] usb 1-1.4: Endpoint 1 MaxPacketSize 64 [ 142.994049] usb 1-1.4: Endpoint 2 MaxPacketSize 64 [ 142.999084] usb 1-1.4: Setting MaxPacketSize 64 [ 143.005126] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB1 [/code]
    The reply is currently minimized Show
Your Reply

SUPPORT


This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
IGEP Community Wiki
IGEP Community Forum
IGEP Community Online Chat