On Mon 2019-09-02 11:23:44, Pavel Machek wrote: > Hi! > > > So I ended up cleaning up omap2430 glue layer a bit for host mode with the > > various reproducable errors I was seeing docking droid4 to a lapdock. There > > are a few fixes, and then we end up removing all the devctl register tinkering > > for omap2430 glue layer. > > I should have your recent patches up-to [PATCH] power: supply: > cpcap-charger: Enable vbus boost voltage applied to linux-next, -0830. > > So... to get usb host to work even with stock kernel, I need a hub and > external power... and "right" cable between phone and hub. > > When I plugged/unplugged it several times, I got > > ### usb unplug: > musb-hdrc.0.auto: musb_set_peripheral: already in peripheral mode: 80 > musb-hdrc.0.auto: musb_set_peripheral: already in peripheral mode: 80 > ub0: stop stats: rx/tx 0/0, errs 0/0 > l3_init_cm:clk:0040:0: failed to disable > l3_init_cm:clk:00c0:0: failed to disable > ### usb plug produces nothing > ### usb unplug: > musb-hdrc.0.auto: musb_set_peripheral: already in peripheral mode: 80 > musb-hdrc.0.auto: musb_set_peripheral: already in peripheral mode: 80 > > Hmm. I did it two more times, and now machine rebooted, and USB was > powered from the phone for a while (3.6V). > > And I reproduced the crash on the next boot. > > Is there anything I may be missing in .config? Hmm. I guess CONFIG_USB_MUSB_DUAL_ROLE=y might be useful. And now... if I unplug/replug the usb after the boot, USB hub and mouse are recognized. Good! Less than minute later: mmusb-hdrc.0.auto: Babble USB disconnect I unplug, replug usb (not at the phone, between hub and dongle, and green LED indincating charging starts blinking rapidly. cpcap-core spi0.0: EOT timed out. I try plug/replug, and now green led is on. I unplug replug at the phone, and get bunch more of messages: musm _set_peripheral: already in peripheral mode: 99 musm _set_peripheral: already in peripheral mode: 81 musm _set_peripheral: already in peripheral mode: 81 musb_set_host: could not set host: 99 musb_set_host: could not set host: 99 musb_set_host: could not set host: 99 musb_set_host: could not set host: 99 musb_set_host: could not set host: 99 musb_set_host: could not set host: 99 musb_set_host: could not set host: 99 musb_set_host: could not set host: 99 Unplug/replug at host, and again, hub+mouse is detected. I unplug power connected to one of USB hub's ports... and find out that phone was _not_ powering it. Ok... so something somehow works.... sometimes :-). Pavel -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany