diff options
author | Klaus Goger <klaus.goger@theobroma-systems.com> | 2015-07-10 08:34:35 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2015-07-30 18:44:07 +0200 |
commit | 0a7498a59668784860e6e73145d4c9aab490d5d2 (patch) | |
tree | 5fb2843903337eaffdfae2c455118776c7193e89 | |
parent | aa87cc19e6b7a6678c41e69ee0567f5f614d9f4e (diff) |
ARM: sun6i: set bootmode for stm32
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
-rw-r--r-- | board/sunxi/board.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 4c050174fa..578627d32a 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -94,11 +94,18 @@ int board_init(void) asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r"(24000000)); } + gpio_request(SUNXI_GPC(3), "STM32 Boot0"); + sunxi_gpio_set_cfgpin(SUNXI_GPC(3), SUNXI_GPIO_OUTPUT); + gpio_request(SUNXI_GPC(26), "STM32 Reset"); + sunxi_gpio_set_cfgpin(SUNXI_GPC(26), SUNXI_GPIO_OUTPUT); gpio_request(SUNXI_GPA(7), "PHY Reset"); sunxi_gpio_set_cfgpin(SUNXI_GPA(7), SUNXI_GPIO_OUTPUT); + gpio_direction_output(SUNXI_GPC(3), 0); + gpio_direction_output(SUNXI_GPC(26), 0); gpio_direction_output(SUNXI_GPA(7), 0); mdelay(10); + gpio_direction_output(SUNXI_GPC(26), 1); gpio_direction_output(SUNXI_GPA(7), 1); ret = axp_gpio_init(); |