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