summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/power/supply/active-semi,act8945a-charger.yaml
blob: 5220d9cb16d88023ef600dace806d33698f23236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/active-semi,act8945a-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Active-semi ACT8945A Charger Function

maintainers:
  - Sebastian Reichel <sre@kernel.org>

allOf:
  - $ref: power-supply.yaml#

properties:
  compatible:
    const: active-semi,act8945a-charger

  interrupts:
    maxItems: 1

  active-semi,chglev-gpios:
    maxItems: 1
    description: charge current level GPIO

  active-semi,lbo-gpios:
    maxItems: 1
    description: low battery voltage detect GPIO

  active-semi,input-voltage-threshold-microvolt:
    description: |
      Specifies the charger's input over-voltage threshold value.
      Despite the name, specified values are in millivolt (mV).
      Defaults to 6.6 V
    enum: [ 6600, 7000, 7500, 8000 ]

  active-semi,precondition-timeout:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Specifies the charger's PRECONDITION safety timer setting value in minutes.
      If 0, it means to disable this timer.
      Defaults to 40 minutes.
    enum: [ 0, 40, 60, 80 ]

  active-semi,total-timeout:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Specifies the charger's total safety timer setting value in hours;
      If 0, it means to disable this timer;
      Defaults to 3 hours.
    enum: [ 0, 3, 4, 5 ]

required:
  - compatible
  - interrupts
  - active-semi,chglev-gpios
  - active-semi,lbo-gpios

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    pmic {
      charger {
        compatible = "active-semi,act8945a-charger";
        interrupt-parent = <&pioA>;
        interrupts = <45 IRQ_TYPE_LEVEL_LOW>;
        active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
        active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
        active-semi,input-voltage-threshold-microvolt = <6600>;
        active-semi,precondition-timeout = <40>;
        active-semi,total-timeout = <3>;
      };
    };