diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2014-08-04 14:12:24 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-08-25 14:48:13 (GMT) |
commit | 7b9225237049181524be5a8801dde6a6716e1357 (patch) | |
tree | 1f1ddac01b283723bf1785a77c0fd4e072338ba1 /board/ti/dra7xx/evm.c | |
parent | 1286b7f6ca5fc3d42927cbe2f50b51a4870021dd (diff) | |
download | u-boot-fsl-qoriq-7b9225237049181524be5a8801dde6a6716e1357.tar.xz |
ARM: DRA: Enable VTT regulator
DRA7 evm REV G and later boards uses a vtt regulator for DDR3 termination
and this is controlled by gpio7_11. Configuring gpio7_11.
The pad A22(offset 0x3b4) is used by gpio7_11 on REV G and later boards,
and left unused on previous boards, so it is safe enough to enable gpio
on all DRA7 boards.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'board/ti/dra7xx/evm.c')
-rw-r--r-- | board/ti/dra7xx/evm.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index ae50d88..5592fc5 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -13,6 +13,8 @@ #include <common.h> #include <palmas.h> #include <sata.h> +#include <asm/gpio.h> +#include <asm/arch/gpio.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> #include <asm/arch/sata.h> @@ -26,6 +28,9 @@ DECLARE_GLOBAL_DATA_PTR; +/* GPIO 7_11 */ +#define GPIO_DDR_VTT_EN 203 + const struct omap_sysinfo sysinfo = { "Board: DRA7xx\n" }; @@ -272,3 +277,29 @@ int board_eth_init(bd_t *bis) return ret; } #endif + +#ifdef CONFIG_BOARD_EARLY_INIT_F +/* VTT regulator enable */ +static inline void vtt_regulator_enable(void) +{ + if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL) + return; + + /* Do not enable VTT for DRA722 */ + if (omap_revision() == DRA722_ES1_0) + return; + + /* + * EVM Rev G and later use gpio7_11 for DDR3 termination. + * This is safe enough to do on older revs. + */ + gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en"); + gpio_direction_output(GPIO_DDR_VTT_EN, 1); +} + +int board_early_init_f(void) +{ + vtt_regulator_enable(); + return 0; +} +#endif |