1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright (C) 2020 Texas Instruments Incorporated
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/power/supply/bq2515x.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: TI bq2515x 500-mA Linear charger family
9
10maintainers:
11  - Dan Murphy <dmurphy@ti.com>
12  - Ricardo Rivera-Matos <r-rivera-matos@ti.com>
13
14description: |
15  The BQ2515x family is a highly integrated battery charge management IC that
16  integrates the most common functions for wearable devices, namely a charger,
17  an output voltage rail, ADC for battery and system monitoring, and
18  push-button controller.
19
20  Specifications about the charger can be found at:
21    http://www.ti.com/lit/ds/symlink/bq25150.pdf
22    http://www.ti.com/lit/ds/symlink/bq25155.pdf
23
24properties:
25  compatible:
26    enum:
27      - ti,bq25150
28      - ti,bq25155
29
30  reg:
31    maxItems: 1
32    description: I2C address of the charger.
33
34  ac-detect-gpios:
35    description: |
36       GPIO used for connecting the bq2515x device PG (AC Detect)
37       pin.
38    maxItems: 1
39
40  reset-gpios:
41    description: GPIO used for hardware reset.
42    maxItems: 1
43
44  powerdown-gpios:
45    description: GPIO used for low power mode of IC.
46    maxItems: 1
47
48  charge-enable-gpios:
49    description: GPIO used to turn on and off charging.
50    maxItems: 1
51
52  input-current-limit-microamp:
53    $ref: /schemas/types.yaml#/definitions/uint32
54    description: Maximum input current in micro Amps.
55    minimum: 50000
56    maximum: 500000
57
58  monitored-battery:
59    $ref: /schemas/types.yaml#/definitions/phandle
60    description: phandle to the battery node being monitored
61
62required:
63  - compatible
64  - reg
65  - monitored-battery
66
67additionalProperties: false
68
69examples:
70  - |
71    bat: battery {
72      compatible = "simple-battery";
73      constant-charge-current-max-microamp = <50000>;
74      precharge-current-microamp = <2500>;
75      constant-charge-voltage-max-microvolt = <4000000>;
76    };
77    #include <dt-bindings/gpio/gpio.h>
78    i2c0 {
79      #address-cells = <1>;
80      #size-cells = <0>;
81
82      bq25150: charger@6b {
83        compatible = "ti,bq25150";
84        reg = <0x6b>;
85        monitored-battery = <&bat>;
86        input-current-limit-microamp = <100000>;
87
88        ac-detect-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
89        reset-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
90        powerdown-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
91        charge-enable-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
92      };
93    };
94