[Optimus One, P500 Android Development] haoto:
More updates. I'm using the LG kernel source LGP500(Thunder)_Android_Froyo_v10r.zip which is based on linux 2.6.32.9, with stock 2.2.2 system. Attached are the boot image, kernel zImage, and kernel config I used. You should be able to at least see some dmesg output this time. Sorry if it's not easy for you to flash it; I'm completely new to android phones and will learn the proper ways when I get the time. For now it looks like everyone wishing to take this further needs to hack and compile the kernel source anyway :) Also, I didn't compile the USB device code (Android gadget) in because it seems to crash my phone when combined with USB host driver. Maybe the LG driver engineers didn't expect us to use it this way yet.

A Micro-AB plug (our a hacked Micro-B one like yours by soldering ID and GND) is required to produce any response when a USB device is connected. According to OTG spec you should also connect a 36.5 kΩ resistor between ID and GND when using a charger. I didn't test this, but I don't think it's a problem for now.

However, there are some complications I cannot figure out.

First, the hardware doesn't produce an ID-changed IRQ (OTGSC_IDIS) when the Micro-AB plug is plugged-in, nor does OTGSC_ID ever becomes "A". I simply hacked the is_host() macro in drivers/usb/otg/msm72k_otg.c to always return true so that the driver believes it is a host. But for some unknown reason, you still need to use a Micro-AB plug.

I did manage to get the phone run in USB host mode, using a Y-cable to power the devices. But I can't get it to recognize any device. Below is a sample dmesg output when a USB keyboard is connected:

<7>[ 153.284488] usb usb1: usb resume
<7>[ 153.284513] msm_hsusb_host msm_hsusb_host.0: resume root hub
<7>[ 153.321383] hub 1-0:1.0: hub_resume
<7>[ 153.321453] msm_hsusb_host msm_hsusb_host.0: GetStatus port 1 status 84001403 POWER sig=k CSC CONNECT
<7>[ 153.321486] hub 1-0:1.0: port 1: status 0301 change 0001
<7>[ 153.431414] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
<7>[ 153.431471] hub 1-0:1.0: port 1, status 0301, change 0000, 1.5 Mb/s
<6>[ 153.551378] usb 1-1: new low speed USB device using msm_hsusb_host and address 2
<7>[ 153.553388] msm_hsusb_host msm_hsusb_host.0: detected XactErr len 0/8 retry 1
<7>[ 153.554364] msm_hsusb_host msm_hsusb_host.0: detected XactErr len 0/8 retry 2
...
<7>[ 155.943383] msm_hsusb_host msm_hsusb_host.0: detected XactErr len 0/8 retry 31
<7>[ 155.944376] msm_hsusb_host msm_hsusb_host.0: devpath 1 ep0out 3strikes
<7>[ 155.944399] usb usb1: clear tt buffer port 1, a0 ep0 t00080248
<3>[ 156.151369] usb 1-1: device not accepting address 5, error -71
<3>[ 156.151451] hub 1-0:1.0: unable to enumerate USB device on port 1
<7>[ 156.151478] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 000

Notably, connecting a high-speed device such as a USB stick produces a different, and shorter message:

<7>[ 4333.870061] usb usb1: usb resume
<7>[ 4333.870088] msm_hsusb_host msm_hsusb_host.0: resume root hub
<7>[ 4333.901361] hub 1-0:1.0: hub_resume
<7>[ 4333.901438] msm_hsusb_host msm_hsusb_host.0: GetStatus port 1 status 8c001002 POWER sig=se0 CSC
<7>[ 4334.011429] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000

So, it seems that the hardware has difficulty recognizing USB "j states". I'm not really sure about this because I didn't do these experiments very carefully, and I do remember seeing "sig=j" once, but can never reproduce it anymore. (Hint: I guess it might be related to control of the pull-up resistor on the phone side. It's also possible that my cable is bad and it'll just work for you, fat chance :p)

As a side note, I also tried reversing the D+ and D- pins on one of the devices I tested as per:http://android.modaco.com/content-page/334222/an-experimental-cm7-kernel/page/200/#entry1667619 But (apparently) it doesn't help except making the device useless.

Hope someone can pick this up from here as I'm out of spare time at least for some weeks :)