forked from grate-driver/linux
-
Notifications
You must be signed in to change notification settings - Fork 4
/
max77620.yaml
665 lines (547 loc) · 23.6 KB
/
max77620.yaml
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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/max77620.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim Semiconductor MAX77620 Power Management IC
maintainers:
- Rob Herring <[email protected]>
description:
The Maxim MAX77620 is a system power management IC that can be used to
drive the power sequences need to boot an SoC as well as provide runtime
configurable power supplies for various aspects of that SoC.
In addition, the MAX77620 has 8 GPIO pins which can be configured as GPIO
as well as a set of special I/O functions.
The MAX77620 also supports alarm interrupts when its die temperature crosses
120° C and 140° C. These threshold temperatures are not configurable. The
device does not provide the real temperature of die, but merely indicates
whether the temperature is above or below the threshold levels.
properties:
compatible:
enum:
- maxim,max77620
- maxim,max20024
- maxim,max77663
reg:
maxItems: 1
interrupts:
description: The interrupt on the parent the controller is connected to.
$ref: /schemas/types.yaml#/definitions/uint32-array
interrupt-controller:
description: Marks the device node as an interrupt controller.
"#interrupt-cells":
description: Must be 2 and their usage is compliant to the 2 cells
variant of <../interrupt-controller/interrupts.txt>. IRQ numbers for
different interrupt source of MAX77620 are defined at
dt-bindings/mfd/max77620.h.
$ref: /schemas/types.yaml#/definitions/uint32
const: 2
system-power-controller:
$ref: /schemas/types.yaml#/definitions/flag
description:
Indicates that this PMIC is controlling the system power, see
../power/power-controller.txt for more details.
"#gpio-cells":
description: The first cell is the pin number and the second cell is used
to specify the GPIO polarity (0 = active high, 1 = active low).
$ref: /schemas/types.yaml#/definitions/uint32
const: 2
gpio-controller:
description: Marks the device node as a GPIO controller.
type: boolean
"#thermal-sensor-cells":
description: Please refer to ../thermal/thermal-sensor.yaml for more details.
const: 0
fps:
description: |
The Flexible Power Sequencer (FPS) allows each regulator to power up
under hardware or software control. Additionally, each regulator can
power on independently or among a group of other regulators with an
adjustable power-up and power-down delays (sequencing). GPIO1, GPIO2,
and GPIO3 can be programmed to be part of a sequence allowing external
regulators to be sequenced along with internal regulators. 32KHz clock
can be programmed to be part of a sequence.
The flexible sequencing structure consists of two hardware enable
inputs (EN0, EN1), and 3 master sequencing timers called FPS0, FPS1
and FPS2. Each master sequencing timer is programmable through its
configuration register to have a hardware enable source (EN1 or EN2)
or a software enable source (SW). When enabled/disabled, the master
sequencing timer generates eight sequencing events on different time
periods called slots. The time period between each event is
programmable within the configuration register. Each regulator,
GPIO1, GPIO2, GPIO3, and 32KHz clock has a flexible power sequence
slave register which allows its enable source to be specified as a
flexible power sequencer timer or a software bit. When a FPS source
of regulators, GPIOs and clocks specifies the enable source to be a
flexible power sequencer, the power up and power down delays can be
specified in the regulators, GPIOs and clocks flexible power
sequencer configuration registers.
When FPS event cleared (set to LOW), regulators, GPIOs and 32KHz
clock are set into following state at the sequencing event that
corresponds to its flexible sequencer configuration register.
Sleep state: In this state, regulators, GPIOs and 32KHz clock get
disabled at the sequencing event.
Global Low Power Mode (GLPM): In this state, regulators are set in
low power mode at the sequencing event.
The configuration parameters of FPS is provided through sub-node
"fps" and their child for FPS specific. The child node name for FPS
are "fps0", "fps1", and "fps2" for FPS0, FPS1 and FPS2 respectively.
The FPS configurations like FPS source, power up and power down slots
for regulators, GPIOs and 32kHz clocks are provided in their respective
configuration nodes which is explained in respective sub-system DT
binding document.
There is need for different FPS configuration parameters based on
system state like when system state changed from active to suspend or
active to power off (shutdown).
type: object
properties:
maxim,fps-event-source:
description: |
FPS event source like external hardware input to PMIC i.e. EN0, EN1
or software (SW).
The macros are defined on dt-bindings/mfd/max77620.h for different
control source.
- MAX77620_FPS_EVENT_SRC_EN0: for hardware input pin EN0
- MAX77620_FPS_EVENT_SRC_EN1: for hardware input pin EN1
- MAX77620_FPS_EVENT_SRC_SW: for software control
$ref: /schemas/types.yaml#/definitions/uint32
maxim,shutdown-fps-time-period-us:
description: FPS time period in microseconds when system enters into
shutdown state.
maxim,suspend-fps-time-period-us:
description: FPS time period in microseconds when system enters into
suspend state.
maxim,device-state-on-disabled-event:
description: |
Describe the PMIC state when FPS event cleared (set to LOW) whether
it should go to sleep state or low-power state. Following are valid
values:
- MAX77620_FPS_INACTIVE_STATE_SLEEP: to set the PMIC state to
sleep
- MAX77620_FPS_INACTIVE_STATE_LOW_POWER: to set the PMIC state to
low power
Absence of this property or other value will not change device state
when FPS event get cleared.
$ref: /schemas/types.yaml#/definitions/uint32
maxim,power-ok-control:
description: |
Used to configure the map power OK bit.
- 1: Enables POK(Power OK) to control nRST_IO and GPIO1 POK
function.
- 0: Disables POK control.
If this property is missing, do not configure MPOK bit. If POK
mapping is enabled for GPIO1/nRST_IO then, GPIO1/nRST_IO pins are
HIGH only if all rails that have POK control enabled are HIGH.
If any of the rails goes down(which are enabled for POK control)
then, GPIO1/nRST_IO goes LOW. this property is valid for max20024
only.
$ref: /schemas/types.yaml#/definitions/uint32
regulators:
description: |
The MAX77620 has multiple DCDCs (sd[0-3]) and LDOs (ldo[0-8]). Details
about each of these regulators are defined using child nodes named after
the regulator under a top-level "regulators" node. Input supplies for
each of the regulators are defined in the "regulators" node.
Each subnode should contain the constraints and initialization details
for the corresponding regulator. The definition for each of these nodes
is defined using the standard bindings for regulators found in:
../regulator/regulator.txt
Additional properties required to configure FPS parameters for SDs and
LDOs are defined below.
type: object
properties:
in-sd0-supply:
description: input supply for SD0, INA-SD0 or INB-SD0 pins
in-sd1-supply:
description: input supply for SD1
in-sd2-supply:
description: input supply for SD2
in-sd3-supply:
description: input supply for SD3
in-ld0-1-supply:
description: input supply for LDO0 and LDO1
in-ld2-supply:
description: input supply for LDO2
in-ld3-5-supply:
description: input supply for LDO3 and LDO5
in-ld4-6-supply:
description: input supply for LDO4 and LDO6
in-ld7-8-supply:
description: input supply for LDO7 and LDO8
patternProperties:
"^(sd[0-3]|ldo[0-8])$":
type: object
$ref: /schemas/regulator/regulator.yaml
properties:
maxim,active-fps-source:
description: |
FPS source for the regulators to get enabled/disabled when the
system is in active state. Valid values are:
- MAX77620_FPS_SRC_0: FPS source is FPS0.
- MAX77620_FPS_SRC_1: FPS source is FPS1.
- MAX77620_FPS_SRC_2: FPS source is FPS2.
- MAX77620_FPS_SRC_NONE: Regulator is not controlled by FPS
events and it gets enabled/disabled by register access.
Absence of this property will leave the FPS configuration
register for that regulator at the default value.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
maxim,active-fps-power-up-slot:
description: Sequencing event slot number on which the regulator
gets enabled when master FPS input event set to HIGH. Valid
values are 0 to 7. This is applicable if FPS source is selected
as FPS0, FPS1 or FPS2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7]
maxim,active-fps-power-down-slot:
description: Sequencing event slot number on which the regulator
gets disabled when master FPS input event set to LOW. Valid
values are 0 to 7. This is applicable if FPS source is selected
as FPS0, FPS1 or FPS2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7]
maxim,suspend-fps-source:
description: This is same as "maxim,active-fps-source" but the
value gets configured when the system enters suspend.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
maxim,suspend-fps-power-up-slot:
description: This is same as "maxim,active-fps-power-up-slot" but
the value gets configured when the system enters suspend. This
is applicable if the suspend state FPS source is selected as
FPS0, FPS1 or FPS2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7]
maxim,suspend-fps-power-down-slot:
description: This is same as "maxim,active-fps-power-down-slot"
but this value gets configured when the system enters suspend.
This is applicable if the suspend state FPS source is selected
as FPS0, FPS1 or FPS2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7]
maxim,ramp-rate-setting:
description: |
Ramp rate (uV/us) setting to be configured for the device. The
platform may have a ramp rate different from that advertised if
it has design variation from Maxim's recommended rate. In this
case, the platform specific ramp rate is used for ramp time
calculation and this property is used for device register
configurations. The measured ramp rate of platform is provided
by the "regulator-ramp-delay" property as described in
<../regulator/regulator.txt>.
The Maxim Max77620 PMIC supports the following ramp delays:
- SD: 13.75 mV/us, 27.5 mV/us, 55 mV/us
- LDOs: 5 mV/us, 100 mV/us
Note: If the measured ramp delay is same as advertised ramp
delay then it is not required to provide the ramp delay with
property "maxim,ramp-rate-setting". The ramp rate can be
provided by the regulator-ramp-delay which will be used for
ramp time calculation for voltage change as well as for
device configuration.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [5000, 13750, 27500, 55000, 100000]
patternProperties:
"^gpio(@[0-9]+)?$":
type: object
properties:
gpio-hog:
$ref: /schemas/types.yaml#/definitions/flag
output-high:
$ref: /schemas/types.yaml#/definitions/flag
gpios:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
"^(.+-hog(-[0-9]+)?)$":
type: object
"^pinmux(@[0-9]+)?$":
type: object
patternProperties:
"^gpio[0-7_]+$":
type: object
properties:
pins:
items:
pattern: "^gpio[0-7]$"
minItems: 1
maxItems: 8
function:
$ref: /schemas/types.yaml#/definitions/string
enum:
- gpio
- lpm-control-in
- fps-out
- 32k-out1
- sd0-dvs-in
- sd1-dvs-in
- reference-out
drive-push-pull:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
drive-open-drain:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
bias-pull-up:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
bias-pull-down:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
maxim,active-fps-source:
description: |
FPS source for the GPIOs to get enabled/disabled when the system
is in active state. Valid values are:
- MAX77620_FPS_SRC_0: FPS source is FPS0.
- MAX77620_FPS_SRC_1: FPS source is FPS1.
- MAX77620_FPS_SRC_2: FPS source is FPS2.
- MAX77620_FPS_SRC_NONE: GPIO is not controlled by FPS events
and it gets enabled/disabled by register access.
Absence of this property will leave the FPS configuration
register for that GPIO at the default value.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4]
maxim,active-fps-power-up-slot:
description: Sequencing event slot number on which the GPIO gets
enabled when master FPS input event set to HIGH. Valid values
are 0 to 7. This is applicable if FPS source is selected as
FPS0, FPS1 or FPS2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7]
maxim,active-fps-power-down-slot:
description: Sequencing event slot number on which the GPIO gets
disabled when master FPS input event set to LOW. Valid values
are 0 to 7. This is applicable if FPS source is selected as
FPS0, FPS1 or FPS2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7]
maxim,suspend-fps-source:
description: This is same as "maxim,active-fps-source" but the
value gets configured when the system enters suspend.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4]
maxim,suspend-fps-power-up-slot:
description: This is same as "maxim,active-fps-power-up-slot" but
the value gets configured when the system enters suspend. This
is applicable if the suspend state FPS source is selected as
FPS0, FPS1 or FPS2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7]
maxim,suspend-fps-power-down-slot:
description: This is same as "maxim,active-fps-power-down-slot"
but this value gets configured when the system enters suspend.
This is applicable if the suspend state FPS source is selected
as FPS0, FPS1 or FPS2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7]
required:
- pins
unevaluatedProperties: false
required:
- compatible
- reg
unevaluatedProperties: false
allOf:
- if:
properties:
compatible:
contains:
const: maxim,max77620
then:
properties:
fps:
properties:
maxim,shutdown-fps-time-period-us:
enum: [40, 80, 160, 320, 640, 1280, 2560, 5120]
maxim,suspend-fps-time-period-us:
enum: [40, 80, 160, 320, 640, 1280, 2560, 5120]
- if:
properties:
compatible:
contains:
const: maxim,max20024
then:
properties:
fps:
properties:
maxim,shutdown-fps-time-period-us:
enum: [20, 40, 80, 160, 320, 640, 1280, 2540]
maxim,suspend-fps-time-period-us:
enum: [20, 40, 80, 160, 320, 640, 1280, 2540]
- if:
properties:
compatible:
contains:
const: maxim,max77663
then:
properties:
fps:
properties:
maxim,shutdown-fps-time-period-us:
enum: [20, 40, 80, 160, 320, 640, 1280, 2540]
maxim,suspend-fps-time-period-us:
enum: [20, 40, 80, 160, 320, 640, 1280, 2540]
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/mfd/max77620.h>
#include <dt-bindings/thermal/thermal.h>
i2c@7000d000 {
reg = <0x7000d000 0x100>;
#address-cells = <1>;
#size-cells = <0>;
pmic: pmic@3c {
compatible = "maxim,max77620";
reg = <0x3c>;
interrupt-parent = <&intc>;
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
#interrupt-cells = <2>;
interrupt-controller;
#gpio-cells = <2>;
gpio-controller;
#thermal-sensor-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&default>;
fps {
fps0 {
maxim,shutdown-fps-time-period-us = <1280>;
maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
};
fps1 {
maxim,shutdown-fps-time-period-us = <1280>;
maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
};
fps2 {
maxim,shutdown-fps-time-period-us = <1280>;
maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_SW>;
};
};
default: pinmux {
gpio0 {
pins = "gpio0";
function = "gpio";
};
gpio1 {
pins = "gpio1";
function = "fps-out";
maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
};
gpio2 {
pins = "gpio2";
function = "fps-out";
maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
};
};
regulators {
in-ldo0-1-supply = <&sd2>;
in-ldo7-8-supply = <&sd2>;
sd0 {
regulator-name = "vdd-core";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1400000>;
regulator-boot-on;
regulator-always-on;
maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
};
sd1 {
regulator-name = "vddio-ddr";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on;
regulator-boot-on;
maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
};
sd2 {
regulator-name = "vdd-pre-reg";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>;
};
sd3 {
regulator-name = "vdd-1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
};
ldo0 {
regulator-name = "avdd-sys";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on;
regulator-boot-on;
};
ldo1 {
regulator-name = "vdd-pex";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
};
ldo2 {
regulator-name = "vddio-sdmmc3";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
ldo3 {
regulator-name = "vdd-cam-hv";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
ldo4 {
regulator-name = "vdd-rtc";
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
regulator-always-on;
regulator-boot-on;
};
ldo5 {
regulator-name = "avdd-ts-hv";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
};
ldo6 {
regulator-name = "vdd-ts";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
};
ldo7 {
regulator-name = "vdd-gen-pll-edp";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
regulator-always-on;
regulator-boot-on;
};
ldo8 {
regulator-name = "vdd-hdmi-dp";
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
};
};
};
};
thermal-zones {
pmic-thermal {
polling-delay = <0>;
polling-delay-passive = <0>;
thermal-sensors = <&pmic>;
trips {
pmic_die_warn_temp_thresh: hot-die {
temperature = <120000>;
type = "hot";
hysteresis = <0>;
};
pmic_die_crit_temp_thresh: critical-die {
temperature = <140000>;
type = "critical";
hysteresis = <0>;
};
};
cooling-maps {
map0 {
trip = <&pmic_die_warn_temp_thresh>;
cooling-device = <&cool_dev THERMAL_NO_LIMIT
THERMAL_NO_LIMIT>;
contribution = <100>;
};
};
};
};