xref: /openbmc/u-boot/include/power/act8846_pmic.h (revision 00a457b2)
1 /*
2  * Copyright (C) 2015 Google, Inc
3  * Written by Simon Glass <sjg@chromium.org>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #ifndef _PMIC_ACT8846_H_
9 #define _PMIC_ACT8846_H_
10 
11 #include <asm/gpio.h>
12 
13 #define ACT8846_NUM_OF_REGS	12
14 
15 #define BUCK_VOL_MASK 0x3f
16 #define LDO_VOL_MASK 0x3f
17 
18 #define BUCK_EN_MASK 0x80
19 #define LDO_EN_MASK 0x80
20 
21 #define VOL_MIN_IDX 0x00
22 #define VOL_MAX_IDX 0x3f
23 
24 struct  act8846_reg_table {
25 	char	*name;
26 	char	reg_ctl;
27 	char	reg_vol;
28 };
29 
30 struct pmic_act8846 {
31 	struct pmic *pmic;
32 	int node;	/*device tree node*/
33 	struct gpio_desc pwr_hold;
34 	struct udevice *dev;
35 };
36 
37 #endif
38