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