From da20981269d890cb85ef9336a3f488d61fbd73b7 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Thu, 24 Nov 2016 15:29:50 +0800 Subject: [PATCH] rockchip: board: popmetal: de-assert the host rst pin in board init The PopMetal board have a on board FE1.1 usb 2.0 hub which connect to the usb host port, we need to de-assert its reset pin to enable it. Signed-off-by: Kever Yang Acked-by: Simon Glass Added rockchip: tag: Signed-off-by: Simon Glass --- .../chipspark/popmetal_rk3288/popmetal-rk3288.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c index aad74ef109..ed82b2bd78 100644 --- a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c +++ b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c @@ -6,6 +6,7 @@ #include #include +#include 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; +} -- 2.25.1