Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | d2c88f7 | 2015-08-30 16:55:29 -0600 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Google, Inc |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
Simon Glass | d2c88f7 | 2015-08-30 16:55:29 -0600 | [diff] [blame] | 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 |