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