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/bq25980.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: TI BQ25980 Flash Charger
9
10maintainers:
11  - Dan Murphy <dmurphy@ti.com>
12  - Ricardo Rivera-Matos <r-rivera-matos@ti.com>
13
14description: |
15  The BQ25980, BQ25975, and BQ25960 are a series of flash chargers intended
16  for use in high-power density portable electronics. These inductorless
17  switching chargers can provide over 97% efficiency by making use of the
18  switched capacitor architecture.
19
20allOf:
21  - $ref: power-supply.yaml#
22
23properties:
24  compatible:
25    enum:
26      - ti,bq25980
27      - ti,bq25975
28      - ti,bq25960
29
30  reg:
31    maxItems: 1
32
33  ti,watchdog-timeout-ms:
34    description: |
35      Watchdog timer in milli seconds. 0 disables the watchdog.
36    default: 0
37    minimum: 0
38    maximum: 300000
39    enum: [ 0, 5000, 10000, 50000, 300000]
40
41  ti,sc-ovp-limit-microvolt:
42    description: |
43      Minimum input voltage limit in micro volts with a when the charger is in
44      switch cap mode. 100000 micro volt step.
45    default: 17800000
46    minimum: 14000000
47    maximum: 22000000
48
49  ti,sc-ocp-limit-microamp:
50    description: |
51      Maximum input current limit in micro amps with a 100000 micro amp step.
52    minimum: 100000
53    maximum: 3300000
54
55  ti,bypass-ovp-limit-microvolt:
56    description: |
57      Minimum input voltage limit in micro volts with a when the charger is in
58      switch cap mode. 50000 micro volt step.
59    minimum: 7000000
60    maximum: 12750000
61
62  ti,bypass-ocp-limit-microamp:
63    description: |
64      Maximum input current limit in micro amps with a 100000 micro amp step.
65    minimum: 100000
66    maximum: 3300000
67
68  ti,bypass-enable:
69    type: boolean
70    description: Enables bypass mode at boot time
71
72  interrupts:
73    maxItems: 1
74    description: |
75      Indicates that the device state has changed.
76
77  monitored-battery:
78    $ref: /schemas/types.yaml#/definitions/phandle
79    description: phandle to the battery node being monitored
80
81required:
82  - compatible
83  - reg
84  - monitored-battery
85
86unevaluatedProperties: false
87
88examples:
89  - |
90    bat: battery {
91      compatible = "simple-battery";
92      constant-charge-current-max-microamp = <4000000>;
93      constant-charge-voltage-max-microvolt = <8400000>;
94      precharge-current-microamp = <160000>;
95      charge-term-current-microamp = <160000>;
96    };
97    #include <dt-bindings/gpio/gpio.h>
98    #include <dt-bindings/interrupt-controller/irq.h>
99    i2c0 {
100      #address-cells = <1>;
101      #size-cells = <0>;
102
103      bq25980: charger@65 {
104          compatible = "ti,bq25980";
105          reg = <0x65>;
106          interrupt-parent = <&gpio1>;
107          interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
108          ti,watchdog-timer = <0>;
109          ti,sc-ocp-limit-microamp = <2000000>;
110          ti,sc-ovp-limit-microvolt = <17800000>;
111          monitored-battery = <&bat>;
112      };
113    };
114
115...
116