usb: phy: snps: Ensure SIDDQ is disabled for proper functioning

Some platforms may have the SIDDQ enabled by default as a part of
PHY POR. This leads to PHY analog blocks staying down and hence
the PHY is not in a proper state to function.
Ensure that SIDDQ is disabled as a part of init routine.

Change-Id: I6685c34fc69168472d4a97d14e714b9b5a3558b5
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
This commit is contained in:
Ajay Agarwal 2021-02-03 18:10:10 +05:30 • committed by Gerrit - the friendly Code Review server
commit ac1c3838c7

View file

@ -33,6 +33,7 @@
#define POR BIT(1)
#define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0 (0x54)
#define SIDDQ BIT(2)
#define RETENABLEN BIT(3)
#define FSEL_MASK (0x7 << 4)
#define FSEL_DEFAULT (0x3 << 4)
@ -459,6 +460,9 @@ static int msm_hsphy_init(struct usb_phy *uphy)
msm_usb_write_readback(phy->base, USB2_PHY_USB_PHY_UTMI_CTRL0,
SLEEPM, SLEEPM);
msm_usb_write_readback(phy->base, USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0,
SIDDQ, 0);
msm_usb_write_readback(phy->base, USB2_PHY_USB_PHY_UTMI_CTRL5,
POR, 0);