[PATCH] usb: gadget: renesas: add support for RZ/G2L SoC
Marek Vasut
marek.vasut at mailbox.org
Tue Apr 21 01:15:45 CEST 2026
On 4/16/26 4:14 PM, Michele Bisogno wrote:
Hello Michele,
> Thank you for the review and the link to the Linux implementation.
>
>> Regulator change should be a separate patch please.
>
> I agree. I will split the regulator changes into a separate patch
> for the v2 series to keep the subsystem changes distinct.
>
>> drivers/usb/gadget/rcar is pulled from Linux 1b4861e32e46...
>> but none of these changes in this patch are even in Linux next.
>
> The RZ/G2L support in Linux relies heavily on DMA for data transfers.
> In U-Boot, we are primarily using the PIO path. The refactoring
> in fifo.c (switching to ioread8/iowrite8) was found to be necessary
> to handle trailing bytes and alignment specifically for the RZ/G2L
> bus when DMA is not active.
If Linux also contains the PIO code, it would also benefit from matching
improvement, right ?
> Additionally, the usb_del_gadget_udc() change in common.c addresses
> a re-entrancy bug unique to U-Boot's gadget lifecycle. Without
> this, the UDC list becomes stale, causing the board to crash if
> a command like 'ums' is executed more than once.
This should be a separate bugfix patch.
>> The addition of RZ/G2L into USBHS driver in Linux was much simpler
>
> I agree that moving the RZ/G2L specifics in common.c to a platform
> dependent file (similar to Linux) would be the cleaner long-term
> architecture. However, doing so would require a much more invasive
> refactoring of the existing driver structure. I opted for these
> minimal changes to maintain stability for existing R-Car Gen3
> users while enabling RZ/G2L support.
>
> I will prepare a v2 series with the patches split as requested.
Ideally, let's try to keep the Linux and U-Boot driver code base
synchronized as much as possible.
Thank you !
More information about the U-Boot
mailing list