rockchip: board: popmetal: de-assert the host rst pin in board init
[oweals/u-boot.git] / board / chipspark / popmetal_rk3288 / popmetal-rk3288.c
index aad74ef1095adecc7ae5c100db2876f0568e8012..ed82b2bd781663b910e3156e6ffbf6da3e1b94fe 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <spl.h>
+#include <asm/gpio.h>
 
 void board_boot_order(u32 *spl_boot_list)
 {
@@ -13,3 +14,19 @@ void board_boot_order(u32 *spl_boot_list)
        spl_boot_list[0] = BOOT_DEVICE_MMC2;
        spl_boot_list[1] = BOOT_DEVICE_MMC1;
 }
+
+#define GPIO7A3_HUB_RST        227
+
+int rk_board_late_init(void)
+{
+       int ret;
+
+       ret = gpio_request(GPIO7A3_HUB_RST, "hub_rst");
+       if (ret)
+               return ret;
+       ret = gpio_direction_output(GPIO7A3_HUB_RST, 1);
+       if (ret)
+               return ret;
+
+       return 0;
+}