]>
git.ipfire.org Git - thirdparty/kernel/linux.git/blob - include/linux/mfd/samsung/s2mps14.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2014 Samsung Electronics Co., Ltd
4 * http://www.samsung.com
7 #ifndef __LINUX_MFD_S2MPS14_H
8 #define __LINUX_MFD_S2MPS14_H
10 /* S2MPS14 registers */
77 /* S2MPS14 regulator ids */
78 enum s2mps14_regulators
{
110 S2MPS14_REGULATOR_MAX
,
113 /* Regulator constraints for BUCKx */
114 #define S2MPS14_BUCK1235_START_SEL 0x20
115 #define S2MPS14_BUCK4_START_SEL 0x40
117 * Default ramp delay in uv/us. Datasheet says that ramp delay can be
118 * controlled however it does not specify which register is used for that.
119 * Let's assume that default value will be set.
121 #define S2MPS14_BUCK_RAMP_DELAY 12500
123 #define S2MPS14_LDO_VSEL_MASK 0x3F
124 #define S2MPS14_BUCK_VSEL_MASK 0xFF
125 #define S2MPS14_ENABLE_MASK (0x03 << S2MPS14_ENABLE_SHIFT)
126 #define S2MPS14_ENABLE_SHIFT 6
127 /* On/Off controlled by PWREN */
128 #define S2MPS14_ENABLE_SUSPEND (0x01 << S2MPS14_ENABLE_SHIFT)
129 /* On/Off controlled by LDO10EN or EMMCEN */
130 #define S2MPS14_ENABLE_EXT_CONTROL (0x00 << S2MPS14_ENABLE_SHIFT)
131 #define S2MPS14_LDO_N_VOLTAGES (S2MPS14_LDO_VSEL_MASK + 1)
132 #define S2MPS14_BUCK_N_VOLTAGES (S2MPS14_BUCK_VSEL_MASK + 1)
134 #endif /* __LINUX_MFD_S2MPS14_H */