xref: /linux/Documentation/devicetree/bindings/power/supply/bq2515x.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
18f7bda7aSRicardo Rivera-Matos# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28f7bda7aSRicardo Rivera-Matos# Copyright (C) 2020 Texas Instruments Incorporated
38f7bda7aSRicardo Rivera-Matos%YAML 1.2
48f7bda7aSRicardo Rivera-Matos---
51ea78ec5SKrzysztof Kozlowski$id: http://devicetree.org/schemas/power/supply/bq2515x.yaml#
61ea78ec5SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
78f7bda7aSRicardo Rivera-Matos
88f7bda7aSRicardo Rivera-Matostitle: TI bq2515x 500-mA Linear charger family
98f7bda7aSRicardo Rivera-Matos
108f7bda7aSRicardo Rivera-Matosmaintainers:
1107d1caa4SKrzysztof Kozlowski  - Andrew Davis <afd@ti.com>
128f7bda7aSRicardo Rivera-Matos
138f7bda7aSRicardo Rivera-Matosdescription: |
148f7bda7aSRicardo Rivera-Matos  The BQ2515x family is a highly integrated battery charge management IC that
158f7bda7aSRicardo Rivera-Matos  integrates the most common functions for wearable devices, namely a charger,
168f7bda7aSRicardo Rivera-Matos  an output voltage rail, ADC for battery and system monitoring, and
178f7bda7aSRicardo Rivera-Matos  push-button controller.
188f7bda7aSRicardo Rivera-Matos
198f7bda7aSRicardo Rivera-Matos  Specifications about the charger can be found at:
208f7bda7aSRicardo Rivera-Matos    http://www.ti.com/lit/ds/symlink/bq25150.pdf
218f7bda7aSRicardo Rivera-Matos    http://www.ti.com/lit/ds/symlink/bq25155.pdf
228f7bda7aSRicardo Rivera-Matos
238f7bda7aSRicardo Rivera-Matosproperties:
248f7bda7aSRicardo Rivera-Matos  compatible:
258f7bda7aSRicardo Rivera-Matos    enum:
268f7bda7aSRicardo Rivera-Matos      - ti,bq25150
278f7bda7aSRicardo Rivera-Matos      - ti,bq25155
288f7bda7aSRicardo Rivera-Matos
298f7bda7aSRicardo Rivera-Matos  reg:
308f7bda7aSRicardo Rivera-Matos    maxItems: 1
318f7bda7aSRicardo Rivera-Matos    description: I2C address of the charger.
328f7bda7aSRicardo Rivera-Matos
338f7bda7aSRicardo Rivera-Matos  ac-detect-gpios:
348f7bda7aSRicardo Rivera-Matos    description: |
358f7bda7aSRicardo Rivera-Matos       GPIO used for connecting the bq2515x device PG (AC Detect)
368f7bda7aSRicardo Rivera-Matos       pin.
378f7bda7aSRicardo Rivera-Matos    maxItems: 1
388f7bda7aSRicardo Rivera-Matos
398f7bda7aSRicardo Rivera-Matos  reset-gpios:
408f7bda7aSRicardo Rivera-Matos    description: GPIO used for hardware reset.
418f7bda7aSRicardo Rivera-Matos    maxItems: 1
428f7bda7aSRicardo Rivera-Matos
438f7bda7aSRicardo Rivera-Matos  powerdown-gpios:
448f7bda7aSRicardo Rivera-Matos    description: GPIO used for low power mode of IC.
458f7bda7aSRicardo Rivera-Matos    maxItems: 1
468f7bda7aSRicardo Rivera-Matos
478f7bda7aSRicardo Rivera-Matos  charge-enable-gpios:
488f7bda7aSRicardo Rivera-Matos    description: GPIO used to turn on and off charging.
498f7bda7aSRicardo Rivera-Matos    maxItems: 1
508f7bda7aSRicardo Rivera-Matos
518f7bda7aSRicardo Rivera-Matos  input-current-limit-microamp:
528f7bda7aSRicardo Rivera-Matos    description: Maximum input current in micro Amps.
538f7bda7aSRicardo Rivera-Matos    minimum: 50000
548f7bda7aSRicardo Rivera-Matos    maximum: 500000
558f7bda7aSRicardo Rivera-Matos
568f7bda7aSRicardo Rivera-Matos  monitored-battery:
578f7bda7aSRicardo Rivera-Matos    $ref: /schemas/types.yaml#/definitions/phandle
588f7bda7aSRicardo Rivera-Matos    description: phandle to the battery node being monitored
598f7bda7aSRicardo Rivera-Matos
608f7bda7aSRicardo Rivera-Matosrequired:
618f7bda7aSRicardo Rivera-Matos  - compatible
628f7bda7aSRicardo Rivera-Matos  - reg
638f7bda7aSRicardo Rivera-Matos  - monitored-battery
648f7bda7aSRicardo Rivera-Matos
658f7bda7aSRicardo Rivera-MatosadditionalProperties: false
668f7bda7aSRicardo Rivera-Matos
678f7bda7aSRicardo Rivera-Matosexamples:
688f7bda7aSRicardo Rivera-Matos  - |
698f7bda7aSRicardo Rivera-Matos    bat: battery {
708f7bda7aSRicardo Rivera-Matos      compatible = "simple-battery";
718f7bda7aSRicardo Rivera-Matos      constant-charge-current-max-microamp = <50000>;
728f7bda7aSRicardo Rivera-Matos      precharge-current-microamp = <2500>;
738f7bda7aSRicardo Rivera-Matos      constant-charge-voltage-max-microvolt = <4000000>;
748f7bda7aSRicardo Rivera-Matos    };
758f7bda7aSRicardo Rivera-Matos    #include <dt-bindings/gpio/gpio.h>
76*20a72af1SRob Herring    i2c {
778f7bda7aSRicardo Rivera-Matos      #address-cells = <1>;
788f7bda7aSRicardo Rivera-Matos      #size-cells = <0>;
798f7bda7aSRicardo Rivera-Matos
808f7bda7aSRicardo Rivera-Matos      bq25150: charger@6b {
818f7bda7aSRicardo Rivera-Matos        compatible = "ti,bq25150";
828f7bda7aSRicardo Rivera-Matos        reg = <0x6b>;
838f7bda7aSRicardo Rivera-Matos        monitored-battery = <&bat>;
848f7bda7aSRicardo Rivera-Matos        input-current-limit-microamp = <100000>;
858f7bda7aSRicardo Rivera-Matos
868f7bda7aSRicardo Rivera-Matos        ac-detect-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
878f7bda7aSRicardo Rivera-Matos        reset-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
888f7bda7aSRicardo Rivera-Matos        powerdown-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
898f7bda7aSRicardo Rivera-Matos        charge-enable-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
908f7bda7aSRicardo Rivera-Matos      };
918f7bda7aSRicardo Rivera-Matos    };
92