diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c index b6c17ec83f76f91cac73ae04fcf66c0efa2a92ae..c7f19c79242858b3fbddf2d44dcfb559c34ae562 100644 --- a/board/ti/beagle_x15/board.c +++ b/board/ti/beagle_x15/board.c @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include #include #include @@ -30,6 +32,9 @@ DECLARE_GLOBAL_DATA_PTR; +/* GPIO 7_11 */ +#define GPIO_DDR_VTT_EN 203 + const struct omap_sysinfo sysinfo = { "Board: BeagleBoard x15\n" }; @@ -404,3 +409,21 @@ 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; + + 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 diff --git a/include/configs/beagle_x15.h b/include/configs/beagle_x15.h index 8d072c6ed0dec1f70c15b7d96ca4bdbd0e2c5d7b..c5dde99f5ff2f31653ae7e13c1a43d8b061e7ab1 100644 --- a/include/configs/beagle_x15.h +++ b/include/configs/beagle_x15.h @@ -18,6 +18,8 @@ #define CONFIG_IODELAY_RECALIBRATION #endif +#define CONFIG_BOARD_EARLY_INIT_F + #define CONFIG_NR_DRAM_BANKS 2 #define CONFIG_ENV_SIZE (64 << 10)