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:26:05 -0400
commitb3bd56c7d0900c3be7d9cd4248d32a17db2f0dbc (patch)
tree3d18574f3f820920bfc747679e6fdff8e3e93c44
parentb4f0b1401c18e020625d4cb24a02d57b55a5219d (diff)
downloadu-boot-imx-b3bd56c7d0900c3be7d9cd4248d32a17db2f0dbc.zip
u-boot-imx-b3bd56c7d0900c3be7d9cd4248d32a17db2f0dbc.tar.gz
u-boot-imx-b3bd56c7d0900c3be7d9cd4248d32a17db2f0dbc.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;