xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/bq25890.yaml (revision 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc)
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/bq25890.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: Binding for bq25890, bq25892, bq25895 and bq25896 Li-Ion Charger
9
10maintainers:
11  - Sebastian Reichel <sre@kernel.org>
12
13allOf:
14  - $ref: power-supply.yaml#
15
16properties:
17  compatible:
18    enum:
19      - ti,bq25890
20      - ti,bq25892
21      - ti,bq25895
22      - ti,bq25896
23
24  reg:
25    maxItems: 1
26
27  interrupts:
28    maxItems: 1
29
30  ti,battery-regulation-voltage:
31    $ref: /schemas/types.yaml#/definitions/uint32
32    description: maximum charging voltage (in uV)
33
34  ti,charge-current:
35    $ref: /schemas/types.yaml#/definitions/uint32
36    description: maximum charging current (in uA)
37
38  ti,termination-current:
39    $ref: /schemas/types.yaml#/definitions/uint32
40    description: |
41      charge will be terminated when current in constant-voltage phase
42      drops below this value (in uA)
43
44  ti,precharge-current:
45    $ref: /schemas/types.yaml#/definitions/uint32
46    description: maximum charge current during precharge phase (in uA)
47
48  ti,minimum-sys-voltage:
49    $ref: /schemas/types.yaml#/definitions/uint32
50    description: |
51      when battery is charging and it is below minimum system voltage,
52      the system will be regulated above minimum-sys-voltage setting (in uV)
53
54  ti,boost-voltage:
55    $ref: /schemas/types.yaml#/definitions/uint32
56    description: VBUS voltage level in boost mode (in uV)
57
58  ti,boost-max-current:
59    $ref: /schemas/types.yaml#/definitions/uint32
60    description: maximum allowed current draw in boost mode (in uA)
61
62  ti,boost-low-freq:
63    description: boost mode frequency will be 500kHz, otherwise 1.5MHz
64    type: boolean
65
66  ti,use-ilim-pin:
67    description: |
68      ILIM resistor will be used and the input current will be the lower
69      between the resistor setting and the IINLIM register setting
70    type: boolean
71
72  ti,thermal-regulation-threshold:
73    $ref: /schemas/types.yaml#/definitions/uint32
74    description: |
75      temperature above which the charge current is lowered, to avoid overheating
76      (in degrees Celsius). If omitted, the default setting will be used (120 degrees)
77
78  ti,ibatcomp-micro-ohms:
79    description: value of a resistor in series with the battery (in Micro Ohms)
80
81  ti,ibatcomp-clamp-microvolt:
82    description: max. charging voltage adjustment due to expected voltage drop on in-series resistor
83
84required:
85  - compatible
86  - reg
87  - interrupts
88  - ti,battery-regulation-voltage
89  - ti,charge-current
90  - ti,termination-current
91  - ti,precharge-current
92  - ti,minimum-sys-voltage
93  - ti,boost-voltage
94  - ti,boost-max-current
95
96additionalProperties: false
97
98examples:
99  - |
100    #include <dt-bindings/interrupt-controller/irq.h>
101    i2c0 {
102      #address-cells = <1>;
103      #size-cells = <0>;
104
105      charger@6a {
106        compatible = "ti,bq25890";
107        reg = <0x6a>;
108
109        interrupt-parent = <&gpio1>;
110        interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
111
112        ti,battery-regulation-voltage = <4200000>;
113        ti,charge-current = <1000000>;
114        ti,termination-current = <50000>;
115        ti,precharge-current = <128000>;
116        ti,minimum-sys-voltage = <3600000>;
117        ti,boost-voltage = <5000000>;
118        ti,boost-max-current = <1000000>;
119
120        ti,use-ilim-pin;
121        ti,thermal-regulation-threshold = <120>;
122      };
123    };
124