Commit 334bbb387f2d369f4cf0b28173f0764c8316fd5b
Committed by
Tom Rini
1 parent
f4787eab13
Exists in
v2017.01-smarct4x
and in
34 other branches
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 <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Showing 2 changed files with 25 additions and 0 deletions Side-by-side Diff
board/ti/beagle_x15/board.c
... | ... | @@ -14,6 +14,8 @@ |
14 | 14 | #include <usb.h> |
15 | 15 | #include <asm/omap_common.h> |
16 | 16 | #include <asm/emif.h> |
17 | +#include <asm/gpio.h> | |
18 | +#include <asm/arch/gpio.h> | |
17 | 19 | #include <asm/arch/clock.h> |
18 | 20 | #include <asm/arch/dra7xx_iodelay.h> |
19 | 21 | #include <asm/arch/sys_proto.h> |
... | ... | @@ -30,6 +32,9 @@ |
30 | 32 | |
31 | 33 | DECLARE_GLOBAL_DATA_PTR; |
32 | 34 | |
35 | +/* GPIO 7_11 */ | |
36 | +#define GPIO_DDR_VTT_EN 203 | |
37 | + | |
33 | 38 | const struct omap_sysinfo sysinfo = { |
34 | 39 | "Board: BeagleBoard x15\n" |
35 | 40 | }; |
... | ... | @@ -402,6 +407,24 @@ |
402 | 407 | printf("Error %d registering CPSW switch\n", ret); |
403 | 408 | |
404 | 409 | return ret; |
410 | +} | |
411 | +#endif | |
412 | + | |
413 | +#ifdef CONFIG_BOARD_EARLY_INIT_F | |
414 | +/* VTT regulator enable */ | |
415 | +static inline void vtt_regulator_enable(void) | |
416 | +{ | |
417 | + if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL) | |
418 | + return; | |
419 | + | |
420 | + gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en"); | |
421 | + gpio_direction_output(GPIO_DDR_VTT_EN, 1); | |
422 | +} | |
423 | + | |
424 | +int board_early_init_f(void) | |
425 | +{ | |
426 | + vtt_regulator_enable(); | |
427 | + return 0; | |
405 | 428 | } |
406 | 429 | #endif |