diff options
author | Ye.Li <B37916@freescale.com> | 2015-08-14 16:39:06 +0800 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2015-08-17 11:02:55 +0800 |
commit | a8714a02a958897bad302fffbdee36acef98a003 (patch) | |
tree | 7d95c42007c1f04e1476deecb873f5e7800c088a /board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | |
parent | 045f4dbcc664ec5f34722ae36b5774124823e9a2 (diff) | |
download | u-boot-imx-a8714a02a958897bad302fffbdee36acef98a003.zip u-boot-imx-a8714a02a958897bad302fffbdee36acef98a003.tar.gz u-boot-imx-a8714a02a958897bad302fffbdee36acef98a003.tar.bz2 |
MLK-11364 imx: mx6ul : Add support for i.MX6UL 9x9 EVK board
The i.mx6ul 9x9 EVK shares the same base board with 6ul 14x14 EVK
with two main changes on CPU board:
1. Change to use pfuze 3000.
2. Use 256MB LPDDR2 memory.
This patch uses a macro CONFIG_6UL_9X9_LPDDR2 to distinguish the changes above,
basing on 14x14 EVK board level codes.
The new build target for the 9x9 EVK: mx6ul_9x9_evk_config
Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c')
-rw-r--r-- | board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index 7fd8b3b..4179e14 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -27,6 +27,12 @@ #include <usb.h> #include <usb/ehci-fsl.h> +#ifdef CONFIG_POWER +#include <power/pmic.h> +#include <power/pfuze300_pmic.h> +#include "../common/pfuze.h" +#endif + #ifdef CONFIG_FSL_FASTBOOT #include <fsl_fastboot.h> #ifdef CONFIG_ANDROID_RECOVERY @@ -821,6 +827,41 @@ int board_early_init_f(void) return 0; } +#ifdef CONFIG_POWER +#define I2C_PMIC 0 +int power_init_board(void) +{ + struct pmic *p; + int ret; + unsigned int reg, rev_id; + + ret = power_pfuze300_init(I2C_PMIC); + if (ret) + return ret; + + p = pmic_get("PFUZE300"); + ret = pmic_probe(p); + if (ret) + return ret; + + pmic_reg_read(p, PFUZE300_DEVICEID, ®); + pmic_reg_read(p, PFUZE300_REVID, &rev_id); + printf("PMIC: PFUZE300 DEV_ID=0x%x REV_ID=0x%x\n", reg, rev_id); + + /* SW1A/1B step ramp up time from 2us to 4us/25mV */ + reg = 0x40; + pmic_reg_write(p, PFUZE300_SW1ACONF, reg); + pmic_reg_write(p, PFUZE300_SW1BCONF, reg); + + /* SW1A/1B standby voltage set to 0.975V */ + reg = 0xb; + pmic_reg_write(p, PFUZE300_SW1ASTBY, reg); + pmic_reg_write(p, PFUZE300_SW1BSTBY, reg); + + return 0; +} +#endif + int board_init(void) { /* Address of boot parameters */ @@ -885,7 +926,11 @@ u32 get_board_rev(void) int checkboard(void) { - puts("Board: MX6UL 14x14 EVK\n"); +#if defined(CONFIG_MX6UL_9X9_LPDDR2) + puts("Board: MX6UL 9x9 EVK\n"); +#else + puts("Board: MX6UL 14x14 EVK\n"); +#endif return 0; } |