aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation/devicetree/bindings/mfd/maxim,max8998.yaml
blob: f3c3f64fd012b19aa852cb0734ab85e8a24dfd07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/maxim,max8998.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim MAX8998, National/TI LP3974 Power Management IC

maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

description:
  The Maxim MAX8998 is a Power Management IC which includes voltage/current
  regulators, real time clock, battery charging controller and several other
  sub-blocks. It is interfaced using an I2C interface. Each sub-block is
  addressed by the host system using different i2c slave address.

properties:
  compatible:
    enum:
      - maxim,max8998
      - national,lp3974
      - ti,lp3974

  reg:
    maxItems: 1

  interrupts:
    minItems: 1
    items:
      - description: Main interrupt
      - description: Power-on/-off interrupt

  max8998,pmic-buck1-dvs-gpios:
    maxItems: 2
    description:
      Two host gpios used for buck1 DVS.

  max8998,pmic-buck2-dvs-gpio:
    maxItems: 1
    description:
      Host gpio used for buck2 DVS.

  max8998,pmic-buck1-default-dvs-idx:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]
    default: 0
    description:
      Default voltage setting selected from the possible 4 options selectable
      by the DVS gpios.

  max8998,pmic-buck2-default-dvs-idx:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]
    default: 0
    description:
      Default voltage setting selected from the possible 2 options selectable
      by the DVS GPIOs.

  max8998,pmic-buck-voltage-lock:
    type: boolean
    description:
      If present, disallows changing of preprogrammed buck DVS voltages.

  max8998,pmic-buck1-dvs-voltage:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    maxItems: 4
    description:
      Four voltage values in microvolts for buck1 regulator that can be
      selected using DVS GPIO.

  max8998,pmic-buck2-dvs-voltage:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    maxItems: 2
    description:
      Two voltage values in microvolts for buck2 regulator that can be
      selected using DVS GPIO.

  regulators:
    type: object
    additionalProperties: false

    properties:
      CHARGER:
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false
        description:
          CHARGER is main battery charger current control, wrongly represented
          as regulator.

        properties:
          regulator-min-microamp:
            minimum: 90000
            maximum: 800000

          regulator-max-microamp:
            minimum: 90000
            maximum: 800000

          regulator-min-microvolt: false
          regulator-max-microvolt: false

        required:
          - regulator-name

    patternProperties:
      "^(LDO([2-9]|1[0-7])|BUCK[1-4])$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        required:
          - regulator-name

      "^(EN32KHz-AP|EN32KHz-CP|ENVICHG|ESAFEOUT[12])$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false
        description: |
          EN32KHz-AP and EN32KHz-CP are 32768 Hz clocks, wrongly represented as
          regulators.
          ENVICHG is a Battery Charging Current Monitor Output.

        properties:
          regulator-min-microvolt: false
          regulator-max-microvolt: false

        required:
          - regulator-name

dependencies:
  max8998,pmic-buck1-dvs-gpios: [ "max8998,pmic-buck1-dvs-voltage" ]
  max8998,pmic-buck2-dvs-gpio: [ "max8998,pmic-buck2-dvs-voltage" ]

required:
  - compatible
  - reg
  - regulators

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        pmic@66 {
            compatible = "national,lp3974";
            reg = <0x66>;
            interrupts-extended = <&gpx0 7 IRQ_TYPE_LEVEL_LOW>,
                                  <&gpx2 7 IRQ_TYPE_LEVEL_LOW>;
            pinctrl-names = "default";
            pinctrl-0 = <&lp3974_irq>;

            max8998,pmic-buck1-default-dvs-idx = <0>;
            max8998,pmic-buck1-dvs-gpios = <&gpx0 5 GPIO_ACTIVE_HIGH>,
                                           <&gpx0 6 GPIO_ACTIVE_HIGH>;
            max8998,pmic-buck1-dvs-voltage = <1100000>, <1000000>,
                                             <1100000>, <1000000>;
            max8998,pmic-buck2-default-dvs-idx = <0>;
            max8998,pmic-buck2-dvs-gpio = <&gpe2 0 GPIO_ACTIVE_HIGH>;
            max8998,pmic-buck2-dvs-voltage = <1200000>, <1100000>;

            regulators {
                LDO2 {
                    regulator-name = "VALIVE_1.2V";
                    regulator-min-microvolt = <1200000>;
                    regulator-max-microvolt = <1200000>;
                    regulator-always-on;
                };

                LDO3 {
                    regulator-name = "VUSB+MIPI_1.1V";
                    regulator-min-microvolt = <1100000>;
                    regulator-max-microvolt = <1100000>;
                    regulator-always-on;
                };

                LDO4 {
                    regulator-name = "VADC_3.3V";
                    regulator-min-microvolt = <3300000>;
                    regulator-max-microvolt = <3300000>;
                };

                LDO5 {
                    regulator-name = "VTF_2.8V";
                    regulator-min-microvolt = <2800000>;
                    regulator-max-microvolt = <2800000>;
                };

                LDO6 {
                    regulator-name = "LDO6";
                    regulator-min-microvolt = <2000000>;
                    regulator-max-microvolt = <2000000>;
                };

                LDO7 {
                    regulator-name = "VLCD+VMIPI_1.8V";
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <1800000>;
                };

                LDO8 {
                    regulator-name = "VUSB+VDAC_3.3V";
                    regulator-min-microvolt = <3300000>;
                    regulator-max-microvolt = <3300000>;
                    regulator-always-on;
                };

                LDO9 {
                    regulator-name = "VCC_2.8V";
                    regulator-min-microvolt = <2800000>;
                    regulator-max-microvolt = <2800000>;
                    regulator-always-on;
                };

                LDO10 {
                    regulator-name = "VPLL_1.1V";
                    regulator-min-microvolt = <1100000>;
                    regulator-max-microvolt = <1100000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                LDO11 {
                    regulator-name = "CAM_AF_3.3V";
                    regulator-min-microvolt = <3300000>;
                    regulator-max-microvolt = <3300000>;
                };

                LDO12 {
                    regulator-name = "PS_2.8V";
                    regulator-min-microvolt = <2800000>;
                    regulator-max-microvolt = <2800000>;
                };

                LDO13 {
                    regulator-name = "VHIC_1.2V";
                    regulator-min-microvolt = <1200000>;
                    regulator-max-microvolt = <1200000>;
                };

                LDO14 {
                    regulator-name = "CAM_I_HOST_1.8V";
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <1800000>;
                };

                LDO15 {
                    regulator-name = "CAM_S_DIG+FM33_CORE_1.2V";
                    regulator-min-microvolt = <1200000>;
                    regulator-max-microvolt = <1200000>;
                };

                LDO16 {
                    regulator-name = "CAM_S_ANA_2.8V";
                    regulator-min-microvolt = <2800000>;
                    regulator-max-microvolt = <2800000>;
                };

                LDO17 {
                    regulator-name = "VCC_3.0V_LCD";
                    regulator-min-microvolt = <3000000>;
                    regulator-max-microvolt = <3000000>;
                };

                BUCK1 {
                    regulator-name = "VINT_1.1V";
                    regulator-min-microvolt = <750000>;
                    regulator-max-microvolt = <1500000>;
                    regulator-boot-on;
                    regulator-always-on;
                };

                BUCK2 {
                    regulator-name = "VG3D_1.1V";
                    regulator-min-microvolt = <750000>;
                    regulator-max-microvolt = <1500000>;
                    regulator-boot-on;
                };

                BUCK3 {
                    regulator-name = "VCC_1.8V";
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <1800000>;
                    regulator-always-on;
                };

                BUCK4 {
                    regulator-name = "VMEM_1.2V";
                    regulator-min-microvolt = <1200000>;
                    regulator-max-microvolt = <1200000>;
                    regulator-always-on;
                };

                EN32KHz-AP {
                    regulator-name = "32KHz AP";
                    regulator-always-on;
                };

                EN32KHz-CP {
                    regulator-name = "32KHz CP";
                };

                ENVICHG {
                    regulator-name = "VICHG";
                };

                ESAFEOUT1 {
                    regulator-name = "SAFEOUT1";
                };

                ESAFEOUT2 {
                    regulator-name = "SAFEOUT2";
                    regulator-boot-on;
                };
            };
        };
    };