0001 * ams AS3722 Power management IC.
0002
0003 Required properties:
0004 -------------------
0005 - compatible: Must be "ams,as3722".
0006 - reg: I2C device address.
0007 - interrupt-controller: AS3722 has internal interrupt controller which takes the
0008 interrupt request from internal sub-blocks like RTC, regulators, GPIOs as well
0009 as external input.
0010 - #interrupt-cells: Should be set to 2 for IRQ number and flags.
0011 The first cell is the IRQ number. IRQ numbers for different interrupt source
0012 of AS3722 are defined at dt-bindings/mfd/as3722.h
0013 The second cell is the flags, encoded as the trigger masks from binding document
0014 interrupts.txt, using dt-bindings/irq.
0015
0016 Optional properties:
0017 --------------------
0018 - ams,enable-internal-int-pullup: Boolean property, to enable internal pullup on
0019 interrupt pin. Missing this will disable internal pullup on INT pin.
0020 - ams,enable-internal-i2c-pullup: Boolean property, to enable internal pullup on
0021 i2c scl/sda pins. Missing this will disable internal pullup on i2c
0022 scl/sda lines.
0023 - ams,enable-ac-ok-power-on: Boolean property, to enable exit out of power off
0024 mode with AC_OK pin (pin enabled in power off mode).
0025
0026 Optional submodule and their properties:
0027 =======================================
0028
0029 Pinmux and GPIO:
0030 ===============
0031 Device has 8 GPIO pins which can be configured as GPIO as well as the special IO
0032 functions.
0033
0034 Please refer to pinctrl-bindings.txt in this directory for details of the
0035 common pinctrl bindings used by client devices, including the meaning of the
0036 phrase "pin configuration node".
0037
0038 Following are properties which is needed if GPIO and pinmux functionality
0039 is required:
0040 Required properties:
0041 -------------------
0042 - gpio-controller: Marks the device node as a GPIO controller.
0043 - #gpio-cells: Number of GPIO cells. Refer to binding document
0044 gpio/gpio.txt
0045
0046 Optional properties:
0047 --------------------
0048 Following properties are require if pin control setting is required
0049 at boot.
0050 - pinctrl-names: A pinctrl state named "default" be defined, using the
0051 bindings in pinctrl/pinctrl-bindings.txt.
0052 - pinctrl[0...n]: Properties to contain the phandle that refer to
0053 different nodes of pin control settings. These nodes represents
0054 the pin control setting of state 0 to state n. Each of these
0055 nodes contains different subnodes to represents some desired
0056 configuration for a list of pins. This configuration can
0057 include the mux function to select on those pin(s), and
0058 various pin configuration parameters, such as pull-up,
0059 open drain.
0060
0061 Each subnode have following properties:
0062 Required properties:
0063 - pins: List of pins. Valid values of pins properties are:
0064 gpio0, gpio1, gpio2, gpio3, gpio4, gpio5,
0065 gpio6, gpio7
0066
0067 Optional properties:
0068 function, bias-disable, bias-pull-up, bias-pull-down,
0069 bias-high-impedance, drive-open-drain.
0070
0071 Valid values for function properties are:
0072 gpio, interrupt-out, gpio-in-interrupt,
0073 vsup-vbat-low-undebounce-out,
0074 vsup-vbat-low-debounce-out,
0075 voltage-in-standby, oc-pg-sd0, oc-pg-sd6,
0076 powergood-out, pwm-in, pwm-out, clk32k-out,
0077 watchdog-in, soft-reset-in
0078
0079 Regulators:
0080 ===========
0081 Device has multiple DCDC and LDOs. The node "regulators" is require if regulator
0082 functionality is needed.
0083
0084 Following are properties of regulator subnode.
0085
0086 Optional properties:
0087 -------------------
0088 The input supply of regulators are the optional properties on the
0089 regulator node. The input supply of these regulators are provided
0090 through following properties:
0091 vsup-sd2-supply: Input supply for SD2.
0092 vsup-sd3-supply: Input supply for SD3.
0093 vsup-sd4-supply: Input supply for SD4.
0094 vsup-sd5-supply: Input supply for SD5.
0095 vin-ldo0-supply: Input supply for LDO0.
0096 vin-ldo1-6-supply: Input supply for LDO1 and LDO6.
0097 vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7.
0098 vin-ldo3-4-supply: Input supply for LDO3 and LDO4.
0099 vin-ldo9-10-supply: Input supply for LDO9 and LDO10.
0100 vin-ldo11-supply: Input supply for LDO11.
0101
0102 Optional sub nodes for regulators:
0103 ---------------------------------
0104 The subnodes name is the name of regulator and it must be one of:
0105 sd[0-6], ldo[0-7], ldo[9-11]
0106
0107 Each sub-node should contain the constraints and initialization
0108 information for that regulator. See regulator.txt for a description
0109 of standard properties for these sub-nodes.
0110 Additional optional custom properties are listed below.
0111 ams,ext-control: External control of the rail. The option of
0112 this properties will tell which external input is
0113 controlling this rail. Valid values are 0, 1, 2 ad 3.
0114 0: There is no external control of this rail.
0115 1: Rail is controlled by ENABLE1 input pin.
0116 2: Rail is controlled by ENABLE2 input pin.
0117 3: Rail is controlled by ENABLE3 input pin.
0118 Missing this property on DT will be assume as no
0119 external control. The external control pin macros
0120 are defined @dt-bindings/mfd/as3722.h
0121
0122 ams,enable-tracking: Enable tracking with SD1, only supported
0123 by LDO3.
0124
0125 Power-off:
0126 =========
0127 AS3722 supports the system power off by turning off all its rails.
0128 The device node should have the following properties to enable this
0129 functionality
0130 ams,system-power-controller: Boolean, to enable the power off functionality
0131 through this device.
0132
0133 Example:
0134 --------
0135 #include <dt-bindings/mfd/as3722.h>
0136 ...
0137 ams3722 {
0138 compatible = "ams,as3722";
0139 reg = <0x48>;
0140
0141 ams,system-power-controller;
0142
0143 interrupt-parent = <&intc>;
0144 interrupt-controller;
0145 #interrupt-cells = <2>;
0146
0147 gpio-controller;
0148 #gpio-cells = <2>;
0149
0150 pinctrl-names = "default";
0151 pinctrl-0 = <&as3722_default>;
0152
0153 as3722_default: pinmux {
0154 gpio0 {
0155 pins = "gpio0";
0156 function = "gpio";
0157 bias-pull-down;
0158 };
0159
0160 gpio1_2_4_7 {
0161 pins = "gpio1", "gpio2", "gpio4", "gpio7";
0162 function = "gpio";
0163 bias-pull-up;
0164 };
0165
0166 gpio5 {
0167 pins = "gpio5";
0168 function = "clk32k_out";
0169 };
0170 }
0171
0172 regulators {
0173 vsup-sd2-supply = <...>;
0174 ...
0175
0176 sd0 {
0177 regulator-name = "vdd_cpu";
0178 regulator-min-microvolt = <700000>;
0179 regulator-max-microvolt = <1400000>;
0180 regulator-always-on;
0181 ams,ext-control = <2>;
0182 };
0183
0184 sd1 {
0185 regulator-name = "vdd_core";
0186 regulator-min-microvolt = <700000>;
0187 regulator-max-microvolt = <1400000>;
0188 regulator-always-on;
0189 ams,ext-control = <1>;
0190 };
0191
0192 sd2 {
0193 regulator-name = "vddio_ddr";
0194 regulator-min-microvolt = <1350000>;
0195 regulator-max-microvolt = <1350000>;
0196 regulator-always-on;
0197 };
0198
0199 sd4 {
0200 regulator-name = "avdd-hdmi-pex";
0201 regulator-min-microvolt = <1050000>;
0202 regulator-max-microvolt = <1050000>;
0203 regulator-always-on;
0204 };
0205
0206 sd5 {
0207 regulator-name = "vdd-1v8";
0208 regulator-min-microvolt = <1800000>;
0209 regulator-max-microvolt = <1800000>;
0210 regulator-always-on;
0211 };
0212 ....
0213 };
0214 };