summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2013-08-20 17:24:22 -0400
committerAnson Huang <b20788@freescale.com>2013-09-02 11:29:44 -0400
commita34e2d6bd2897ce06d69267a9e8f5e17f8bb063d (patch)
tree3d18574f3f820920bfc747679e6fdff8e3e93c44
parent1b47aae68a6c90f41eb46f5c8ae4390629b32773 (diff)
downloadu-boot-imx-a34e2d6bd2897ce06d69267a9e8f5e17f8bb063d.zip
u-boot-imx-a34e2d6bd2897ce06d69267a9e8f5e17f8bb063d.tar.gz
u-boot-imx-a34e2d6bd2897ce06d69267a9e8f5e17f8bb063d.tar.bz2
ENGR00275821 imx6slevk: Set PMIC's standby voltage and rampup time
Need to set SW1AB and SW1C's standby voltage for suspend, from 1.375V -> 0.975V; Need to increase the speed of SW1AB and SW1C ramp up time. Signed-off-by: Anson Huang <b20788@freescale.com>
-rw-r--r--board/freescale/mx6slevk/mx6slevk.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index c4fdd8b..4cc9604 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -177,6 +177,54 @@ static int setup_pmic_voltages(void)
return -1;
}
printf("Found PFUZE100! deviceid=%x,revid=%x\n", value, rev_id);
+
+ /* set SW1AB staby volatage 0.975V */
+ if (i2c_read(0x8, 0x21, 1, &value, 1)) {
+ printf("Read SW1ABSTBY error!\n");
+ return -1;
+ }
+ value &= ~0x3f;
+ value |= 0x1b;
+ if (i2c_write(0x8, 0x21, 1, &value, 1)) {
+ printf("Set SW1ABSTBY error!\n");
+ return -1;
+ }
+
+ /* set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
+ if (i2c_read(0x8, 0x24, 1, &value, 1)) {
+ printf("Read SW1ABCONFIG error!\n");
+ return -1;
+ }
+ value &= ~0xc0;
+ value |= 0x40;
+ if (i2c_write(0x8, 0x24, 1, &value, 1)) {
+ printf("Set SW1ABCONFIG error!\n");
+ return -1;
+ }
+
+ /* set SW1C staby volatage 0.975V */
+ if (i2c_read(0x8, 0x2f, 1, &value, 1)) {
+ printf("Read SW1CSTBY error!\n");
+ return -1;
+ }
+ value &= ~0x3f;
+ value |= 0x1b;
+ if (i2c_write(0x8, 0x2f, 1, &value, 1)) {
+ printf("Set SW1CSTBY error!\n");
+ return -1;
+ }
+
+ /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */
+ if (i2c_read(0x8, 0x32, 1, &value, 1)) {
+ printf("Read SW1CCONFIG error!\n");
+ return -1;
+ }
+ value &= ~0xc0;
+ value |= 0x40;
+ if (i2c_write(0x8, 0x32, 1, &value, 1)) {
+ printf("Set SW1CCONFIG error!\n");
+ return -1;
+ }
}
return 0;