From patchwork Fri Jun 29 09:11:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ruslan Bilovol X-Patchwork-Id: 1131001 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BB7EBDFF34 for ; Fri, 29 Jun 2012 09:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207Ab2F2JLL (ORCPT ); Fri, 29 Jun 2012 05:11:11 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:42103 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753298Ab2F2JLJ (ORCPT ); Fri, 29 Jun 2012 05:11:09 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q5T9B8oe005130; Fri, 29 Jun 2012 04:11:08 -0500 Received: from DFLE70.ent.ti.com (dfle70.ent.ti.com [128.247.5.40]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q5T9B892022353; Fri, 29 Jun 2012 04:11:08 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle70.ent.ti.com (128.247.5.40) with Microsoft SMTP Server id 14.1.323.3; Fri, 29 Jun 2012 04:11:08 -0500 Received: from localhost (uglx0155540.ucm2.emeaucm.ext.ti.com [10.167.145.75]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id q5T9B7qx032070; Fri, 29 Jun 2012 04:11:07 -0500 From: Ruslan Bilovol To: , CC: , Subject: [PATCH 2/2] OMAP4430: USB Host: Implement workaround for Errata i687 Date: Fri, 29 Jun 2012 12:11:05 +0300 Message-ID: <1340961065-26938-2-git-send-email-ruslan.bilovol@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1340961065-26938-1-git-send-email-ruslan.bilovol@ti.com> References: <1340961065-26938-1-git-send-email-ruslan.bilovol@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The OMAP4 EHCI controller has the following defect (errata ID i687): Title: USB TLL Hold Timing Violation Description: There is a timing hold violation on an internal logic on the clock USB TLL path resulting in a systematic connection failure on the TLL link WORKAROUND: As part of workaround, next should be done: Set the I/O drive strength to 1. Depending which USB host subsystem is used, • Port B1 used: Set CONTROL.CONTROL_SMART2IO_PADCONF_2[11] USBB1_DR0_DS = 0x1 • Port B2 used: Set CONTROL.CONTROL_SMART2IO_PADCONF_2[12] USBB2_DR0_DS = 0x1 All OMAP4430 devices are impacted. Signed-off-by: Ruslan Bilovol --- arch/arm/mach-omap2/usb-host.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index dde8a11..3a6f2a2 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c @@ -30,6 +30,7 @@ #include #include +#include "control.h" #include "mux.h" #ifdef CONFIG_MFD_OMAP_USB_HOST @@ -252,6 +253,14 @@ void __init setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode) OMAP_PIN_INPUT_PULLDOWN); omap_mux_init_signal("usbb1_ulpitll_dat7", OMAP_PIN_INPUT_PULLDOWN); + + /* Errata i687: set I/O drive strength to 1 */ + if (cpu_is_omap443x()) { + u32 val; + val = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART2IO_PADCONF_2); + val |= OMAP4_USBB1_DR0_DS_MASK; + omap4_ctrl_pad_writel(val, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART2IO_PADCONF_2); + } break; case OMAP_USBHS_PORT_MODE_UNUSED: default: @@ -309,6 +318,14 @@ void __init setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode) OMAP_PIN_INPUT_PULLDOWN); omap_mux_init_signal("usbb2_ulpitll_dat7", OMAP_PIN_INPUT_PULLDOWN); + + /* Errata i687: set I/O drive strength to 1 */ + if (cpu_is_omap443x()) { + u32 val; + val = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART2IO_PADCONF_2); + val |= OMAP4_USBB2_DR0_DS_MASK; + omap4_ctrl_pad_writel(val, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART2IO_PADCONF_2); + } break; case OMAP_USBHS_PORT_MODE_UNUSED: default: