blob: e018892fe11b098bb5008e1f124e0a548a8b2aae [file] [log] [blame]
TI BQ24251 Battery Charger
=========================
This chip manages the charging of a Li-Ion battery and provides basic
information like whether a SDP, DCP, or DCD is providing external USB
power.
It doesn't report the voltage of the battery but it can be combined with
a simple voltage divider circuit and an external ADC to get this value.
R1 R2
+------/\/\/\------+------/\/\/\------+
| | |
Vbat Vadc GND
Required Properties:
-------------------
- compatible: "ti,bq24251-charger"
- reg: This must be 0x6a
- stat-gpio: The gpio connected to the STAT pin [1]
- pg-gpio: The gpio connected to the PG_L pin [1]
Optional Properties:
-------------------
- battery-regulation-voltage: The battery regulation voltage in uV
- charge-current: The charge current in uA
- term-current-sense-threshold: Termination current sense threshold in uA
- vindpm-threshold: Input Vin-dpm voltage in uV
- ovp-voltage: Over volt protection voltage in uV
- io-channels: The phandle + io-specifier pair of the ADC [2]
- upper-divider-ohm: The resistance of R1 in the divider circuit
- lower-divider-ohm: The resistance of R2 in the divider circuit
Note: If any voltage divider properties are specified, they all must be.
[1] See Documentation/devicetree/bindings/gpio/gpio.txt
[2] See Documentation/devicetree/bindings/iio/iio-bindings.txt
Example:
/* BQ24251RGE (Charger Chip) @ 0x6A */
bq24251rge@6a {
compatible = "ti,bq24251-charger";
reg = <0x6a>;
stat-gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
pg-gpio = <&gpio4 22 GPIO_ACTIVE_LOW>;
battery-regulation-voltage = <4200000>;
charge-current = <500000>;
term-current-sense-threshold = <50000>;
vindpm-threshold = <4360000>;
ovp-voltage = <10500000>;
io-channels = <&adc1 3>;
upper-divider-ohm = 100000;
lower-divider-ohm = 301000;
};