xref: /OK3568_Linux_fs/kernel/include/dt-bindings/regulator/qcom,rpmh-regulator.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /* Copyright (c) 2018, The Linux Foundation. All rights reserved. */
3*4882a593Smuzhiyun 
4*4882a593Smuzhiyun #ifndef __QCOM_RPMH_REGULATOR_H
5*4882a593Smuzhiyun #define __QCOM_RPMH_REGULATOR_H
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun /*
8*4882a593Smuzhiyun  * These mode constants may be used to specify modes for various RPMh regulator
9*4882a593Smuzhiyun  * device tree properties (e.g. regulator-initial-mode).  Each type of regulator
10*4882a593Smuzhiyun  * supports a subset of the possible modes.
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * %RPMH_REGULATOR_MODE_RET:	Retention mode in which only an extremely small
13*4882a593Smuzhiyun  *				load current is allowed.  This mode is supported
14*4882a593Smuzhiyun  *				by LDO and SMPS type regulators.
15*4882a593Smuzhiyun  * %RPMH_REGULATOR_MODE_LPM:	Low power mode in which a small load current is
16*4882a593Smuzhiyun  *				allowed.  This mode corresponds to PFM for SMPS
17*4882a593Smuzhiyun  *				and BOB type regulators.  This mode is supported
18*4882a593Smuzhiyun  *				by LDO, HFSMPS, BOB, and PMIC4 FTSMPS type
19*4882a593Smuzhiyun  *				regulators.
20*4882a593Smuzhiyun  * %RPMH_REGULATOR_MODE_AUTO:	Auto mode in which the regulator hardware
21*4882a593Smuzhiyun  *				automatically switches between LPM and HPM based
22*4882a593Smuzhiyun  *				upon the real-time load current.  This mode is
23*4882a593Smuzhiyun  *				supported by HFSMPS, BOB, and PMIC4 FTSMPS type
24*4882a593Smuzhiyun  *				regulators.
25*4882a593Smuzhiyun  * %RPMH_REGULATOR_MODE_HPM:	High power mode in which the full rated current
26*4882a593Smuzhiyun  *				of the regulator is allowed.  This mode
27*4882a593Smuzhiyun  *				corresponds to PWM for SMPS and BOB type
28*4882a593Smuzhiyun  *				regulators.  This mode is supported by all types
29*4882a593Smuzhiyun  *				of regulators.
30*4882a593Smuzhiyun  */
31*4882a593Smuzhiyun #define RPMH_REGULATOR_MODE_RET		0
32*4882a593Smuzhiyun #define RPMH_REGULATOR_MODE_LPM		1
33*4882a593Smuzhiyun #define RPMH_REGULATOR_MODE_AUTO	2
34*4882a593Smuzhiyun #define RPMH_REGULATOR_MODE_HPM		3
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun #endif
37