summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBengt Jonsson <bengt.g.jonsson@stericsson.com>2011-03-23 18:58:35 +0100
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 15:15:01 +0200
commitbc7c33949542d8700e62161343e6c8e8d9218265 (patch)
treef8dcb45a249a1b0320f176ad6a416f1e06f7b6e3
parent0bacd4f4c404cfdbba8f4824e61ebb1bbf33c682 (diff)
ARM: ux500: Vsmps3 controlled by SysClkReq1
Vsmps3 is put in HW control by SysClkReq1 at init. The corresponding settings in suspend-force are removed. ST-Ericsson Linux next: - ST-Ericsson ID: ER326467 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I4d20ed770fe931919f5bd0bf68d53cb69a19bf89 Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18985
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c27
-rw-r--r--drivers/regulator/ab8500-debug.c28
-rw-r--r--drivers/regulator/ab8500.c21
-rw-r--r--include/linux/regulator/ab8500.h3
4 files changed, 43 insertions, 36 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 5e8855b964c..f8995efd865 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -168,15 +168,16 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
*/
INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x00),
/*
+ * Vsmps1SysClkReq1HPValid = enabled
+ * Vsmps2SysClkReq1HPValid = enabled
+ * Vsmps3SysClkReq1HPValid = enabled
* VanaSysClkReq1HPValid = disabled
* VpllSysClkReq1HPValid = enabled
* Vaux1SysClkReq1HPValid = disabled
* Vaux2SysClkReq1HPValid = disabled
* Vaux3SysClkReq1HPValid = disabled
- * Vsmps2SysClkReq1HPValid = enabled
- * Vsmps1SysClkReq1HPValid = enabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x13),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x17),
/*
* VextSupply1SysClkReq1HPValid = disabled
* VextSupply2SysClkReq1HPValid = disabled
@@ -281,16 +282,32 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
*/
INIT_REGULATOR_REGISTER(AB8500_VBBSEL2, 0x00),
/*
- * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2
* Vsmps1Regu = HW control
+ * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2
*/
INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x06),
/*
- * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2
* Vsmps2Regu = HW control
+ * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2
*/
INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x06),
/*
+ * Vsmps3Sel2 = 1.2125 V
+ * NOTE! PRCMU register
+ */
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL2, 0x29),
+ /*
+ * Vsmps3Regu = HW control
+ * Vsmps3SelCtrl = Vsmps3 voltage defined by Vsmps3Sel2
+ * NOTE! PRCMU register
+ */
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS3REGU, 0x06),
+ /*
+ * Vsmps3Sel1 = 0.9 V
+ * NOTE! PRCMU register
+ */
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL1, 0x10),
+ /*
* VPll = Hw controlled
* VanaRegu = force off
*/
diff --git a/drivers/regulator/ab8500-debug.c b/drivers/regulator/ab8500-debug.c
index 5646fcc11cc..b03f7b1b1fa 100644
--- a/drivers/regulator/ab8500-debug.c
+++ b/drivers/regulator/ab8500-debug.c
@@ -1506,34 +1506,6 @@ static struct ab8500_force_reg ab8500_force_reg[] = {
},
{
/*
- * ReguSysClkReq1HPValid1
- * OTP: 0x00, HSI: 0x16, suspend: 0x17/0xff (value/mask)
- * [ 4] VpllSysClkReq1HPValid = Vpll set by SysClkReq1
- * [ 2] Vsmps3SysClkReq1HPValid = Vsmps3 set by SysClkReq1
- * [ 1] Vsmps2SysClkReq1HPValid = Vsmsp2 set by SysClkReq1
- * [ 0] Vsmps1SysClkReq1HPValid = Vsmps1 set by SysClkReq1
- */
- .name = "ReguSysClkReq1HPValid1",
- .bank = 0x03,
- .addr = 0x07,
- .mask = 0x17,
- .val = 0x17,
- },
- {
- /*
- * Vsmsp3Regu
- * OTP: 0x01, HSI: 0x01, suspend: 0x06/0x0f (value/mask)
- * [3:2] Vsmps3SelCtrl[1:0] = Vsmps3 voltage set by Vsmps3Sel2
- * [1:0] Vsmps3Regu[1:0] = Vsmps3 in HW control
- */
- .name = "Vsmps3Regu",
- .bank = 0x04,
- .addr = 0x05,
- .mask = 0x0f,
- .val = 0x06,
- },
- {
- /*
* SysUlpClkCtrl1
* OTP: 0x00, HSI: 0x00, suspend: 0x00/0x0f (value/mask)
* [ 3] 4500SysClkReq = inactive
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 19952694308..40d84a745e7 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -591,13 +591,14 @@ static struct ab8500_reg_init ab8500_reg_init[] = {
/*
* 0x01, Vsmps1SysClkReq1HPValid
* 0x02, Vsmps2SysClkReq1HPValid
+ * 0x04, Vsmps3SysClkReq1HPValid
* 0x08, VanaSysClkReq1HPValid
* 0x10, VpllSysClkReq1HPValid
* 0x20, Vaux1SysClkReq1HPValid
* 0x40, Vaux2SysClkReq1HPValid
* 0x80, Vaux3SysClkReq1HPValid
*/
- REG_INIT(AB8500_REGUSYSCLKREQ1HPVALID1, 0x03, 0x07, 0xfb),
+ REG_INIT(AB8500_REGUSYSCLKREQ1HPVALID1, 0x03, 0x07, 0xff),
/*
* 0x10, VextSupply1SysClkReq1HPValid
* 0x20, VextSupply2SysClkReq1HPValid
@@ -694,16 +695,22 @@ static struct ab8500_reg_init ab8500_reg_init[] = {
*/
REG_INIT(AB8500_VBBSEL2, 0x04, 0x12, 0x0f),
/*
- * 0x0c, Vsmps1SelCtrl
* 0x03, Vsmps1Regu
+ * 0x0c, Vsmps1SelCtrl
*/
REG_INIT(AB8500_VSMPS1REGU, 0x04, 0x03, 0x0f),
/*
- * 0x0c, Vsmps2SelCtrl
* 0x03, Vsmps2Regu
+ * 0x0c, Vsmps2SelCtrl
*/
REG_INIT(AB8500_VSMPS2REGU, 0x04, 0x04, 0x0f),
/*
+ * 0x03, Vsmps3Regu
+ * 0x0c, Vsmps3SelCtrl
+ * NOTE! PRCMU register
+ */
+ REG_INIT(AB8500_VSMPS3REGU, 0x04, 0x05, 0x0f),
+ /*
* 0x0c, VanaRegu
* 0x03, VpllRegu
*/
@@ -736,6 +743,14 @@ static struct ab8500_reg_init ab8500_reg_init[] = {
*/
REG_INIT(AB8500_VSMPS1SEL1, 0x04, 0x13, 0x3f),
/*
+ * 0x7f, Vsmps3Sel1
+ */
+ REG_INIT(AB8500_VSMPS3SEL1, 0x04, 0x1b, 0x7f),
+ /*
+ * 0x7f, Vsmps3Sel2
+ */
+ REG_INIT(AB8500_VSMPS3SEL2, 0x04, 0x1c, 0x7f),
+ /*
* 0x0f, Vaux1Sel
*/
REG_INIT(AB8500_VAUX1SEL, 0x04, 0x1f, 0x0f),
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index f10563d9767..b753789fabc 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -72,7 +72,10 @@ enum ab8500_regulator_reg {
AB8500_VBBSEL2, /* NOTE! PRCMU register */
AB8500_VSMPS1REGU,
AB8500_VSMPS2REGU,
+ AB8500_VSMPS3REGU, /* NOTE! PRCMU register */
AB8500_VSMPS1SEL1,
+ AB8500_VSMPS3SEL1, /* NOTE! PRCMU register */
+ AB8500_VSMPS3SEL2, /* NOTE! PRCMU register */
AB8500_NUM_REGULATOR_REGISTERS,
};