summaryrefslogtreecommitdiff
path: root/board/freescale/mx6slevk
diff options
context:
space:
mode:
authorNitin Garg <nitin.garg@freescale.com>2014-05-27 10:36:06 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-05-27 22:15:10 -0500
commit748eac71fde78aa0c2e8cb3a3bab94bd994c06f5 (patch)
tree3ccd5be6ad3a4b21018a00fee6426b8612e6d83a /board/freescale/mx6slevk
parent441fd86d055c57b79257943449a8101b83e98c61 (diff)
downloadu-boot-imx-748eac71fde78aa0c2e8cb3a3bab94bd994c06f5.zip
u-boot-imx-748eac71fde78aa0c2e8cb3a3bab94bd994c06f5.tar.gz
u-boot-imx-748eac71fde78aa0c2e8cb3a3bab94bd994c06f5.tar.bz2
ENGR00315499-5: Support i.MX6 1.2GHz via LDO bypass
Add check for 1.2GHz core speed. If Speed grading fuse is for 1.2GHz, enable LDO bypass and setup PMIC voltages. LDO bypass is dependent on the flatten device tree file. Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Diffstat (limited to 'board/freescale/mx6slevk')
-rw-r--r--board/freescale/mx6slevk/mx6slevk.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index aadad32..aeb418b 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2013-2014 Freescale Semiconductor, Inc.
*
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*
@@ -19,6 +19,10 @@
#include <fsl_esdhc.h>
#include <mmc.h>
#include <netdev.h>
+#ifdef CONFIG_SYS_I2C_MXC
+#include <i2c.h>
+#include <asm/imx-common/mxc_i2c.h>
+#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -128,6 +132,41 @@ static int setup_fec(void)
}
#endif
+#ifdef CONFIG_LDO_BYPASS_CHECK
+void ldo_mode_set(int ldo_bypass)
+{
+ unsigned char value;
+ /* swith to ldo_bypass mode */
+ if (ldo_bypass) {
+ /* decrease VDDARM to 1.15V */
+ if (i2c_read(0x8, 0x20, 1, &value, 1)) {
+ printf("Read SW1AB error!\n");
+ return;
+ }
+ value &= ~0x3f;
+ value |= 0x22;
+ if (i2c_write(0x8, 0x20, 1, &value, 1)) {
+ printf("Set SW1AB error!\n");
+ return;
+ }
+ /* increase VDDSOC to 1.15V */
+ if (i2c_read(0x8, 0x2e, 1, &value, 1)) {
+ printf("Read SW1C error!\n");
+ return;
+ }
+ value &= ~0x3f;
+ value |= 0x22;
+ if (i2c_write(0x8, 0x2e, 1, &value, 1)) {
+ printf("Set SW1C error!\n");
+ return;
+ }
+
+ set_anatop_bypass();
+ printf("switch to ldo_bypass mode!\n");
+ }
+
+}
+#endif
int board_early_init_f(void)
{