1# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
2# Copyright (C) 2020 Texas Instruments Incorporated
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/power/supply/bq256xx.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: TI bq256xx Switch Mode Buck Charger
9
10maintainers:
11  - Ricardo Rivera-Matos <r-rivera-matos@ti.com>
12
13description: |
14  The bq256xx devices are a family of highly-integrated battery charge
15  management and system power management ICs for single cell Li-ion and Li-
16  polymer batteries.
17
18  Datasheets:
19    - https://www.ti.com/lit/ds/symlink/bq25600.pdf
20    - https://www.ti.com/lit/ds/symlink/bq25601.pdf
21    - https://www.ti.com/lit/ds/symlink/bq25600d.pdf
22    - https://www.ti.com/lit/ds/symlink/bq25601d.pdf
23    - https://www.ti.com/lit/ds/symlink/bq25611d.pdf
24    - https://www.ti.com/lit/ds/symlink/bq25618.pdf
25    - https://www.ti.com/lit/ds/symlink/bq25619.pdf
26
27properties:
28  compatible:
29    enum:
30      - ti,bq25600
31      - ti,bq25601
32      - ti,bq25600d
33      - ti,bq25601d
34      - ti,bq25611d
35      - ti,bq25618
36      - ti,bq25619
37
38  reg:
39    maxItems: 1
40
41  ti,watchdog-timeout-ms:
42    $ref: /schemas/types.yaml#/definitions/uint32
43    default: 0
44    description: |
45      Watchdog timer in ms. 0 (default) disables the watchdog
46    minimum: 0
47    maximum: 160000
48    enum: [ 0, 40000, 80000, 160000]
49
50  input-voltage-limit-microvolt:
51    description: |
52       Minimum input voltage limit in µV with a 100000 µV step
53    minimum: 3900000
54    maximum: 5400000
55
56  input-current-limit-microamp:
57    description: |
58       Maximum input current limit in µA with a 100000 µA step
59    minimum: 100000
60    maximum: 3200000
61
62  monitored-battery:
63    $ref: /schemas/types.yaml#/definitions/phandle
64    description: phandle to the battery node being monitored
65
66  interrupts:
67    maxItems: 1
68    description: |
69      Interrupt sends an active low, 256 μs pulse to host to report the charger
70      device status and faults.
71
72required:
73  - compatible
74  - reg
75  - monitored-battery
76
77additionalProperties: false
78
79examples:
80  - |
81    bat: battery {
82      compatible = "simple-battery";
83      constant-charge-current-max-microamp = <2040000>;
84      constant-charge-voltage-max-microvolt = <4352000>;
85      precharge-current-microamp = <180000>;
86      charge-term-current-microamp = <180000>;
87    };
88    #include <dt-bindings/gpio/gpio.h>
89    #include <dt-bindings/interrupt-controller/irq.h>
90    i2c {
91
92      clock-frequency = <400000>;
93
94      #address-cells = <1>;
95      #size-cells = <0>;
96
97      charger@6b {
98        compatible = "ti,bq25601";
99        reg = <0x6b>;
100        monitored-battery = <&bat>;
101
102        interrupt-parent = <&gpio1>;
103        interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
104        ti,watchdog-timeout-ms = <40000>;
105
106        input-voltage-limit-microvolt = <4500000>;
107        input-current-limit-microamp = <2400000>;
108       };
109    };
110...
111