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