1*4882a593Smuzhiyun* ams AS3722 Power management IC. 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun------------------- 5*4882a593Smuzhiyun- compatible: Must be "ams,as3722". 6*4882a593Smuzhiyun- reg: I2C device address. 7*4882a593Smuzhiyun- interrupt-controller: AS3722 has internal interrupt controller which takes the 8*4882a593Smuzhiyun interrupt request from internal sub-blocks like RTC, regulators, GPIOs as well 9*4882a593Smuzhiyun as external input. 10*4882a593Smuzhiyun- #interrupt-cells: Should be set to 2 for IRQ number and flags. 11*4882a593Smuzhiyun The first cell is the IRQ number. IRQ numbers for different interrupt source 12*4882a593Smuzhiyun of AS3722 are defined at dt-bindings/mfd/as3722.h 13*4882a593Smuzhiyun The second cell is the flags, encoded as the trigger masks from binding document 14*4882a593Smuzhiyun interrupts.txt, using dt-bindings/irq. 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunOptional properties: 17*4882a593Smuzhiyun-------------------- 18*4882a593Smuzhiyun- ams,enable-internal-int-pullup: Boolean property, to enable internal pullup on 19*4882a593Smuzhiyun interrupt pin. Missing this will disable internal pullup on INT pin. 20*4882a593Smuzhiyun- ams,enable-internal-i2c-pullup: Boolean property, to enable internal pullup on 21*4882a593Smuzhiyun i2c scl/sda pins. Missing this will disable internal pullup on i2c 22*4882a593Smuzhiyun scl/sda lines. 23*4882a593Smuzhiyun- ams,enable-ac-ok-power-on: Boolean property, to enable exit out of power off 24*4882a593Smuzhiyun mode with AC_OK pin (pin enabled in power off mode). 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunOptional submodule and their properties: 27*4882a593Smuzhiyun======================================= 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunPinmux and GPIO: 30*4882a593Smuzhiyun=============== 31*4882a593SmuzhiyunDevice has 8 GPIO pins which can be configured as GPIO as well as the special IO 32*4882a593Smuzhiyunfunctions. 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunPlease refer to pinctrl-bindings.txt in this directory for details of the 35*4882a593Smuzhiyuncommon pinctrl bindings used by client devices, including the meaning of the 36*4882a593Smuzhiyunphrase "pin configuration node". 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunFollowing are properties which is needed if GPIO and pinmux functionality 39*4882a593Smuzhiyunis required: 40*4882a593Smuzhiyun Required properties: 41*4882a593Smuzhiyun ------------------- 42*4882a593Smuzhiyun - gpio-controller: Marks the device node as a GPIO controller. 43*4882a593Smuzhiyun - #gpio-cells: Number of GPIO cells. Refer to binding document 44*4882a593Smuzhiyun gpio/gpio.txt 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun Optional properties: 47*4882a593Smuzhiyun -------------------- 48*4882a593Smuzhiyun Following properties are require if pin control setting is required 49*4882a593Smuzhiyun at boot. 50*4882a593Smuzhiyun - pinctrl-names: A pinctrl state named "default" be defined, using the 51*4882a593Smuzhiyun bindings in pinctrl/pinctrl-bindings.txt. 52*4882a593Smuzhiyun - pinctrl[0...n]: Properties to contain the phandle that refer to 53*4882a593Smuzhiyun different nodes of pin control settings. These nodes represents 54*4882a593Smuzhiyun the pin control setting of state 0 to state n. Each of these 55*4882a593Smuzhiyun nodes contains different subnodes to represents some desired 56*4882a593Smuzhiyun configuration for a list of pins. This configuration can 57*4882a593Smuzhiyun include the mux function to select on those pin(s), and 58*4882a593Smuzhiyun various pin configuration parameters, such as pull-up, 59*4882a593Smuzhiyun open drain. 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun Each subnode have following properties: 62*4882a593Smuzhiyun Required properties: 63*4882a593Smuzhiyun - pins: List of pins. Valid values of pins properties are: 64*4882a593Smuzhiyun gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, 65*4882a593Smuzhiyun gpio6, gpio7 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun Optional properties: 68*4882a593Smuzhiyun function, bias-disable, bias-pull-up, bias-pull-down, 69*4882a593Smuzhiyun bias-high-impedance, drive-open-drain. 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun Valid values for function properties are: 72*4882a593Smuzhiyun gpio, interrupt-out, gpio-in-interrupt, 73*4882a593Smuzhiyun vsup-vbat-low-undebounce-out, 74*4882a593Smuzhiyun vsup-vbat-low-debounce-out, 75*4882a593Smuzhiyun voltage-in-standby, oc-pg-sd0, oc-pg-sd6, 76*4882a593Smuzhiyun powergood-out, pwm-in, pwm-out, clk32k-out, 77*4882a593Smuzhiyun watchdog-in, soft-reset-in 78*4882a593Smuzhiyun 79*4882a593SmuzhiyunRegulators: 80*4882a593Smuzhiyun=========== 81*4882a593SmuzhiyunDevice has multiple DCDC and LDOs. The node "regulators" is require if regulator 82*4882a593Smuzhiyunfunctionality is needed. 83*4882a593Smuzhiyun 84*4882a593SmuzhiyunFollowing are properties of regulator subnode. 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun Optional properties: 87*4882a593Smuzhiyun ------------------- 88*4882a593Smuzhiyun The input supply of regulators are the optional properties on the 89*4882a593Smuzhiyun regulator node. The input supply of these regulators are provided 90*4882a593Smuzhiyun through following properties: 91*4882a593Smuzhiyun vsup-sd2-supply: Input supply for SD2. 92*4882a593Smuzhiyun vsup-sd3-supply: Input supply for SD3. 93*4882a593Smuzhiyun vsup-sd4-supply: Input supply for SD4. 94*4882a593Smuzhiyun vsup-sd5-supply: Input supply for SD5. 95*4882a593Smuzhiyun vin-ldo0-supply: Input supply for LDO0. 96*4882a593Smuzhiyun vin-ldo1-6-supply: Input supply for LDO1 and LDO6. 97*4882a593Smuzhiyun vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7. 98*4882a593Smuzhiyun vin-ldo3-4-supply: Input supply for LDO3 and LDO4. 99*4882a593Smuzhiyun vin-ldo9-10-supply: Input supply for LDO9 and LDO10. 100*4882a593Smuzhiyun vin-ldo11-supply: Input supply for LDO11. 101*4882a593Smuzhiyun 102*4882a593Smuzhiyun Optional sub nodes for regulators: 103*4882a593Smuzhiyun --------------------------------- 104*4882a593Smuzhiyun The subnodes name is the name of regulator and it must be one of: 105*4882a593Smuzhiyun sd[0-6], ldo[0-7], ldo[9-11] 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun Each sub-node should contain the constraints and initialization 108*4882a593Smuzhiyun information for that regulator. See regulator.txt for a description 109*4882a593Smuzhiyun of standard properties for these sub-nodes. 110*4882a593Smuzhiyun Additional optional custom properties are listed below. 111*4882a593Smuzhiyun ams,ext-control: External control of the rail. The option of 112*4882a593Smuzhiyun this properties will tell which external input is 113*4882a593Smuzhiyun controlling this rail. Valid values are 0, 1, 2 ad 3. 114*4882a593Smuzhiyun 0: There is no external control of this rail. 115*4882a593Smuzhiyun 1: Rail is controlled by ENABLE1 input pin. 116*4882a593Smuzhiyun 2: Rail is controlled by ENABLE2 input pin. 117*4882a593Smuzhiyun 3: Rail is controlled by ENABLE3 input pin. 118*4882a593Smuzhiyun Missing this property on DT will be assume as no 119*4882a593Smuzhiyun external control. The external control pin macros 120*4882a593Smuzhiyun are defined @dt-bindings/mfd/as3722.h 121*4882a593Smuzhiyun 122*4882a593Smuzhiyun ams,enable-tracking: Enable tracking with SD1, only supported 123*4882a593Smuzhiyun by LDO3. 124*4882a593Smuzhiyun 125*4882a593SmuzhiyunPower-off: 126*4882a593Smuzhiyun========= 127*4882a593SmuzhiyunAS3722 supports the system power off by turning off all its rails. 128*4882a593SmuzhiyunThe device node should have the following properties to enable this 129*4882a593Smuzhiyunfunctionality 130*4882a593Smuzhiyunams,system-power-controller: Boolean, to enable the power off functionality 131*4882a593Smuzhiyun through this device. 132*4882a593Smuzhiyun 133*4882a593SmuzhiyunExample: 134*4882a593Smuzhiyun-------- 135*4882a593Smuzhiyun#include <dt-bindings/mfd/as3722.h> 136*4882a593Smuzhiyun... 137*4882a593Smuzhiyunams3722 { 138*4882a593Smuzhiyun compatible = "ams,as3722"; 139*4882a593Smuzhiyun reg = <0x48>; 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun ams,system-power-controller; 142*4882a593Smuzhiyun 143*4882a593Smuzhiyun interrupt-parent = <&intc>; 144*4882a593Smuzhiyun interrupt-controller; 145*4882a593Smuzhiyun #interrupt-cells = <2>; 146*4882a593Smuzhiyun 147*4882a593Smuzhiyun gpio-controller; 148*4882a593Smuzhiyun #gpio-cells = <2>; 149*4882a593Smuzhiyun 150*4882a593Smuzhiyun pinctrl-names = "default"; 151*4882a593Smuzhiyun pinctrl-0 = <&as3722_default>; 152*4882a593Smuzhiyun 153*4882a593Smuzhiyun as3722_default: pinmux { 154*4882a593Smuzhiyun gpio0 { 155*4882a593Smuzhiyun pins = "gpio0"; 156*4882a593Smuzhiyun function = "gpio"; 157*4882a593Smuzhiyun bias-pull-down; 158*4882a593Smuzhiyun }; 159*4882a593Smuzhiyun 160*4882a593Smuzhiyun gpio1_2_4_7 { 161*4882a593Smuzhiyun pins = "gpio1", "gpio2", "gpio4", "gpio7"; 162*4882a593Smuzhiyun function = "gpio"; 163*4882a593Smuzhiyun bias-pull-up; 164*4882a593Smuzhiyun }; 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun gpio5 { 167*4882a593Smuzhiyun pins = "gpio5"; 168*4882a593Smuzhiyun function = "clk32k_out"; 169*4882a593Smuzhiyun }; 170*4882a593Smuzhiyun } 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun regulators { 173*4882a593Smuzhiyun vsup-sd2-supply = <...>; 174*4882a593Smuzhiyun ... 175*4882a593Smuzhiyun 176*4882a593Smuzhiyun sd0 { 177*4882a593Smuzhiyun regulator-name = "vdd_cpu"; 178*4882a593Smuzhiyun regulator-min-microvolt = <700000>; 179*4882a593Smuzhiyun regulator-max-microvolt = <1400000>; 180*4882a593Smuzhiyun regulator-always-on; 181*4882a593Smuzhiyun ams,ext-control = <2>; 182*4882a593Smuzhiyun }; 183*4882a593Smuzhiyun 184*4882a593Smuzhiyun sd1 { 185*4882a593Smuzhiyun regulator-name = "vdd_core"; 186*4882a593Smuzhiyun regulator-min-microvolt = <700000>; 187*4882a593Smuzhiyun regulator-max-microvolt = <1400000>; 188*4882a593Smuzhiyun regulator-always-on; 189*4882a593Smuzhiyun ams,ext-control = <1>; 190*4882a593Smuzhiyun }; 191*4882a593Smuzhiyun 192*4882a593Smuzhiyun sd2 { 193*4882a593Smuzhiyun regulator-name = "vddio_ddr"; 194*4882a593Smuzhiyun regulator-min-microvolt = <1350000>; 195*4882a593Smuzhiyun regulator-max-microvolt = <1350000>; 196*4882a593Smuzhiyun regulator-always-on; 197*4882a593Smuzhiyun }; 198*4882a593Smuzhiyun 199*4882a593Smuzhiyun sd4 { 200*4882a593Smuzhiyun regulator-name = "avdd-hdmi-pex"; 201*4882a593Smuzhiyun regulator-min-microvolt = <1050000>; 202*4882a593Smuzhiyun regulator-max-microvolt = <1050000>; 203*4882a593Smuzhiyun regulator-always-on; 204*4882a593Smuzhiyun }; 205*4882a593Smuzhiyun 206*4882a593Smuzhiyun sd5 { 207*4882a593Smuzhiyun regulator-name = "vdd-1v8"; 208*4882a593Smuzhiyun regulator-min-microvolt = <1800000>; 209*4882a593Smuzhiyun regulator-max-microvolt = <1800000>; 210*4882a593Smuzhiyun regulator-always-on; 211*4882a593Smuzhiyun }; 212*4882a593Smuzhiyun .... 213*4882a593Smuzhiyun }; 214*4882a593Smuzhiyun}; 215