xref: /linux/Documentation/devicetree/bindings/power/supply/bq24190.yaml (revision 05be28fe8521f183f945d052d5019197e5934f0e)
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  usb-otg-vbus:
34    $ref: /schemas/regulator/regulator.yaml#
35    description: |
36      Regulator that is used to control the VBUS voltage direction for
37      either USB host mode or for charging on the OTG port
38
39  ti,system-minimum-microvolt:
40    description: |
41      when power is connected and the battery is below minimum system voltage,
42      the system will be regulated above this setting.
43
44  omit-battery-class:
45    type: boolean
46    description: |
47      If this property is set, the operating system does not try to create a
48      battery device.
49
50  monitored-battery:
51    $ref: /schemas/types.yaml#/definitions/phandle
52    description: |
53      phandle to a "simple-battery" compatible node.
54
55      This property must be a phandle to a node using the format described
56      in battery.yaml, with the following properties being required:
57      - precharge-current-microamp: maximum charge current during precharge phase
58                                    (typically 20% of battery capacity).
59      - charge-term-current-microamp: a charge cycle terminates when the battery voltage is
60                                      above recharge threshold, and the current is below this
61                                      setting (typically 10% of battery capacity).
62
63required:
64  - compatible
65  - reg
66  - interrupts
67
68additionalProperties: false
69
70examples:
71  - |
72    #include <dt-bindings/gpio/gpio.h>
73    #include <dt-bindings/interrupt-controller/irq.h>
74
75    bat: battery {
76      compatible = "simple-battery";
77      precharge-current-microamp = <256000>;
78      charge-term-current-microamp = <128000>;
79    };
80
81    i2c {
82      #address-cells = <1>;
83      #size-cells = <0>;
84
85      charger@6a {
86        compatible = "ti,bq24190";
87        reg = <0x6a>;
88        interrupt-parent = <&gpiochip>;
89        interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
90        monitored-battery = <&bat>;
91        ti,system-minimum-microvolt = <3200000>;
92
93        usb_otg_vbus: usb-otg-vbus { };
94      };
95    };
96