diff options
author | Lukasz Majewski <lukma@denx.de> | 2020-01-25 09:01:39 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-02-09 14:59:16 +0100 |
commit | eceb4e006ad7a8bce0f5fd7410af77745466ccc8 (patch) | |
tree | 5c766a39ed78d80940634803c758cbf886c15314 /board/liebherr | |
parent | d1d731c038e03fca884689123305811068d5c0c9 (diff) | |
download | u-boot-eceb4e006ad7a8bce0f5fd7410af77745466ccc8.tar.gz |
arm: xea: spl: Add GPIO0_0 setup on spl_board_init
Explicitly configure GPIO0_0 in SPL, which controlls 3V3 voltage
on the XEA board (it also supplies TIVAs).
This code would enable TIVAs power supply early (also when board
uses the falcon boot).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'board/liebherr')
-rw-r--r-- | board/liebherr/xea/xea.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c index bdc073664c..df5d316717 100644 --- a/board/liebherr/xea/xea.c +++ b/board/liebherr/xea/xea.c @@ -64,9 +64,24 @@ static int boot_tiva0, boot_tiva1; /* Check if TIVAs request booting via U-Boot proper */ void spl_board_init(void) { - struct gpio_desc btiva0, btiva1; + struct gpio_desc btiva0, btiva1, en_3_3v; int ret; + /* + * Setup GPIO0_0 (TIVA power enable pin) to be output high + * to allow TIVA startup. + */ + ret = dm_gpio_lookup_name("GPIO0_0", &en_3_3v); + if (ret) + printf("Cannot get GPIO0_0\n"); + + ret = dm_gpio_request(&en_3_3v, "pwr_3_3v"); + if (ret) + printf("Cannot request GPIO0_0\n"); + + /* Set GPIO0_0 to HIGH */ + dm_gpio_set_dir_flags(&en_3_3v, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); + ret = dm_gpio_lookup_name("GPIO0_23", &btiva0); if (ret) printf("Cannot get GPIO0_23\n"); |