From patchwork Sun Jan 12 13:22:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Lifshitz X-Patchwork-Id: 3472051 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4D3E99F2ED for ; Sun, 12 Jan 2014 13:23:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 78B9C2012B for ; Sun, 12 Jan 2014 13:23:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB36820103 for ; Sun, 12 Jan 2014 13:23:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbaALNXU (ORCPT ); Sun, 12 Jan 2014 08:23:20 -0500 Received: from softlayer.compulab.co.il ([50.23.254.55]:52062 "EHLO compulab.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbaALNXE (ORCPT ); Sun, 12 Jan 2014 08:23:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=compulab.co.il; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=FqpHdjaEcRlNXPq0vQBMmlYPdKMDQEdFls0wME+b0qY=; b=cR7GDTyzD80/APCOXkLPZig0EoOGLvwhEDrlxJUCbhymqPQXSsz2ffggcw4ViJjq9pveZGVMpZpW32I53KCVfX+bPdgI2lqUdaumnxg+RlW6jJdwGBC0SU6QEwI7nOhR/1vmtYly7UpBoSVrBvDbCUkbAA1F6BHw8wt1HAx9siE=; Received: from [82.166.188.245] (port=18244 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.80.1) (envelope-from ) id 1W2L0K-0002tO-0d; Sun, 12 Jan 2014 15:23:04 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id ADF92644199; Sun, 12 Jan 2014 15:23:03 +0200 (IST) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1vOXQXltBZ6C; Sun, 12 Jan 2014 15:23:02 +0200 (IST) Received: from localhost.localdomain (lifshitz-linux.compulab.local [192.168.11.10]) by zimbra-mta.compulab.co.il (Postfix) with ESMTPSA id 380046441A5; Sun, 12 Jan 2014 15:23:01 +0200 (IST) From: Dmitry Lifshitz To: Tony Lindgren , Benoit Cousson Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 12/12] ARM: OMAP2+: make reset pulse for sbc-t3x usb hubs Date: Sun, 12 Jan 2014 15:22:55 +0200 Message-Id: <1389532975-28281-13-git-send-email-lifshitz@compulab.co.il> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1389532975-28281-1-git-send-email-lifshitz@compulab.co.il> References: <1389532975-28281-1-git-send-email-lifshitz@compulab.co.il> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: softlayer.compulab.co.il: acl_c_relayhosts_text_entry: lifshitz@compulab.co.il|compulab.co.il Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP sbc-t3x boards features two external USB ports on SB-T35 baseboard. The baseboardi USB hub reset signal should be de-asserted to make those ports functional. sbc-t3517 features additional (assembled on CoM) USB hub which also requires reset signal handling. Add quirks code to handle proper reset pulse signal. Signed-off-by: Dmitry Lifshitz --- arch/arm/mach-omap2/pdata-quirks.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 1ee831f..3e1407c 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -108,6 +108,23 @@ static int omap3_sbc_t3730_twl_callback(struct device *dev, return 0; } +static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name) +{ + int err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, hub_name); + + if (err) { + pr_err("SBC-T3x: %s reset gpio request failed: %d\n", + hub_name, err); + return; + } + + gpio_export(gpio, 0); + + udelay(10); + gpio_set_value(gpio, 1); + msleep(1); +} + static void __init omap3_sbc_t3730_twl_init(void) { twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback; @@ -115,12 +132,14 @@ static void __init omap3_sbc_t3730_twl_init(void) static void __init omap3_sbc_t3730_legacy_init(void) { + omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub"); legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 136); omap_ads7846_init(1, 57, 0, NULL); } static void __init omap3_sbc_t3530_legacy_init(void) { + omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub"); omap_ads7846_init(1, 57, 0, NULL); } @@ -198,6 +217,8 @@ static void __init omap3_sbc_t3517_wifi_init(void) static void __init omap3_sbc_t3517_legacy_init(void) { + omap3_sbc_t3x_usb_hub_init(152, "cm-t3517 usb hub"); + omap3_sbc_t3x_usb_hub_init(98, "sb-t35 usb hub"); am35xx_emac_reset(); hsmmc2_internal_input_clk(); omap3_sbc_t3517_wifi_init();