AnsweredAssumed Answered

T2080 Hangs during USB scan in U-Boot

Question asked by Vladimir Boroda on Jan 22, 2018
Latest reply on Feb 12, 2018 by Vladimir Boroda

The custom T2080-based board with u-boot-qoriq 2017.09 hangs solidly when I am attempting to run "usb start".   Sometimes it hangs on USB0, but if not there, then definitely on USB1.


USB0:   USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80
unable to get device descriptor (error=-1)
1 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices...


If nothing is plugged into USB0, u-boot always hangs on USB1, which connects the CPU to a eMMC via an embedded USB hub.


When trying to debug the issue, I got it down to enabling the Async Schedule in ehci_submit_async() in ehci-hcd.c:


        usbsts = ehci_readl(&ctrl->hcor->or_usbsts);
        ehci_writel(&ctrl->hcor->or_usbsts, (usbsts & 0x3f));

        /* Enable async. schedule. */
        cmd = ehci_readl(&ctrl->hcor->or_usbcmd);
        cmd |= CMD_ASE;
        ehci_writel(&ctrl->hcor->or_usbcmd, cmd); <- Hung here!

        ret = handshake((uint32_t *)&ctrl->hcor->or_usbsts <...>

The system doesn't hang every time it goes through this logic, but it is always hung on the second or third time the ehci_submit_async() function is called.  The 24 MHz reference clock to USB seems solid.