summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Wallin <mattias.wallin@stericsson.com>2011-05-25 16:17:40 +0200
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 15:15:31 +0200
commit8fddc78cee33a947736ad2a05ef91076603a58a6 (patch)
tree2b34b882202a4b98a94d1ed9976bf44c7428e840
parente121c6d76758bebce0bca7c2e0dafc104eda600d (diff)
mach-ux500: Regulator: ExtSupply3LPn in Low Power
This patch set the ExtSupply3LPn in Low Power mode at startup. ExtSupply3LPn can control the ExtSmps4 and ExtSmps3. On HREF the ExtSupply3LPn is configured to not control ExtSmps3, only ExtSmps4. ST-Ericsson ID: ER337978 ST-Ericsson Linux next: na ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I793209c7ed104199976c5d35858058e9a49eae16 Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23944 Reviewed-by: QATEST Reviewed-by: Martin PERSSON <martin.persson@stericsson.com> Reviewed-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c4
-rw-r--r--drivers/regulator/ab8500.c18
2 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index a14518214d1..1286f6c2822 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -347,11 +347,11 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
/*
* VextSupply1Regu = HW control
* VextSupply2Regu = HW control
- * VextSupply3Regu = HW control
+ * VextSupply3Regu = Low Power mode
* ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0
* ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0
*/
- INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0x2a),
+ INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0x1a),
/*
* Vaux1Regu = force HP
* Vaux2Regu = force off
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index b1f38f6cb26..8b94f67d677 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -1045,6 +1045,24 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
value);
}
+ /*
+ * Remove below when ab8500v2.0 is no longer important.
+ * Below only affects power consumption and is depending on the
+ * HREF OTP configuration.
+ * It changes the default setting for VextSupply3Regu to Low Power.
+ * Active high or low is depending on OTP which is changed from ab8500v3.0.
+ */
+ if (abx500_get_chip_id(&pdev->dev) < 0x30) {
+ err = abx500_mask_and_set_register_interruptible(&pdev->dev,
+ AB8500_REGU_CTRL2, 0x08, 0x30, 0x30);
+ if (err < 0) {
+ dev_err(&pdev->dev,
+ "Failed to override 0x%02x, 0x%02x.\n",
+ AB8500_REGU_CTRL2, 0x08);
+ return err;
+ }
+ }
+
/* register all regulators */
for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) {
struct ab8500_regulator_info *info = NULL;