From patchwork Thu Feb 17 12:41:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 570001 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1HCfDZl020746 for ; Thu, 17 Feb 2011 12:41:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756150Ab1BQMlQ (ORCPT ); Thu, 17 Feb 2011 07:41:16 -0500 Received: from na3sys009aog114.obsmtp.com ([74.125.149.211]:56456 "EHLO na3sys009aog114.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755035Ab1BQMlQ (ORCPT ); Thu, 17 Feb 2011 07:41:16 -0500 Received: from source ([209.85.214.50]) (using TLSv1) by na3sys009aob114.postini.com ([74.125.148.12]) with SMTP ID DSNKTV0Xaz8ESrXLNZ2yLqGinQW9FVL3UhBT@postini.com; Thu, 17 Feb 2011 04:41:16 PST Received: by bwg12 with SMTP id 12so2520506bwg.9 for ; Thu, 17 Feb 2011 04:41:14 -0800 (PST) Received: by 10.204.26.200 with SMTP id f8mr578543bkc.46.1297946473814; Thu, 17 Feb 2011 04:41:13 -0800 (PST) Received: from localhost (cs181221087.pp.htv.fi [82.181.221.87]) by mx.google.com with ESMTPS id u23sm614705bkw.21.2011.02.17.04.41.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Feb 2011 04:41:13 -0800 (PST) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Anand Gadiyar , Felipe Balbi Subject: [patch-v2.6.39 1/7] arm: omap4: usb: explicitly configure MUSB pads Date: Thu, 17 Feb 2011 14:41:00 +0200 Message-Id: <1297946466-9565-2-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.4.rc2 In-Reply-To: <1297946466-9565-1-git-send-email-balbi@ti.com> References: <1297946466-9565-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 17 Feb 2011 12:41:36 +0000 (UTC) diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 5298949..5a82b43 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -31,6 +31,7 @@ #include #include #include "control.h" +#include "mux.h" #if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X) @@ -181,6 +182,43 @@ static struct platform_device musb_device = { .resource = musb_resources, }; +static void usb_musb_mux_init(struct omap_musb_board_data *board_data) +{ + switch (board_data->interface_type) { + case MUSB_INTERFACE_UTMI: + omap_mux_init_signal("usba0_otg_dp", OMAP_PIN_INPUT); + omap_mux_init_signal("usba0_otg_dm", OMAP_PIN_INPUT); + break; + case MUSB_INTERFACE_ULPI: + omap_mux_init_signal("usba0_ulpiphy_clk", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_stp", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dir", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_nxt", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dat0", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dat1", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dat2", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dat3", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dat4", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dat5", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dat6", + OMAP_PIN_INPUT_PULLDOWN); + omap_mux_init_signal("usba0_ulpiphy_dat7", + OMAP_PIN_INPUT_PULLDOWN); + break; + default: + break; + } +} void __init usb_musb_init(struct omap_musb_board_data *board_data) { if (cpu_is_omap243x()) { @@ -199,6 +237,8 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data) musb_resources[0].start = OMAP44XX_HSUSB_OTG_BASE; musb_resources[1].start = OMAP44XX_IRQ_HS_USB_MC_N; musb_resources[2].start = OMAP44XX_IRQ_HS_USB_DMA_N; + + usb_musb_mux_init(board_data); } musb_resources[0].end = musb_resources[0].start + SZ_4K - 1;