USB: host: tuning disconnect threshold on g12a/g12b [2/2]
authorqi duan <qi.duan@amlogic.com>
Thu, 18 Oct 2018 10:21:57 +0000 (18:21 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Thu, 1 Nov 2018 09:47:57 +0000 (02:47 -0700)
PD#174736

Problem:
Some usb device may disconnect when handshake

Solution:
tuning disconnect threshold when usb host initial
now default is 0x24, only three value can tuning, 0x2c,0x34,0x3c
we set 0x34 now

Verify:
Google estelle boards which return from factory
no side effect on refernce u200 board

Change-Id: I71d974a6bac43452b20bd7f2a6827d3a46fa39fb
Signed-off-by: qi duan <qi.duan@amlogic.com>
drivers/amlogic/usb/phy/phy-aml-new-usb2-v2.c

index 6cc8d01..46a4224 100644 (file)
@@ -30,6 +30,7 @@
 #include "phy-aml-new-usb-v2.h"
 
 struct amlogic_usb_v2  *g_phy2_v2;
+#define TUNING_DISCONNECT_THRESHOLD 0x34
 
 void set_usb_phy_host_tuning(int port, int default_val)
 {
@@ -97,6 +98,8 @@ void set_usb_pll(struct amlogic_usb_v2 *phy, void __iomem     *reg)
        /* Recovery analog status */
        writel(0, reg + 0x38);
        writel(phy->pll_setting[5], reg + 0x34);
+
+       writel(TUNING_DISCONNECT_THRESHOLD, reg + 0xC);
 }
 
 static int amlogic_new_usb2_init(struct usb_phy *x)