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