215 lines
6.6 KiB
Plaintext
215 lines
6.6 KiB
Plaintext
* ams AS3722 Power management IC.
|
|
|
|
Required properties:
|
|
-------------------
|
|
- compatible: Must be "ams,as3722".
|
|
- reg: I2C device address.
|
|
- interrupt-controller: AS3722 has internal interrupt controller which takes the
|
|
interrupt request from internal sub-blocks like RTC, regulators, GPIOs as well
|
|
as external input.
|
|
- #interrupt-cells: Should be set to 2 for IRQ number and flags.
|
|
The first cell is the IRQ number.
|
|
The second cell is the flags, encoded as the trigger masks from binding document
|
|
interrupts.txt, using dt-bindings/irq.
|
|
|
|
Optional submodule and their properties:
|
|
---------------------------------------
|
|
|
|
Pinmux and GPIO:
|
|
---------------
|
|
Device has 8 GPIO pins which can be configured as GPIO as well as the special IO
|
|
functions.
|
|
|
|
Please refer to pinctrl-bindings.txt in this directory for details of the
|
|
common pinctrl bindings used by client devices, including the meaning of the
|
|
phrase "pin configuration node".
|
|
|
|
Following are properties which is needed if GPIO and pinmux functionality
|
|
is required:
|
|
- gpio-controller: Marks the device node as a GPIO controller.
|
|
- #gpio-cells: Number of GPIO cells. Refer to binding document gpio/gpio.txt
|
|
- pinctrl-names: A pinctrl state named "default" must be defined, using the
|
|
bindings in pinctrl/pinctrl-binding.txt.
|
|
- pinctrl[0...n]: Nodes for pin control to represents state 0 to state n.
|
|
Each of these nodes contains different subnodes to represents
|
|
some desired configuration for a list of pins. This configuration can
|
|
include the mux function to select on those pin(s), and various pin
|
|
configuration parameters, such as pull-up, open drain.
|
|
|
|
Each subnode have following properties:
|
|
Required properties:
|
|
pins: List of pins. Valid options for pins properties are
|
|
gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7
|
|
|
|
Optional properties:
|
|
Optional properties are
|
|
function, bias-disable, bias-pull-up, bias-pull-down,
|
|
bias-high-impedance, drive-open-drain, low-power-enable
|
|
|
|
Valid options for funtion properties are:
|
|
gpio, interrupt-out, gpio-in-interrupt,
|
|
vsup-vbat-low-undebounce-out, vsup-vbat-low-debounce-out,
|
|
voltage-in-standby, oc-pg-sd0, oc-pg-sd6, powergood-out,
|
|
pwm-in, pwm-out, clk32k-out, watchdog-in, soft-reset-in
|
|
|
|
Regulators:
|
|
-----------
|
|
Device has multiple DCDC and LDOs. The node "regulators" is require if regulator
|
|
functionality is needed.
|
|
|
|
Following are properties of regulator subnode.
|
|
|
|
Optional properties:
|
|
-------------------
|
|
The input supply of regulators are the optional properties on the
|
|
regulator node. The input supply of these regulators are provided
|
|
through following properties:
|
|
vsup-sd2-supply: Input supply for SD2.
|
|
vsup-sd3-supply: Input supply for SD3.
|
|
vsup-sd4-supply: Input supply for SD4.
|
|
vsup-sd5-supply: Input supply for SD5.
|
|
vin-ldo0-supply: Input supply for LDO0.
|
|
vin-ldo1-6-supply: Input supply for LDO1 and LDO6.
|
|
vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7.
|
|
vin-ldo3-4-supply: Input supply for LDO3 and LDO4.
|
|
vin-ldo9-10-supply: Input supply for LDO9 and LDO10.
|
|
vin-ldo11-supply: Input supply for LDO11.
|
|
|
|
Optional sub nodes:
|
|
-----------------
|
|
The subnodes name is the name of regulator and it must be one of:
|
|
sd[0-6], ldo[0-7], ldo[9-11]
|
|
|
|
Each sub-node should contain the constraints and initialization
|
|
information for that regulator. See regulator.txt for a description
|
|
of standard properties for these sub-nodes.
|
|
Additional custom properties are listed below.
|
|
ams,ext-control: External control of the rail. The option of
|
|
this properties will tell which external input is
|
|
controlling this rail. Valid values are 0, 1, 2 ad 3.
|
|
0: There is no external control of this rail.
|
|
1: Rail is controlled by ENABLE1 input pin.
|
|
2: Rail is controlled by ENABLE2 input pin.
|
|
3: Rail is controlled by ENABLE3 input pin.
|
|
ams,enable-tracking: Enable tracking with SD1, only supported
|
|
by LDO3.
|
|
|
|
Clock:
|
|
======
|
|
AS3722 supports one 32KHz clock to output from device. The clock control is
|
|
provided through the clock driver.
|
|
This binding uses the common clock binding ./clock-bindings.txt.
|
|
The device node should have the optional properties to support the clock:
|
|
#clock-cells: from common clock binding; shall be set to 1. The clock id for
|
|
single clock output is 0.
|
|
|
|
Power-off:
|
|
=========
|
|
|
|
AS3722 supports the system power off by turning off all its rail. The power off
|
|
is provided through pm power off.
|
|
The device node should have the following properties to enable power-off
|
|
functionality from ams AS3722:
|
|
ams,system-power-controller: To enable the power off functionality through
|
|
device.
|
|
|
|
Thermal:
|
|
=========
|
|
|
|
AS3722 has thermal sensors for SD0, SD1, and SD6 and supports over-temperature
|
|
alarm interrupts. The device node should have the following optional property
|
|
to support thermal sensors:
|
|
- ams,sd0-adc-ch: ADC channel for sd0 regulator temp, it has four possible
|
|
channels: 16, 17, 18, 19.
|
|
- ams,sd1-adc-ch: ADC channel for sd1 regulator temp, it has one possible
|
|
channel: 20.
|
|
- ams,sd6-adc-ch: ADC channel for sd6 regulator temp, it has two possible
|
|
channels: 21, 22.
|
|
- #thermal-sensor-cells: from the common thermal binding; shall be set to 1.
|
|
|
|
Example:
|
|
--------
|
|
ams3722 {
|
|
compatible = "ams,as3722";
|
|
reg = <0x48>;
|
|
|
|
interrupt-parent = <&intc>;
|
|
interrupt-controller;
|
|
#interrupt-cells = <2>;
|
|
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
|
|
ams,sd0-adc-ch = <16>;
|
|
ams,sd0-adc-ch = <20>;
|
|
ams,sd0-adc-ch = <22>;
|
|
#thermal-sensor-cells = <1>;
|
|
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&as3722_default>;
|
|
|
|
as3722_default: pinmux {
|
|
gpio0 {
|
|
pins = "gpio0";
|
|
function = "gpio";
|
|
bias-pull-down;
|
|
low-power-enable =
|
|
AS3722_GPIO_LOW_POWER_MODE(4, 0x7);
|
|
};
|
|
|
|
gpio1_2_4_7 {
|
|
pins = "gpio1", "gpio2", "gpio4", "gpio7";
|
|
function = "gpio";
|
|
bias-pull-up;
|
|
};
|
|
|
|
gpio5 {
|
|
pins = "gpio5";
|
|
function = "clk32k_out";
|
|
};
|
|
}
|
|
|
|
regulators {
|
|
vsup-sd2-supply = <...>;
|
|
...
|
|
|
|
sd0 {
|
|
regulator-name = "vdd_cpu";
|
|
regulator-min-microvolt = <700000>;
|
|
regulator-max-microvolt = <1400000>;
|
|
regulator-always-on;
|
|
ams,ext-control = <2>;
|
|
};
|
|
|
|
sd1 {
|
|
regulator-name = "vdd_core";
|
|
regulator-min-microvolt = <700000>;
|
|
regulator-max-microvolt = <1400000>;
|
|
regulator-always-on;
|
|
ams,ext-control = <1>;
|
|
};
|
|
|
|
sd2 {
|
|
regulator-name = "vddio_ddr";
|
|
regulator-min-microvolt = <1350000>;
|
|
regulator-max-microvolt = <1350000>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
sd4 {
|
|
regulator-name = "avdd-hdmi-pex";
|
|
regulator-min-microvolt = <1050000>;
|
|
regulator-max-microvolt = <1050000>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
sd5 {
|
|
regulator-name = "vdd-1v8";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-always-on;
|
|
};
|
|
....
|
|
};
|
|
};
|