Skip to content

Commit 0552bef

Browse files
Ryceancurrygregkh
authored andcommitted
phy: usb: Toggle the PHY power during init
[ Upstream commit 0a92ea8 ] When bringing up the PHY, it might be in a bad state if left powered. One case is we lose the PLL lock if the PLL is gated while the PHY is powered. Toggle the PHY power so we can start from a known state. Fixes: 4e5b9c9 ("phy: usb: Add support for new Synopsys USB controller on the 7216") Signed-off-by: Justin Chen <justin.chen@broadcom.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20241024213540.1059412-1-justin.chen@broadcom.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d0178cb commit 0552bef

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ static void usb_init_common_7216(struct brcm_usb_init_params *params)
309309
void __iomem *ctrl = params->regs[BRCM_REGS_CTRL];
310310

311311
USB_CTRL_UNSET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN);
312+
313+
/*
314+
* The PHY might be in a bad state if it is already powered
315+
* up. Toggle the power just in case.
316+
*/
317+
USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN);
312318
USB_CTRL_UNSET(ctrl, USB_PM, USB_PWRDN);
313319

314320
/* 1 millisecond - for USB clocks to settle down */

0 commit comments

Comments
 (0)