xref: /linux/Documentation/devicetree/bindings/power/supply/bq24190.yaml (revision d30c1683aaecb93d2ab95685dc4300a33d3cea7a)
1# SPDX-License-Identifier: GPL-2.0
2# Copyright (C) 2021 Sebastian Reichel
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/power/supply/bq24190.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: TI BQ2419x Li-Ion Battery Charger
9
10maintainers:
11  - Sebastian Reichel <sre@kernel.org>
12
13allOf:
14  - $ref: power-supply.yaml#
15
16properties:
17  compatible:
18    enum:
19      - ti,bq24190
20      - ti,bq24192
21      - ti,bq24192i
22      - ti,bq24193
23      - ti,bq24196
24      - ti,bq24296
25      - ti,bq24297
26
27  reg:
28    maxItems: 1
29
30  interrupts:
31    maxItems: 1
32
33  ce-gpios:
34    description:
35      Active low Charge Enable pin. Battery charging is enabled when
36      REG01[5:4] = 01 and CE pin is Low. CE pin must be pulled high or low.
37    maxItems: 1
38
39  usb-otg-vbus:
40    $ref: /schemas/regulator/regulator.yaml#
41    description: |
42      Regulator that is used to control the VBUS voltage direction for
43      either USB host mode or for charging on the OTG port
44
45  ti,system-minimum-microvolt:
46    description: |
47      when power is connected and the battery is below minimum system voltage,
48      the system will be regulated above this setting.
49
50  omit-battery-class:
51    type: boolean
52    description: |
53      If this property is set, the operating system does not try to create a
54      battery device.
55
56  monitored-battery:
57    description: |
58      phandle to a "simple-battery" compatible node.
59
60      This property must be a phandle to a node using the format described
61      in battery.yaml, with the following properties being required:
62      - precharge-current-microamp: maximum charge current during precharge phase
63                                    (typically 20% of battery capacity).
64      - charge-term-current-microamp: a charge cycle terminates when the battery voltage is
65                                      above recharge threshold, and the current is below this
66                                      setting (typically 10% of battery capacity).
67
68required:
69  - compatible
70  - reg
71  - interrupts
72
73additionalProperties: false
74
75examples:
76  - |
77    #include <dt-bindings/gpio/gpio.h>
78    #include <dt-bindings/interrupt-controller/irq.h>
79
80    bat: battery {
81      compatible = "simple-battery";
82      precharge-current-microamp = <256000>;
83      charge-term-current-microamp = <128000>;
84    };
85
86    i2c {
87      #address-cells = <1>;
88      #size-cells = <0>;
89
90      charger@6a {
91        compatible = "ti,bq24190";
92        reg = <0x6a>;
93        interrupt-parent = <&gpiochip>;
94        interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
95        monitored-battery = <&bat>;
96        ti,system-minimum-microvolt = <3200000>;
97
98        usb_otg_vbus: usb-otg-vbus { };
99      };
100    };
101