aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/usb-musb.c
diff options
context:
space:
mode:
authorAnand Gadiyar <gadiyar@ti.com>2011-02-16 05:12:15 -0500
committerFelipe Balbi <balbi@ti.com>2011-02-17 10:36:41 -0500
commit2aae4221eebf926ad1058546e2cb81dae8f3e696 (patch)
treeba97414c1112c1d206442dc1d5f0bb6c9a8ca56e /arch/arm/mach-omap2/usb-musb.c
parentfe5a4901c20c09b4380b7d4a0197efb6489c4ce8 (diff)
arm: omap4: usb: explicitly configure MUSB pads
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>
Diffstat (limited to 'arch/arm/mach-omap2/usb-musb.c')
-rw-r--r--arch/arm/mach-omap2/usb-musb.c40
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 9107883287f..9788b494185 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -30,6 +30,7 @@
30#include <mach/irqs.h> 30#include <mach/irqs.h>
31#include <mach/am35xx.h> 31#include <mach/am35xx.h>
32#include <plat/usb.h> 32#include <plat/usb.h>
33#include "mux.h"
33 34
34#if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X) 35#if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X)
35 36
@@ -88,6 +89,43 @@ static struct platform_device musb_device = {
88 .resource = musb_resources, 89 .resource = musb_resources,
89}; 90};
90 91
92static void usb_musb_mux_init(struct omap_musb_board_data *board_data)
93{
94 switch (board_data->interface_type) {
95 case MUSB_INTERFACE_UTMI:
96 omap_mux_init_signal("usba0_otg_dp", OMAP_PIN_INPUT);
97 omap_mux_init_signal("usba0_otg_dm", OMAP_PIN_INPUT);
98 break;
99 case MUSB_INTERFACE_ULPI:
100 omap_mux_init_signal("usba0_ulpiphy_clk",
101 OMAP_PIN_INPUT_PULLDOWN);
102 omap_mux_init_signal("usba0_ulpiphy_stp",
103 OMAP_PIN_INPUT_PULLDOWN);
104 omap_mux_init_signal("usba0_ulpiphy_dir",
105 OMAP_PIN_INPUT_PULLDOWN);
106 omap_mux_init_signal("usba0_ulpiphy_nxt",
107 OMAP_PIN_INPUT_PULLDOWN);
108 omap_mux_init_signal("usba0_ulpiphy_dat0",
109 OMAP_PIN_INPUT_PULLDOWN);
110 omap_mux_init_signal("usba0_ulpiphy_dat1",
111 OMAP_PIN_INPUT_PULLDOWN);
112 omap_mux_init_signal("usba0_ulpiphy_dat2",
113 OMAP_PIN_INPUT_PULLDOWN);
114 omap_mux_init_signal("usba0_ulpiphy_dat3",
115 OMAP_PIN_INPUT_PULLDOWN);
116 omap_mux_init_signal("usba0_ulpiphy_dat4",
117 OMAP_PIN_INPUT_PULLDOWN);
118 omap_mux_init_signal("usba0_ulpiphy_dat5",
119 OMAP_PIN_INPUT_PULLDOWN);
120 omap_mux_init_signal("usba0_ulpiphy_dat6",
121 OMAP_PIN_INPUT_PULLDOWN);
122 omap_mux_init_signal("usba0_ulpiphy_dat7",
123 OMAP_PIN_INPUT_PULLDOWN);
124 break;
125 default:
126 break;
127 }
128}
91void __init usb_musb_init(struct omap_musb_board_data *board_data) 129void __init usb_musb_init(struct omap_musb_board_data *board_data)
92{ 130{
93 if (cpu_is_omap243x()) { 131 if (cpu_is_omap243x()) {
@@ -102,6 +140,8 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data)
102 musb_resources[0].start = OMAP44XX_HSUSB_OTG_BASE; 140 musb_resources[0].start = OMAP44XX_HSUSB_OTG_BASE;
103 musb_resources[1].start = OMAP44XX_IRQ_HS_USB_MC_N; 141 musb_resources[1].start = OMAP44XX_IRQ_HS_USB_MC_N;
104 musb_resources[2].start = OMAP44XX_IRQ_HS_USB_DMA_N; 142 musb_resources[2].start = OMAP44XX_IRQ_HS_USB_DMA_N;
143
144 usb_musb_mux_init(board_data);
105 } 145 }
106 musb_resources[0].end = musb_resources[0].start + SZ_4K - 1; 146 musb_resources[0].end = musb_resources[0].start + SZ_4K - 1;
107 147