summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>2014-06-25 11:03:35 -0500
committerRanjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>2014-06-26 13:56:37 -0500
commit6bc15c5fee23d7a70122a947762fce1192b9ddb4 (patch)
tree398674e1f86354b1b2fb996dd5577ee14baac22b
parent2a69800d94f182e975e4ed3ae2e64d30d35a3603 (diff)
ENGR00320048 ARM:imx6sl:Ensure that bandgap is not disabled in LDO-enabled mode
The main bandgap is required for regulation in LDO-enabled mode. Ensure that the main bandgap is only disabled in LDO-bypass mode when entering low power IDLE. Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
-rw-r--r--arch/arm/mach-imx/imx6sl_wfi.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx6sl_wfi.S b/arch/arm/mach-imx/imx6sl_wfi.S
index f8556e67631e..e1cb9fa90b06 100644
--- a/arch/arm/mach-imx/imx6sl_wfi.S
+++ b/arch/arm/mach-imx/imx6sl_wfi.S
@@ -425,6 +425,17 @@ podf_loop:
bic r6, r6, #0x1
str r6, [r3, #0x130]
+ /*
+ * Cannot disable regular bandgap
+ * in LDO-enabled mode. The bandgap
+ * is required for ARM-LDO to regulate
+ * the voltage.
+ */
+ ldr r6, [r3, #0x140]
+ and r6, r6, #0x1f
+ cmp r6, #0x1f
+ bne leave_bandgap_enabled
+
/* Enable low power bandgap */
ldr r6, [r3, #0x260]
orr r6, r6, #0x20
@@ -453,6 +464,7 @@ podf_loop:
orr r6, r6, #0x1
str r6, [r3, #0x150]
+leave_bandgap_enabled:
leave_2p5_on:
b do_wfi
@@ -506,6 +518,16 @@ podf_loop1:
cmp r12, #1
beq ldo2p5_not_disabled
+ /*
+ * Regular bandgap will not be disabled
+ * in LDO-enabled mode as it is required
+ * for ARM-LDO to regulate the voltage.
+ */
+ ldr r6, [r3, #0x140]
+ and r6, r6, #0x1f
+ cmp r6, #0x1f
+ bne skip_bandgap_restore
+
/* Power up the regular bandgap. */
ldr r6, [r3, #0x150]
bic r6, r6, #0x1
@@ -524,6 +546,7 @@ podf_loop1:
bic r6, r6, #0x20
str r6, [r3, #0x260]
+skip_bandgap_restore:
/* Enable main 2p5. */
ldr r6, [r3, #0x130]
orr r6, r6, #0x1