From: Andrew H. <and...@gm...> - 2010-05-31 20:57:36
|
A follow up to this, I checked the power requested by the hub and a usb to serial device I was trying to connect by using lsusb -v on my desktop. Both request 100mA, and both shut down the host port on the gumstix. The device I was able to successfully connect to the gumstix host port only requests 2mA, and it shows up and works fine on the gumstix. I am using a USB hub that will supply external power, and I will remove the power pin from the connector that goes to the gumstix. Also, I don't see anything that looks like the code mentioned before in ehci.h. Where do I change this now? The image I built last night seems to be using linux-omap3-2.6.33-r76 kernel. Andrew On Mon, May 31, 2010 at 3:41 AM, Andrew Hakman <and...@gm...> wrote: > Does this same patch work for the Host port as well? > > When I connect a hub, I see this on the console > > root@overo:~# usb 2-2: new high speed USB device using ehci-omap and address 2 > usb 2-2: device descriptor read/all, error -71 > usb 2-2: new high speed USB device using ehci-omap and address 3 > usb 2-2: New USB device found, idVendor=1a40, idProduct=0201 > usb 2-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0 > usb 2-2: Product: USB 2.0 Hub [MTT] > hub 2-2:1.0: USB hub found > hub 2-2:1.0: 7 ports detected > > but in dmesg > ehci-omap ehci-omap.0: port 2 high speed > ehci-omap ehci-omap.0: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT > usb 2-2: new high speed USB device using ehci-omap and address 3 > ehci-omap ehci-omap.0: port 2 high speed > ehci-omap ehci-omap.0: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT > usb 2-2: default language 0x0409 > usb 2-2: udev 3, busnum 2, minor = 130 > usb 2-2: New USB device found, idVendor=1a40, idProduct=0201 > usb 2-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0 > usb 2-2: Product: USB 2.0 Hub [MTT] > usb 2-2: uevent > usb 2-2: usb_probe_device > usb 2-2: configuration #1 chosen from 1 choice > usb 2-2: uevent > usb 2-2: adding 2-2:1.0 (config #1, interface 0) > usb 2-2:1.0: uevent > hub 2-2:1.0: usb_probe_interface > hub 2-2:1.0: usb_probe_interface - got id > hub 2-2:1.0: USB hub found > hub 2-2:1.0: 7 ports detected > hub 2-2:1.0: standalone hub > hub 2-2:1.0: ganged power switching > hub 2-2:1.0: individual port over-current protection > hub 2-2:1.0: TT per port > hub 2-2:1.0: TT requires at most 8 FS bit times (666 ns) > hub 2-2:1.0: Port indicators are supported > hub 2-2:1.0: power on to power good time: 100ms > hub 2-2:1.0: local power source is good > hub 2-2:1.0: enabling power on all ports > drivers/usb/core/inode.c: creating file '003' > hub 2-0:1.0: state 7 ports 3 chg 0000 evt 0004 > usb 2-2: link qh256-0001/cef36e40 start 1 [1/0 us] > hub 2-2:1.0: state 7 ports 7 chg 0000 evt 0000 > hub 2-2:1.0: hub_suspend > usb 2-2: unlink qh256-0001/cef36e40 start 1 [1/0 us] > usb 2-2: usb auto-suspend > hub 2-0:1.0: hub_suspend > usb usb2: bus auto-suspend > ehci-omap ehci-omap.0: suspend root hub > > Plugging anything into the hub results in nothing happening. I've > tried devices that if I plug them in directly to the Overo, they work > fine and show up in lsusb, but through the hub, I get nothing. > > If this patch applies to the host port as well, how do I recompile the > kernel after I change the c file? Can I just bitbake the console-image > again, or do I have to bitbake the kernel package separately, then the > image again? > > Andrew > > > On Mon, May 10, 2010 at 5:37 AM, Chris Cotton <Cot...@ya...> wrote: >> >> Hi again, >> I have now located the line which needs editing, and done hardware testing >> to confirm that the modification works. >> >> I disconnected the +5V pin of the USB connector from the Gimstix, and >> connected it directly to a 5V 1Amp regulated power supply. I then tested >> the Gumstix against a CP2103 USB adaptor, which I have a development kit >> for; this allowed me to change the current descriptor in my USB device. >> Sure enough, as soon as I set the descriptor to 'claim' the device needed >> more than 100mA, I got the error you are seeing. (The device actually only >> uses 25mA) >> >> I then altered the file: >> /tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51/git/drivers/usb/host/ehci.h >> >> by changing the following line from: >> /* REVISIT charge pump on TWL4030 can supply up to >> * 100 mA ... but this value is board-specific, like >> * "mode", and should be passed to usb_musb_init(). >> */ >> .power = 50, /* up to 100 mA */ >> >> to: >> /* REVISIT charge pump on TWL4030 can supply up to >> * 100 mA ... but this value is board-specific, like >> * "mode", and should be passed to usb_musb_init(). >> */ >> .power = 250, /* up to 500 mA */ >> >> Rebuilding the kernel, I can confirm that the gumstix now accepts >> connections from high - current devices, hopefully including devices such as >> your camera :) >> >> Please note that if you use the modified kernel on a 'normal' gumstix >> development board, you may end up damaging the twl4030 power supply IC as >> the gumstix won't protect it when you connect a high current device to the >> board!! The above change is strictly for non-standard / modified hardware >> which can safely supply the required current. >> >> Hope this solves your problem, >> Chris >> >> >> zyperion wrote: >>> >>> So the USB OTG port is supposed to be able to source 100ma as far as I >>> understand and my team and I are trying to use an Overo Fire with the >>> Pinto board to control a UAV helicopter with a stripped down usb webcam. >>> The webcam was hooked up by being soldered on to the miniB end of a USB >>> MiniAB cable with the MiniA end going into the OTG port of the Gumstix. We >>> haven't seen the camera pull more than 40ma or so yet but are having >>> trouble getting it up and running. The gumstix is current using the may >>> 4th build of the desktop image and recognizes a USB device attached and >>> identifies it as an HP webcam but gives a "configuration due to >>> insufficient available bus power" error. To remedy this we were wondering >>> if we could simply bypass the Gumstix and connect the 5V supply pin from >>> the webcam directly to the 5V rail that we're getting off the helicopter's >>> battery that's being used to power the whole system thereby removing the >>> need for the Gumstix to do any sourcing at all. Would this effectively >>> operate the same way a powered usb hub would? We don't really have the >>> option of using a powered hub due to the weight restrictions for the >>> helicopter so we really need to be able to run this single webcam off the >>> OTG port on the Pinto. Anyone have any insight or suggestions? >>> >> >> -- >> View this message in context: http://old.nabble.com/USB-OTG-port-power-issue-with-webcam-tp28492360p28510479.html >> Sent from the Gumstix mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> > |