12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 22eb4d8dcSEmmanuel Vadot%YAML 1.2 32eb4d8dcSEmmanuel Vadot--- 4*b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/active-semi,act8945a-charger.yaml# 5*b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 62eb4d8dcSEmmanuel Vadot 72eb4d8dcSEmmanuel Vadottitle: Active-semi ACT8945A Charger Function 82eb4d8dcSEmmanuel Vadot 92eb4d8dcSEmmanuel Vadotmaintainers: 102eb4d8dcSEmmanuel Vadot - Sebastian Reichel <sre@kernel.org> 112eb4d8dcSEmmanuel Vadot 122eb4d8dcSEmmanuel VadotallOf: 132eb4d8dcSEmmanuel Vadot - $ref: power-supply.yaml# 142eb4d8dcSEmmanuel Vadot 152eb4d8dcSEmmanuel Vadotproperties: 162eb4d8dcSEmmanuel Vadot compatible: 172eb4d8dcSEmmanuel Vadot const: active-semi,act8945a-charger 182eb4d8dcSEmmanuel Vadot 192eb4d8dcSEmmanuel Vadot interrupts: 202eb4d8dcSEmmanuel Vadot maxItems: 1 212eb4d8dcSEmmanuel Vadot 222eb4d8dcSEmmanuel Vadot active-semi,chglev-gpios: 232eb4d8dcSEmmanuel Vadot maxItems: 1 242eb4d8dcSEmmanuel Vadot description: charge current level GPIO 252eb4d8dcSEmmanuel Vadot 262eb4d8dcSEmmanuel Vadot active-semi,lbo-gpios: 272eb4d8dcSEmmanuel Vadot maxItems: 1 282eb4d8dcSEmmanuel Vadot description: low battery voltage detect GPIO 292eb4d8dcSEmmanuel Vadot 302eb4d8dcSEmmanuel Vadot active-semi,input-voltage-threshold-microvolt: 312eb4d8dcSEmmanuel Vadot description: | 322eb4d8dcSEmmanuel Vadot Specifies the charger's input over-voltage threshold value. 332eb4d8dcSEmmanuel Vadot Despite the name, specified values are in millivolt (mV). 342eb4d8dcSEmmanuel Vadot Defaults to 6.6 V 352eb4d8dcSEmmanuel Vadot enum: [ 6600, 7000, 7500, 8000 ] 362eb4d8dcSEmmanuel Vadot 372eb4d8dcSEmmanuel Vadot active-semi,precondition-timeout: 382eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 392eb4d8dcSEmmanuel Vadot description: | 402eb4d8dcSEmmanuel Vadot Specifies the charger's PRECONDITION safety timer setting value in minutes. 412eb4d8dcSEmmanuel Vadot If 0, it means to disable this timer. 422eb4d8dcSEmmanuel Vadot Defaults to 40 minutes. 432eb4d8dcSEmmanuel Vadot enum: [ 0, 40, 60, 80 ] 442eb4d8dcSEmmanuel Vadot 452eb4d8dcSEmmanuel Vadot active-semi,total-timeout: 462eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 472eb4d8dcSEmmanuel Vadot description: | 482eb4d8dcSEmmanuel Vadot Specifies the charger's total safety timer setting value in hours; 492eb4d8dcSEmmanuel Vadot If 0, it means to disable this timer; 502eb4d8dcSEmmanuel Vadot Defaults to 3 hours. 512eb4d8dcSEmmanuel Vadot enum: [ 0, 3, 4, 5 ] 522eb4d8dcSEmmanuel Vadot 532eb4d8dcSEmmanuel Vadotrequired: 542eb4d8dcSEmmanuel Vadot - compatible 552eb4d8dcSEmmanuel Vadot - interrupts 562eb4d8dcSEmmanuel Vadot - active-semi,chglev-gpios 572eb4d8dcSEmmanuel Vadot - active-semi,lbo-gpios 582eb4d8dcSEmmanuel Vadot 592eb4d8dcSEmmanuel VadotadditionalProperties: false 602eb4d8dcSEmmanuel Vadot 612eb4d8dcSEmmanuel Vadotexamples: 622eb4d8dcSEmmanuel Vadot - | 632eb4d8dcSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 642eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 652eb4d8dcSEmmanuel Vadot pmic { 662eb4d8dcSEmmanuel Vadot charger { 672eb4d8dcSEmmanuel Vadot compatible = "active-semi,act8945a-charger"; 682eb4d8dcSEmmanuel Vadot interrupt-parent = <&pioA>; 692eb4d8dcSEmmanuel Vadot interrupts = <45 IRQ_TYPE_LEVEL_LOW>; 702eb4d8dcSEmmanuel Vadot active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>; 712eb4d8dcSEmmanuel Vadot active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>; 722eb4d8dcSEmmanuel Vadot active-semi,input-voltage-threshold-microvolt = <6600>; 732eb4d8dcSEmmanuel Vadot active-semi,precondition-timeout = <40>; 742eb4d8dcSEmmanuel Vadot active-semi,total-timeout = <3>; 752eb4d8dcSEmmanuel Vadot }; 762eb4d8dcSEmmanuel Vadot }; 77