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_MIN_600MV 600000
127 #define S2MPS14_BUCK4_MIN_1400MV 1400000
128 #define S2MPS14_BUCK1235_STEP_6_25MV 6250
129 #define S2MPS14_BUCK4_STEP_12_5MV 12500
130 #define S2MPS14_BUCK1235_START_SEL 0x20
131 #define S2MPS14_BUCK4_START_SEL 0x40
133 * Default ramp delay in uv/us. Datasheet says that ramp delay can be
134 * controlled however it does not specify which register is used for that.
135 * Let's assume that default value will be set.
137 #define S2MPS14_BUCK_RAMP_DELAY 12500
139 /* Regulator constraints for different types of LDOx */
140 #define S2MPS14_LDO_MIN_800MV 800000
141 #define S2MPS14_LDO_MIN_1800MV 1800000
142 #define S2MPS14_LDO_STEP_12_5MV 12500
143 #define S2MPS14_LDO_STEP_25MV 25000
145 #define S2MPS14_LDO_VSEL_MASK 0x3F
146 #define S2MPS14_BUCK_VSEL_MASK 0xFF
147 #define S2MPS14_ENABLE_MASK (0x03 << S2MPS14_ENABLE_SHIFT)
148 #define S2MPS14_ENABLE_SHIFT 6
149 /* On/Off controlled by PWREN */
150 #define S2MPS14_ENABLE_SUSPEND (0x01 << S2MPS14_ENABLE_SHIFT)
151 #define S2MPS14_LDO_N_VOLTAGES (S2MPS14_LDO_VSEL_MASK + 1)
152 #define S2MPS14_BUCK_N_VOLTAGES (S2MPS14_BUCK_VSEL_MASK + 1)
154 #endif /* __LINUX_MFD_S2MPS14_H */
This page took 0.03384 seconds and 5 git commands to generate.