rk312x: usb: Skip DWC HOST for rk3126/3128 and usb phy tuning
authorlyz <lyz@rock-chips.com>
Tue, 9 Dec 2014 14:23:05 +0000 (22:23 +0800)
committerlyz <lyz@rock-chips.com>
Tue, 9 Dec 2014 14:23:10 +0000 (22:23 +0800)
1.Use EHCI/OHCI for all rk312x series
2.Set Host disconnect trigger point to 600mv, default is 650mv

drivers/usb/dwc_otg_310/usbdev_rk3126.c

index a6f174cc322dbe44ac16c4c65945a120a38f4e16..5b7ba89aea94cb46504d9115d8f5d6c552adda79 100755 (executable)
@@ -8,7 +8,7 @@ static void usb20otg_hw_init(void)
 {
        /* Turn off differential receiver in suspend mode */
        writel(UOC_HIWORD_UPDATE(0, 1, 2),
-                  RK_GRF_VIRT + RK312X_GRF_USBPHY1_CON6);
+                  RK_GRF_VIRT + RK312X_GRF_USBPHY0_CON6);
        /* other haredware init,include:
         * DRV_VBUS GPIO init */
        if (gpio_is_valid(control_usb->otg_gpios->gpio)) {
@@ -216,12 +216,12 @@ struct dwc_otg_platform_data usb20otg_pdata_rk3126 = {
 #ifdef CONFIG_USB20_HOST
 static void usb20host_hw_init(void)
 {
-       /* Switch to DWC HOST */
-       writel(UOC_HIWORD_UPDATE(1, 1, 3),
-                  RK_GRF_VIRT + RK312X_GRF_SOC_CON2);
        /* Turn off differential receiver in suspend mode */
        writel(UOC_HIWORD_UPDATE(0, 1, 2),
-                  RK_GRF_VIRT + RK312X_GRF_USBPHY0_CON6);
+                  RK_GRF_VIRT + RK312X_GRF_USBPHY1_CON6);
+       /* Set disconnect detection trigger point to 600mv */
+       writel(UOC_HIWORD_UPDATE(1, 0xf, 11),
+                  RK_GRF_VIRT + RK312X_GRF_USBPHY1_CON7);
        /* other haredware init,include:
         * DRV_VBUS GPIO init */
        if (gpio_is_valid(control_usb->host_gpios->gpio)) {