[g1-hackers] USB Host mode on G1
Jay Freeman (saurik)
saurik at saurik.com
Thu Jan 1 20:14:32 UTC 2009
As Mike said, this line of thought (just trying to activate things) won't help. This feature is something the underlying USB driver needs to support, and the one for the Qualcomm MSM chipset (what I believe is an accurate description of where the USB functionality is) that is in Android does not support this.
The driver can be found in the kernel under:
./include/asm-arm/arch-msm/msm_hsusb.h
./drivers/usb/function/msm_hsusb.c
./drivers/usb/function/msm_hsusb_hw.h
This is certainly not enough information to actually implement host mode, but the _hw.h file does have a bit breakdown for at least most of the registers.
The most specific register in question, the one that chooses what mode it is in, is this one:
46 #define USB_USBMODE (MSM_USB_BASE + 0x01A8)
59 #define USBMODE_DEVICE 2
60 #define USBMODE_HOST 3
The code that actually selects device mode (which doesn't bother using the flags... grr) is here:
1047 /* select DEVICE mode */
1048 writel(0x12, USB_USBMODE);
1049 msleep(1);
I am not even certain, though, what the 0x10 part is, much less what other changes would have to be done to the driver (which may be many) to actually activate host mode correctly. Someone much more familiar with USB devices, however, may recognize standard names or standard organizations on this chip and be able to figure it out, though (I know next to nothing about USB).
Sincerely,
Jay Freeman (saurik)
http://www.saurik.com/
----- Original Message -----
From: Frank Murray
To: Hacking the Android T-Mobile G1
Sent: Thursday, January 01, 2009 4:12 AM
Subject: Re: [g1-hackers] USB Host mode on G1
Is there any information available on the chipset used and it's register set? I've built in support for a number of host mode drivers but it's a guessing game whether the hardware is based on Uhci/ohci/ehci or a custom solution. Host mode on the Neo can be activated by writing to the OHCI part of /sys so I was hoping that the G1 had a similar facility.
On Dec 31, 2008 6:25 PM, "Mike Lockwood" <lockwood at android.com> wrote:
Short answer: No
Long answer: The chipset supports OTG so it is theoretically
possible, but I'm not sure if the G1 hardware would need to be
modified. Also, we have no OTG support in the USB driver, and none of
the higher level code in android supports host side USB.
Mike
On Wed, Dec 31, 2008 at 1:03 PM, Mike Down <nikropht at gmail.com> wrote: > Has anyone been able to ge...
--
Mike Lockwood
Google android team
_______________________________________________ G1-Hackers mailing list G1-Hackers at telesphoreo.org ...
------------------------------------------------------------------------------
_______________________________________________
G1-Hackers mailing list
G1-Hackers at telesphoreo.org
http://www.telesphoreo.org/cgi-bin/mailman/listinfo/g1-hackers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.telesphoreo.org/pipermail/g1-hackers/attachments/20090101/222cbeb0/attachment.htm
More information about the G1-Hackers
mailing list