|
#861
|
||||
|
||||
|
first draft for putting bq24150 into fastcharge mode at a reasonable charge end voltage, and keep it in charge mode until battery is full:
Code:
i2cset -y -m 0x77 2 0x6b 0x04 0xc9; # next register 0x03 is device ID, always 4b and r/o; so we skip to 0x04 i2cset -y -m 0xff 2 0x6b 0x02 0x8c; # 0x8c = 3v5 + .640 + .040 + .020 = 4V200, BE CAREFUL and DON'T CHANGE # unless you know what you're doing. 4V2 is ABS MAX! i2cset -y -m 0xff 2 0x6b 0x01 0xc8; i2cset -y -m 0xc0 2 0x6b 0x00 0x00; # tickle watchdog, while status indicates 'charging from wallcharger' while [ $(i2cget -y 2 0x6b 0x00) = 0x90 ] ; do sleep 28; # reset watchdog timer: i2cset -y -m 0x80 2 0x6b 0x00 0x80; done echo "charging finished, status(reg0)=$(i2cget -y 2 0x6b 0x00)" Code:
Nokia-N900-02-8:~# ~user/i2c/i2cdump -y -r 0-4 2 0x6b
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 90 c8 8c 4b c9 ???K?
Usual disclaimer: this is addressed to developers only, who exactly understand the above code. ENDUSERS STAY AWAY cheers jOERG Last edited by joerg_rw; 2010-05-14 at 13:13. |
| The Following 18 Users Say Thank You to joerg_rw For This Useful Post: | ||
|
#862
|
|||
|
|||
|
According to the wiki, the reason given for BME being closed source is:
Quote:
Failing that, maybe they would be so kind as to let a few people (egoshin / joerg / etc) have access to the code under an NDA... |
|
#863
|
||||
|
||||
|
sorry for the edits in post 2 above (charging), but while testing I found the registers need another sequence to be set correctly.
anyway now it is at least tested and working for what can be told by watching your shell /j |
|
#864
|
||||
|
||||
|
So basically there's NO changes other than enabling the charge pump? Dang it, so my supposed self-powered hub is a not as selfpowered as I though...
|
| The Following User Says Thank You to javispedro For This Useful Post: | ||
|
#865
|
|||
|
|||
|
Quote:
EDIT: I do not enable charge pump, it is impossible (read joerg). But to work as HOST some VBUS voltage is needed (read blue_led) and TWL4030 is an obvious candidate. I don't know - is it possible to use VBUS from 1707 chip (a real USB PHY) because checking it requires too much change in code - driver actively works with 1707 registers and intermixing both is difficult to predict. And of course - the procedure... it is not suitable for normal use because it requires PC initially. I am working on that stuff right now, and first - try to use FORCE_HOST. However, it is not simple as a success experiment, it doesn't see anything at all, so I am looking into code and acquiring logic. BTW, if joerg is successfull in setting VBUS charge voltage and workaround BME intervention it could be a solution for non-selfpowered hubs/HDs. I did an experiment with his command (first version) and it seems it works, at least until DSME shutdowns N900. I stopped do it for now because fast shutdown does too much confusion in results and I can't go far enough until mounting USB stick. Last edited by egoshin; 2010-05-14 at 16:49. Reason: syntax |
| The Following User Says Thank You to egoshin For This Useful Post: | ||
|
#866
|
|||
|
|||
|
Joerg, double check - is this code a replacement of BME which is supposed to be stopped by earlier published script?
|
| The Following User Says Thank You to egoshin For This Useful Post: | ||
|
#867
|
||||
|
||||
|
Quote:
And of course without the (even if it's broken) pump and without a host connection it's surely not asserted. Pumping even a measly 3,0 V might mean that the useless-for-charger-detection vbus sense in gaia gets asserted, and the PHY turns on. (Of course the less changes to the driver the better) Quote:
DSME reboots can be entirely disabled via a /etc file. The issue iirc is the rest of watchdogs, and even those can be disabled by a r&d flag. |
| The Following 2 Users Say Thank You to javispedro For This Useful Post: | ||
|
#868
|
|||
|
|||
|
An updated version of the kernel with egoshin's patches and
CONFIG_USB_GPIO_VBUS=m CONFIG_USB_GADGET_DEBUG=y is now available. Quote:
|
| The Following 7 Users Say Thank You to titan For This Useful Post: | ||
|
#869
|
|||
|
|||
|
hi guys!
I've been following you on this thread for quite some time, and recently also in the chatroom. I'm really impressed by your work so far! Keep it going ![]() I would like to join you in testing, I have a rather good knowledge of linux and also some hardware-level-experience of USB. But I'd still like some advice:
I think that's it for now… Would be great if you could give me some hints ![]() Btw, it's not important if charging doesn't work, I have a desktop charger. |
|
#870
|
|||
|
|||
|
1) modprobe bq27x00_battery and check /sys/class/power_supply/bq27200-0
3) both are compiled in ls /sys/kernel/debug/usbmon/ 0s 0u 1s 1t 1u 5) always backup and be prepared to reflash ![]() Quote:
|
| The Following 3 Users Say Thank You to titan For This Useful Post: | ||
![]() |
| Tags |
| awesomeness in the works, boulevard of broken deals, host, i am the dealbreaker, inspector gadget lies, mobidapter is a scam, nokia fanbois, otg, over 9000, usb, usbcontrol |
|
|