4 * Copyright (c) 2014 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.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
19 #ifndef __LINUX_MFD_S2MPS14_H
20 #define __LINUX_MFD_S2MPS14_H
22 /* S2MPS14 registers */
89 /* S2MPS14 regulator ids */
90 enum s2mps14_regulators
{
122 S2MPS14_REGULATOR_MAX
,
125 /* Regulator constraints for BUCKx */
126 #define S2MPS14_BUCK1235_START_SEL 0x20
127 #define S2MPS14_BUCK4_START_SEL 0x40
129 * Default ramp delay in uv/us. Datasheet says that ramp delay can be
130 * controlled however it does not specify which register is used for that.
131 * Let's assume that default value will be set.
133 #define S2MPS14_BUCK_RAMP_DELAY 12500
135 #define S2MPS14_LDO_VSEL_MASK 0x3F
136 #define S2MPS14_BUCK_VSEL_MASK 0xFF
137 #define S2MPS14_ENABLE_MASK (0x03 << S2MPS14_ENABLE_SHIFT)
138 #define S2MPS14_ENABLE_SHIFT 6
139 /* On/Off controlled by PWREN */
140 #define S2MPS14_ENABLE_SUSPEND (0x01 << S2MPS14_ENABLE_SHIFT)
141 /* On/Off controlled by LDO10EN or EMMCEN */
142 #define S2MPS14_ENABLE_EXT_CONTROL (0x00 << S2MPS14_ENABLE_SHIFT)
143 #define S2MPS14_LDO_N_VOLTAGES (S2MPS14_LDO_VSEL_MASK + 1)
144 #define S2MPS14_BUCK_N_VOLTAGES (S2MPS14_BUCK_VSEL_MASK + 1)
146 #endif /* __LINUX_MFD_S2MPS14_H */