summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2012-04-10 23:44:15 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-11 09:51:01 +0200
commite400e0b5925f14538f826ceeb5f0f0608c88d330 (patch)
treea5253483780480117f0aa2cc67a69b4dca755243 /include
parentcacee0da048a10068ecdbdfeae125eba22e48d8d (diff)
downloadbarebox-e400e0b5925f14538f826ceeb5f0f0608c88d330.tar.gz
barebox-e400e0b5925f14538f826ceeb5f0f0608c88d330.tar.xz
Add MC13783 SWx definitions
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/mfd/mc13xxx.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
index a9dd847ad..2880307a2 100644
--- a/include/mfd/mc13xxx.h
+++ b/include/mfd/mc13xxx.h
@@ -132,6 +132,24 @@
#define MC13892_REVISION_3_3 10
#define MC13892_REVISION_3_5 11
+#define MC13783_SWX_VOLTAGE(x) ((x) & 0x3f)
+#define MC13783_SWX_VOLTAGE_DVS(x) (((x) & 0x3f) << 6)
+#define MC13783_SWX_VOLTAGE_STANDBY(x) (((x) & 0x3f) << 12)
+#define MC13783_SWX_VOLTAGE_1_450 0x16
+
+#define MC13783_SWX_MODE_OFF 0
+#define MC13783_SWX_MODE_NO_PULSE_SKIP 1
+#define MC13783_SWX_MODE_PULSE_SKIP 2
+#define MC13783_SWX_MODE_LOW_POWER_PFM 3
+
+#define MC13783_SW1A_MODE(x) (((x) & 0x3) << 0)
+#define MC13783_SW1A_MODE_STANDBY(x) (((x) & 0x3) << 2)
+#define MC13783_SW1B_MODE(x) (((x) & 0x3) << 10)
+#define MC13783_SW1B_MODE_STANDBY(x) (((x) & 0x3) << 12)
+#define MC13783_SW1A_SOFTSTART (1 << 9)
+#define MC13783_SW1B_SOFTSTART (1 << 17)
+#define MC13783_SW_PLL_FACTOR(x) (((x) - 28) << 19)
+
enum mc13xxx_mode {
MC13XXX_MODE_I2C,
MC13XXX_MODE_SPI,