Hi, I've been playing about with this for the last few days. Unfortunately it doesn't work correctly, and I'm running out of ideas to try. Therefore I'm posting my progress so far here in case anyone can shed some light.... Note that this patch is against the HTC Hero kernel source, but I imagine it would work for the G1 which is MSM7201A based as well.
First of all, I don't have the docs for the MSM7201A. However, from looking at the gadget support code, its obviously using the same EHCI USB core as various freescale CPUs. There are docs available for these, such as the MPC5121. The reference manual for that is available here:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC5121e&nodeId=0162468rH3DgbNGrmC22FA&fpsp=1&tab=Documentation_Tab
Note that the MSM7201a appears to have a slightly newer core; the REVISION field in the MODULE ID register is newer. I've not yet looked for docs on a newer CPU with this newer core revision, but that will be my next step.
The USB transceiver is an SMSC USB3316. Unfortunately, again, I do not have docs for this. However, register level docs on the USB3320 series (which seems very closely related) are available from here:
http://www.smsc.com/index.php?tid=143&pid=211&cid=&tab=4
Additionally, you'll need a specially hacked USB cable which deals with the fact you're using a USB B connector as a usb host, and also supplies power to downstream USB devices (I doubt the hero can /output/ power on the VBUS line. Even if it can, I've no idea how to switch it to do so) . I happened to have one of these made up form my old Nokia N770 so I just repurposed that. There's information about this sort of thing at the openmoko project:
http://wiki.openmoko.org/wiki/Specialized_USB_cables
The attached patch adds the necessary glue to get the EHCI host
controller running. I've not bothered to implement any gadget/function
coexistence code yet, so you'd need to disable those to try it out.
So: the EHCI host controller starts up happily, and can even see devices being plugged in. The problem is it doesn't seem to be able to communicate with the usb devices. I get lots of -EPROTO (-71) errors (as in the attached connect-error.txt file). I've tried everything I can think of, but am hampered by (a) lacking specific documentation and (b) not knowing how the hero/USB port is wired. It's even possible that the hero is missing some vital piece of hardware to support host mode :(
The USB3316 appears to be able to swap the D+/D- lines about by changing a register setting. I've tried this in case I had them the wrong way round; it changed the errors, but didn't really help. Also, note that the openmoko site talks about missing 15k resistors causing exactly this sort of error. However, the USB3316 has these built in, and they're software controllable.