Skip to content

Commit 9ce71e8

Browse files
claudiubezneavinodkoul
authored andcommitted
phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
Assert PLL reset on PHY power off. This saves power. Fixes: f3b5a8d ("phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver") Cc: [email protected] Reviewed-by: Yoshihiro Shimoda <[email protected]> Tested-by: Yoshihiro Shimoda <[email protected]> Reviewed-by: Lad Prabhakar <[email protected]> Signed-off-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 55a387e commit 9ce71e8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/phy/renesas/phy-rcar-gen3-usb2.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,17 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)
537537
struct rcar_gen3_chan *channel = rphy->ch;
538538
int ret = 0;
539539

540-
scoped_guard(spinlock_irqsave, &channel->lock)
540+
scoped_guard(spinlock_irqsave, &channel->lock) {
541541
rphy->powered = false;
542542

543+
if (rcar_gen3_are_all_rphys_power_off(channel)) {
544+
u32 val = readl(channel->base + USB2_USBCTR);
545+
546+
val |= USB2_USBCTR_PLL_RST;
547+
writel(val, channel->base + USB2_USBCTR);
548+
}
549+
}
550+
543551
if (channel->vbus)
544552
ret = regulator_disable(channel->vbus);
545553

0 commit comments

Comments
 (0)