[PATCH v2 2/2] mach-meson: g12a: reset usb controller in reset_misc()
Marek Vasut
marex at denx.de
Mon Oct 10 18:09:41 CEST 2022
On 10/7/22 11:38, Mattijs Korpershoek wrote:
> On some g12a boards like the VIM3L and the SEI610, with some
> USB cables/hosts, there is a long (5s) delay before
> between "fastboot reboot" and the host detecting a USB reset.
>
> This breaks tools relying on "fastboot reboot fastboot" which assume
> that 1s after the command send, the board should disconnect on usb.
>
> To reproduce, enable fastboot in U-Boot console:
> => fastboot usb 0
>
> Then, on the host, run:
> # echo "running fastboot reboot bootloader" > /dev/kmsg && fastboot reboot bootloader
> Rebooting into bootloader OKAY [ 0.003s]
> Finished. Total time: 3.033s
>
> [54074.251551] running fastboot reboot bootloader
> ... there is a delay of 5s before we detect a disconnection ...
> [54079.041238] usb 1-7.4: USB disconnect, device number 72
> [54079.239625] usb 1-7.4: new high-speed USB device number 73 using xhci_hcd
> [54079.359103] usb 1-7.4: New USB device found, idVendor=1b8e, idProduct=fada, bcdDevice= 2.27
> [54079.359110] usb 1-7.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [54079.359112] usb 1-7.4: Product: USB download gadget
> [54079.359114] usb 1-7.4: Manufacturer: U-Boot
> [54079.359116] usb 1-7.4: SerialNumber: C8631470CC41
>
> Note: this does not happen when we use the RST button on the board.
>
> To fix this, re-implement a platform reset which calls
> board_usb_cleanup() before resetting the board.
Shouldn't that call happen somewhere in drivers/usb/ .remove() callback
instead ?
More information about the U-Boot
mailing list