[EXT] Re: [PATCH v1] T1024RDB: USB: Add a 10808 us delay in usb_scan_port

Marek Vasut marex at denx.de
Wed Dec 18 05:50:27 CET 2019


On 12/18/19 4:27 AM, Yinbo Zhu wrote:

Hi,

[...]

>>> diff --git a/common/usb_hub.c b/common/usb_hub.c index 
>>> 33aaeb8e44..6dd06696b2 100644
>>> --- a/common/usb_hub.c
>>> +++ b/common/usb_hub.c
>>> @@ -486,6 +486,9 @@ static int usb_scan_port(struct usb_device_scan *usb_scan)
>>>                 return 0;
>>>         }
>>>
>>> +#ifdef CONFIG_TARGET_T1024RDB
>>> +       udelay(10808);
>>> +#endif
>>
>> This looks like a workaround. Is this a silicon errata?
> 
>  > Does setting usb_pgood_delay to e.g. 2000 help ?
> 
> Hi Marek Casut,
> 
> Thanks your feedback, I test it 2000, usb start can list device, in fact, 120 is enough,
> In addition, if it is some usb storage issue, I think add it into bootargs it is reasonable, but I test some usb storage,
> It is all encounter issue, so I think add it that delay into usb driver code.
> => setenv usb_pgood_delay 120 
> => usb start
> starting USB...
> USB0:   USB EHCI 1.00
> USB1:   USB EHCI 1.00
> scanning bus 0 for devices... 2 USB Device(s) found
> scanning bus 1 for devices... 1 USB Device(s) found
>        scanning usb for storage devices... 1 Storage Device(s) found
> =>

So does setting the usb_pgood_delay resolve the issue ? The variable
increases the time between turning on Vbus and starting scanning the
bus, it's a common issue on various boards and this is the way to solve it.


More information about the U-Boot mailing list