From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kever Yang Date: Tue, 29 Nov 2016 16:49:18 +0800 Subject: [U-Boot] [PATCH v2 2/4] board: popmetal: de-assert the host rst pin in board init In-Reply-To: References: <1479972592-32761-1-git-send-email-kever.yang@rock-chips.com> <1479972592-32761-3-git-send-email-kever.yang@rock-chips.com> Message-ID: <583D410E.2080508@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On 11/26/2016 03:39 AM, Simon Glass wrote: > Hi Kever, > > On 24 November 2016 at 00:29, Kever Yang wrote: >> 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 >> --- >> >> Changes in v2: >> - move the vbus power enable into dwc2 driver >> >> board/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 aad74ef..ed82b2b 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) > Can we get this from the device tree instead of hard-coding it? Then > it can go in generic code. I don't understand how to get this from device tree, this board is the only one based on rk3288 with a USB hub on board and need the de-assert its reset pin. I think it is reasonable to hard coding it in its board file. Thanks, - Kever > >> + return ret; >> + >> + return 0; >> +} >> -- >> 1.9.1 >> > Regards, > Simon > > >