18c2ecf20Sopenharmony_ci* Maxim MAX8997 Voltage and Current Regulator 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe Maxim MAX8997 is a multi-function device which includes voltage and 48c2ecf20Sopenharmony_cicurrent regulators, rtc, charger controller and other sub-blocks. It is 58c2ecf20Sopenharmony_ciinterfaced to the host controller using a i2c interface. Each sub-block is 68c2ecf20Sopenharmony_ciaddressed by the host system using different i2c slave address. This document 78c2ecf20Sopenharmony_cidescribes the bindings for 'pmic' sub-block of max8997. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciRequired properties: 108c2ecf20Sopenharmony_ci- compatible: Should be "maxim,max8997-pmic". 118c2ecf20Sopenharmony_ci- reg: Specifies the i2c slave address of the pmic block. It should be 0x66. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci- max8997,pmic-buck1-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 148c2ecf20Sopenharmony_ci units for buck1 when changing voltage using gpio dvs. Refer to [1] below 158c2ecf20Sopenharmony_ci for additional information. 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci- max8997,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 188c2ecf20Sopenharmony_ci units for buck2 when changing voltage using gpio dvs. Refer to [1] below 198c2ecf20Sopenharmony_ci for additional information. 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci- max8997,pmic-buck5-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 228c2ecf20Sopenharmony_ci units for buck5 when changing voltage using gpio dvs. Refer to [1] below 238c2ecf20Sopenharmony_ci for additional information. 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci[1] If none of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional 268c2ecf20Sopenharmony_ci property is specified, the 'max8997,pmic-buck[1/2/5]-dvs-voltage' 278c2ecf20Sopenharmony_ci property should specify atleast one voltage level (which would be a 288c2ecf20Sopenharmony_ci safe operating voltage). 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci If either of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional 318c2ecf20Sopenharmony_ci property is specified, then all the eight voltage values for the 328c2ecf20Sopenharmony_ci 'max8997,pmic-buck[1/2/5]-dvs-voltage' should be specified. 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciOptional properties: 358c2ecf20Sopenharmony_ci- interrupts: Interrupt specifiers for two interrupt sources. 368c2ecf20Sopenharmony_ci - First interrupt specifier is for 'irq1' interrupt. 378c2ecf20Sopenharmony_ci - Second interrupt specifier is for 'alert' interrupt. 388c2ecf20Sopenharmony_ci- max8997,pmic-buck1-uses-gpio-dvs: 'buck1' can be controlled by gpio dvs. 398c2ecf20Sopenharmony_ci- max8997,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs. 408c2ecf20Sopenharmony_ci- max8997,pmic-buck5-uses-gpio-dvs: 'buck5' can be controlled by gpio dvs. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciAdditional properties required if either of the optional properties are used: 438c2ecf20Sopenharmony_ci- max8997,pmic-ignore-gpiodvs-side-effect: When GPIO-DVS mode is used for 448c2ecf20Sopenharmony_ci multiple bucks, changing the voltage value of one of the bucks may affect 458c2ecf20Sopenharmony_ci that of another buck, which is the side effect of the change (set_voltage). 468c2ecf20Sopenharmony_ci Use this property to ignore such side effects and change the voltage. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci- max8997,pmic-buck125-default-dvs-idx: Default voltage setting selected from 498c2ecf20Sopenharmony_ci the possible 8 options selectable by the dvs gpios. The value of this 508c2ecf20Sopenharmony_ci property should be between 0 and 7. If not specified or if out of range, the 518c2ecf20Sopenharmony_ci default value of this property is set to 0. 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci- max8997,pmic-buck125-dvs-gpios: GPIO specifiers for three host gpio's used 548c2ecf20Sopenharmony_ci for dvs. The format of the gpio specifier depends in the gpio controller. 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ciRegulators: The regulators of max8997 that have to be instantiated should be 578c2ecf20Sopenharmony_ciincluded in a sub-node named 'regulators'. Regulator nodes included in this 588c2ecf20Sopenharmony_cisub-node should be of the format as listed below. 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci regulator_name { 618c2ecf20Sopenharmony_ci standard regulator bindings here 628c2ecf20Sopenharmony_ci }; 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ciThe following are the names of the regulators that the max8997 pmic block 658c2ecf20Sopenharmony_cisupports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number 668c2ecf20Sopenharmony_cias per the datasheet of max8997. 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci - LDOn 698c2ecf20Sopenharmony_ci - valid values for n are 1 to 18 and 21 708c2ecf20Sopenharmony_ci - Example: LDO0, LD01, LDO2, LDO21 718c2ecf20Sopenharmony_ci - BUCKn 728c2ecf20Sopenharmony_ci - valid values for n are 1 to 7. 738c2ecf20Sopenharmony_ci - Example: BUCK1, BUCK2, BUCK3, BUCK7 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci - ENVICHG: Battery Charging Current Monitor Output. This is a fixed 768c2ecf20Sopenharmony_ci voltage type regulator 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci - ESAFEOUT1: (ldo19) 798c2ecf20Sopenharmony_ci - ESAFEOUT2: (ld020) 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci - CHARGER_CV: main battery charger voltage control 828c2ecf20Sopenharmony_ci - CHARGER: main battery charger current control 838c2ecf20Sopenharmony_ci - CHARGER_TOPOFF: end of charge current threshold level 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ciThe bindings inside the regulator nodes use the standard regulator bindings 868c2ecf20Sopenharmony_ciwhich are documented elsewhere. 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ciExample: 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci max8997_pmic@66 { 918c2ecf20Sopenharmony_ci compatible = "maxim,max8997-pmic"; 928c2ecf20Sopenharmony_ci interrupt-parent = <&wakeup_eint>; 938c2ecf20Sopenharmony_ci reg = <0x66>; 948c2ecf20Sopenharmony_ci interrupts = <4 0>, <3 0>; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci max8997,pmic-buck1-uses-gpio-dvs; 978c2ecf20Sopenharmony_ci max8997,pmic-buck2-uses-gpio-dvs; 988c2ecf20Sopenharmony_ci max8997,pmic-buck5-uses-gpio-dvs; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci max8997,pmic-ignore-gpiodvs-side-effect; 1018c2ecf20Sopenharmony_ci max8997,pmic-buck125-default-dvs-idx = <0>; 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci max8997,pmic-buck125-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */ 1048c2ecf20Sopenharmony_ci <&gpx0 1 1 0 0>, /* SET2 */ 1058c2ecf20Sopenharmony_ci <&gpx0 2 1 0 0>; /* SET3 */ 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>, 1088c2ecf20Sopenharmony_ci <1250000>, <1200000>, 1098c2ecf20Sopenharmony_ci <1150000>, <1100000>, 1108c2ecf20Sopenharmony_ci <1000000>, <950000>; 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci max8997,pmic-buck2-dvs-voltage = <1100000>, <1100000>, 1138c2ecf20Sopenharmony_ci <1100000>, <1100000>, 1148c2ecf20Sopenharmony_ci <1000000>, <1000000>, 1158c2ecf20Sopenharmony_ci <1000000>, <1000000>; 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>, 1188c2ecf20Sopenharmony_ci <1200000>, <1200000>, 1198c2ecf20Sopenharmony_ci <1200000>, <1200000>, 1208c2ecf20Sopenharmony_ci <1200000>, <1200000>; 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci regulators { 1238c2ecf20Sopenharmony_ci ldo1_reg: LDO1 { 1248c2ecf20Sopenharmony_ci regulator-name = "VDD_ABB_3.3V"; 1258c2ecf20Sopenharmony_ci regulator-min-microvolt = <3300000>; 1268c2ecf20Sopenharmony_ci regulator-max-microvolt = <3300000>; 1278c2ecf20Sopenharmony_ci }; 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci ldo2_reg: LDO2 { 1308c2ecf20Sopenharmony_ci regulator-name = "VDD_ALIVE_1.1V"; 1318c2ecf20Sopenharmony_ci regulator-min-microvolt = <1100000>; 1328c2ecf20Sopenharmony_ci regulator-max-microvolt = <1100000>; 1338c2ecf20Sopenharmony_ci regulator-always-on; 1348c2ecf20Sopenharmony_ci }; 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci buck1_reg: BUCK1 { 1378c2ecf20Sopenharmony_ci regulator-name = "VDD_ARM_1.2V"; 1388c2ecf20Sopenharmony_ci regulator-min-microvolt = <950000>; 1398c2ecf20Sopenharmony_ci regulator-max-microvolt = <1350000>; 1408c2ecf20Sopenharmony_ci regulator-always-on; 1418c2ecf20Sopenharmony_ci regulator-boot-on; 1428c2ecf20Sopenharmony_ci }; 1438c2ecf20Sopenharmony_ci }; 1448c2ecf20Sopenharmony_ci }; 145