View Single Post
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#821
@joerg:

I finally found a time and did tests. Without BME it doesn't work. But it seems that some application also listen VBUS signal because even with stopped BME a dbus server issues a note about vbus change (seen in syslog).

Moreover, if I stop BME and set VBUS then after 3-5secs the N900 LED indicator goes to constant yellow and "battery filling icon" occurs in screen.

Originally Posted by joerg_rw View Post
[*]Could you repeat the tests as done above, but prior to that you run a 'stop bme', so we find out if annoying bme_RX-51 has its fingers in there in any way. (I could imagine detection of VBUS in/for musb_hdrc somewhat fails without bme)
It doesn't work - I lost the way to wakeup USB hardware and I can't transfer it to hostmode. The request to transfer to hostmode stays but nothing happens. I believe that BME works with USB wakeups but I still doesn't know how. The kernel code has some way to do it, of course, but I had no time to research it.

Originally Posted by joerg_rw View Post
[*]And finally, maybe you can replace the TWL4030 VBUS boostmode call by a call to bq24150 (or a system() call [man 3 system] to invoke my above posted cmdline like
Code:
 /bin/sh -c '/sbin/stop bme && sleep 3 && /usr/local/i2cset -y -m 0x07 2 0x6b 0x01 0x05 && while sleep 28; do /usr/local/i2cset -y -m 0x80 2 0x6b 0x00 0x80; done &'
)
It doesn't work at all. As I said, the "charge" process starts but no reaction from external hard disk or USB stick. USB hardware is not switched to hostmode.

Originally Posted by joerg_rw View Post
[*]Please publish the diffs of the patches you made to the kernel, and the exact procedure (echo x >y?) to make that happen.
AIUI it's only a few files like musb_core.c or similar, so you could as well publish the complete file(s) as an attachment to your answer.
I sorted out all diffs and now I am sure that I have only two lines of code (see before in this thread) which switches TWL4030 to VBUS ON then I issues "host" command and which are relevant to this experiments.

The exact sequence is:

1. Boot the modified kernel and wait until system set up.
2. connect USB to PC, answer on question as "PC suite mode" (not mass storage).
3. echo host >/sys/devices/platform/musb_hdrc/mode -- this command requests host operations in MUSB driver and it also switches VBUS on in TWL4030 because of my fixes.
4. echo H >/proc/drivers/musb_hdrc -- it activates a request for switching to hostmode in USB hardware
5. reconnect USB to self-powered external disk (in 5 secs). In this moment USB hardware is switched to suspend mode and hostmode is activated. After cable is attached a debug shows that signal about "new device is connected"/"session started" comes in and MUSB driver starts host-mode state machine and tries to enumerate a new device.

At this moment syslog begins display "non supported" messages. I have also some debug print switched on and it shows me that there is "end-of-TX" interrupts.

If it doesn't happen then - repeat the procedure. The check shows that in this case the request to hostmode is lost. I believe some daemon action causes it (DMCE ?).

Now I switch to looking into kernel code "why it doesn't recognize a HUB?"

Last edited by egoshin; 2010-05-11 at 06:26.
 

The Following 2 Users Say Thank You to egoshin For This Useful Post: