^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) * Maxim MAX8998, National/TI LP3974 multi-function device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) The Maxim MAX8998 is a multi-function device which includes voltage/current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) regulators, real time clock, battery charging controller and several
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) other sub-blocks. It is interfaced using an I2C interface. Each sub-block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) is addressed by the host system using different i2c slave address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) PMIC sub-block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) The PMIC sub-block contains a number of voltage and current regulators,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) with controllable parameters and dynamic voltage scaling capability.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) In addition, it includes a real time clock and battery charging controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) as well. It is accessible at I2C address 0x66.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) - compatible: Should be one of the following:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) - "maxim,max8998" for Maxim MAX8998
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) - "national,lp3974" or "ti,lp3974" for National/TI LP3974.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) - reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Optional properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) - interrupts: Interrupt specifiers for two interrupt sources.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) - First interrupt specifier is for main interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) - Second interrupt specifier is for power-on/-off interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) - max8998,pmic-buck1-dvs-gpios: GPIO specifiers for two host gpios used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) for buck 1 dvs. The format of the gpio specifier depends on the gpio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) - max8998,pmic-buck2-dvs-gpio: GPIO specifier for host gpio used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) for buck 2 dvs. The format of the gpio specifier depends on the gpio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) - max8998,pmic-buck1-default-dvs-idx: Default voltage setting selected from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) the possible 4 options selectable by the dvs gpios. The value of this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) property should be 0, 1, 2 or 3. If not specified or out of range,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) a default value of 0 is taken.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) - max8998,pmic-buck2-default-dvs-idx: Default voltage setting selected from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) the possible 2 options selectable by the dvs gpios. The value of this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) property should be 0 or 1. If not specified or out of range, a default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) value of 0 is taken.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) - max8998,pmic-buck-voltage-lock: If present, disallows changing of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) preprogrammed buck dvfs voltages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) Additional properties required if max8998,pmic-buck1-dvs-gpios is defined:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) - max8998,pmic-buck1-dvs-voltage: An array of 4 voltage values in microvolts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) for buck1 regulator that can be selected using dvs gpio.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) Additional properties required if max8998,pmic-buck2-dvs-gpio is defined:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) - max8998,pmic-buck2-dvs-voltage: An array of 2 voltage values in microvolts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) for buck2 regulator that can be selected using dvs gpio.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) Regulators: All the regulators of MAX8998 to be instantiated shall be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) listed in a child node named 'regulators'. Each regulator is represented
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) by a child node of the 'regulators' node.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) regulator-name {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) /* standard regulator bindings here */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) Following regulators of the MAX8998 PMIC block are supported. Note that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) the 'n' in regulator name, as in LDOn or BUCKn, represents the LDO or BUCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) number as described in MAX8998 datasheet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) - LDOn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) - valid values for n are 2 to 17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) - Example: LDO2, LDO10, LDO17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) - BUCKn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) - valid values for n are 1 to 4.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) - Example: BUCK1, BUCK2, BUCK3, BUCK4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) - ENVICHG: Battery Charging Current Monitor Output. This is a fixed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) voltage type regulator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) - ESAFEOUT1: (ldo19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) - ESAFEOUT2: (ld020)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) - CHARGER: main battery charger current control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) Standard regulator bindings are used inside regulator subnodes. Check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) Documentation/devicetree/bindings/regulator/regulator.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) pmic@66 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) compatible = "maxim,max8998-pmic";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) reg = <0x66>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) interrupt-parent = <&wakeup_eint>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) interrupts = <4 0>, <3 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) /* Buck 1 DVS settings */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) max8998,pmic-buck1-default-dvs-idx = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) max8998,pmic-buck1-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) <&gpx0 1 1 0 0>; /* SET2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) max8998,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) <1000000>, <950000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) /* Buck 2 DVS settings */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) max8998,pmic-buck2-default-dvs-idx = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) max8998,pmic-buck2-dvs-gpio = <&gpx0 0 3 0 0>; /* SET3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) max8998,pmic-buck2-dvs-voltage = <1350000>, <1300000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) /* Regulators to instantiate */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) regulators {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) ldo2_reg: LDO2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) regulator-name = "VDD_ALIVE_1.1V";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) regulator-min-microvolt = <1100000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) regulator-max-microvolt = <1100000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) regulator-always-on;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) buck1_reg: BUCK1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) regulator-name = "VDD_ARM_1.2V";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) regulator-min-microvolt = <950000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) regulator-max-microvolt = <1350000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) regulator-always-on;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) regulator-boot-on;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) charger_reg: CHARGER {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) regulator-name = "CHARGER";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) regulator-min-microamp = <90000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) regulator-max-microamp = <800000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) };