summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/power/supply/bq256xx.yaml
blob: a76afe3ca29922fe73da12126f9e107a4fef270d (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# 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/bq256xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TI bq256xx Switch Mode Buck Charger

maintainers:
  - Andrew Davis <afd@ti.com>

description: |
  The bq256xx devices are a family of highly-integrated battery charge
  management and system power management ICs for single cell Li-ion and Li-
  polymer batteries.

  Datasheets:
    - https://www.ti.com/lit/ds/symlink/bq25600.pdf
    - https://www.ti.com/lit/ds/symlink/bq25601.pdf
    - https://www.ti.com/lit/ds/symlink/bq25600d.pdf
    - https://www.ti.com/lit/ds/symlink/bq25601d.pdf
    - https://www.ti.com/lit/ds/symlink/bq25611d.pdf
    - https://www.ti.com/lit/ds/symlink/bq25618.pdf
    - https://www.ti.com/lit/ds/symlink/bq25619.pdf

properties:
  compatible:
    enum:
      - ti,bq25600
      - ti,bq25601
      - ti,bq25600d
      - ti,bq25601d
      - ti,bq25611d
      - ti,bq25618
      - ti,bq25619

  reg:
    maxItems: 1

  ti,watchdog-timeout-ms:
    default: 0
    description: |
      Watchdog timer in ms. 0 (default) disables the watchdog
    minimum: 0
    maximum: 160000
    enum: [ 0, 40000, 80000, 160000]

  input-voltage-limit-microvolt:
    description: |
       Minimum input voltage limit in µV with a 100000 µV step
    minimum: 3900000
    maximum: 5400000

  input-current-limit-microamp:
    description: |
       Maximum input current limit in µA with a 100000 µA step
    minimum: 100000
    maximum: 3200000

  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.

  ti,no-thermistor:
    type: boolean
    description: Indicates that no thermistor is connected to the TS pin

required:
  - compatible
  - reg
  - monitored-battery

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - ti,bq25600
              - ti,bq25601
              - ti,bq25600d
              - ti,bq25601d
    then:
      properties:
        ti,no-thermistor: false

additionalProperties: false

examples:
  - |
    bat: battery {
      compatible = "simple-battery";
      constant-charge-current-max-microamp = <2040000>;
      constant-charge-voltage-max-microvolt = <4352000>;
      precharge-current-microamp = <180000>;
      charge-term-current-microamp = <180000>;
    };
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {

      clock-frequency = <400000>;

      #address-cells = <1>;
      #size-cells = <0>;

      charger@6b {
        compatible = "ti,bq25601";
        reg = <0x6b>;
        monitored-battery = <&bat>;

        interrupt-parent = <&gpio1>;
        interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
        ti,watchdog-timeout-ms = <40000>;

        input-voltage-limit-microvolt = <4500000>;
        input-current-limit-microamp = <2400000>;
       };
    };
...