summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/rcar
AgeCommit message (Collapse)Author
2026-04-26usb: gadget: rcar: Add support for RZ/G2L (R9A07G044)Michele Bisogno
The Renesas RZ/G2L (and RZ/G2LC) USBHS controller requires the CNEN bit in the SYSCFG register to be set for function operation. Additionally, its CFIFO is byte-addressable. Introduce a new renesas_usbhs_driver_param structure for the RZ/G2L SoC and link it via the udevice_id data pointer. Update usbhs_probe() to accept the udevice pointer to retrieve these parameters during initialization. This alignment follows the logic used in the Linux kernel renesas_usbhs driver. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Michele Bisogno <[email protected]>
2026-04-26usb: gadget: rcar: Add support for reset controllerMichele Bisogno
Some Renesas SoCs, such as the RZ/G2L, require the USBHS core to be explicitly deasserted from reset before register access is possible. Update the OTG probe to handle a bulk reset controller. To maintain hardware stability, the reset is deasserted after clocks are enabled in probe(), and asserted before clocks are disabled in remove(). Update the error paths in probe to ensures clocks are disabled if the reset initialization fails. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Michele Bisogno <[email protected]>
2026-04-26usb: gadget: rcar: Fix gadget registration lifecycle in removeMichele Bisogno
The driver currently fails to unregister the USB gadget when the device is removed or the driver is unbound. This leads to dangling pointers in the UDC core and potential memory corruption. Add a call to usb_del_gadget_udc() in the remove path to ensure a clean teardown of the gadget interface. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Michele Bisogno <[email protected]>
2024-10-01usb: gadget: usbhs: Add Renesas USBHS device driverVitaliy Vasylskyy
Add UDC driver for Renesas USBHS controller found in R-Car Gen3 SoCs. This is mostly ported from the Linux kernel, with additional porting glue. The code has been synchronized with 1b4861e32e46 ("Linux 6.9.3") and cleaned up and ported to DM since the original implementation by Vitaliy. Signed-off-by: Vitaliy Vasylskyy <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>