drivers: power: supply: support bq25713

This commit is contained in:
leeboby 2024-08-12 17:18:05 +08:00
parent 2d94361c54
commit 37be4bf486
5 changed files with 1171 additions and 0 deletions

View File

@ -185,6 +185,36 @@
};
};
&i2c1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c1m2_xfer>;
};
&i2c3 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c3m0_xfer>;
bq25713: bq25713@6b {
status = "okay";
compatible = "ti,bq25713-aimax";
reg = <0x6b>;
ti,charge-current = <2000000>;
ti,max-input-voltage = <21000000>;
ti,max-input-current = <3000000>;
ti,max-charge-voltage = <12600000>;
ti,input-current = <500000>;
ti,input-current-sdp = <500000>;
ti,input-current-dcp = <2000000>;
ti,input-current-cdp = <2000000>;
ti,minimum-sys-voltage = <7400000>;
ti,otg-voltage = <5000000>;
ti,otg-current = <1500000>;
};
};
/*** 40 pins ***/
&i2c2 {
status = "disabled";

View File

@ -678,6 +678,12 @@ config CHARGER_BQ25700
help
Say Y to enable support for the TI BQ25700 battery charger.
config CHARGER_BQ25713
tristate "TI BQ25713 battery charger driver"
depends on REGMAP_I2C
help
Say Y to enable support for the TI BQ25713 battery charger.
config CHARGER_BQ25890
tristate "TI BQ25890 battery charger driver"
depends on I2C

View File

@ -87,6 +87,7 @@ obj-$(CONFIG_CHARGER_BQ24257) += bq24257_charger.o
obj-$(CONFIG_CHARGER_BQ24735) += bq24735-charger.o
obj-$(CONFIG_CHARGER_BQ2515X) += bq2515x_charger.o
obj-$(CONFIG_CHARGER_BQ25700) += bq25700_charger.o
obj-$(CONFIG_CHARGER_BQ25713) += bq25713_charger.o
obj-$(CONFIG_CHARGER_BQ25890) += bq25890_charger.o
obj-$(CONFIG_CHARGER_BQ25980) += bq25980_charger.o
obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
/*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __CHARGER_BQ25713_H_
#define __CHARGER_BQ25713_H_
#define CHARGER_CURRENT_EVENT 0x01
#define INPUT_CURRENT_EVENT 0x02
struct bq2570x_platform_data {
int current_limit; /* mA */
int weak_battery_voltage; /* mV */
int battery_regulation_voltage; /* mV */
int charge_current; /* mA */
int termination_current; /* mA */
int resistor_sense; /* m ohm */
const char *notify_device; /* name */
};
void bq25713_charger_set_current(unsigned long event, int current_value);
#endif /* __CHARGER_BQ25713_H_ */