tegrakernel/kernel/kernel-4.9/Documentation/devicetree/bindings/mfd/max77620.txt

206 lines
8.2 KiB
Plaintext
Raw Normal View History

2022-02-16 09:13:02 -06:00
MAX77620 Power management IC from Maxim Semiconductor.
Required properties:
-------------------
- compatible: Must be one of
"maxim,max77620"
"maxim,max20024".
- reg: I2C device address.
Optional properties:
-------------------
- interrupts: The interrupt on the parent the controller is
connected to.
- interrupt-controller: Marks the device node as an interrupt controller.
- #interrupt-cells: is <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.
Optional subnodes and their properties:
=======================================
Flexible power sequence configurations:
--------------------------------------
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).
Optional properties:
-------------------
-maxim,fps-event-source: u32, 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.
-maxim,shutdown-fps-time-period-us: u32, FPS time period in microseconds
when system enters in to shutdown
state.
-maxim,suspend-fps-time-period-us: u32, FPS time period in microseconds
when system enters in to suspend state.
-maxim,device-state-on-disabled-event: u32, 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.
- maxim,enable-rtc2-alarm-wakeup: enable rtc alarm2 and rtc periodic second
timer interrupt, to wake up device if
rtc2 timer expired, wake up on alarm2
from sleep by EN1 input signal.
Here supported time periods by device in microseconds are as follows:
MAX77620 supports 40, 80, 160, 320, 640, 1280, 2560 and 5120 microseconds.
MAX20024 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
For DT binding details of different sub modules like GPIO, pincontrol,
regulator, power, please refer respective device-tree binding document
under their respective sub-system directories.
There is another name of these properties to reduce the property name
length to meet ePAPR specs. The another name is without vendor as
follows:
maxim,fps-event-source -> fps-event-source
maxim,shutdown-fps-time-period-us -> shutdown-fps-time-period-us
maxim,suspend-fps-time-period-us -> suspend-fps-time-period-us
maxim,device-state-on-disabled-event -> device-state-on-disabled-event
Backup Battery:
==============
This sub-node configure charging backup battery of the device. Device has
support of charging the backup battery. The subnode name is "backup-battery".
The property for backup-battery child nodes as:
Presence of this child node will enable the backup battery charging.
Optional properties:
-maxim,backup-battery-charging-current: Charging current setting.
The device supports 50/100/200/400/600/800uA.
If this property is unavailable then it will
charge with 50uA.
-maxim,backup-battery-charging-voltage: Charging Voltage Limit Setting.
Device supports 2500000/3000000/3300000/350000uV.
Default will be set to 2500mV. The voltage will be roundoff
to nearest lower side if other than above is configured.
-maxim,backup-battery-output-resister: Output resistor on Ohm.
Device supports 100/1000/3000/6000 Ohms.
There is another name of these properties to reduce the property name
length to meet ePAPR specs. The another name is without vendor as
follows:
maxim,backup-battery-charging-current ->backup-battery-charging-current
maxim,backup-battery-charging-voltage -> backup-battery-charging-voltage
maxim,backup-battery-output-resister->backup-battery-output-resister
Low-Battery Monitor:
==================
This sub-node configure low battery monitor configuration registers. Device has
support for low-battery monitor configuration through child DT node
"low-battery-monitor".
Optional properties:
- maxim,low-battery-dac-enable: Enable low battery DAC.
- maxim,low-battery-dac-disable: Disable low battery DAC.
- maxim,low-battery-shutdown-enable: Enable low battery shutdown.
- maxim,low-battery-shutdown-disable: Disable low battery shutdown.
- maxim,low-battery-reset-enable: Enable low battery reset.
- maxim,low-battery-reset-disable: Disable low battery reset.
There is another name of these properties to reduce the property name
length to meet ePAPR specs. The another name is without vendor as
follows:
maxim,low-battery-dac-enable->low-battery-dac-enable
maxim,low-battery-dac-disable->low-battery-dac-disable
maxim,low-battery-shutdown-enable->low-battery-shutdown-enable
maxim,low-battery-shutdown-disable->low-battery-shutdown-disable
maxim,low-battery-reset-enable->low-battery-reset-enable
maxim,low-battery-reset-disable->low-battery-reset-disable
Example:
--------
#include <dt-bindings/mfd/max77620.h>
max77620@3c {
compatible = "maxim,max77620";
reg = <0x3c>;
interrupt-parent = <&intc>;
interrupts = <0 86 IRQ_TYPE_NONE>;
interrupt-controller;
#interrupt-cells = <2>;
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>;
};
};
};