Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | b08ce89 | 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 | b08ce89 | 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 | |
John Keeping | 89ea34a | 2023-01-19 12:56:12 +0000 | [diff] [blame] | 12 | #define ACT8846_NUM_OF_REGS 0xf6 |
Simon Glass | b08ce89 | 2015-08-30 16:55:29 -0600 | [diff] [blame] | 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 |