[PATCH v2 1/2] dt-bindings: power: supply: gpio-charger: add support for fast-charge timer

Dimitri Fedrau via B4 Relay posted 2 patches 1 month ago
[PATCH v2 1/2] dt-bindings: power: supply: gpio-charger: add support for fast-charge timer
Posted by Dimitri Fedrau via B4 Relay 1 month ago
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.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
---
 Documentation/devicetree/bindings/power/supply/gpio-charger.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
index 25826bfc289c1c00c338fd0cee2ae6932529cfc3..0edacc104186497118d4ba41f80947009a9aacf6 100644
--- a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
+++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
@@ -62,6 +62,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
 
@@ -97,4 +101,5 @@ examples:
                                      <700000 0x01>, // 700 mA => GPIO A.12 high
                                      <0 0x02>; // 0 mA => GPIO A.11 high
       charge-current-limit-default-microamp = <700000>;
+      fast-charge-timer-gpios = <&gpioA 13 GPIO_ACTIVE_LOW>;
     };

-- 
2.39.5
Re: [PATCH v2 1/2] dt-bindings: power: supply: gpio-charger: add support for fast-charge timer
Posted by Sebastian Reichel 1 week, 1 day ago
Hi,

On Fri, Jan 09, 2026 at 07:41:19PM +0100, Dimitri Fedrau via B4 Relay wrote:
> 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.
> 
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
> ---

With the time being charger specific, this is not a good solution
for the generic gpio-charger compatible. You should add a compatible
for the BQ24081 (using gpio-charger as fallback) and then only allow
'fast-charge-timer-gpios' for the BQ24081.

Greetings,

-- Sebastian

>  Documentation/devicetree/bindings/power/supply/gpio-charger.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
> index 25826bfc289c1c00c338fd0cee2ae6932529cfc3..0edacc104186497118d4ba41f80947009a9aacf6 100644
> --- a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
> +++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
> @@ -62,6 +62,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
>  
> @@ -97,4 +101,5 @@ examples:
>                                       <700000 0x01>, // 700 mA => GPIO A.12 high
>                                       <0 0x02>; // 0 mA => GPIO A.11 high
>        charge-current-limit-default-microamp = <700000>;
> +      fast-charge-timer-gpios = <&gpioA 13 GPIO_ACTIVE_LOW>;
>      };
> 
> -- 
> 2.39.5
> 
>