xref: /openbmc/u-boot/include/power/ltc3676_pmic.h (revision baefb63a)
1 /*
2  *  Copyright (C) 2014 Gateworks Corporation
3  *  Tim Harvey <tharvey@gateworks.com>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7 
8 #ifndef __LTC3676_PMIC_H_
9 #define __LTC3676_PMIC_H_
10 
11 /* LTC3676 registers */
12 enum {
13 	LTC3676_BUCK1	= 0x01,
14 	LTC3676_BUCK2	= 0x02,
15 	LTC3676_BUCK3	= 0x03,
16 	LTC3676_BUCK4	= 0x04,
17 	LTC3676_LDOA	= 0x05,
18 	LTC3676_LDOB	= 0x06,
19 	LTC3676_SQD1	= 0x07,
20 	LTC3676_SQD2	= 0x08,
21 	LTC3676_CNTRL	= 0x09,
22 	LTC3676_DVB1A	= 0x0A,
23 	LTC3676_DVB1B	= 0x0B,
24 	LTC3676_DVB2A	= 0x0C,
25 	LTC3676_DVB2B	= 0x0D,
26 	LTC3676_DVB3A	= 0x0E,
27 	LTC3676_DVB3B	= 0x0F,
28 	LTC3676_DVB4A	= 0x10,
29 	LTC3676_DVB4B	= 0x11,
30 	LTC3676_MSKIRQ	= 0x12,
31 	LTC3676_MSKPG	= 0x13,
32 	LTC3676_USER	= 0x14,
33 	LTC3676_HRST	= 0x1E,
34 	LTC3676_CLIRQ	= 0x1F,
35 	LTC3676_IRQSTAT	= 0x15,
36 	LTC3676_PGSTATL	= 0x16,
37 	LTC3676_PGSTATR	= 0x17,
38 	LTC3676_NUM_OF_REGS = 0x20,
39 };
40 
41 /*
42  * SW Configuration
43  */
44 
45 #define LTC3676_DVB_MASK	0x1f
46 #define LTC3676_PGOOD_MASK	(1<<5)
47 #define LTC3676_REF_SELA	(0<<5)
48 #define LTC3676_REF_SELB	(1<<5)
49 
50 int power_ltc3676_init(unsigned char bus);
51 #endif
52