power: supply: charger: add sc89890 charger driver

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ie231a1cabdfefce43fc8f21993d981df2395cf31
This commit is contained in:
shengfei Xu 2022-06-12 10:11:20 +00:00 committed by Tao Huang
parent 004ba6e22a
commit 6be5bff60f
4 changed files with 1263 additions and 0 deletions

View File

@ -0,0 +1,40 @@
Binding for sc8990 Li-Ion Charger
This driver will support the sc89890. There are
other ICs in the same family but those have not been tested.
Required properties:
- compatible: "sc,sc89890"
- reg: integer, i2c address of the device.
- interrupts: interrupt line;
- sc,battery-regulation-voltage: integer, maximum charging voltage (in uV);
- sc,charge-current: integer, maximum charging current (in uA);
- sc,termination-current: integer, charge will be terminated when current in
constant-voltage phase drops below this value (in uA);
- sc,precharge-current: integer, maximum charge current during precharge
phase (in uA);
- sc,minimum-sys-voltage: integer, when battery is charging and it is below
minimum system voltage, the system will be regulated above
minimum-sys-voltage setting (in uV);
- sc,boost-voltage: integer, VBUS voltage level in boost mode (in uV);
- sc,boost-max-current: integer, maximum allowed current draw in boost mode
(in uA).
Example:
sc89890 {
compatible = "sc,sc89890";
reg = <0x6a>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PD5 IRQ_TYPE_EDGE_FALLING>;
sc,battery-regulation-voltage = <4200000>;
sc,charge-current = <1000000>;
sc,termination-current = <50000>;
sc,precharge-current = <128000>;
sc,minimum-sys-voltage = <3600000>;
sc,boost-voltage = <5000000>;
sc,boost-max-current = <1000000>;
sc,ibatcomp-micro-ohms = <10>;
};

View File

@ -542,6 +542,14 @@ config CHARGER_SC8551
help
Say Y to enable support for the SC8551 battery pump charger.
config CHARGER_SC89890
tristate "SC89890 battery charger driver"
depends on I2C
depends on GPIOLIB || COMPILE_TEST
select REGMAP_I2C
help
Say Y to enable support for the SC89890 battery charger.
config CHARGER_MAX14577
tristate "Maxim MAX14577/77836 battery charger driver"
depends on MFD_MAX14577

View File

@ -90,6 +90,7 @@ obj-$(CONFIG_CHARGER_BQ25890) += bq25890_charger.o
obj-$(CONFIG_CHARGER_BQ25980) += bq25980_charger.o
obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o
obj-$(CONFIG_CHARGER_SC8551) += sc8551_charger.o
obj-$(CONFIG_CHARGER_SC89890) += sc89890_charger.o
obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o
obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
obj-$(CONFIG_AXP288_FUEL_GAUGE) += axp288_fuel_gauge.o

File diff suppressed because it is too large Load Diff