dt-bindings: power: Add the bq25790 dt bindings
Subsystems (2)
PATCH v2 1/2 dt-bindings: power: Add the bq25790 dt bindings
Add the bindings for the bq25790.
---
v2 - Changed ti,watchdog property, documented the interrupts, fixed exxamples for input-current and input-voltage
.../bindings/power/supply/bq25790.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/bq25790.yaml
Documentation/devicetree/bindings/power/supply/bq25790.yaml new file +95 -0
@@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/supply/bq25790.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: TI BQ25790 Switch Mode Buck-Boost Charger + +maintainers: + - Dan Murphy <[email protected]> + +description: | + BQ25790 is a highly integrated switch-mode buck-boost charger for 1-4 cell + Li-ion batteries and Li-polymer batteries. The device charges a battery from a + wide range of input sources including legacy USB adapters to high voltage USB + PD adapters and traditional barrel adapters. + +allOf: + - $ref: power-supply.yaml# + +properties: + compatible: + enum: + - ti,bq25790 + - ti,bq25792 + + reg: + maxItems: 1 + + ti,watchdog-timeout-ms: + default: 0 + description: | + Watchdog timer in milli seconds. 0 (default) disables the watchdog. + minimum: 0 + maximum: 160000 + enum: [ 0, 500, 1000, 2000, 20000, 40000, 80000, 160000] + + input-voltage-limit-microvolt: + description: | + Minimum input voltage limit in micro volts with a 100000 micro volt step. + minimum: 3600000 + maximum: 22000000 + + input-current-limit-microamp: + description: | + Maximum input current limit in micro amps with a 100000 micro amp step. + minimum: 100000 + maximum: 3300000 + + monitored-battery: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the battery node being monitored + + interrupts: + maxItems: 1 + description: | + Interrupt sends an active low, 256 μs pulse to host to report the charger + device status and faults. + +required: + - compatible + - reg + - monitored-battery + +unevaluatedProperties: false + +examples: + - | + bat: battery { + compatible = "simple-battery"; + constant-charge-current-max-microamp = <2000000>; + constant-charge-voltage-max-microvolt = <4200000>; + precharge-current-microamp = <160000>; + charge-term-current-microamp = <160000>; + }; + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/interrupt-controller/irq.h> + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + bq25790: charger@6b { + compatible = "ti,bq25790"; + reg = <0x6b>; + interrupt-parent = <&gpio1>; + interrupts = <16 IRQ_TYPE_EDGE_FALLING>; + ti,watchdog-timeout-ms = <2000>; + input-current-limit-microamp = <3000000>; + input-voltage-limit-microvolt = <4500000>; + monitored-battery = <&bat>; + }; + }; + +...
Signature · 1 line
2.28.0
PATCH v2 2/2 power: supply: bq25790: Introduce the BQ25790 charger driver
BQ25790 is a highly integrated switch-mode buck-boost charger for 1-4 cell Li-ion battery and Li-polymer battery.
---
v2 - Updated per yaml changes
drivers/power/supply/Kconfig | 8 + drivers/power/supply/Makefile | 1 + drivers/power/supply/bq25790_charger.c | 1117 ++++++++++++++++++++++++ drivers/power/supply/bq25790_charger.h | 150 ++++ 4 files changed, 1276 insertions(+) create mode 100644 drivers/power/supply/bq25790_charger.c create mode 100644 drivers/power/supply/bq25790_charger.h
drivers/power/supply/Kconfig +8 -0
@@ -623,6 +623,14 @@ config CHARGER_BQ2515X rail, ADC for battery and system monitoring, and push-button controller. +config CHARGER_BQ25790 + tristate "TI BQ25790 battery charger driver" + depends on I2C + depends on GPIOLIB || COMPILE_TEST + select REGMAP_I2C + help + Say Y to enable support for the TI BQ25790 battery charger. + config CHARGER_BQ25890 tristate "TI BQ25890 battery charger driver" depends on I2C
drivers/power/supply/Makefile +1 -0
@@ -84,6 +84,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_BQ25890) += bq25890_charger.o +obj-$(CONFIG_CHARGER_BQ25790) += bq25790_charger.o obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
drivers/power/supply/bq25790_charger.c new file +1117 -0
1,117 lines not on this page · raw message
drivers/power/supply/bq25790_charger.h new file +150 -0
150 lines not on this page · raw message
Signature · 1 line
2.28.0
Re: [PATCH v2 2/2] power: supply: bq25790: Introduce the BQ25790 charger driver
Hello
Quoted 2 lines · Dan Murphy
BQ25790 is a highly integrated switch-mode buck-boost charger for 1-4 cell Li-ion battery and Li-polymer battery.
Gentle bump
Quoted 4 lines · Dan Murphy
Add the bindings for the bq25790.
Signed-off-by Ricardo Rivera-Matos <[email protected]>Signed-off-by Dan Murphy <[email protected]>
Quoted 9 lines
---
v2 - Changed ti,watchdog property, documented the interrupts, fixed exxamples for input-current and input-voltage
.../bindings/power/supply/bq25790.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/bq25790.yaml