Skip to content

usb: gadget: rcar: Add RZ/G2L support and lifecycle fixes

Michele Bisogno u-boot 4 versions – Applied

Status from this message: Applied to usb/master, thanks !

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest3 patches 1 replyApplied
  2. v53 patches 2 repliesSuperseded
  3. v63 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v43 patches2 repliesSuperseded

Changes in v7 from the cover letter

- Fixed RB tags

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/3usb: gadget: rcar: Fix gadget registration lifecycle in removedrivers/usb/gadget/rcar/common.c+3 -00 replies
2/3usb: gadget: rcar: Add support for reset controllerdrivers/usb/gadget/rcar/common.c+34 -80 replies
3/3usb: gadget: rcar: Add support for RZ/G2L (R9A07G044)drivers/usb/gadget/rcar/common.c drivers/usb/gadget/rcar/renesas_usb.h+21 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMarek Vasut
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/3] usb: gadget: rcar: Add RZ/G2L support and lifecycle fixes

This series adds support for the Renesas RZ/G2L (R9A07G044) USBHS controller. During development, several lifecycle and resource management issues were identified and addressed to satisfy RZ/G2L hardware requirements and prevent resource leaks across the driver.

The series is split into three logical parts to ensure bisectability:
1. A bugfix for the gadget deletion sequence during driver remove.
2. The addition of reset controller infrastructure and proper clock/reset teardown logic.
3. The RZ/G2L specific hardware parameters, SYSCFG logic, and compatible strings.

Changes in v7:
- Fixed RB tags

Changes in v6:
- Fixed teardown order in usbhs_udc_otg_remove() to ensure PHY shutdown occurs before reset assertion and clock disablement.
- Added explicit reset_release_bulk() and clk_release_bulk() to both the remove path and the probe error paths.
- Sorted header inclusions alphabetically as requested.
- Fixed a bug in the clock enable error path where resources were not properly released.
- Carried over the Reviewed-by tags

Changes in v5:
- Simplified usbhs_probe() signature to only take struct udevice *dev, deriving private data internally as requested.
- Fixed resource leak in usbhs_udc_otg_probe() error paths by adding reset_assert_bulk() to the teardown sequence.
- Standardized resource management by ensuring the probe error path perfectly mirrors the removal path.

Changes in v4:
- Split the monolithic patch into a 3-patch series as requested.
- Added usb_del_gadget_udc() to fix resource leak on driver remove.
- Implemented bulk reset controller support (required for RZ/G2L).
- Improved error handling in probe() to ensure clocks are disabled if reset initialization or deassertion fails.
- Moved reset and clock handles to private data to ensure persistence.
- Reorganized hunks to ensure each patch in the series compiles independently (bisectability).

Michele Bisogno (3):
usb: gadget: rcar: Fix gadget registration lifecycle in remove
usb: gadget: rcar: Add support for reset controller
usb: gadget: rcar: Add support for RZ/G2L (R9A07G044)

 drivers/usb/gadget/rcar/common.c      | 65 +++++++++++++++++++++++----
 drivers/usb/gadget/rcar/renesas_usb.h |  1 +
 2 files changed, 58 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1