xref: /linux/Documentation/devicetree/bindings/mfd/ti,bq25703a.yaml (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/ti,bq25703a.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: BQ257xx Charger Manager/Buck/Boost Converter
8
9maintainers:
10  - Chris Morgan <macromorgan@hotmail.com>
11
12properties:
13  compatible:
14    enum:
15      - ti,bq25703a
16      - ti,bq25792
17
18  reg:
19    const: 0x6b
20
21  input-current-limit-microamp:
22    description:
23      Maximum total input current allowed used for both charging and
24      powering the device.
25    minimum: 50000
26    maximum: 6400000
27
28  interrupts:
29    maxItems: 1
30
31  monitored-battery:
32    description:
33      A minimum of constant-charge-current-max-microamp,
34      constant-charge-voltage-max-microvolt, and
35      voltage-min-design-microvolt are required.
36
37  regulators:
38    type: object
39    additionalProperties: false
40    description:
41      Boost converter regulator output of bq257xx.
42
43    properties:
44      vbus:
45        type: object
46        $ref: /schemas/regulator/regulator.yaml
47        additionalProperties: false
48
49        properties:
50          regulator-name: true
51          regulator-min-microamp:
52            minimum: 0
53            maximum: 6350000
54          regulator-max-microamp:
55            minimum: 0
56            maximum: 6350000
57          regulator-min-microvolt:
58            minimum: 2800000
59            maximum: 22000000
60          regulator-max-microvolt:
61            minimum: 2800000
62            maximum: 22000000
63          enable-gpios:
64            description:
65              The BQ25703 may require both a register write and a GPIO
66              toggle to enable the boost regulator.
67
68        required:
69          - regulator-name
70          - regulator-min-microamp
71          - regulator-max-microamp
72          - regulator-min-microvolt
73          - regulator-max-microvolt
74
75allOf:
76  - $ref: /schemas/power/supply/power-supply.yaml#
77  - if:
78      properties:
79        compatible:
80          const: ti,bq25703a
81    then:
82      properties:
83        input-current-limit-microamp:
84          minimum: 50000
85          maximum: 6400000
86          default: 3250000
87        regulators:
88          properties:
89            vbus:
90              properties:
91                regulator-min-microamp:
92                  minimum: 0
93                  maximum: 6350000
94                regulator-max-microamp:
95                  minimum: 0
96                  maximum: 6350000
97                regulator-min-microvolt:
98                  minimum: 4480000
99                  maximum: 20800000
100                regulator-max-microvolt:
101                  minimum: 4480000
102                  maximum: 20800000
103  - if:
104      properties:
105        compatible:
106          const: ti,bq25792
107    then:
108      properties:
109        input-current-limit-microamp:
110          minimum: 100000
111          maximum: 3300000
112          default: 3000000
113        regulators:
114          properties:
115            vbus:
116              properties:
117                regulator-min-microamp:
118                  minimum: 0
119                  maximum: 3320000
120                regulator-max-microamp:
121                  minimum: 0
122                  maximum: 3320000
123                regulator-min-microvolt:
124                  minimum: 2800000
125                  maximum: 22000000
126                regulator-max-microvolt:
127                  minimum: 2800000
128                  maximum: 22000000
129
130unevaluatedProperties: false
131
132required:
133  - compatible
134  - reg
135  - input-current-limit-microamp
136  - monitored-battery
137  - power-supplies
138
139examples:
140  - |
141    #include <dt-bindings/gpio/gpio.h>
142    #include <dt-bindings/interrupt-controller/irq.h>
143    #include <dt-bindings/pinctrl/rockchip.h>
144    i2c {
145        #address-cells = <1>;
146        #size-cells = <0>;
147
148        bq25703: charger@6b {
149            compatible = "ti,bq25703a";
150            reg = <0x6b>;
151            input-current-limit-microamp = <5000000>;
152            interrupt-parent = <&gpio0>;
153            interrupts = <RK_PD5 IRQ_TYPE_LEVEL_LOW>;
154            monitored-battery = <&battery>;
155            power-supplies = <&fusb302>;
156
157            regulators {
158                usb_otg_vbus: vbus {
159                    enable-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
160                    regulator-max-microamp = <960000>;
161                    regulator-max-microvolt = <5088000>;
162                    regulator-min-microamp = <512000>;
163                    regulator-min-microvolt = <4992000>;
164                    regulator-name = "usb_otg_vbus";
165                };
166            };
167        };
168    };
169
170...
171