regulator: spm_regulator: Add snapshot of spm_regulator driver
This is snapshot of the spm_regulator driver as of msm-4.4
'commit 26efcc23eb82 ("regulator: spm: check min/max voltages
against HW configuration")'.
Also replace the __invoke_psci_fn_smc wrapper with arm_smccc_smc as
__invoke_psci_fn_smc is no longer available.
Change-Id: Ia6ded6dc21ecff2114ddd20e26706d9196239956
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
f9d484ef77
commit
7e9e00a199
@@ -0,0 +1,61 @@
|
||||
Qualcomm Technologies Inc. SPM Regulators
|
||||
|
||||
spm-regulator is a regulator device which supports PMIC processor supply
|
||||
regulators via the SPM module.
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "qcom,spm-regulator"
|
||||
- reg: Specifies the SPMI address and size for this regulator device
|
||||
- regulator-name: A string used as a descriptive name for the regulator
|
||||
|
||||
Required structure:
|
||||
- A qcom,spm-regulator node must be a child of an SPMI node that has specified
|
||||
the spmi-slave-container property
|
||||
|
||||
Optional properties:
|
||||
- qcom,mode: A string which specifies the mode to use for the regulator.
|
||||
Supported values are "pwm" and "auto". PWM mode is more
|
||||
robust, but draws more current than auto mode. If this
|
||||
property is not specified, then the regulator will remain
|
||||
in whatever mode hardware or bootloaders set it to.
|
||||
- qcom,cpu-num: Specifies which CPU this regulator powers. This property is
|
||||
not need when the SPM regulator is shared between all CPUs.
|
||||
- qcom,bypass-spm: Boolean flag which indicates that voltage control should not
|
||||
be managed by an SPM. Instead, the voltage should be
|
||||
controlled via SPMI.
|
||||
- qcom,max-voltage-step: Maximum single voltage step size in microvolts.
|
||||
- qcom,recal-mask: Bit mask of the APSS clusters to recalibrate after each
|
||||
voltage change. Bit 0 corresponds to the first cluster,
|
||||
bit 1 corresponds to the second cluster, and so on.
|
||||
|
||||
Optional structure:
|
||||
- A child node may be specified within a qcom,spm-regulator node which defines
|
||||
an additional regulator which controls the AVS minimum and maximum
|
||||
voltage limits.
|
||||
- The AVS child node must contain these properties defined in regulator.txt:
|
||||
regulator-name, regulator-min-microvolt, regulator-max-microvolt.
|
||||
|
||||
All properties specified within the core regulator framework can also be used.
|
||||
These bindings can be found in regulator.txt.
|
||||
|
||||
Example:
|
||||
qcom,spmi@fc4c0000 {
|
||||
|
||||
qcom,pm8226@1 {
|
||||
spmi-slave-container;
|
||||
|
||||
spm-regulator@1700 {
|
||||
compatible = "qcom,spm-regulator";
|
||||
regulator-name = "8226_s2";
|
||||
reg = <0x1700 0x100>;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1275000>;
|
||||
|
||||
avs-limit-regulator {
|
||||
regulator-name = "8226_s2_avs_limit";
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1275000>;
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1057,6 +1057,16 @@ config REGULATOR_RPM_SMD
|
||||
be used on systems which contain an RPM which communicates with the
|
||||
application processor over SMD.
|
||||
|
||||
config REGULATOR_SPM
|
||||
bool "SPM regulator driver"
|
||||
depends on SPMI
|
||||
help
|
||||
Enable support for the SPM regulator driver which is used for
|
||||
setting voltages of processor supply regulators via the SPM module
|
||||
found inside chips of Qualcomm Technologies Inc. The SPM regulator
|
||||
driver can be used on QTI SoCs where the APSS processor cores are
|
||||
supplied by their own PMIC regulator.
|
||||
|
||||
config REGULATOR_STUB
|
||||
tristate "Stub Regulator"
|
||||
help
|
||||
|
||||
@@ -114,6 +114,7 @@ obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RPM_SMD) += rpm-smd-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_SPM) += spm-regulator.o
|
||||
|
||||
obj-$(CONFIG_REGULATOR_CPR3) += cpr3-regulator.o cpr3-util.o
|
||||
obj-$(CONFIG_REGULATOR_CPR3_HMSS) += cpr3-hmss-regulator.o
|
||||
|
||||
1329
drivers/regulator/spm-regulator.c
Normal file
1329
drivers/regulator/spm-regulator.c
Normal file
File diff suppressed because it is too large
Load Diff
25
include/linux/regulator/spm-regulator.h
Normal file
25
include/linux/regulator/spm-regulator.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_REGULATOR_SPM_H
|
||||
#define _LINUX_REGULATOR_SPM_H
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#ifdef CONFIG_REGULATOR_SPM
|
||||
int __init spm_regulator_init(void);
|
||||
#else
|
||||
static inline int __init spm_regulator_init(void) { return -ENODEV; }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user