summaryrefslogtreecommitdiff
path: root/include/power/act8846_pmic.h
blob: a811f28e633a53716643a69c883431dec4e954cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright (C) 2015 Google, Inc
 * Written by Simon Glass <sjg@chromium.org>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef _PMIC_ACT8846_H_
#define _PMIC_ACT8846_H_

#include <asm/gpio.h>

#define ACT8846_NUM_OF_REGS	12

#define BUCK_VOL_MASK 0x3f
#define LDO_VOL_MASK 0x3f

#define BUCK_EN_MASK 0x80
#define LDO_EN_MASK 0x80

#define VOL_MIN_IDX 0x00
#define VOL_MAX_IDX 0x3f

struct  act8846_reg_table {
	char	*name;
	char	reg_ctl;
	char	reg_vol;
};

struct pmic_act8846 {
	struct pmic *pmic;
	int node;	/*device tree node*/
	struct gpio_desc pwr_hold;
	struct udevice *dev;
};

#endif