[U-Boot] [PATCH v2 2/4] board: popmetal: de-assert the host rst pin in board init
Simon Glass
sjg at chromium.org
Wed Nov 30 01:34:41 CET 2016
On 29 November 2016 at 01:49, Kever Yang <kever.yang at rock-chips.com> wrote:
> Hi Simon,
>
>
> On 11/26/2016 03:39 AM, Simon Glass wrote:
>>
>> Hi Kever,
>>
>> On 24 November 2016 at 00:29, Kever Yang <kever.yang at rock-chips.com>
>> 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 <kever.yang at rock-chips.com>
>>> ---
>>>
>>> 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 <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)
>>
>> 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.
OK, since it's just one board.
Acked-by: Simon Glass <sjg at chromium.org>
In general we can support this sort of thing by adding a driver for
UCLASS_USB_HUB, but I suspect it would need refactoring of
common/usb.c.
Regards,
Simon
More information about the U-Boot
mailing list