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
{
177 #define S2MPS11_BUCK_MIN1 600000
178 #define S2MPS11_BUCK_MIN2 750000
179 #define S2MPS11_BUCK_MIN3 3000000
180 #define S2MPS11_LDO_MIN 800000
181 #define S2MPS11_BUCK_STEP1 6250
182 #define S2MPS11_BUCK_STEP2 12500
183 #define S2MPS11_BUCK_STEP3 25000
184 #define S2MPS11_LDO_STEP1 50000
185 #define S2MPS11_LDO_STEP2 25000
186 #define S2MPS11_LDO_VSEL_MASK 0x3F
187 #define S2MPS11_BUCK_VSEL_MASK 0xFF
188 #define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT)
189 #define S2MPS11_ENABLE_SHIFT 0x06
190 #define S2MPS11_LDO_N_VOLTAGES (S2MPS11_LDO_VSEL_MASK + 1)
191 #define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1)
193 #define S2MPS11_PMIC_EN_SHIFT 6
194 #define S2MPS11_REGULATOR_MAX (S2MPS11_REG_MAX - 3)
196 #endif /* __LINUX_MFD_S2MPS11_H */