blob: 84845c70f91d5a13d27271f4b008e3095dbdbc64 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glassd2c88f72015-08-30 16:55:29 -06002/*
3 * Copyright (C) 2015 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
Simon Glassd2c88f72015-08-30 16:55:29 -06005 */
6
7#ifndef _PMIC_ACT8846_H_
8#define _PMIC_ACT8846_H_
9
10#include <asm/gpio.h>
11
John Keeping519fa7a2023-01-19 12:56:12 +000012#define ACT8846_NUM_OF_REGS 0xf6
Simon Glassd2c88f72015-08-30 16:55:29 -060013
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
23struct act8846_reg_table {
24 char *name;
25 char reg_ctl;
26 char reg_vol;
27};
28
29struct 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