linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch-v2.6.39 1/7] arm: omap4: usb: explicitly configure MUSB pads
Date: Thu, 17 Feb 2011 14:41:00 +0200	[thread overview]
Message-ID: <1297946466-9565-2-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1297946466-9565-1-git-send-email-balbi@ti.com>

From: Anand Gadiyar <gadiyar@ti.com>

Use the mux framework APIs to explicitly configure
the MUSB pads. The MUSB controller in OMAP4 can use
either the old ULPI interface, or the new internal PHY.
Configure the pads accordingly.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/usb-musb.c |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

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 <mach/am35xx.h>
 #include <plat/usb.h>
 #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;
 
-- 
1.7.4.rc2

  reply	other threads:[~2011-02-17 12:41 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 12:40 [patch-v2.6.39 0/7] Patches for next merge window Felipe Balbi
2011-02-17 12:41 ` Felipe Balbi [this message]
2011-02-17 12:41 ` [patch-v2.6.39 2/7] arm: omap4: 4430sdp: drop ehci support Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 3/7] OMAP2430: hwmod data: Add USBOTG Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 4/7] OMAP3xxx: " Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 5/7] AM35xx: " Felipe Balbi
2011-02-18 11:29   ` Premi, Sanjeev
2011-02-18 13:07     ` Hema Kalliguddi
2011-02-18 13:31       ` Premi, Sanjeev
2011-02-17 12:41 ` [patch-v2.6.39 6/7] OMAP4430: hwmod data: Adding USBOTG Felipe Balbi
2011-02-17 13:43   ` Cousson, Benoit
2011-02-17 14:07     ` Hema Kalliguddi
2011-02-17 15:15     ` Felipe Balbi
2011-02-17 15:18       ` Felipe Balbi
2011-02-17 15:21         ` Cousson, Benoit
2011-02-17 15:26           ` Felipe Balbi
2011-02-17 15:54             ` Cousson, Benoit
2011-02-17 16:20               ` Tony Lindgren
2011-02-17 16:22                 ` Felipe Balbi
2011-02-17 16:59                   ` Tony Lindgren
2011-02-17 17:14                     ` Cousson, Benoit
2011-02-17 17:17                       ` Felipe Balbi
2011-02-17 17:17                       ` Felipe Balbi
2011-02-17 17:24                         ` Cousson, Benoit
2011-02-17 17:37                           ` Felipe Balbi
2011-02-17 17:46                             ` Cousson, Benoit
2011-02-17 17:52                               ` Felipe Balbi
2011-02-17 18:01                                 ` Felipe Balbi
2011-02-17 18:18                               ` Tony Lindgren
2011-02-17 19:08                                 ` Felipe Balbi
2011-02-17 21:16                                   ` Tony Lindgren
2011-02-18 14:11                                 ` Cousson, Benoit
2011-02-18 15:41                                   ` Felipe Balbi
2011-02-18 15:55                                     ` Cousson, Benoit
2011-02-18 16:50                                     ` Cousson, Benoit
2011-02-21 18:22                                       ` Tony Lindgren
2011-02-21 21:36                                         ` Cousson, Benoit
2011-02-21 22:08                                           ` Tony Lindgren
2011-02-21 22:53                                             ` Cousson, Benoit
2011-02-21 23:09                                               ` Tony Lindgren
2011-02-21 23:28                                               ` Russell King - ARM Linux
2011-02-22 18:27                                               ` Paul Walmsley
2011-02-17 16:21             ` Tony Lindgren
2011-02-17 16:31               ` Felipe Balbi
2011-02-17 12:41 ` [patch-v2.6.39 7/7] OMAP2+: musb: hwmod adaptation for musb registration Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297946466-9565-2-git-send-email-balbi@ti.com \
    --to=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).