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