]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: renesas: rcar-gen3-usb2: Add support to initialize the bus
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Thu, 22 Aug 2024 15:27:55 +0000 (18:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:01 +0000 (14:40 +0200)
commitba7694f61c3eef02e1a2fb169bd74da948f7a6dc
treef86b91d1359189b6a3dc85bddcac2aa7e6b8a23e
parent262e32568acc2a2fbdc4322fb71f602dcaa929b5
phy: renesas: rcar-gen3-usb2: Add support to initialize the bus

[ Upstream commit 4eae16375357a2a7e8501be5469532f7636064b3 ]

The Renesas RZ/G3S need to initialize the USB BUS before transferring data
due to hardware limitation. As the register that need to be touched for
this is in the address space of the USB PHY, and the UBS PHY need to be
initialized before any other USB drivers handling data transfer, add
support to initialize the USB BUS.

As the USB PHY is probed before any other USB drivers that enables
clocks and de-assert the reset signals and the BUS initialization is done
in the probe phase, we need to add code to de-assert reset signal and
runtime resume the device (which enables its clocks) before accessing
the registers.

As the reset signals are not required by the USB PHY driver for the other
USB PHY hardware variants, the reset signals and runtime PM was handled
only in the function that initialize the USB BUS.

The PHY initialization was done right after runtime PM enable to have
all in place when the PHYs are registered.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/r/20240822152801.602318-11-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Stable-dep-of: 9ce71e85b29e ("phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/renesas/phy-rcar-gen3-usb2.c