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