[Gta04-owner] [PATCH 3.2] twl4030_charger: set usb max current through sysfs

Dr. H. Nikolaus Schaller hns at goldelico.com
Tue Mar 27 11:44:42 CEST 2012


Am 27.03.2012 um 08:04 schrieb Andreas Kemnade:

> Hi,
> 
> here are some first notes.
> 
> 
>>> +	/* get setting of CGAIN bit */
>>> +	status = twl4030_bci_read(TWL4030_BCICTL1, &bcictl1);
>>> +	if (status < 0)
>>> +		return status;
>>> +	if (bcictl1 & TWL4030_CGAIN)
>>> +		cur /= 2;
>>> +	cur = cur / 1665;
>>> +	if (cur > 511)
>>> +		return -EINVAL;
>>> +	if (cur < 0)
>>> +		return -EINVAL;
>> 
>> I think this should be
>>        if (cur < 256)
>> 
>> should it not?  The TRM said that the high bit is forced to '1'.
>> 
> The high bit is bit 9, 1<<9 = 512. But it is always set because the current
> is translated into a voltage from 0.75V to 1.5V
> 0.75 V corresponds to 512 and 0mA. 1.5V corresponds to 1023 and 852mA (1704mA if CGAIN
> is set to 1)
> 
>> Also, I wonder if we should consider setting the CGAIN flag for particularly
>> high currents.  Do you know if it is used for anything else?
>> 
> I guess we can set CGAIN, but for that high currents, I would also like to know
> if there are chances to toast the GTA04. 1.7A would allow you to charge at
> 1C even when you are using the freerunner heavily. There is something about
> a heat protection mode in the manual, but I would really double-check

Here is an excerpt from the GTA01 battery which differs mainly in that there
is no BQ27000 inside and a 10k Ohm NTC to report battery temperature.

2. Capacity
When discharged at 240mA to 2.75V after standart charge at 25°C
Minimum 1200mAh
3. Standard charge
current
4.2V±0.05V, 600mA, 25°C Constant Current with Constant Voltage.
600mA ( 0.5C )
4. Quick charging
current
4.2V±0.05V, 1200mA, 25oC Current with Constant Voltage.
1200mA
5. Standard Discharge
current
Constant current, 2.75V end.
240mA
6. Maximum Discharge
current
Constant current, 2.75V end.
1800mA

Since the GTA02 battery uses HDQ we have no direct temperature detection
and there is a fixed 10k resistor connected to the TPS65950. This reports
constant 29-30 degrees C and effectively disables any heat protection
in the TPS65950 charger logic.

I could also imagine that the BQ27000 could limit the charging current
and temperature but I don't know.

> how and if that works as expected. 1.7A with light load would be more than
> 1C charging. Would that still be ok for the battery?

I think it would be above the Quick charging current of 1.2A for the battery.

BR,
Nikolaus



More information about the Gta04-owner mailing list