
The SET_ADDRESS request is received just fine, it then sets musb->ep0_state = MUSB_EP0_STAGE_STATUSIN; but no IRQ arrives to trigger another call to musb_g_ep0_irq. Eventually, the host just sends back another SET_REQUEST. Looking at dmesg on the host (Device not responding to set address), I guess that the device should send something back and it apparently doesn't.
Over the past few days, I have figured part of the problem (I am still far from being done). I was loading the U-Boot SPL via USB, which implies that the bootrom sets up the USB link first: that was the key to that first issue. The controller was simply not being reset properly: MUSB_POWER_SOFTCONN was still present in the MUSB_POWER register, so I cleared it early and cleared the interrupt registers as well. Then, the musb-new driver could work properly.
This is all because the bootrom doesn't cleanly deinit musb (the host isn't notified of the disconnection when the bootrom starts executing the loaded software). I'll submit a patch in due time so that the musb-new driver works with bootrom USB peripherial load.
While working on this, I flashed the U-Boot SPL to the internal memory. When the device boots from it, with no USB cable attached, neither the legacy musb driver nor musb-new work properly. I only get the first IRQ and nothing more. However, as soon as I boot with the bootrom initializing USB, it works in U-Boot. So there must be an extra step in the initialization process that the bootrom is taking and U-Boot is missing.
I have looked at muxing and clocks, everything seems to be fine, so I'm starting to run out of ideas.
Any suggestion or help appreciated!