usb: phy2: recovery analog status in PHY initial function
authorJianxin Qin <jianxin.qin@amlogic.com>
Tue, 26 Jun 2018 02:46:40 +0000 (10:46 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Mon, 2 Jul 2018 08:27:37 +0000 (01:27 -0700)
PD#164286: usb: phy2: recovery analog status during initial phase

If a USB device is enumerated done by Host, then the host system
reboot without power off, the AML USB PHY statue need to recovery,
or the USB device will be enumerated unsuccessfully.

Change-Id: If122e53b6a818be11be0ed6581ac485450244db0
Signed-off-by: Jianxin Qin <jianxin.qin@amlogic.com>
drivers/amlogic/usb/phy/phy-aml-new-usb2-v2.c

index 9203666..cecb808 100644 (file)
@@ -90,9 +90,12 @@ void set_usb_pll(struct amlogic_usb_v2 *phy, void __iomem    *reg)
        writel(phy->pll_setting[2], reg + 0x48);
        udelay(100);
        writel((0x10000000 | (phy->pll_setting[0])), reg + 0x40);
+
        /* PHY Tune */
        writel(phy->pll_setting[3], reg + 0x50);
        writel(phy->pll_setting[4], reg + 0x10);
+       /* Recovery analog status */
+       writel(0, reg + 0x38);
        writel(phy->pll_setting[5], reg + 0x34);
 }