From ac1c3838c7cfafbdf1dd0aa137f02cfb4977ddd2 Mon Sep 17 00:00:00 2001 From: Ajay Agarwal Date: Wed, 3 Feb 2021 18:10:10 +0530 Subject: [PATCH] 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 --- drivers/usb/phy/phy-msm-snps-hs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/phy/phy-msm-snps-hs.c b/drivers/usb/phy/phy-msm-snps-hs.c index d6d76c450ef4..619951fee626 100644 --- a/drivers/usb/phy/phy-msm-snps-hs.c +++ b/drivers/usb/phy/phy-msm-snps-hs.c @@ -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);