2 * Copyright (c) 2013 Samsung Electronics Co., Ltd
3 * http://www.samsung.com
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
12 #ifndef __LINUX_MFD_S2MPA01_H
13 #define __LINUX_MFD_S2MPA01_H
15 /* S2MPA01 registers */
35 S2MPA01_REG_LDO_DSCH1
,
36 S2MPA01_REG_LDO_DSCH2
,
37 S2MPA01_REG_LDO_DSCH3
,
38 S2MPA01_REG_LDO_DSCH4
,
108 S2MPA01_REG_LDO_OVCB1
,
109 S2MPA01_REG_LDO_OVCB2
,
110 S2MPA01_REG_LDO_OVCB3
,
111 S2MPA01_REG_LDO_OVCB4
,
115 /* S2MPA01 regulator ids */
116 enum s2mpa01_regulators
{
155 S2MPA01_REGULATOR_MAX
,
158 #define S2MPA01_LDO_VSEL_MASK 0x3F
159 #define S2MPA01_BUCK_VSEL_MASK 0xFF
160 #define S2MPA01_ENABLE_MASK (0x03 << S2MPA01_ENABLE_SHIFT)
161 #define S2MPA01_ENABLE_SHIFT 0x06
162 #define S2MPA01_LDO_N_VOLTAGES (S2MPA01_LDO_VSEL_MASK + 1)
163 #define S2MPA01_BUCK_N_VOLTAGES (S2MPA01_BUCK_VSEL_MASK + 1)
165 #define S2MPA01_RAMP_DELAY 12500 /* uV/us */
167 #define S2MPA01_BUCK16_RAMP_SHIFT 4
168 #define S2MPA01_BUCK24_RAMP_SHIFT 6
169 #define S2MPA01_BUCK3_RAMP_SHIFT 4
170 #define S2MPA01_BUCK5_RAMP_SHIFT 6
171 #define S2MPA01_BUCK7_RAMP_SHIFT 2
172 #define S2MPA01_BUCK8910_RAMP_SHIFT 0
174 #define S2MPA01_BUCK1_RAMP_EN_SHIFT 3
175 #define S2MPA01_BUCK2_RAMP_EN_SHIFT 2
176 #define S2MPA01_BUCK3_RAMP_EN_SHIFT 1
177 #define S2MPA01_BUCK4_RAMP_EN_SHIFT 0
178 #define S2MPA01_PMIC_EN_SHIFT 6
180 #endif /*__LINUX_MFD_S2MPA01_H */