power: supply: charger: add sc8551 charger pump driver

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I9580e0af62cb652c0e90832455d025049edb374a
This commit is contained in:
shengfei Xu 2022-06-12 03:17:34 +00:00 committed by Tao Huang
parent 4fe55239b3
commit 9b12899635
4 changed files with 2278 additions and 0 deletions

View File

@ -0,0 +1,46 @@
Binding for sc8551 battery charger
Required properties:
- compatible: "sc,sc8551-standalone" for sc8551 Charger Power Supply
- monitored-battery: phandle of battery characteristics devicetree node
- interrupts: Interrupt mapping for GPIO IRQ. Use in conjunction with
"interrupt-parent". If an interrupt is not provided the driver will switch
automatically to polling.
- input-voltage-limit-microvolt: integer, input voltage level in uV, used to
decrease voltage level when the over current
of the input power source occurs.
- input-current-limit-microamp: integer, input current value in uA drained by the
charger from the power source.Default: 500000 uA (500mA)
- sc,sc8551,bat-ovp-disable: enable the battery over voltage protection
- sc,sc8551,bat-ocp-disable: enable the battery over current protection
- sc,sc8551,bus-ocp-disable: enable the bus over voltage protection
- sc,sc8551,bat-ovp-threshold: Configures the battery over voltage protection voltage (in uV).
- sc,sc8551,bat-ocp-threshold: Configures the battery over current protection voltage (in uA).
- sc,sc8551,bus-ovp-threshold: Configures the bus over voltage protection voltage (in uV).
- sc,sc8551,bus-ocp-threshold: Configures the bus over current protection voltage (in uA).
- sc,sc8551,ac-ovp-threshold: Configures the AC voltage protection voltage (in uV).
- sc,sc8551,sense-resistor-mohm: integer, value of a resistor in series with the battery;
Example:
c8551: sc8551@66 {
compatible = "sc,sc8551-standalone";
reg = <0x66>;
interrupt-parent = <&gpio4>;
interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
sc,sc8551,bat-ovp-disable = <0>;
sc,sc8551,bat-ocp-disable = <0>;
sc,sc8551,bus-ocp-disable = <0>;
sc,sc8551,bat-ovp-threshold = <4500>;
sc,sc8551,bat-ocp-threshold = <4500>;
sc,sc8551,bus-ovp-threshold = <12000>;
sc,sc8551,bus-ocp-threshold = <4000>;
sc,sc8551,ac-ovp-threshold = <17>;
sc,sc8551,sense-resistor-mohm = <2>;
};

View File

@ -535,6 +535,13 @@ config CHARGER_LT3651
Say Y to include support for the Analog Devices (Linear Technology)
LT3651 battery charger which reports its status via GPIO lines.
config CHARGER_SC8551
tristate "SC8551 battery charger pump driver"
depends on I2C
select REGMAP_I2C
help
Say Y to enable support for the SC8551 battery pump charger.
config CHARGER_MAX14577
tristate "Maxim MAX14577/77836 battery charger driver"
depends on MFD_MAX14577

View File

@ -89,6 +89,7 @@ obj-$(CONFIG_CHARGER_BQ25700) += bq25700_charger.o
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_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