[Optimus One, P500 Android Development] harshaxdadevelopers:
almost there

Hello nikoperugia,

I have compiled a USB host enabled kernel for Optimus One based

on mik_os's CM7.

It's based on kernel source tree at https://github.com/mik9/ThunderG-Kernel and patched according to Sven's ZTE blade files http://sven.killig.de/android/Blade/usb_host/.

And guess what, it seems to be working though not completely.

I had a tough time trying to build the Y cable as it never provided

enough power to the devices.

This kernel has usb host side functionality( not as a module)

so we don't need to do

insmod usbcore.ko

after bootup when I enter

insmod ehci-hcd.ko

this is my dmesg:

<6>[ 1001.768471] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<7>[ 1001.768501] ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96
<7>[ 1001.768532] #ifdef PLATFORM_DRIVER
<7>[ 1001.768676] usb_hcd_msm7201_probe()
<7>[ 1001.768686] initializing MSM7201/QSD8X50/MSM7227 USB Controller
<6>[ 1001.788356] msm_hsusb_host msm_hsusb_host.0: Qualcomm MSM7201/QSD8X50/MSM7227 On-Chip EHCI Host Controller
<6>[ 1001.788437] msm_hsusb_host msm_hsusb_host.0: new USB bus registered, assigned bus number 1
<7>[ 1001.788486] msm_hsusb_host msm_hsusb_host.0: reset command 60080002 (park)=0 ithresh=8 period=1024 Reset HALT
<7>[ 1001.788762] msm_hsusb_host msm_hsusb_host.0: park 0
<7>[ 1001.788786] msm_hsusb_host msm_hsusb_host.0: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT
<6>[ 1001.789276] msm_hsusb_host msm_hsusb_host.0: irq 47, io mem 0xa0800000
<7>[ 1001.808379] usb usb1: default language 0x0409
<7>[ 1001.808426] usb usb1: udev 1, busnum 1, minor = 0
<6>[ 1001.808442] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
<6>[ 1001.808461] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
<6>[ 1001.808481] usb usb1: Product: Qualcomm MSM7201/QSD8X50/MSM7227 On-Chip EHCI Host Controller
<6>[ 1001.808499] usb usb1: Manufacturer: Linux 2.6.32.9 ehci_hcd
<6>[ 1001.808514] usb usb1: SerialNumber: msm_hsusb_host.0
<7>[ 1001.808954] usb usb1: uevent
<7>[ 1001.810396] usb usb1: usb_probe_device
<6>[ 1001.810426] usb usb1: configuration #1 chosen from 1 choice
<7>[ 1001.810482] usb usb1: adding 1-0:1.0 (config #1, interface 0)
<7>[ 1001.810616] usb 1-0:1.0: uevent
<7>[ 1001.812037] hub 1-0:1.0: usb_probe_interface
<7>[ 1001.812059] hub 1-0:1.0: usb_probe_interface - got id
<6>[ 1001.812076] hub 1-0:1.0: USB hub found
<6>[ 1001.812161] hub 1-0:1.0: 1 port detected
<7>[ 1001.812176] hub 1-0:1.0: standalone hub
<7>[ 1001.812187] hub 1-0:1.0: individual port power switching
<7>[ 1001.812202] hub 1-0:1.0: individual port over-current protection
<7>[ 1001.812221] hub 1-0:1.0: power on to power good time: 20ms
<7>[ 1001.812247] hub 1-0:1.0: local power source is good
<7>[ 1001.812264] hub 1-0:1.0: enabling power on all ports
<7>[ 1001.908397] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
<7>[ 1004.008374] hub 1-0:1.0: hub_suspend
<7>[ 1004.008424] usb usb1: bus auto-suspend
<7>[ 1004.008439] msm_hsusb_host msm_hsusb_host.0: suspend root hub

the root hub is suspended because there are no devices connected on the other side. But when I connect a powered USB hub the dmesg says like:

New device found
[ 111.752229] usb 0-1: device descriptor read/64, error -71
[ 112.375194] usb 0-1: device not accepting address 5, error -108

Any idea what the problem is? I have a feeling it's with the modified ehci driver code :confused:

p.s: i'll upload the patched kernel source along with the config for Optimus One in my next post. It's taking time :P