Reply
Thread Tools
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#971
ivgalves, You're right. AFAIK, current HEN works flawlessly with new booston, so joerg_rw could push update to HEN, containing latest flavor of script(s).

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 5 Users Say Thank You to Estel For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#972
Now I have semi-working kernel driver for bq24150 chip for charging battery. I sent it to lkml for comments, see: https://lkml.org/lkml/2012/1/26/519 Driver does not have implemented current sense voltage and termination current sense voltage configuration yet.

So both kernel drivers bq2415x_charger and bq27x00_battery can be replacement for BME.

@joerg_rw:
Can you look my driver?
 

The Following 10 Users Say Thank You to pali For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#973
Driver update, now boost mode for usb host mode working too :-)

This driver is now included in kp51.

How to use charge:
1. turn off bme:
$ stop bme

2. load module:
$ modprobe power_supply
$ insmod ./bq2415x_charger.ko

3. select correct charge mode:
* none = limit 100mA
* host = usb host/usb charger, limit 500mA
* dedicated = dedicated - wallcharger, unlimited
$ echo host > /sys/class/power_supply/bq24150-0/mode
$ echo dedicated > /sys/class/power_supply/bq24150-0/mode

how to usb host mode:
1. turn off bme
2. connect usb device
3. load module

4. enable host mode (choose hosth, hostl, hostf):
$ echo hosth > /sys/devices/platform/musb_hdrc/mode

5. enable boost mode:
$ echo boost > /sys/class/power_supply/bq24150-0/mode

6. enumerate:
$ echo F > /proc/driver/musb_hdrc

how to stop usb host mode:
$ echo none > /sys/class/power_supply/bq24150-0/mode
$ echo peripheral > /sys/devices/platform/musb_hdrc/mode

how to revert back to bme:
1. make sure that host mode was stopped
2. unload bq2415_charger module:
$ rmmod bq2415_charger
3. start bme:
$ start bme


Now I tested both charging and usb flash disk and both worked. Please note that this driver is experimental and can cause problems!!!

Last edited by pali; 2012-07-27 at 06:39.
 

The Following 16 Users Say Thank You to pali For This Useful Post:
Posts: 29 | Thanked: 24 times | Joined on Jul 2011
#974
Good to hear this pali!

Do you people know what hardware is used by the USB in the N9?
How far are we from having USB hostmode for N9?

I can help testing or porting the patch for the N9 kernel.
Btw, where can I find the kernel patches of the USB hostmode work?

Best regards,
Rafael Diniz
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#975
Originally Posted by pali View Post
3. select correct charge mode:
* none = limit 100mA
* host = usb host/usb charger, limit 500mA
* dedicated = dedicated - wallcharger, unlimited
Sorry if it's stupid question, but shouldn't "dedicated" be limited to 950 mA? shadowjk tested this some time ago, and increasing charging current by just by 100 mA over this limit (from 950 mA to 1050 mA), resulted in dangerous increase in heat-generation (probably, in charging chip).

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#976
Sysfs entry mode setting only current limit (6-7bit of register 0x01).

Charge current (4-6bit of register 0x04) is configured by default to 950mA. (so I think you mean this property).

Same configuration is configured by charge21.sh script
 

The Following 2 Users Say Thank You to pali For This Useful Post:
Posts: 96 | Thanked: 80 times | Joined on May 2010
#977
Another related (and potentially off-topic) comment... could you also implement the 800mA current limit that the chipset provides? I think this is useful for some wall chargers that claim to deliver 1A but actually struggle to do so and end up going into thermal shutdown.
 

The Following 2 Users Say Thank You to avidscavenger For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#978
Originally Posted by avidscavenger View Post
Another related (and potentially off-topic) comment... could you also implement the 800mA current limit that the chipset provides? I think this is useful for some wall chargers that claim to deliver 1A but actually struggle to do so and end up going into thermal shutdown.
It is implemented. Set mode to none and manually set current_limit to 800. In my driver are implemented all possible configurations supported by bq24150 chip.
 

The Following 6 Users Say Thank You to pali For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Feb 2012
#979
Hi!

So bq2415x drivers make possible to charge n900 while in hostmode?
I would need to connect my n900 to active usb-hub in hostmode and charge it also while in hostmode.
 
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#980
Originally Posted by vib3 View Post
Hi!

So bq2415x drivers make possible to charge n900 while in hostmode?
I would need to connect my n900 to active usb-hub in hostmode and charge it also while in hostmode.
Of course. You need only select correct bq mode.
 

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

Tags
bada rox, detection, h-e-n, hostmode, speed, usb host


 
Forum Jump


All times are GMT. The time now is 06:15.