Thread: Hardware OTG support
View Single Post
Old 08-13-2012, 09:51 AM   #15
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by knc1 View Post
I disagree with GM, I think it is a rather trivial thing to do. After all, the Kindle kernels are already running the (other) USB host port.

I even ordered (from Amazon) the adapter cable to do it with when cscat and I posted about doing this a few months ago.
What's to disagree with? I just provided a list of what we NEED (some of which may already be built in). All we need to do is to TEST this stuff (and perhaps find any missing pieces at freescale.com or elsewhere).

Here is a little test I just did on my K5:

[root@kindle root]# modprobe ehci-hcd otg
[root@kindle root]# dmesg|tail
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.1: irq 14, io base 0x53f80200
fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
[root@kindle root]#


According to "FreescaleUSBDrivers.pdf", the next step is to plug in a USB drive and check dmesg again. I plugged in a USB stick, but the power LED did not turn on and no now message was added to dmesg. It would be interesting to see if it is detected when external power is supplied. This would be easier to test by using an onscreen console or a wifi SSH connection, to avoid switching between USB ethernet gadget and other USB gadgets.

Later in the manual is says to do "modprobe g_file_storage file=/dev/ram0" to mount a USB drive. Searching for it on my K5 found this:
./lib/modules/2.6.31-rt11-lab126/kernel/drivers/usb/gadget/g_file_storage.ko
So like I said, it just takes SOMEBODY who is interested enough to devote the time to do this research. I did not say that it was HARD. I just provided a list of things that need to be taken into account, and may need to be added IF any of them are missing. The little extra research I just did shows that the K5 appears to have built-in support for USB storage devices over OTG. Cool.

It is easier to to tell others they are wrong without providing useful information to support that claim, than it is to do a little research to provide the information. It is not hard. I never said it was. I just provided a list of possibilities to be researched, and now I started a path of research others can follow. Although a bit old, here is the document I used:
FreescaleUSBDrivers.pdf: http://www.mobileread.mobi/forums/at...9&d=1256815731

Also, traversing USB hubs is not necessarily supported by all OTG devices, and would also require software support. Not all USB devices work when attached to a hub (from lack of software support). I just stripped the outer insulation from part of one of my USB OTG host cables, and I plan to attach the power wires from another USB cable to it so I can borrow power from a USB wall charger or host computer. I do not have time to continue this now -- TTYL...

Last edited by geekmaster; 08-13-2012 at 10:19 AM.
geekmaster is offline   Reply With Quote