From: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
On some devices like TIs BQ24081 battery charger it is possible to activate
or deactivate a fast-charge timer that provides a backup safety for charge
termination via GPIO. In case of the BQ24081 it is a fixed 7-hour timer.
Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
---
.../bindings/power/supply/gpio-charger.yaml | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
index 25826bfc289c1c00c338fd0cee2ae6932529cfc3..fefa09cb24ec2f501099f486c9a4eb77e64cda67 100644
--- a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
+++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
@@ -16,7 +16,12 @@ description:
properties:
compatible:
- const: gpio-charger
+ oneOf:
+ - const: gpio-charger
+ - items:
+ - enum:
+ - ti,bq24081
+ - const: gpio-charger
charger-type:
enum:
@@ -62,6 +67,10 @@ properties:
description: Default charge current limit. Must be listed in
charge-current-limit-mapping.
+ fast-charge-timer-gpios:
+ maxItems: 1
+ description: GPIO used for enabling/disabling the fast-charge timer
+
required:
- compatible
@@ -98,3 +107,14 @@ examples:
<0 0x02>; // 0 mA => GPIO A.11 high
charge-current-limit-default-microamp = <700000>;
};
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ charger {
+ compatible = "ti,bq24081", "gpio-charger";
+ charger-type = "battery";
+ charge-status-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+ charge-current-limit-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
+ charge-current-limit-mapping = <206000 0x1>, <0 0x0>;
+ fast-charge-timer-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ };
--
2.39.5