summaryrefslogtreecommitdiff
path: root/include/power
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-08-30 16:55:29 -0600
committerSimon Glass <sjg@chromium.org>2015-09-02 21:28:23 -0600
commitd2c88f7d528a3490dc3ce5317db39c0912bd2de1 (patch)
treed37f6fdf1a75060f1660732a08ce9f69ee6641c0 /include/power
parent26ad30e9d3ec445f61f94910fb14cc6e7d8efa25 (diff)
downloadu-boot-imx-d2c88f7d528a3490dc3ce5317db39c0912bd2de1.zip
u-boot-imx-d2c88f7d528a3490dc3ce5317db39c0912bd2de1.tar.gz
u-boot-imx-d2c88f7d528a3490dc3ce5317db39c0912bd2de1.tar.bz2
power: Add support for ACT8846 PMIC
Add a driver for the ACT8846 PMIC. This supports several LDOs and BUCKs and is connected to the I2C bus. This driver supports using a regulator driver to access the regulators. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/power')
-rw-r--r--include/power/act8846_pmic.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/power/act8846_pmic.h b/include/power/act8846_pmic.h
new file mode 100644
index 0000000..a811f28
--- /dev/null
+++ b/include/power/act8846_pmic.h
@@ -0,0 +1,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