Skip to content

Commit 0a92ea8

Browse files
Ryceancurryvinodkoul
authored andcommitted
phy: usb: Toggle the PHY power during init
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 <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 40384c8 commit 0a92ea8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

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

327327
USB_CTRL_UNSET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN);
328+
329+
/*
330+
* The PHY might be in a bad state if it is already powered
331+
* up. Toggle the power just in case.
332+
*/
333+
USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN);
328334
USB_CTRL_UNSET(ctrl, USB_PM, USB_PWRDN);
329335

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

0 commit comments

Comments
 (0)