On 4/5/25 07:25, Philippe Mathieu-Daudé wrote:
Hi Guenter,
On 5/4/25 16:00, Guenter Roeck wrote:
This series is needed to support the USB interface on imx8mp-evk when
booting the Linux kernel.
According to the XHCI specification, ERSTBA should be written in Low-High
order. The Linux kernel writes the high word first. This results in an
initialization failure.
The following information is found in the Linux kernel commit log.
[Synopsys]- The host controller was design to support ERST setting
during the RUN state. But since there is a limitation in controller
in supporting separate ERSTBA_HI and ERSTBA_LO programming,
It is supported when the ERSTBA is programmed in 64bit,
or in 32 bit mode ERSTBA_HI before ERSTBA_LO
[Synopsys]- The internal initialization of event ring fetches
the "Event Ring Segment Table Entry" based on the indication of
ERSTBA_LO written.
Add property to support writing the high word first. Enable it
for dwc3.
----------------------------------------------------------------
Guenter Roeck (2):
hw: usb: xhci: Add property to support writing ERSTBA in high-low order
hw/usb/hcd-dwc3: Set erstba-hi-lo property
What about using .impl.min_access_size = 8 instead?
That would seem to be a bit excessive. The problem only affects the ERSTBA
register. I don't see an indication that other registers are affected,
or that all accesses would have to be 64 bit wide. The information above
also suggests that the controller can operate in both 32-bit and 64-bit
mode.
Could you try this patch, or provide me with a reproducer?
That is a bit too invasive for my liking, and it would affect all users,
not just dwc3. I'll leave such changes to you. I'll cook up a minimal
reproducer and point you to it.
Thanks,
Guenter