xref: /openbmc/u-boot/include/power/max8998_pmic.h (revision de757a7a)
1 /*
2  *  Copyright (C) 2011 Samsung Electronics
3  *  Lukasz Majewski <l.majewski@samsung.com>
4  *
5  * See file CREDITS for list of people who contributed to this
6  * project.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21  * MA 02111-1307 USA
22  */
23 
24 #ifndef __MAX8998_PMIC_H_
25 #define __MAX8998_PMIC_H_
26 
27 /* MAX 8998 registers */
28 enum {
29 	MAX8998_REG_IRQ1,
30 	MAX8998_REG_IRQ2,
31 	MAX8998_REG_IRQ3,
32 	MAX8998_REG_IRQ4,
33 	MAX8998_REG_IRQM1,
34 	MAX8998_REG_IRQM2,
35 	MAX8998_REG_IRQM3,
36 	MAX8998_REG_IRQM4,
37 	MAX8998_REG_STATUS1,
38 	MAX8998_REG_STATUS2,
39 	MAX8998_REG_STATUSM1,
40 	MAX8998_REG_STATUSM2,
41 	MAX8998_REG_CHGR1,
42 	MAX8998_REG_CHGR2,
43 	MAX8998_REG_LDO_ACTIVE_DISCHARGE1,
44 	MAX8998_REG_LDO_ACTIVE_DISCHARGE2,
45 	MAX8998_REG_BUCK_ACTIVE_DISCHARGE3,
46 	MAX8998_REG_ONOFF1,
47 	MAX8998_REG_ONOFF2,
48 	MAX8998_REG_ONOFF3,
49 	MAX8998_REG_ONOFF4,
50 	MAX8998_REG_BUCK1_VOLTAGE1,
51 	MAX8998_REG_BUCK1_VOLTAGE2,
52 	MAX8998_REG_BUCK1_VOLTAGE3,
53 	MAX8998_REG_BUCK1_VOLTAGE4,
54 	MAX8998_REG_BUCK2_VOLTAGE1,
55 	MAX8998_REG_BUCK2_VOLTAGE2,
56 	MAX8998_REG_BUCK3,
57 	MAX8998_REG_BUCK4,
58 	MAX8998_REG_LDO2_LDO3,
59 	MAX8998_REG_LDO4,
60 	MAX8998_REG_LDO5,
61 	MAX8998_REG_LDO6,
62 	MAX8998_REG_LDO7,
63 	MAX8998_REG_LDO8_LDO9,
64 	MAX8998_REG_LDO10_LDO11,
65 	MAX8998_REG_LDO12,
66 	MAX8998_REG_LDO13,
67 	MAX8998_REG_LDO14,
68 	MAX8998_REG_LDO15,
69 	MAX8998_REG_LDO16,
70 	MAX8998_REG_LDO17,
71 	MAX8998_REG_BKCHR,
72 	MAX8998_REG_LBCNFG1,
73 	MAX8998_REG_LBCNFG2,
74 	PMIC_NUM_OF_REGS,
75 };
76 
77 #define MAX8998_LDO3		(1 << 2)
78 #define MAX8998_LDO4		(1 << 1)
79 #define MAX8998_LDO7		(1 << 6)
80 #define MAX8998_LDO8		(1 << 5)
81 #define MAX8998_LDO17		(1 << 4)
82 #define MAX8998_SAFEOUT1	(1 << 4)
83 
84 #define MAX8998_I2C_ADDR        (0xCC >> 1)
85 
86 enum { LDO_OFF, LDO_ON };
87 
88 #endif /* __MAX8998_PMIC_H_ */
89