[patch] Working MSM7201 usb host driver v2

1,445 views
Skip to first unread message

Andrew de Quincey

unread,
Feb 9, 2010, 3:16:40 PM2/9/10
to android...@googlegroups.com
Hi, here's my now working patch - I've still a bit of work to do on it obviously, but it should suffice as a proof of concept

ehci-msm7201-v2.patch

Jun Sun

unread,
Feb 9, 2010, 5:14:30 PM2/9/10
to android...@googlegroups.com
On 2/9/2010 12:16 PM, Andrew de Quincey wrote:
> Hi, here's my now working patch - I've still a bit of work to do on it
> obviously, but it should suffice as a proof of concept
>
> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel

Nice work.

What is the kernel base here? Also, MSM7201 is the same chip used in G1
phone, right?

Cheers.

Jun

Andrew de Quincey

unread,
Feb 9, 2010, 5:26:07 PM2/9/10
to android...@googlegroups.com

Its against the HTC hero source from their website; I wasn't sure if the vanilla android MSM code would work on the hero, but I doubt it would take long to port. I can send a patch against git head for the MSM port if that'd be helpful?

Yes, the G1 is MSM7201/USB3316 based as well so this will *probably* work on that too, but I only have access to two Heros here.

I've also just had a quick look at the Nexus One source; I think it may use the same USB host core even though its a different Qualcomm SoC.

Jun Sun

unread,
Feb 10, 2010, 1:09:08 PM2/10/10
to android...@googlegroups.com
On 2/9/2010 2:26 PM, Andrew de Quincey wrote:
>
>
> On 9 February 2010 22:14, Jun Sun <monke...@gmail.com
> <mailto:monke...@gmail.com>> wrote:
>
> On 2/9/2010 12:16 PM, Andrew de Quincey wrote:
>
> Hi, here's my now working patch - I've still a bit of work to do
> on it
> obviously, but it should suffice as a proof of concept
>
> --
> unsubscribe: android-kerne...@googlegroups.com
> <mailto:android-kernel%2Bunsu...@googlegroups.com>

> website: http://groups.google.com/group/android-kernel
>
>
> Nice work.
>
> What is the kernel base here? Also, MSM7201 is the same chip used in
> G1 phone, right?
>
>
> Its against the HTC hero source from their website; I wasn't sure if the
> vanilla android MSM code would work on the hero, but I doubt it would
> take long to port. I can send a patch against git head for the MSM port
> if that'd be helpful?

I think that will be helpful to let people try on G1 phones (although
currently I am running older kernel for G1 ;0)

Cheers.

Jun

Andrew de Quincey

unread,
Feb 10, 2010, 1:15:25 PM2/10/10
to android...@googlegroups.com
Cool, I shall get on it then! Would 2.6.27 be the branch to go for would you reckon?

Do you know if there's another list with more G1 users on it for testing perhaps? This one seems sort of dead.

Andrew de Quincey

unread,
Feb 10, 2010, 2:27:04 PM2/10/10
to android...@googlegroups.com
Here you go - this is a patch against the android-msm-2.6.27 branch.

I don't have a config.gz from the G1, so I don't know what specific options it uses so there may be compilation failures resulting from disabling the USB_FUNCTION stuff. If you could send me a copy of your config.gz, I can sort this out.

ehci-msm7201-android-msm-2.6.27-v2.patch

Andrew de Quincey

unread,
Feb 10, 2010, 2:41:20 PM2/10/10
to android...@googlegroups.com
Hi, sorry, my git skills failed me last time - resending :)

ehci-msm7201-android-msm-2.6.27-v3.patch

Jun Sun

unread,
Feb 10, 2010, 8:50:31 PM2/10/10
to android...@googlegroups.com
On 2/10/2010 11:41 AM, Andrew de Quincey wrote:
> Hi, sorry, my git skills failed me last time - resending :)
>

Just did a quick sanity check on my current G1 kernel. It looks very
promising. I will give it more serious try later. See below.

jsun@tata kernel]$ patch -p1 --dry-run <
../ehci-msm7201-android-msm-2.6.27-v3.patch
patching file arch/arm/mach-msm/htc_battery.c
Hunk #1 FAILED at 182.
Hunk #2 FAILED at 364.
Hunk #3 FAILED at 793.
3 out of 3 hunks FAILED -- saving rejects to file
arch/arm/mach-msm/htc_battery.c.rej
patching file drivers/usb/Kconfig
patching file drivers/usb/function/Kconfig
Hunk #1 FAILED at 14.
1 out of 1 hunk FAILED -- saving rejects to file
drivers/usb/function/Kconfig.rej
patching file drivers/usb/host/Kconfig
Hunk #1 succeeded at 75 (offset -13 lines).
patching file drivers/usb/host/ehci-hcd.c
Hunk #1 succeeded at 1043 (offset 3 lines).
patching file drivers/usb/host/ehci-msm7201.c
patching file drivers/usb/host/ehci-msm7201.h

See also my .config attached. This is an old G1 kernel, 2.6.25. We
hacked it so that we can have ECM(subset) feature in USB gadget. In
doing that we actually disabled USB_FUNCTION as well and reverted to
USB_GADGET.

Cheers.

Jun

.config

Andrew de Quincey

unread,
Feb 10, 2010, 9:32:20 PM2/10/10
to android...@googlegroups.com
Hi, thanks for the .config, that helped getting my dev system setup a lot. Anyway, attached is a backport against the android-msm-htc-2.6.25 branch; I can't guarantee it'll work properly as the kernel EHCI stack has definitely changed a bit since .25. It compiles though, what more testing do we need? :)

I'm only going to support the standard linux USB host + gadget frameworks: that's what all the linux USB OTG support is based on, and I can't be bothered porting all that to the android specific USB_FUNCTION stuff. If someone else does though, I've no objections!

I'm going to start reading up on OTG drivers to take this beyond the prototype stage.

ehci-msm7201-android-msm-htc-2.6.25-v3.patch

Jun Sun

unread,
Feb 12, 2010, 1:11:47 PM2/12/10
to android...@googlegroups.com

Thanks, Andrew. This patch applies perfectly.

I build a new kernel with usb host config. See the attachment.

The kernel boots up fine, with driver starting seemingly fine. However,
plugging in a USB disk does not cause any kernel messages. I did take a
look of interrupt, there is no usb interrupts at all. See below.

Any ideas?

One thing I think could be the issue is that the USB connector might be
wrong for the host side.


Cheers.

Jun

----------------

[ 0.558361] smd_init()
[ 0.558392] smd_core_init()
[ 0.558605] smd_alloc_channel() 'SMD_RPCCALL' cid=2, shared=e010d9a0
[ 0.558911] smd_alloc_channel() 'SMD_DATA5' cid=11, shared=e0119a18
[ 0.559124] smd_alloc_channel() 'SMD_DATA6' cid=12, shared=e011da40
[ 0.559368] smd_alloc_channel() 'SMD_DATA7' cid=13, shared=e0121a68
[ 0.559582] smd_alloc_channel() 'SMD_DATA11' cid=17, shared=e01119c8
[ 0.559796] smd_alloc_channel() 'SMD_CS_A2M' cid=33, shared=e01159f0
[ 0.560091] smd_alloc_channel() 'SMD_DATA5_CNTL' cid=38, shared=e0125a90
[ 0.560366] smd_alloc_channel() 'SMD_DATA6_CNTL' cid=39, shared=e0129ab8
[ 0.560640] smd_alloc_channel() 'SMD_DATA7_CNTL' cid=40, shared=e012dae0
[ 0.560915] smd_core_init() done
[ 0.563326] SMD: ch 2 OPENING -> OPENED
[ 0.564791] hw3d: 0 init
[ 0.565249] msm_perf_init():
[ 0.566835] H2W: Registering H2W (headset) driver
[ 0.569033] input: h2w headset as /class/input/input0
[ 0.582471] RPC_TIME_TOD_SET_APPS_BASES:
[ 0.582471] tick = 339413
[ 0.582502] stamp = 855640006
[ 0.584302] ashmem: initialized
[ 0.585920] yaffs Jan 20 2010 21:15:37 Installing.
[ 0.586073] io scheduler noop registered
[ 0.586103] io scheduler anticipatory registered (default)
[ 0.586896] logger: created 64K log 'log_main'
[ 0.587080] logger: created 256K log 'log_events'
[ 0.587263] logger: created 64K log 'log_radio'
[ 0.587415] ram_console: got buffer at 16d00000, size 20000
[ 0.587904] ram_console: uncorrectable error in header
[ 0.587995] ram_console: no valid data in buffer (sig = 0xc7effffe)
[ 0.588026] console [ram-1] enabled
[ 0.591678] pmem: 1 init
[ 0.601129] pmem_adsp: 0 init
[ 0.602166] pmem_gpu0: 0 init
[ 0.603509] pmem_gpu1: 0 init
[ 0.605157] pmem_camera: 0 init
[ 0.606805] mddi_pmdh: init() base=0xe000b000 irq=16
[ 0.625493] get_smem_clock: state 10429 clock 0
[ 0.650244] mddi cmd send rtd: int 3a000, stat 8063, rtd val d
[ 0.670762] mddi_pmdh: publish: mddi_c_d263_0000
[ 0.672929] vsync on gpio 97 now 0
[ 0.673265] mddi_pmdh: mddi_add_panel(c039bda0, c02f44ac)
[ 0.673540] mddi_pmdh: publish: mddi_panel
[ 0.674272] msmfb_probe() installing 320 x 480 panel
[ 0.696286] smd_alloc_channel() 'SMD_GPSNMEA' cid=27, shared=e0131b10
[ 0.710976] msm_serial: detected port #0
[ 0.711464] msm_serial.0: ttyMSM0 at MMIO 0xa9a00000 (irq = 9) is a MSM
[ 0.712746] msm_serial: driver initialized
[ 0.714913] loop: module loaded
[ 0.715279] PPP generic driver version 2.4.2
[ 0.716042] PPP Deflate Compression module registered
[ 0.716347] PPP BSD Compression module registered
[ 0.726500] allocated dma buffer at ffc01000, dma_addr 16166000
[ 0.726958] read CFG0 = aad400c0, CFG1 = 4745c
[ 0.727507] CFG0 = e8d408c0, CFG1 = 4745c
[ 0.727812] CFG0: cw/page=3 ud_sz=516 ecc_sz=10 spare_sz=1
num_addr_cycles=5
[ 0.728575] NAND_READ_ID = 1500aaec
[ 0.729124] status: c03120
[ 0.729429] nandid: 1500aaec maker ec device aa
[ 0.729735] CFG0: cw/page=3 ud_sz=512 ecc_sz=10 spare_sz=5
[ 0.730396] DEV_CMD1: f00f3000
[ 0.730885] NAND_EBI2_ECC_BUF_CFG: 1ff
[ 0.731434] flash_id: 1500aaec size 10000000
[ 0.731739] Creating 6 MTD partitions on "msm_nand":
[ 0.732044] 0x024c0000-0x02500000 : "misc"
[ 0.733448] 0x026c0000-0x02bc0000 : "recovery"
[ 0.734547] 0x02bc0000-0x02e40000 : "boot"
[ 0.735615] 0x02e40000-0x071c0000 : "system"
[ 0.736927] 0x071c0000-0x0b540000 : "cache"
[ 0.738087] 0x0b540000-0x10000000 : "userdata"
[ 0.750091] msm_hsusb msm_hsusb: Qualcomm MSM7201 On-Chip EHCI Host
Controller
[ 0.751068] msm_hsusb msm_hsusb: new USB bus registered, assigned bus
number 1
[ 0.780213] msm_hsusb msm_hsusb: irq 47, io mem 0xa0800000
[ 0.790091] msm_hsusb msm_hsusb: USB 2.0 started, EHCI 1.00, driver
10 Dec 2004
[ 0.792044] usb usb1: configuration #1 chosen from 1 choice
[ 0.792929] hub 1-0:1.0: USB hub found
[ 0.793387] hub 1-0:1.0: 1 port detected
[ 0.800915] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.801495] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[ 0.801800] usb usb1: Product: Qualcomm MSM7201 On-Chip EHCI Host
Controller
[ 0.802349] usb usb1: Manufacturer: Linux 2.6.25-01843-gfea26b0 ehci_hcd
[ 0.802899] usb usb1: SerialNumber: msm_hsusb
[ 0.803540] Initializing USB Mass Storage driver...
[ 0.804058] usbcore: registered new interface driver usb-storage
[ 0.804608] USB Mass Storage support registered.
[ 0.810427] mice: PS/2 mouse device common for all mice
[ 0.847659] smd_alloc_channel() 'SMD_DS' cid=0, shared=e0135b38
[ 0.848575] smd_alloc_channel() 'SMD_DATA1' cid=7, shared=e0139b60
[ 0.849613] smd_alloc_channel() 'SMD_DATA2' cid=8, shared=e013db88
[ 0.850396] smd_alloc_channel() 'SMD_DATA3' cid=9, shared=e0141bb0
[ 0.851251] smd_alloc_channel() 'SMD_DATA4' cid=10, shared=e0145bd8
[ 0.870579] msm_i2c msm_i2c.0: Error during data xfer (-5)
[ 0.881403] synaptics_ts_probe: Product Major Version 1
[ 0.883173] synaptics_ts_probe: Product Minor Version c
[ 0.884669] synaptics_ts_probe: product property 2
[ 0.886164] synaptics_ts_probe: device control 81
[ 0.887904] synaptics_ts_probe: interrupt enable 3
[ 0.890000] synaptics_ts_probe: 0xe0: 1 1 1 2 1 c 0 0
[ 0.890000] synaptics_ts_probe: max_x 3480, max_y 5368
[ 0.890000] synaptics_ts_probe: inactive_x -80 -80, inactive_y -32 -32
[ 0.890000] synaptics_ts_probe: snap_x 240-248 240-248, snap_y 80-88
80-88
[ 0.890488] input: synaptics-rmi-touchscreen as /class/input/input1
[ 0.950763] synaptics_ts_probe: Start touchscreen
synaptics-rmi-touchscreen in interrupt mode
[ 0.951556] GPIO Event Driver
[ 0.952349] GPIO Keypad Driver: Start keypad matrix for
trout-keypad-v3 in interrupt mode
[ 0.953051] No IRQF_TRIGGER set_type function for IRQ 191 (troutgpio)
[ 0.953387] No IRQF_TRIGGER set_type function for IRQ 192 (troutgpio)
[ 0.953997] GPIO Input Driver: Start gpio inputs for trout-keypad-v3
in interrupt mode
[ 0.954333] No IRQF_TRIGGER set_type function for IRQ 188 (troutgpio)
[ 0.954913] GPIO Input Driver: Start gpio inputs for trout-keypad-v3
in interrupt mode
[ 0.955951] input: trout-keypad-v3 as /class/input/input2
[ 1.010885] No IRQF_TRIGGER set_type function for IRQ 186 (troutgpio)
[ 1.011495] GPIO Input Driver: Start gpio inputs for trout-nav in
interrupt mode
[ 1.012319] input: trout-nav as /class/input/input3
[ 1.071495] rs30000048:0da5b528 rs30000048:0da5b528: rtc core:
registered msm_rtc as rtc0
[ 1.075554] Registered led device: blue
[ 1.076134] Registered led device: green
[ 1.076591] Registered led device: red
[ 1.077263] AKM8976A compass driver: init
[ 1.077660] No IRQF_TRIGGER set_type function for IRQ 187 (troutgpio)
[ 1.078819] input: compass as /class/input/input4
[ 1.101068] pdev->dev.platform_data is not NULL
[ 1.101495] mt9t013: probe
[ 1.102044] mt9t013: init
[ 1.102319] mt9t013: mt9t013_register_init
[ 1.102624] mt9t013: camera sensor_reset set as 1
[ 1.105188] mt9t013: clk_get(vfe_mdc_clk): c02e4cc8
[ 1.105523] mt9t013: clk_get(mdc_clk): c02e4948
[ 1.105859] mt9t013: clk select 1
[ 1.106378] mt9t013: clk_get(vfe_clk): c02e4ca8
[ 1.106744] mt9t013: enable vfe_clk
[ 1.130061] mt9t013: clk select 0
[ 1.139124] mt9t013: camera sensor init sequence done
[ 1.139430] mt9t013: camera sensor suspend sequence
[ 1.140091] mt9t013: disabling vfe_clk
[ 1.140427] mt9t013: clk_put(vfe_clk): c02e4ca8
[ 1.140976] mt9t013: camera sensor suspend sequence done
[ 1.142044] Bluetooth: HCI UART driver ver 2.2
[ 1.142380] Bluetooth: HCI H4 protocol initialized
[ 1.142899] Bluetooth: HCILL protocol initialized
[ 1.144150] mmc0: Qualcomm MSM SDCC at 0x00000000e1000000 irq 24,0 dma -1
[ 1.144730] mmc0: 4 bit data mode enabled
[ 1.145004] mmc0: MMC clock 144000 -> 20000000 Hz, PCLK 64000000 Hz
[ 1.145554] mmc0: Slot eject status = 1
[ 1.145828] mmc0: Power save feature enable = 0
[ 1.146134] mmc0: PIO transfer enabled
[ 1.147629] mmc1: Qualcomm MSM SDCC at 0x00000000e1001000 irq 26,194
dma 8
[ 1.147965] mmc1: 4 bit data mode enabled
[ 1.148514] mmc1: MMC clock 144000 -> 20000000 Hz, PCLK 64000000 Hz
[ 1.148789] mmc1: Slot eject status = 0
[ 1.149094] mmc1: Power save feature enable = 0
[ 1.149613] mmc1: DM non-cached buffer at ffc06000, dma_addr 0x16189000
[ 1.149918] mmc1: DM cmd busaddr 370708480, cmdptr busaddr 370709248
[ 1.150732] Registered led device: spotlight
[ 1.151281] Registered led device: keyboard-backlight
[ 1.152044] Registered led device: button-backlight
[ 1.152838] No IRQF_TRIGGER set_type function for IRQ 190 (troutgpio)
[ 1.154028] usbcore: registered new interface driver usbhid
[ 1.154364] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[ 1.155432] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[ 1.163875] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.164638] TCP cubic registered
[ 1.165066] NET: Registered protocol family 1
[ 1.165523] NET: Registered protocol family 17
[ 1.166134] Bluetooth: L2CAP ver 2.9
[ 1.166439] Bluetooth: L2CAP socket layer initialized
[ 1.166958] Bluetooth: SCO (Voice Link) ver 0.6
[ 1.167263] Bluetooth: SCO socket layer initialized
[ 1.167934] Bluetooth: RFCOMM socket layer initialized
[ 1.168575] Bluetooth: RFCOMM TTY layer initialized
[ 1.168880] Bluetooth: RFCOMM ver 1.9
[ 1.169826] clock_late_init() disabled 18 unused clocks
[ 1.173204] rs30000048:0da5b528 rs30000048:0da5b528: setting system
clock to 2010-02-12 18:00:18 UTC (1265997618)
[ 1.173906] Freeing init memory: 104K
[ 1.174303] Warning: unable to open an initial console.
[ 1.361495] init: cannot open '/initlogo.rle'
[ 1.367415] yaffs: dev is 32505859 name is "mtdblock3"
[ 1.367995] yaffs: passed flags ""
[ 1.368300] yaffs: Attempting MTD mount on 31.3, "mtdblock3"
[ 1.400000] yaffs: restored from checkpoint
[ 1.400000] yaffs_read_super: isCheckpointed 1
[ 1.431373] yaffs: dev is 32505861 name is "mtdblock5"
[ 1.431922] yaffs: passed flags ""
[ 1.432228] yaffs: Attempting MTD mount on 31.5, "mtdblock5"
[ 1.456347] yaffs: restored from checkpoint
[ 1.456988] yaffs_read_super: isCheckpointed 1
[ 1.466073] yaffs: dev is 32505860 name is "mtdblock4"
[ 1.466653] yaffs: passed flags ""
[ 1.466958] yaffs: Attempting MTD mount on 31.4, "mtdblock4"
[ 1.471587] yaffs: restored from checkpoint
[ 1.472197] yaffs_read_super: isCheckpointed 1
[ 1.501007] init: service 'console' requires console
[ 2.218087] warning: `rild' uses 32-bit capabilities (legacy support
in use)
[ 2.268911] mmc_sd_init_card: Delay 250 ms
[ 2.628087] mmc1: host does not support reading read-only switch.
assuming write-enable.
[ 2.628545] mmc1: new SD card at address aaaa
[ 2.631587] mmcblk0: mmc1:aaaa SU01G 992000KiB
[ 2.632289] mmcblk0: p1
[ 2.638758] FAT: bogus number of reserved sectors
[ 2.639399] VFS: Can't find a valid FAT filesystem on dev mmcblk0.
[ 3.062906] SMD: ch 0 OPENING -> OPENED
[ 3.063913] qmi: smd closed
[ 3.064248] SMD: ch 38 OPENING -> OPENED
[ 3.064523] qmi: smd opened
[ 3.065286] qmi: smd closed
[ 3.065622] SMD: ch 39 OPENING -> OPENED
[ 3.065927] qmi: smd opened
[ 3.066812] qmi: smd closed
[ 3.067392] SMD: ch 40 OPENING -> OPENED
[ 3.067666] qmi: smd opened
[ 3.069650] qmi: ctl: wds use client_id 0x01
[ 3.070128] qmi: ctl: wds use client_id 0x01
[ 3.070434] qmi: ctl: wds use client_id 0x01
[ 5.166056] init: untracked pid 60 exited
[ 5.216087] init: untracked pid 62 exited
[ 12.651283] init sharp panel
[ 17.201516] android_power: wakeup (0->0) at 24781448974 (2010-02-12
18:00:41.738067627 UTC)
[ 17.845576] wlan: no version for "struct_module" found: kernel tainted.
[ 17.887621] TIWLAN: Driver loading
[ 17.888048] trout_wifi_power: 1
[ 18.100001] trout_wifi_reset: 0
[ 18.154020] trout_wifi_set_carddetect: 1
[ 18.154569] mmc0: card_present 1
[ 18.154874] mmc0: Slot status change detected (0 -> 1)
[ 18.170083] mmc0: card claims to support voltages below the defined
range. These will be ignored.
[ 18.170083] mmc0: SDIO card claims to support the incompletely
defined 'low voltage range'. This will be ignored.
[ 18.170083] mmc0: new SDIO card at address 0001
[ 18.170083] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 18.174966] TIWLAN: Driver initialized (rc 0)
[ 18.175576] TIWLAN: Driver loaded
[ 29.151946] audmgr_rpc_thread() start
[ 29.152892] audio_enable()
[ 29.161550] audmgr: rpc_reply status 0
[ 29.180329] audmgr: rpc READY handle=0x00000000
[ 29.244144] audmgr: rpc CODEC_CONFIG volume=0x00002000
[ 29.245120] audpp: enable
[ 29.245517] adsp: opening module AUDPPTASK
[ 29.248721] adsp: module AUDPPTASK has been registered
[ 29.249270] msm_adsp_enable() 'AUDPPTASK'
[ 29.251000] adsp: rpc event=0, proc_id=2, module=4, image=0
[ 29.251489] adsp: module AUDPPTASK: READY
[ 29.253350] audpp: ENABLE
[ 29.253655] audio_dsp_event: CFG_MSG ENABLE
[ 29.256982] adsp: waiting for DSP write ready
[ 29.356861] audpp: DMA missed
[ 29.856861] audpp: DMA missed
[ 30.552833] audpp: DMA missed
[ 30.908875] audpp: DMA missed
[ 31.776892] audpp: DMA missed
[ 32.520880] audpp: DMA missed
[ 34.920363] audio_disable()
[ 34.921980] audio_dsp_event: CFG_MSG DISABLE
[ 34.922255] audpp: disable
[ 34.923567] msm_adsp_disable() 'AUDPPTASK'
[ 34.924116] audpp: DISABLE
[ 34.925459] adsp: closing module AUDPPTASK
[ 34.925795] adsp: disable interrupt
[ 34.930454] audmgr: rpc_reply status 0
[ 34.959182] audmgr: DISABLED
[ 44.847297] NOHZ: local_softirq_pending 08
[ 44.853147] NOHZ: local_softirq_pending 08
[ 45.090095] NOHZ: local_softirq_pending 08
[ 56.490101] NOHZ: local_softirq_pending 08
[ 56.490101] NOHZ: local_softirq_pending 08
[ 56.490101] NOHZ: local_softirq_pending 08
[ 56.520101] NOHZ: local_softirq_pending 08
[ 58.440102] NOHZ: local_softirq_pending 08
[ 58.499867] NOHZ: local_softirq_pending 08
[ 60.980103] NOHZ: local_softirq_pending 08
/ # cat /proc/interrupts
CPU0
0: 353 msm smd_dev
1: 0 msm debug
5: 2068 msm smsm_dev
7: 9565 msm gp_timer
8: 0 msm dg_timer
16: 1852 msm mddi_pmdh
19: 1090 msm msm_mdp
20: 0 msm hw3d
21: 42550 msm msmdatamover
23: 69 msm adsp
24: 2185 msm msm-sdcc (cmd)
26: 74 msm msm-sdcc (cmd)
34: 5515 msm msm_i2c
47: 0 msm ehci_hcd:usb1
82: 1 msmgpio gpio_event_axis
83: 2 msmgpio gpio_event_axis
84: 0 msmgpio gpio_keys
93: 1202 msmgpio tiwlan0
100: 0 msmgpio gpio_kp
101: 0 msmgpio gpio_kp
102: 0 msmgpio gpio_kp
103: 8 msmgpio gpio_kp
104: 0 msmgpio gpio_kp
105: 0 msmgpio gpio_kp
106: 1 msmgpio gpio_kp
113: 0 msmgpio h2w_button
147: 0 msmgpio h2w_detect
154: 1 msmgpio gpio_event_axis
158: 1 msmgpio gpio_event_axis
161: 839 msmgpio vsync
186: 0 troutgpio gpio_keys
187: 0 troutgpio akm8976
188: 0 troutgpio gpio_keys
190: 0 troutgpio switch-gpio
191: 0 troutgpio gpio_keys
192: 0 troutgpio gpio_keys
193: 279 troutgpio synaptics-rmi-ts
194: 0 troutgpio msm-sdcc (slot)
Err: 0
/ #

config.usb-host

Andrew de Quincey

unread,
Feb 12, 2010, 1:32:55 PM2/12/10
to android...@googlegroups.com
Hi, thanks for trying that out, good to see the EHCI hardware initialised ok, even if its not quite working yet.

Are you supplying power to the USB disk on its /USB/ interface? Even if its got an external PSU, it might need power on the USB line as well in order to function properly.

When I plug a device in, I don't see anything at all until I've switched my external usb-powering battery on.

If the two USB data lines are the wrong way round, you'll see the device being plugged in, but it'll fail to communicate with it. As I've said, we can fix this in software :)

I seriously doubt I have to tell you this, but just in case: make absolutely certain the USB  GND and USB power lines aren't mixed up!

If that's not it, I can send a patch with loads of debugging turned on.

Chris Stratton

unread,
Feb 15, 2010, 1:58:47 AM2/15/10
to Android Linux Kernel Development
On Feb 9, 3:16 pm, Andrew de Quincey <a...@lidskialf.net> wrote:
> Hi, here's my now working patch - I've still a bit of work to do on it
>
>  ehci-msm7201-v2.patch

I have just gotten this working on a tmo mytouch sapphire 32B with a
cyanogen 2.6.29 kernel patched with a modification of Andrew's code.

This verifies that the hardware is host capable, with a y cable for
power dmesg shows the names of peripherals plugged in.

There was some sort of bug with one of the private data structures
getting wiped out; I did a very ugly temporary fix to get past that.

Many thanks to Andrew for the pioneering work and off list support.

Chris

Angel

unread,
Feb 15, 2010, 6:13:53 AM2/15/10
to Android Linux Kernel Development
Im trying to get the usb host driver as well for the G2/htc sapphire/
htc magic.
Any hint?

Olivier Perron

unread,
Feb 15, 2010, 8:56:13 AM2/15/10
to Android Linux Kernel Development
Hi,

The patch applies cleanly but.... there must be something wicked at
some point: once I enable "USB Host" I simply can't find any "EHCI/
MSM720" HCD option...
Is there any other option I do need to set or unset somewhere else to
get that EHCI/MSM720 option to appear ?

Cheers
Olivier

On 9 fév, 21:16, Andrew de Quincey <a...@lidskialf.net> wrote:
> Hi, here's my now working patch - I've still a bit of work to do on it
> obviously, but it should suffice as a proof of concept
>

>  ehci-msm7201-v2.patch
> 21KAfficherTélécharger

Chris Stratton

unread,
Feb 14, 2010, 4:19:22 AM2/14/10
to Android Linux Kernel Development
Andrew,

I've tried patching the cyanogen 2.6.29.6-cm42 kernel with your usb
host code for basically the same finds root hub and nothing else
result on a magic32b that Jun Sun posted from a g1.

Im using a usb hard drive's Y cable and a usb A to mini adapter; I
think this should be good as the phone will charge off either the real
mini or the adapted one. But nothing in dmesg either booting with
devices connected or connecting them later.

I think I need to learn about how the enumeration process is supposed
to trigger in an ordinary host only system.

Maybe one of us can figure out how to try a kernel closer to yours,
also should look for g1/magic vs. hero differences in source.

Chris

Chris Stratton

unread,
Feb 15, 2010, 12:03:28 PM2/15/10
to Android Linux Kernel Development
On Feb 15, 8:56 am, Olivier Perron <olivier.perro...@gmail.com> wrote:

> The patch applies cleanly but.... there must be something wicked at
> some point: once I enable "USB Host" I simply can't find any "EHCI/
> MSM720" HCD option...

You need to disable usb gadget or usb function,
then enable EHCI HCD (USB 2.0) support
then Support for Qualcomm MSM7201 on-chip EHCI USB

However there is a bug in the patch, having to do with pointer
arithmetic for the private data structure, which causes some function
pointers to be wiped in some builds, and as a result no USB devices
are ever seen.

Here's a potential fix - compiled but not yet tested (a cruder
workaround was tested last night to verify the mytouch HW)

In drivers/usb/host/ehci-msm7201.h

change to

static inline struct msm7201_usb_priv *hcd_to_msm7201(struct usb_hcd
*hcd)
{
return (struct msm7201_usb_priv *) (((char *)(hcd->hcd_priv)) +
sizeof(struct ehci_hcd));
}

Olivier Perron

unread,
Feb 15, 2010, 12:17:30 PM2/15/10
to android...@googlegroups.com
On Mon, Feb 15, 2010 at 6:03 PM, Chris Stratton <cs0...@gmail.com> wrote:
> On Feb 15, 8:56 am, Olivier Perron <olivier.perro...@gmail.com> wrote:
>
>> The patch applies cleanly but.... there must be something wicked at
>> some point: once I enable "USB Host" I simply can't find any "EHCI/
>> MSM720" HCD option...
>
> You need to disable usb gadget or usb function,

OK, I've disabled those 2 ones.


> then enable EHCI HCD (USB 2.0) support

I definitively can't see that one. Where is it supposed to be ?

> then  Support for Qualcomm MSM7201 on-chip EHCI USB
>

Same for that one: it simply doesn't appear in menuconfig.


> However there is a bug in the patch, having to do with pointer

[...]
Thanks for the patch, I'll test it once I have sorted those
configuration issues out !

Andrew de Quincey

unread,
Feb 15, 2010, 12:25:16 PM2/15/10
to android...@googlegroups.com
> > then enable EHCI HCD (USB 2.0) support
>
> I definitively can't see that one. Where is it supposed to be ?

The kconfig config option for the MSM architecture has changed name in
some kernels (certainly the vanilla g1 source differs from the hero
source)... which kernel base are you compiling against?

Olivier Perron

unread,
Feb 15, 2010, 1:05:11 PM2/15/10
to android...@googlegroups.com
On Mon, Feb 15, 2010 at 6:25 PM, Andrew de Quincey <a...@lidskialf.net> wrote:
>. which kernel base are you compiling against?

I've tried with the stock HTC Hero kernel source code and starting
from their given .config

Maybe I'm not using the right set of patches ? I did apply the v2 patch file.

Andrew de Quincey

unread,
Feb 15, 2010, 1:25:11 PM2/15/10
to android...@googlegroups.com

I think I missed a file in the patch due to taking shortcuts and
general confusion; give me half an hour to do things properly
(i.e.move to git) and I'll resend proper versions.

Andrew de Quincey

unread,
Feb 15, 2010, 2:27:15 PM2/15/10
to android...@googlegroups.com

Hi, attached are the latest patches - I've restarted the number at 10
to provide a clean break.

2.6.27 one is tested working on my hero.

android-msm-2.6.27-hero-v10.patch
android-msm-htc-2.6.25-v10.patch

Olivier Perron

unread,
Feb 15, 2010, 2:45:02 PM2/15/10
to android...@googlegroups.com
> Hi, attached are the latest patches - I've restarted the number at 10

That make me remember a joke:
"There are only 10 types of people in the world: Those who understand
binary, and those who don't"

Sorry for that, I couldn't resist :)

I can now see and check the required options ! Thanks for this updated patch.
I'll keep you informed if I got usb host working with the resulting kernel.

Cheers
Olivier

Andrew de Quincey

unread,
Feb 15, 2010, 4:45:46 PM2/15/10
to android...@googlegroups.com
Hmmph, I've just been looking over the msm72k_udc.c /gadget/ usb code
this evening: there's no module unload routine defined right now, so
its not possible to cleanly unload it when compiled as a module. I
need to sort this out first of all so we can test things without
having to reboot all the time.

Olivier Perron

unread,
Feb 16, 2010, 5:29:34 AM2/16/10
to android...@googlegroups.com
On Mon, Feb 15, 2010 at 8:45 PM, Olivier Perron
<olivier....@gmail.com> wrote:
>> Hi, attached are the latest patches - I've restarted the number at 10

Hi Andrew,
patched kernel compiled and tested this morning: usb host works as expected.

Keep up the good work on this subject!

Cheers
Olivier

Andrew de Quincey

unread,
Feb 16, 2010, 9:12:51 AM2/16/10
to android...@googlegroups.com
On 16 February 2010 10:29, Olivier Perron <olivier....@gmail.com> wrote:
> On Mon, Feb 15, 2010 at 8:45 PM, Olivier Perron
> <olivier....@gmail.com> wrote:
>>> Hi, attached are the latest patches - I've restarted the number at 10
>
> Hi Andrew,
> patched kernel compiled and tested this morning: usb host works as expected.

That's great news, thanks for trying it out!

> Keep up the good work on this subject!

Expect more soon.

Markus Fritsche

unread,
Feb 16, 2010, 8:27:16 PM2/16/10
to Android Linux Kernel Development

> Expect more soon.

Does that mean my android device might be able to connect to linux-
supported usb hardware? My pocket DVB-recoder coming up? ;)

Andrew de Quincey

unread,
Feb 17, 2010, 5:12:19 AM2/17/10
to android...@googlegroups.com
On 17 February 2010 01:27, Markus Fritsche

Theoretically yes; I've not yet tried a DVB USB stick, but I've got
two in the cupboard!

Depends on the bandwidth the phone can support. It sounds feasible
though: I've heard of them working on the Linksys NSLU2 "slugs" which
are 266Mhz ARMs...

Andrew de Quincey

unread,
Feb 17, 2010, 6:49:09 PM2/17/10
to android...@googlegroups.com
Hi, quick status update before I go to sleep.

I've just fixed the msm72k_udc.ko gadget driver so it can be
unloaded/loaded properly. I've tested it by repeatedly
loading/unloading the msm72k_udc.ko gadget and the ehci-hcd.ko host
drivers one after another and it seems fairly stable (I'd bet there
are a number of bugs remaining though :).

Next up, I need to replace the "usb function notifier" and
msm_hsusb_set_vbus_state() stuff and we ought to have fully
functioning device and host drivers that can be rmmoded/insmodded in
order to switch usb "modes". I should have this done sometime this
week, and I'll send an updated patch then. (right now, the gadget
driver can't detect when the USB cable is plugged in because of these
missing calls).

After that, we can investigate "proper" USB OTG support (ala the
Droid) and whether the phone can output power on VBUS.

I also wonder what Google's stance on this is; is there a chance of
getting it into the mainline android-MSM tree? I suppose I should also
try and get it into the vanilla kernel tree to help out people porting
to this platform in future.

Chris Stratton

unread,
Feb 17, 2010, 6:59:37 PM2/17/10
to android...@googlegroups.com

The switching modules path may prove productive for our purposes, but I think actual otg drivers dont do this, as theres a state machine that drives mode changing automatically, so they keep both drivers resident and enable/disable them. 

The more I look into actual otg however, I'm less intetested than I originally was.  I think for user purposes it may actually be better to have manual switching not unlike the enabling of mass storage mode, particularly as a lot of people are likely to be using cobbled together cable & adapter assemblies that wouldnt put a compliant otg device into host mode.


--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/grou...

sonic

unread,
Mar 10, 2010, 9:50:57 AM3/10/10
to Android Linux Kernel Development
First of all, a big thank you for finding all this out!
I eagerly want to try this on my Nexus One. What would be the best
route to proceed?
I'm wondering how your ehci-msm7201.c relates to
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=blob;f=drivers/usb/host/ehci-msm.c
Isn't the host code already there? It has been there already in the
Samsung Galaxy kernel source, but strangely disappeared in the Nexus
One kernel source. Which one should I try?

Andrew de Quincey

unread,
Mar 10, 2010, 11:58:41 AM3/10/10
to android...@googlegroups.com

I had absolutely no idea about the existence of that tree, so I'd
implemented the driver myself from scratch!

If you look at the android kernel trees at android.git.kernel.org
there is absolutely no mention about host mode as you say. This has to
be a policy decision by Google.

I searched for *days* for talk about android host mode implementations
before starting this project, but couldn't find anything whatsoever! I
see they've even done the horrible
make-the-function-drivers-unloadable stuff I've just done too!

The tree looks an awful lot cleaner than the "official" sources.... I
reckon I'll be giving it a go later!

Thanks: kinda wish I'd heard this earlier, but that's not your fault! :)

Sven Killig

unread,
Mar 10, 2010, 12:40:59 PM3/10/10
to android...@googlegroups.com
> -----Original Message-----
> From: android...@googlegroups.com
[mailto:android...@googlegroups.com] On Behalf Of Andrew de Quincey
> Sent: Wednesday, March 10, 2010 5:59 PM
> To: android...@googlegroups.com
> Subject: Re: [android-kernel] Re: Working MSM7201 usb host driver v2
>
> If you look at the android kernel trees at android.git.kernel.org
> there is absolutely no mention about host mode as you say. This has to
> be a policy decision by Google.

I was afraid Qualcomm gave up implementing a stable hub-capable host mode
driver, but your success makes me hope again :-)
My tries got stuck half a year ago:
http://www.android-hilfe.de/root-hacking-modding-fuer-samsung-galaxy/5891-us
b-host-otg-moeglich-2.html#post67545
I just used this cable:
http://cgi.ebay.com/Micro-USB-Host-Cable-for-Nokia-N810-OTG-on-the-go-N-810_
W0QQitemZ250589706476QQcmdZViewItemQQptZPDA_Accessories?hash=item3a584f78ec
("Micro USB Host Cable for Nokia N810 OTG on the go N 810")
and a powered USB 2.0 hub, perhaps that was the mistake?

Sven Killig

unread,
Mar 10, 2010, 12:46:16 PM3/10/10
to android...@googlegroups.com
btw, the driver against a 2.6.27 kernel can be found in
http://opensource.samsungmobile.com/download/OpenSource/GT-I7500_OpenSource_
Update3.zip
(unfortunately Samsung always converts the line endings to Windows X-( )

Andrew de Quincey

unread,
Mar 10, 2010, 12:55:04 PM3/10/10
to android...@googlegroups.com

Interesting, so it detects the host hardware ok, but fails to actually
talk to any devices? I had exactly that error from two sources:

1) 'cos I had the cable data lines the wrong way round
2) I found you had to set an extra flag in the DMA setup.. see here:
http://groups.google.com/group/android-kernel/browse_thread/thread/361326399cd4e891#

If you look at:
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=blob;f=drivers/usb/host/ehci-msm.c;h=6111ae2fc8870786efe84162eb9aae75d91e725b;hb=carrot.cupcake

Specifically:
510 /*
511 * generic hardware linkage
512 */
513 .irq = ehci_msm_irq,
514 .flags = HCD_USB2,

They're missing that flag. I found if you changed that to
.flags = HCD_USB2 | HCD_MEMORY | HCD_LOCAL_MEM,

it all started working. The HCD_LOCAL_MEM tells it that the USB
controller can't DMA from just any old memory, and it has to copy to a
local transfer buffer before intiating DMA.

Andrew de Quincey

unread,
Mar 10, 2010, 12:58:43 PM3/10/10
to android...@googlegroups.com

OK, I need to think what to do next.... I imagine there are
HTC-specific hacks in their source trees to support their specific
platforms, so switching to an entirely codeaurora tree might be
tricky.

Perhaps backporting the relevant pieces from the codeaurora tree might
be the way to go forward, but I'll have to have a look at code
quality/applicability etc.

Sven Killig

unread,
Mar 10, 2010, 7:28:22 PM3/10/10
to android...@googlegroups.com
> -----Original Message-----
> From: android...@googlegroups.com [mailto:android...@googlegroups.com] On Behalf Of Andrew de Quincey
> Sent: Wednesday, March 10, 2010 6:55 PM
> To: android...@googlegroups.com
> Subject: Re: [android-kernel] Re: Working MSM7201 usb host driver v2
>
> 1) 'cos I had the cable data lines the wrong way round

How could this happen? Aren't they colour-coded?

> .flags = HCD_USB2 | HCD_MEMORY | HCD_LOCAL_MEM,

I modified the Samsung Galaxy kernel source this way. Now the error message
hub 1-0:1.0: unable to enumerate USB device on port 1
after modprobe disappeared, the last line is now
msm_hsusb_vbus_shutdown
But nothing else is happening in dmesg when replugging. I'm still not sure about my wiring though.

Andrew de Quincey

unread,
Mar 10, 2010, 8:15:33 PM3/10/10
to android...@googlegroups.com
On 11 March 2010 00:28, Sven Killig <sv...@killig.de> wrote:
>> -----Original Message-----
>> From: android...@googlegroups.com [mailto:android...@googlegroups.com] On Behalf Of Andrew de Quincey
>> Sent: Wednesday, March 10, 2010 6:55 PM
>> To: android...@googlegroups.com
>> Subject: Re: [android-kernel] Re: Working MSM7201 usb host driver v2
>>
>> 1) 'cos I had the cable data lines the wrong way round
>
> How could this happen? Aren't they colour-coded?

Ah - I was playing about with the Hero USB PHY's registers which let
you swap the lines about in software :)

>>       .flags = HCD_USB2 | HCD_MEMORY | HCD_LOCAL_MEM,
>
> I modified the Samsung Galaxy kernel source this way. Now the error message
> hub 1-0:1.0: unable to enumerate USB device on port 1
> after modprobe disappeared, the last line is now
> msm_hsusb_vbus_shutdown
> But nothing else is happening in dmesg when replugging. I'm still not sure about my wiring though.

Hmm, dunno yet, I'm still in the middle of backporting the ehci-msm.c
driver to my hero tree; should be able to test that out soon though.

The code appears to have full USB OTG as well, which should be kinda
cool; theoretically no need for any module unloading. Also, I now know
the RPC calls to turn the vbus voltage on and off! (untested, may not
be supported on all hardware).

karthik

unread,
Mar 16, 2010, 8:30:41 PM3/16/10
to Android Linux Kernel Development
Hi Andrew,
I was really excited to find this article and tried to use your patch
on Sprint CDMA HTC HERO kernel source. Looks like the patch is giving
some errors..
-----------------------------------------------------------------------------------------------------------
xxxxx@xxxxx-desktop:~/myandroid/heroc_ef05d31a$ patch -p1 -i /home/
xxxxx/Downloads/android-msm-2.6.27-hero-v10.patch
patching file arch/arm/mach-msm/devices.c
Hunk #1 succeeded at 166 (offset 8 lines).
Hunk #2 succeeded at 236 (offset 8 lines).
Hunk #3 FAILED at 252.
Hunk #4 succeeded at 1218 (offset 91 lines).
Hunk #5 succeeded at 1229 (offset 91 lines).
1 out of 5 hunks FAILED -- saving rejects to file arch/arm/mach-msm/
devices.c.rej
patching file arch/arm/mach-msm/htc_battery.c
Hunk #4 succeeded at 1242 (offset 6 lines).
patching file drivers/usb/Kconfig
patching file drivers/usb/host/Kconfig
patching file drivers/usb/host/ehci-hcd.c
patching file drivers/usb/host/ehci-msm7201.c
patching file drivers/usb/host/ehci-msm7201.h
----------------------------------------------------------------------------------------------------------
copy of devices.c.rej
----------------------------------------------------------------------------------------------------------
*************** struct msm_hsusb_platform_data msm_hsusb_pdata = {
*** 249,254 ****
.num_functions = ARRAY_SIZE(usb_functions),
.products = usb_products,
.num_products = ARRAY_SIZE(usb_products),
};

static struct resource resources_hsusb[] = {
--- 252,258 ----
.num_functions = ARRAY_SIZE(usb_functions),
.products = usb_products,
.num_products = ARRAY_SIZE(usb_products),
+ #endif
};

static struct resource resources_hsusb[] = {
-----------------------------------------------------------------------------------------------------------
Do you think that something in the patch needs to be changed for it
to work on CDMA HTC HERO .
Will greatly appreciate any help/suggestion in this case.

Batbetbit

unread,
Mar 24, 2010, 6:46:23 AM3/24/10
to Android Linux Kernel Development
This is a great contribution, thanks for all your effort!!

I cant wait to see it running on my android!

Julian Pas

unread,
May 5, 2010, 1:15:06 PM5/5/10
to Android Linux Kernel Development
Hi Andrew,
I've been looking for hacking the EHCI support for the Nexus One
platform and was considering doing more or less the same as you do now
for your Hero - backporting code from the Aurora project to the
CyanogenMod version of the source tree. I had some talk with the
cyanogen devs and they seem to like the idea and I find it the right
way to go there.
I need this to work for a research project I am into right now where
we'd like to have the Nexus as a mini ARM based PC running linux code
(which it is if you forget about all the eye candy on top). Therefore
I'd like to join forces with you if you are interestedm, and help with
the backporting by extending it to the Nexus kernel config too. Do you
mind dropping me a mail about whether you like the idea and would like
to share your work. Anyways I will have to try this on my own but I
hope we can try joining forces for better and quicker results.
Cheers,
Julian

On 11 Март, 03:15, Andrew de Quincey <a...@lidskialf.net> wrote:
> On 11 March 2010 00:28, Sven Killig <s...@killig.de> wrote:
>
> >> -----Original Message-----
> >> From: android...@googlegroups.com [mailto:android...@googlegroups.com] On Behalf Of Andrew de Quincey
> >> Sent: Wednesday, March 10, 2010 6:55 PM
> >> To: android...@googlegroups.com
> >> Subject: Re: [android-kernel] Re: Working MSM7201usbhostdriver v2
>
> >> 1) 'cos I had the cable data lines the wrong way round
>
> > How could this happen? Aren't they colour-coded?
>
> Ah - I was playing about with the HeroUSBPHY's registers which let
> you swap the lines about in software :)
>
> >>       .flags = HCD_USB2 | HCD_MEMORY | HCD_LOCAL_MEM,
>
> > I modified the Samsung Galaxy kernel source this way. Now the error message
> > hub 1-0:1.0: unable to enumerateUSBdevice on port 1
> > after modprobe disappeared, the last line is now
> > msm_hsusb_vbus_shutdown
> > But nothing else is happening in dmesg when replugging. I'm still not sure about my wiring though.
>
> Hmm, dunno yet, I'm still in the middle of backporting the ehci-msm.c
> driver to my hero tree; should be able to test that out soon though.
>
> The code appears to have fullUSBOTG as well, which should be kinda
> cool; theoretically no need for any module unloading. Also, I now know
> the RPC calls to turn the vbus voltage on and off! (untested, may not
> be supported on all hardware).

--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Sven Killig

unread,
Jun 3, 2010, 5:10:11 PM6/3/10
to android...@googlegroups.com
> -----Original Message-----
> From: android...@googlegroups.com [mailto:android...@googlegroups.com] On Behalf Of Andrew de Quincey
> Sent: Thursday, March 11, 2010 2:16 AM
> To: android...@googlegroups.com
> Subject: Re: [android-kernel] Re: Working MSM7201 usb host driver v2
>
> On 11 March 2010 00:28, Sven Killig <sv...@killig.de> wrote:
> > I'm still not sure about my wiring though.
>
> Hmm, dunno yet

But I do by now: after looking at Figure 2-2 on page 8 of
http://www.atmel.com/atmel/acrobat/doc1137.pdf
it became clear it couldn't work my way: the hub chip is powered by BUS_POWER of the upstream port. So I bought one of those USB Dual Power Cables and connected it as described on
http://wiki.openmoko.org/wiki/Specialized_USB_cables#Buy_a_USB_Y_cable_for_powering_USB_devices_and_charging_the_Freerunner_while_in_host_mode
and it works - on the Nexus One! It even gets charged! whooohooo :-D
Patch and video available at
http://sven.killig.de/android/N1/2.2/usb_host

jessie828

unread,
Jun 29, 2010, 8:49:17 AM6/29/10
to Android Linux Kernel Development
Hello all,

first of all thank you for this wonderful tool. i cant wait to start
trying this out but i need some help.
as i am new to this whole patching kernel stuff i would like to ask
some help.

can anybody help me with sending me in the right direction or sending
me a tutorial on how to patch and recompile the kernel in order for me
to update the hero i have.

i will be using this project for my final thesis and don't want to
loose to much time on finding out how to build a new kernel.
i just want to make the hero work as a host so i can develop my own
serial interface in order for me to transfer data from the htc hero to
an custom USB device.

thank you for any advice/help you guys can give me


On Jun 3, 11:10 pm, "Sven Killig" <s...@killig.de> wrote:
> > -----Original Message-----
> > From: android...@googlegroups.com [mailto:android...@googlegroups.com] On Behalf Of Andrew de Quincey
> > Sent: Thursday, March 11, 2010 2:16 AM
> > To: android...@googlegroups.com
> > Subject: Re: [android-kernel] Re: Working MSM7201 usb host driver v2
>
> > On 11 March 2010 00:28, Sven Killig <s...@killig.de> wrote:
> > > I'm still not sure about my wiring though.
>
> > Hmm, dunno yet
>
> But I do by now: after looking at Figure 2-2 on page 8 ofhttp://www.atmel.com/atmel/acrobat/doc1137.pdf
> it became clear it couldn't work my way: the hub chip is powered by BUS_POWER of the upstream port. So I bought one of those USB Dual Power Cables and connected it as described onhttp://wiki.openmoko.org/wiki/Specialized_USB_cables#Buy_a_USB_Y_cabl...

jessie828

unread,
Jun 29, 2010, 3:27:30 AM6/29/10
to Android Linux Kernel Development
Hello all,

I am new to the android scene and i am very interested in this
project. I am a student doing my final thesis and it has to do with
and HTC hero acting as an USB Host (just like what you guys are doing)
and an custom device (which is in slave mode). the big problem i have
is.

how do i get started on applying this wonderful patch to the hero? can
somebody explain this to me or send me an tutorial on how to achieve
this?

I will be very grateful for any help i can get :)

Thank you

Sven Killig

unread,
Jun 29, 2010, 2:04:24 PM6/29/10
to android...@googlegroups.com
> -----Original Message-----
> From: android...@googlegroups.com [mailto:android-
> ker...@googlegroups.com] On Behalf Of Sven Killig
> Sent: Tuesday, June 29, 2010 8:02 PM
> To: android...@googlegroups.com
> Subject: RE: [android-kernel] Re: Working MSM7201 usb host driver v2
>
> Shouldn't be too different for the Hero, just the kernel and patch source
> is different.

And the .config, of course.

jessie828

unread,
Jun 30, 2010, 4:01:15 AM6/30/10
to Android Linux Kernel Development
thats exactly what im asking.. how do i start.. i dont even know how
to do this for another kernel...

help :(

Greg KH

unread,
Jun 30, 2010, 11:58:28 AM6/30/10
to android...@googlegroups.com
On Wed, Jun 30, 2010 at 1:01 AM, jessie828 <hernan...@gmail.com> wrote:
> thats exactly what im asking.. how do i start.. i dont even know how
> to do this for another kernel...
>
> help :(

Try the kernelnewbies.org site, that's the best place to start
out with.

good luck,

greg k-h

jessie828

unread,
Jul 16, 2010, 5:48:52 AM7/16/10
to Android Linux Kernel Development
Does anybody have the config file for me to compile the kernel for it
to support a keyboard? or where i can find one? or what i need to
select in the make menuconfig for me to get my htc hero working? all
help is very needed and appreciated.

thank you,
jessie

On Jun 30, 5:58 pm, Greg KH <gre...@gmail.com> wrote:

guido

unread,
Aug 8, 2010, 7:03:12 AM8/8/10
to Android Linux Kernel Development

A few questions...

1. Are (some of) you officially part of google?

2. When do you see usb otg released in an actual commercial phone
running android?

3. Would you like a robot named after you (:

I've been waiting for a while now, and I'd really like to buy a smart
phone... but they lack the option of connecting to cheap arduino
boards

Cheers,

Guido

ps. If this post is inconveniencing someone please feel free to remove
it
Reply all
Reply to author
Forward
0 new messages