diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | 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 9107883287f6..9788b4941857 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 | ||
92 | static 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 | } | ||
91 | void __init usb_musb_init(struct omap_musb_board_data *board_data) | 129 | void __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 | ||