4 * Copyright (c) 2012 Samsung Electronics Co., Ltd
5 * http://www.samsung.com
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
14 #ifndef __LINUX_MFD_S2MPS11_H
15 #define __LINUX_MFD_S2MPS11_H
17 /* S2MPS11 registers */
36 S2MPS11_REG_RAMP_BUCK
,
43 S2MPS11_REG_LDO9_16_1
,
44 S2MPS11_REG_LDO17_24_1
,
45 S2MPS11_REG_LDO25_32_1
,
46 S2MPS11_REG_LDO33_38_1
,
120 /* S2MPS11 regulator ids */
121 enum s2mps11_regulators
{
171 S2MPS11_REGULATOR_MAX
,
174 #define S2MPS11_LDO_VSEL_MASK 0x3F
175 #define S2MPS11_BUCK_VSEL_MASK 0xFF
176 #define S2MPS11_BUCK9_VSEL_MASK 0x1F
177 #define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT)
178 #define S2MPS11_ENABLE_SHIFT 0x06
179 #define S2MPS11_LDO_N_VOLTAGES (S2MPS11_LDO_VSEL_MASK + 1)
180 #define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1)
181 #define S2MPS11_BUCK9_N_VOLTAGES (S2MPS11_BUCK9_VSEL_MASK + 1)
182 #define S2MPS11_RAMP_DELAY 25000 /* uV/us */
184 #define S2MPS11_CTRL1_PWRHOLD_MASK BIT(4)
186 #define S2MPS11_BUCK2_RAMP_SHIFT 6
187 #define S2MPS11_BUCK34_RAMP_SHIFT 4
188 #define S2MPS11_BUCK5_RAMP_SHIFT 6
189 #define S2MPS11_BUCK16_RAMP_SHIFT 4
190 #define S2MPS11_BUCK7810_RAMP_SHIFT 2
191 #define S2MPS11_BUCK9_RAMP_SHIFT 0
192 #define S2MPS11_BUCK2_RAMP_EN_SHIFT 3
193 #define S2MPS11_BUCK3_RAMP_EN_SHIFT 2
194 #define S2MPS11_BUCK4_RAMP_EN_SHIFT 1
195 #define S2MPS11_BUCK6_RAMP_EN_SHIFT 0
196 #define S2MPS11_PMIC_EN_SHIFT 6
198 #endif /* __LINUX_MFD_S2MPS11_H */