18c2ecf20Sopenharmony_ci* Maxim MAX8998, National/TI LP3974 multi-function device 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe Maxim MAX8998 is a multi-function device which includes voltage/current 48c2ecf20Sopenharmony_ciregulators, real time clock, battery charging controller and several 58c2ecf20Sopenharmony_ciother sub-blocks. It is interfaced using an I2C interface. Each sub-block 68c2ecf20Sopenharmony_ciis addressed by the host system using different i2c slave address. 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciPMIC sub-block 98c2ecf20Sopenharmony_ci-------------- 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciThe PMIC sub-block contains a number of voltage and current regulators, 128c2ecf20Sopenharmony_ciwith controllable parameters and dynamic voltage scaling capability. 138c2ecf20Sopenharmony_ciIn addition, it includes a real time clock and battery charging controller 148c2ecf20Sopenharmony_cias well. It is accessible at I2C address 0x66. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciRequired properties: 178c2ecf20Sopenharmony_ci- compatible: Should be one of the following: 188c2ecf20Sopenharmony_ci - "maxim,max8998" for Maxim MAX8998 198c2ecf20Sopenharmony_ci - "national,lp3974" or "ti,lp3974" for National/TI LP3974. 208c2ecf20Sopenharmony_ci- reg: Specifies the i2c slave address of the pmic block. It should be 0x66. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ciOptional properties: 238c2ecf20Sopenharmony_ci- interrupts: Interrupt specifiers for two interrupt sources. 248c2ecf20Sopenharmony_ci - First interrupt specifier is for main interrupt. 258c2ecf20Sopenharmony_ci - Second interrupt specifier is for power-on/-off interrupt. 268c2ecf20Sopenharmony_ci- max8998,pmic-buck1-dvs-gpios: GPIO specifiers for two host gpios used 278c2ecf20Sopenharmony_ci for buck 1 dvs. The format of the gpio specifier depends on the gpio 288c2ecf20Sopenharmony_ci controller. 298c2ecf20Sopenharmony_ci- max8998,pmic-buck2-dvs-gpio: GPIO specifier for host gpio used 308c2ecf20Sopenharmony_ci for buck 2 dvs. The format of the gpio specifier depends on the gpio 318c2ecf20Sopenharmony_ci controller. 328c2ecf20Sopenharmony_ci- max8998,pmic-buck1-default-dvs-idx: Default voltage setting selected from 338c2ecf20Sopenharmony_ci the possible 4 options selectable by the dvs gpios. The value of this 348c2ecf20Sopenharmony_ci property should be 0, 1, 2 or 3. If not specified or out of range, 358c2ecf20Sopenharmony_ci a default value of 0 is taken. 368c2ecf20Sopenharmony_ci- max8998,pmic-buck2-default-dvs-idx: Default voltage setting selected from 378c2ecf20Sopenharmony_ci the possible 2 options selectable by the dvs gpios. The value of this 388c2ecf20Sopenharmony_ci property should be 0 or 1. If not specified or out of range, a default 398c2ecf20Sopenharmony_ci value of 0 is taken. 408c2ecf20Sopenharmony_ci- max8998,pmic-buck-voltage-lock: If present, disallows changing of 418c2ecf20Sopenharmony_ci preprogrammed buck dvfs voltages. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ciAdditional properties required if max8998,pmic-buck1-dvs-gpios is defined: 448c2ecf20Sopenharmony_ci- max8998,pmic-buck1-dvs-voltage: An array of 4 voltage values in microvolts 458c2ecf20Sopenharmony_ci for buck1 regulator that can be selected using dvs gpio. 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ciAdditional properties required if max8998,pmic-buck2-dvs-gpio is defined: 488c2ecf20Sopenharmony_ci- max8998,pmic-buck2-dvs-voltage: An array of 2 voltage values in microvolts 498c2ecf20Sopenharmony_ci for buck2 regulator that can be selected using dvs gpio. 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ciRegulators: All the regulators of MAX8998 to be instantiated shall be 528c2ecf20Sopenharmony_cilisted in a child node named 'regulators'. Each regulator is represented 538c2ecf20Sopenharmony_ciby a child node of the 'regulators' node. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci regulator-name { 568c2ecf20Sopenharmony_ci /* standard regulator bindings here */ 578c2ecf20Sopenharmony_ci }; 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ciFollowing regulators of the MAX8998 PMIC block are supported. Note that 608c2ecf20Sopenharmony_cithe 'n' in regulator name, as in LDOn or BUCKn, represents the LDO or BUCK 618c2ecf20Sopenharmony_cinumber as described in MAX8998 datasheet. 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci - LDOn 648c2ecf20Sopenharmony_ci - valid values for n are 2 to 17 658c2ecf20Sopenharmony_ci - Example: LDO2, LDO10, LDO17 668c2ecf20Sopenharmony_ci - BUCKn 678c2ecf20Sopenharmony_ci - valid values for n are 1 to 4. 688c2ecf20Sopenharmony_ci - Example: BUCK1, BUCK2, BUCK3, BUCK4 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci - ENVICHG: Battery Charging Current Monitor Output. This is a fixed 718c2ecf20Sopenharmony_ci voltage type regulator 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci - ESAFEOUT1: (ldo19) 748c2ecf20Sopenharmony_ci - ESAFEOUT2: (ld020) 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci - CHARGER: main battery charger current control 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ciStandard regulator bindings are used inside regulator subnodes. Check 798c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/regulator/regulator.txt 808c2ecf20Sopenharmony_cifor more details. 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ciExample: 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci pmic@66 { 858c2ecf20Sopenharmony_ci compatible = "maxim,max8998-pmic"; 868c2ecf20Sopenharmony_ci reg = <0x66>; 878c2ecf20Sopenharmony_ci interrupt-parent = <&wakeup_eint>; 888c2ecf20Sopenharmony_ci interrupts = <4 0>, <3 0>; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci /* Buck 1 DVS settings */ 918c2ecf20Sopenharmony_ci max8998,pmic-buck1-default-dvs-idx = <0>; 928c2ecf20Sopenharmony_ci max8998,pmic-buck1-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */ 938c2ecf20Sopenharmony_ci <&gpx0 1 1 0 0>; /* SET2 */ 948c2ecf20Sopenharmony_ci max8998,pmic-buck1-dvs-voltage = <1350000>, <1300000>, 958c2ecf20Sopenharmony_ci <1000000>, <950000>; 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci /* Buck 2 DVS settings */ 988c2ecf20Sopenharmony_ci max8998,pmic-buck2-default-dvs-idx = <0>; 998c2ecf20Sopenharmony_ci max8998,pmic-buck2-dvs-gpio = <&gpx0 0 3 0 0>; /* SET3 */ 1008c2ecf20Sopenharmony_ci max8998,pmic-buck2-dvs-voltage = <1350000>, <1300000>; 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci /* Regulators to instantiate */ 1038c2ecf20Sopenharmony_ci regulators { 1048c2ecf20Sopenharmony_ci ldo2_reg: LDO2 { 1058c2ecf20Sopenharmony_ci regulator-name = "VDD_ALIVE_1.1V"; 1068c2ecf20Sopenharmony_ci regulator-min-microvolt = <1100000>; 1078c2ecf20Sopenharmony_ci regulator-max-microvolt = <1100000>; 1088c2ecf20Sopenharmony_ci regulator-always-on; 1098c2ecf20Sopenharmony_ci }; 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci buck1_reg: BUCK1 { 1128c2ecf20Sopenharmony_ci regulator-name = "VDD_ARM_1.2V"; 1138c2ecf20Sopenharmony_ci regulator-min-microvolt = <950000>; 1148c2ecf20Sopenharmony_ci regulator-max-microvolt = <1350000>; 1158c2ecf20Sopenharmony_ci regulator-always-on; 1168c2ecf20Sopenharmony_ci regulator-boot-on; 1178c2ecf20Sopenharmony_ci }; 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci charger_reg: CHARGER { 1208c2ecf20Sopenharmony_ci regulator-name = "CHARGER"; 1218c2ecf20Sopenharmony_ci regulator-min-microamp = <90000>; 1228c2ecf20Sopenharmony_ci regulator-max-microamp = <800000>; 1238c2ecf20Sopenharmony_ci }; 1248c2ecf20Sopenharmony_ci }; 1258c2ecf20Sopenharmony_ci }; 126