]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
reset: rzv2h-usb2phy: Keep PHY clock enabled for entire device lifetime
authorTommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Thu, 12 Mar 2026 14:50:38 +0000 (15:50 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 27 Mar 2026 12:27:15 +0000 (13:27 +0100)
commit8889b289ce1bd11a5102b9617742a1b93bb4843e
tree1b27e1d1c4bcdf286aa915be211810735cc8277b
parent223af4a569d1f491e55d4de8ed40333c938622d0
reset: rzv2h-usb2phy: Keep PHY clock enabled for entire device lifetime

The driver was disabling the USB2 PHY clock immediately after register
initialization in probe() and after each reset operation. This left the
PHY unclocked even though it must remain active for USB functionality.

The behavior appeared to work only when another driver
(e.g., USB controller) had already enabled the clock, making operation
unreliable and hardware-dependent. In configurations where this driver
is the sole clock user, USB functionality would fail.

Fix this by:
- Enabling the clock once in probe() via pm_runtime_resume_and_get()
- Removing all pm_runtime_put() calls from assert/deassert/status
- Registering a devm cleanup action to release the clock at removal
- Removed rzv2h_usbphy_assert_helper() and its call in
  rzv2h_usb2phy_reset_probe()

This ensures the PHY clock remains enabled for the entire device lifetime,
preventing instability and aligning with hardware requirements.

Cc: stable@vger.kernel.org
Fixes: e3911d7f865b ("reset: Add USB2PHY port reset driver for Renesas RZ/V2H(P)")
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/reset-rzv2h-usb2phy.c