From 334bbb387f2d369f4cf0b28173f0764c8316fd5b Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Tue, 16 Jun 2015 20:36:05 +0530 Subject: ARM: BeagleBoard-X15: Enable VTT regulator BeagleBoard-X15 uses a vtt regulator for DDR3 termination and this is controlled by gpio7_11. Configuring gpio7_11. Signed-off-by: Lokesh Vutla Reviewed-by: Tom Rini --- board/ti/beagle_x15/board.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'board') diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c index b6c17ec83f..c7f19c7924 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 -- cgit v1.2.1