aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Kconfig89
-rw-r--r--arch/arm/mach-omap2/Makefile13
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c17
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c1
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c70
-rw-r--r--arch/arm/mach-omap2/board-apollon.c30
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c122
-rw-r--r--arch/arm/mach-omap2/board-generic.c1
-rw-r--r--arch/arm/mach-omap2/board-h4.c60
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c11
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c148
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c304
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c78
-rw-r--r--arch/arm/mach-omap2/board-rx51-video.c1
-rw-r--r--arch/arm/mach-omap2/board-zoom2.c13
-rw-r--r--arch/arm/mach-omap2/board-zoom3.c13
-rw-r--r--arch/arm/mach-omap2/devices.c82
-rw-r--r--arch/arm/mach-omap2/i2c.c27
-rw-r--r--arch/arm/mach-omap2/include/mach/omap4-common.h7
-rw-r--r--arch/arm/mach-omap2/io.c2
-rw-r--r--arch/arm/mach-omap2/iommu2.c44
-rw-r--r--arch/arm/mach-omap2/mcbsp.c13
-rw-r--r--arch/arm/mach-omap2/mux.c338
-rw-r--r--arch/arm/mach-omap2/mux.h28
-rw-r--r--arch/arm/mach-omap2/mux2420.c688
-rw-r--r--arch/arm/mach-omap2/mux2420.h282
-rw-r--r--arch/arm/mach-omap2/mux2430.c791
-rw-r--r--arch/arm/mach-omap2/mux2430.h370
-rw-r--r--arch/arm/mach-omap2/mux34xx.c8
-rw-r--r--arch/arm/mach-omap2/omap-headsmp.S16
-rw-r--r--arch/arm/mach-omap2/omap-hotplug.c79
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c2
-rw-r--r--arch/arm/mach-omap2/omap-smp.c3
-rw-r--r--arch/arm/mach-omap2/omap44xx-smc.S25
-rw-r--r--arch/arm/mach-omap2/pm24xx.c1
-rw-r--r--arch/arm/mach-omap2/pm44xx.c135
-rw-r--r--arch/arm/mach-omap2/serial.c80
-rw-r--r--arch/arm/mach-omap2/usb-ehci.c1
-rw-r--r--arch/arm/mach-omap2/usb-fs.c359
-rw-r--r--arch/arm/mach-omap2/usb-musb.c1
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c14
41 files changed, 3735 insertions, 632 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b31b6f123122..b48bacf0a7aa 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -1,22 +1,77 @@
1if ARCH_OMAP2PLUS
2
3menu "TI OMAP2/3/4 Specific Features"
4
5config ARCH_OMAP2PLUS_TYPICAL
6 bool "Typical OMAP configuration"
7 default y
8 select AEABI
9 select REGULATOR
10 select PM
11 select PM_RUNTIME
12 select VFP
13 select NEON if ARCH_OMAP3 || ARCH_OMAP4
14 select SERIAL_8250
15 select SERIAL_CORE_CONSOLE
16 select SERIAL_8250_CONSOLE
17 select I2C
18 select I2C_OMAP
19 select MFD
20 select MENELAUS if ARCH_OMAP2
21 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
22 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
23 help
24 Compile a kernel suitable for booting most boards
25
26config ARCH_OMAP2
27 bool "TI OMAP2"
28 depends on ARCH_OMAP2PLUS
29 default y
30 select CPU_V6
31
32config ARCH_OMAP3
33 bool "TI OMAP3"
34 depends on ARCH_OMAP2PLUS
35 default y
36 select CPU_V7
37 select USB_ARCH_HAS_EHCI
38 select ARM_L1_CACHE_SHIFT_6
39
40config ARCH_OMAP4
41 bool "TI OMAP4"
42 default y
43 depends on ARCH_OMAP2PLUS
44 select CPU_V7
45 select ARM_GIC
46
1comment "OMAP Core Type" 47comment "OMAP Core Type"
2 depends on ARCH_OMAP2 48 depends on ARCH_OMAP2
3 49
4config ARCH_OMAP2420 50config ARCH_OMAP2420
5 bool "OMAP2420 support" 51 bool "OMAP2420 support"
6 depends on ARCH_OMAP2 52 depends on ARCH_OMAP2
53 default y
7 select OMAP_DM_TIMER 54 select OMAP_DM_TIMER
8 select ARCH_OMAP_OTG 55 select ARCH_OMAP_OTG
9 56
10config ARCH_OMAP2430 57config ARCH_OMAP2430
11 bool "OMAP2430 support" 58 bool "OMAP2430 support"
12 depends on ARCH_OMAP2 59 depends on ARCH_OMAP2
60 default y
13 select ARCH_OMAP_OTG 61 select ARCH_OMAP_OTG
14 62
15config ARCH_OMAP3430 63config ARCH_OMAP3430
16 bool "OMAP3430 support" 64 bool "OMAP3430 support"
17 depends on ARCH_OMAP3 65 depends on ARCH_OMAP3
66 default y
18 select ARCH_OMAP_OTG 67 select ARCH_OMAP_OTG
19 68
69config OMAP_PACKAGE_ZAF
70 bool
71
72config OMAP_PACKAGE_ZAC
73 bool
74
20config OMAP_PACKAGE_CBC 75config OMAP_PACKAGE_CBC
21 bool 76 bool
22 77
@@ -35,6 +90,7 @@ comment "OMAP Board Type"
35config MACH_OMAP_GENERIC 90config MACH_OMAP_GENERIC
36 bool "Generic OMAP board" 91 bool "Generic OMAP board"
37 depends on ARCH_OMAP2 92 depends on ARCH_OMAP2
93 default y
38 94
39config MACH_OMAP2_TUSB6010 95config MACH_OMAP2_TUSB6010
40 bool 96 bool
@@ -44,60 +100,75 @@ config MACH_OMAP2_TUSB6010
44config MACH_OMAP_H4 100config MACH_OMAP_H4
45 bool "OMAP 2420 H4 board" 101 bool "OMAP 2420 H4 board"
46 depends on ARCH_OMAP2 102 depends on ARCH_OMAP2
103 default y
104 select OMAP_PACKAGE_ZAF
47 select OMAP_DEBUG_DEVICES 105 select OMAP_DEBUG_DEVICES
48 106
49config MACH_OMAP_APOLLON 107config MACH_OMAP_APOLLON
50 bool "OMAP 2420 Apollon board" 108 bool "OMAP 2420 Apollon board"
51 depends on ARCH_OMAP2 109 depends on ARCH_OMAP2
110 default y
111 select OMAP_PACKAGE_ZAC
52 112
53config MACH_OMAP_2430SDP 113config MACH_OMAP_2430SDP
54 bool "OMAP 2430 SDP board" 114 bool "OMAP 2430 SDP board"
55 depends on ARCH_OMAP2 115 depends on ARCH_OMAP2
116 default y
117 select OMAP_PACKAGE_ZAC
56 118
57config MACH_OMAP3_BEAGLE 119config MACH_OMAP3_BEAGLE
58 bool "OMAP3 BEAGLE board" 120 bool "OMAP3 BEAGLE board"
59 depends on ARCH_OMAP3 121 depends on ARCH_OMAP3
122 default y
60 select OMAP_PACKAGE_CBB 123 select OMAP_PACKAGE_CBB
61 124
62config MACH_DEVKIT8000 125config MACH_DEVKIT8000
63 bool "DEVKIT8000 board" 126 bool "DEVKIT8000 board"
64 depends on ARCH_OMAP3 127 depends on ARCH_OMAP3
128 default y
65 select OMAP_PACKAGE_CUS 129 select OMAP_PACKAGE_CUS
66 select OMAP_MUX 130 select OMAP_MUX
67 131
68config MACH_OMAP_LDP 132config MACH_OMAP_LDP
69 bool "OMAP3 LDP board" 133 bool "OMAP3 LDP board"
70 depends on ARCH_OMAP3 134 depends on ARCH_OMAP3
135 default y
71 select OMAP_PACKAGE_CBB 136 select OMAP_PACKAGE_CBB
72 137
73config MACH_OVERO 138config MACH_OVERO
74 bool "Gumstix Overo board" 139 bool "Gumstix Overo board"
75 depends on ARCH_OMAP3 140 depends on ARCH_OMAP3
141 default y
76 select OMAP_PACKAGE_CBB 142 select OMAP_PACKAGE_CBB
77 143
78config MACH_OMAP3EVM 144config MACH_OMAP3EVM
79 bool "OMAP 3530 EVM board" 145 bool "OMAP 3530 EVM board"
80 depends on ARCH_OMAP3 146 depends on ARCH_OMAP3
147 default y
81 select OMAP_PACKAGE_CBB 148 select OMAP_PACKAGE_CBB
82 149
83config MACH_OMAP3517EVM 150config MACH_OMAP3517EVM
84 bool "OMAP3517/ AM3517 EVM board" 151 bool "OMAP3517/ AM3517 EVM board"
85 depends on ARCH_OMAP3 152 depends on ARCH_OMAP3
153 default y
86 select OMAP_PACKAGE_CBB 154 select OMAP_PACKAGE_CBB
87 155
88config MACH_OMAP3_PANDORA 156config MACH_OMAP3_PANDORA
89 bool "OMAP3 Pandora" 157 bool "OMAP3 Pandora"
90 depends on ARCH_OMAP3 158 depends on ARCH_OMAP3
159 default y
91 select OMAP_PACKAGE_CBB 160 select OMAP_PACKAGE_CBB
92 161
93config MACH_OMAP3_TOUCHBOOK 162config MACH_OMAP3_TOUCHBOOK
94 bool "OMAP3 Touch Book" 163 bool "OMAP3 Touch Book"
95 depends on ARCH_OMAP3 164 depends on ARCH_OMAP3
165 default y
96 select BACKLIGHT_CLASS_DEVICE 166 select BACKLIGHT_CLASS_DEVICE
97 167
98config MACH_OMAP_3430SDP 168config MACH_OMAP_3430SDP
99 bool "OMAP 3430 SDP board" 169 bool "OMAP 3430 SDP board"
100 depends on ARCH_OMAP3 170 depends on ARCH_OMAP3
171 default y
101 select OMAP_PACKAGE_CBB 172 select OMAP_PACKAGE_CBB
102 173
103config MACH_NOKIA_N800 174config MACH_NOKIA_N800
@@ -112,6 +183,8 @@ config MACH_NOKIA_N810_WIMAX
112config MACH_NOKIA_N8X0 183config MACH_NOKIA_N8X0
113 bool "Nokia N800/N810" 184 bool "Nokia N800/N810"
114 depends on ARCH_OMAP2420 185 depends on ARCH_OMAP2420
186 default y
187 select OMAP_PACKAGE_ZAC
115 select MACH_NOKIA_N800 188 select MACH_NOKIA_N800
116 select MACH_NOKIA_N810 189 select MACH_NOKIA_N810
117 select MACH_NOKIA_N810_WIMAX 190 select MACH_NOKIA_N810_WIMAX
@@ -119,42 +192,55 @@ config MACH_NOKIA_N8X0
119config MACH_NOKIA_RX51 192config MACH_NOKIA_RX51
120 bool "Nokia RX-51 board" 193 bool "Nokia RX-51 board"
121 depends on ARCH_OMAP3 194 depends on ARCH_OMAP3
195 default y
122 select OMAP_PACKAGE_CBB 196 select OMAP_PACKAGE_CBB
123 197
124config MACH_OMAP_ZOOM2 198config MACH_OMAP_ZOOM2
125 bool "OMAP3 Zoom2 board" 199 bool "OMAP3 Zoom2 board"
126 depends on ARCH_OMAP3 200 depends on ARCH_OMAP3
201 default y
127 select OMAP_PACKAGE_CBB 202 select OMAP_PACKAGE_CBB
128 203
129config MACH_OMAP_ZOOM3 204config MACH_OMAP_ZOOM3
130 bool "OMAP3630 Zoom3 board" 205 bool "OMAP3630 Zoom3 board"
131 depends on ARCH_OMAP3 206 depends on ARCH_OMAP3
207 default y
132 select OMAP_PACKAGE_CBP 208 select OMAP_PACKAGE_CBP
133 209
134config MACH_CM_T35 210config MACH_CM_T35
135 bool "CompuLab CM-T35 module" 211 bool "CompuLab CM-T35 module"
136 depends on ARCH_OMAP3 212 depends on ARCH_OMAP3
213 default y
137 select OMAP_PACKAGE_CUS 214 select OMAP_PACKAGE_CUS
138 select OMAP_MUX 215 select OMAP_MUX
139 216
140config MACH_IGEP0020 217config MACH_IGEP0020
141 bool "IGEP v2 board" 218 bool "IGEP v2 board"
142 depends on ARCH_OMAP3 219 depends on ARCH_OMAP3
220 default y
143 select OMAP_PACKAGE_CBB 221 select OMAP_PACKAGE_CBB
144 222
145config MACH_SBC3530 223config MACH_SBC3530
146 bool "OMAP3 SBC STALKER board" 224 bool "OMAP3 SBC STALKER board"
147 depends on ARCH_OMAP3 225 depends on ARCH_OMAP3
226 default y
148 select OMAP_PACKAGE_CUS 227 select OMAP_PACKAGE_CUS
149 select OMAP_MUX 228 select OMAP_MUX
150 229
151config MACH_OMAP_3630SDP 230config MACH_OMAP_3630SDP
152 bool "OMAP3630 SDP board" 231 bool "OMAP3630 SDP board"
153 depends on ARCH_OMAP3 232 depends on ARCH_OMAP3
233 default y
154 select OMAP_PACKAGE_CBP 234 select OMAP_PACKAGE_CBP
155 235
156config MACH_OMAP_4430SDP 236config MACH_OMAP_4430SDP
157 bool "OMAP 4430 SDP board" 237 bool "OMAP 4430 SDP board"
238 default y
239 depends on ARCH_OMAP4
240
241config MACH_OMAP4_PANDA
242 bool "OMAP4 Panda Board"
243 default y
158 depends on ARCH_OMAP4 244 depends on ARCH_OMAP4
159 245
160config OMAP3_EMU 246config OMAP3_EMU
@@ -176,3 +262,6 @@ config OMAP3_SDRC_AC_TIMING
176 wish to say no. Selecting yes without understanding what is 262 wish to say no. Selecting yes without understanding what is
177 going on could result in system crashes; 263 going on could result in system crashes;
178 264
265endmenu
266
267endif
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index ea52b034e963..0db90ff52617 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
22# SMP support ONLY available for OMAP4 22# SMP support ONLY available for OMAP4
23obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o 23obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
24obj-$(CONFIG_LOCAL_TIMERS) += timer-mpu.o 24obj-$(CONFIG_LOCAL_TIMERS) += timer-mpu.o
25obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
25obj-$(CONFIG_ARCH_OMAP4) += omap44xx-smc.o omap4-common.o 26obj-$(CONFIG_ARCH_OMAP4) += omap44xx-smc.o omap4-common.o
26 27
27AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a 28AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a
@@ -36,6 +37,8 @@ AFLAGS_sram243x.o :=-Wa,-march=armv6
36AFLAGS_sram34xx.o :=-Wa,-march=armv7-a 37AFLAGS_sram34xx.o :=-Wa,-march=armv7-a
37 38
38# Pin multiplexing 39# Pin multiplexing
40obj-$(CONFIG_ARCH_OMAP2420) += mux2420.o
41obj-$(CONFIG_ARCH_OMAP2430) += mux2430.o
39obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o 42obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o
40 43
41# SMS/SDRC 44# SMS/SDRC
@@ -47,6 +50,7 @@ ifeq ($(CONFIG_PM),y)
47obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o 50obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
48obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o 51obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o
49obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o 52obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o
53obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o
50obj-$(CONFIG_PM_DEBUG) += pm-debug.o 54obj-$(CONFIG_PM_DEBUG) += pm-debug.o
51 55
52AFLAGS_sleep24xx.o :=-Wa,-march=armv6 56AFLAGS_sleep24xx.o :=-Wa,-march=armv6
@@ -89,7 +93,10 @@ obj-$(CONFIG_OMAP3_EMU) += emu.o
89obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o 93obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
90mailbox_mach-objs := mailbox.o 94mailbox_mach-objs := mailbox.o
91 95
92obj-$(CONFIG_OMAP_IOMMU) := iommu2.o omap-iommu.o 96obj-$(CONFIG_OMAP_IOMMU) += iommu2.o
97
98iommu-$(CONFIG_OMAP_IOMMU) := omap-iommu.o
99obj-y += $(iommu-m) $(iommu-y)
93 100
94i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o 101i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
95obj-y += $(i2c-omap-m) $(i2c-omap-y) 102obj-y += $(i2c-omap-m) $(i2c-omap-y)
@@ -140,12 +147,16 @@ obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
140 hsmmc.o 147 hsmmc.o
141obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \ 148obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
142 hsmmc.o 149 hsmmc.o
150obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \
151 hsmmc.o
143 152
144obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o 153obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
145 154
146obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o \ 155obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o \
147 hsmmc.o 156 hsmmc.o
148# Platform specific device init code 157# Platform specific device init code
158usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o
159obj-y += $(usbfs-m) $(usbfs-y)
149obj-y += usb-musb.o 160obj-y += usb-musb.o
150obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o 161obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
151obj-y += usb-ehci.o 162obj-y += usb-ehci.o
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index cfdc877fc030..ba188cf7d09d 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -31,13 +31,13 @@
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32 32
33#include <mach/gpio.h> 33#include <mach/gpio.h>
34#include <plat/mux.h>
35#include <plat/board.h> 34#include <plat/board.h>
36#include <plat/common.h> 35#include <plat/common.h>
37#include <plat/gpmc.h> 36#include <plat/gpmc.h>
38#include <plat/usb.h> 37#include <plat/usb.h>
39#include <plat/gpmc-smc91x.h> 38#include <plat/gpmc-smc91x.h>
40 39
40#include "mux.h"
41#include "hsmmc.h" 41#include "hsmmc.h"
42 42
43#define SDP2430_CS0_BASE 0x04000000 43#define SDP2430_CS0_BASE 0x04000000
@@ -213,17 +213,30 @@ static struct omap_usb_config sdp2430_usb_config __initdata = {
213 .pins[0] = 3, 213 .pins[0] = 3,
214}; 214};
215 215
216#ifdef CONFIG_OMAP_MUX
217static struct omap_board_mux board_mux[] __initdata = {
218 { .reg_offset = OMAP_MUX_TERMINATOR },
219};
220#else
221#define board_mux NULL
222#endif
223
216static void __init omap_2430sdp_init(void) 224static void __init omap_2430sdp_init(void)
217{ 225{
218 int ret; 226 int ret;
219 227
228 omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC);
229
220 omap2430_i2c_init(); 230 omap2430_i2c_init();
221 231
222 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); 232 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
223 omap_serial_init(); 233 omap_serial_init();
224 omap2_hsmmc_init(mmc); 234 omap2_hsmmc_init(mmc);
225 omap_usb_init(&sdp2430_usb_config); 235 omap2_usbfs_init(&sdp2430_usb_config);
236
237 omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
226 usb_musb_init(&musb_board_data); 238 usb_musb_init(&musb_board_data);
239
227 board_smc91x_init(); 240 board_smc91x_init();
228 241
229 /* Turn off secondary LCD backlight */ 242 /* Turn off secondary LCD backlight */
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 504d2bd222fe..f267dc04d866 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -18,7 +18,6 @@
18#include <plat/common.h> 18#include <plat/common.h>
19#include <plat/board.h> 19#include <plat/board.h>
20#include <plat/gpmc-smc91x.h> 20#include <plat/gpmc-smc91x.h>
21#include <plat/mux.h>
22#include <plat/usb.h> 21#include <plat/usb.h>
23 22
24#include <mach/board-zoom.h> 23#include <mach/board-zoom.h>
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index e4a5d66b83b8..f287461bb038 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -21,6 +21,7 @@
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22#include <linux/i2c/twl.h> 22#include <linux/i2c/twl.h>
23#include <linux/regulator/machine.h> 23#include <linux/regulator/machine.h>
24#include <linux/leds.h>
24 25
25#include <mach/hardware.h> 26#include <mach/hardware.h>
26#include <mach/omap4-common.h> 27#include <mach/omap4-common.h>
@@ -40,6 +41,54 @@
40#define ETH_KS8851_POWER_ON 48 41#define ETH_KS8851_POWER_ON 48
41#define ETH_KS8851_QUART 138 42#define ETH_KS8851_QUART 138
42 43
44static struct gpio_led sdp4430_gpio_leds[] = {
45 {
46 .name = "omap4:green:debug0",
47 .gpio = 61,
48 },
49 {
50 .name = "omap4:green:debug1",
51 .gpio = 30,
52 },
53 {
54 .name = "omap4:green:debug2",
55 .gpio = 7,
56 },
57 {
58 .name = "omap4:green:debug3",
59 .gpio = 8,
60 },
61 {
62 .name = "omap4:green:debug4",
63 .gpio = 50,
64 },
65 {
66 .name = "omap4:blue:user",
67 .gpio = 169,
68 },
69 {
70 .name = "omap4:red:user",
71 .gpio = 170,
72 },
73 {
74 .name = "omap4:green:user",
75 .gpio = 139,
76 },
77
78};
79
80static struct gpio_led_platform_data sdp4430_led_data = {
81 .leds = sdp4430_gpio_leds,
82 .num_leds = ARRAY_SIZE(sdp4430_gpio_leds),
83};
84
85static struct platform_device sdp4430_leds_gpio = {
86 .name = "leds-gpio",
87 .id = -1,
88 .dev = {
89 .platform_data = &sdp4430_led_data,
90 },
91};
43static struct spi_board_info sdp4430_spi_board_info[] __initdata = { 92static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
44 { 93 {
45 .modalias = "ks8851", 94 .modalias = "ks8851",
@@ -112,6 +161,7 @@ static struct platform_device sdp4430_lcd_device = {
112 161
113static struct platform_device *sdp4430_devices[] __initdata = { 162static struct platform_device *sdp4430_devices[] __initdata = {
114 &sdp4430_lcd_device, 163 &sdp4430_lcd_device,
164 &sdp4430_leds_gpio,
115}; 165};
116 166
117static struct omap_lcd_config sdp4430_lcd_config __initdata = { 167static struct omap_lcd_config sdp4430_lcd_config __initdata = {
@@ -156,14 +206,16 @@ static struct omap2_hsmmc_info mmc[] = {
156 {} /* Terminator */ 206 {} /* Terminator */
157}; 207};
158 208
159static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { 209static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
160 { 210 {
161 .supply = "vmmc", 211 .supply = "vmmc",
162 .dev_name = "mmci-omap-hs.0", 212 .dev_name = "mmci-omap-hs.1",
163 }, 213 },
214};
215static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
164 { 216 {
165 .supply = "vmmc", 217 .supply = "vmmc",
166 .dev_name = "mmci-omap-hs.1", 218 .dev_name = "mmci-omap-hs.0",
167 }, 219 },
168}; 220};
169 221
@@ -210,6 +262,8 @@ static struct regulator_init_data sdp4430_vaux1 = {
210 | REGULATOR_CHANGE_MODE 262 | REGULATOR_CHANGE_MODE
211 | REGULATOR_CHANGE_STATUS, 263 | REGULATOR_CHANGE_STATUS,
212 }, 264 },
265 .num_consumer_supplies = 1,
266 .consumer_supplies = sdp4430_vaux_supply,
213}; 267};
214 268
215static struct regulator_init_data sdp4430_vaux2 = { 269static struct regulator_init_data sdp4430_vaux2 = {
@@ -250,7 +304,7 @@ static struct regulator_init_data sdp4430_vmmc = {
250 | REGULATOR_CHANGE_MODE 304 | REGULATOR_CHANGE_MODE
251 | REGULATOR_CHANGE_STATUS, 305 | REGULATOR_CHANGE_STATUS,
252 }, 306 },
253 .num_consumer_supplies = 2, 307 .num_consumer_supplies = 1,
254 .consumer_supplies = sdp4430_vmmc_supply, 308 .consumer_supplies = sdp4430_vmmc_supply,
255}; 309};
256 310
@@ -353,6 +407,11 @@ static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = {
353 .platform_data = &sdp4430_twldata, 407 .platform_data = &sdp4430_twldata,
354 }, 408 },
355}; 409};
410static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
411 {
412 I2C_BOARD_INFO("tmp105", 0x48),
413 },
414};
356static int __init omap4_i2c_init(void) 415static int __init omap4_i2c_init(void)
357{ 416{
358 /* 417 /*
@@ -362,7 +421,8 @@ static int __init omap4_i2c_init(void)
362 omap_register_i2c_bus(1, 400, sdp4430_i2c_boardinfo, 421 omap_register_i2c_bus(1, 400, sdp4430_i2c_boardinfo,
363 ARRAY_SIZE(sdp4430_i2c_boardinfo)); 422 ARRAY_SIZE(sdp4430_i2c_boardinfo));
364 omap_register_i2c_bus(2, 400, NULL, 0); 423 omap_register_i2c_bus(2, 400, NULL, 0);
365 omap_register_i2c_bus(3, 400, NULL, 0); 424 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
425 ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
366 omap_register_i2c_bus(4, 400, NULL, 0); 426 omap_register_i2c_bus(4, 400, NULL, 0);
367 return 0; 427 return 0;
368} 428}
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index aa69fb999748..8cea6235b4be 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -35,13 +35,14 @@
35 35
36#include <mach/gpio.h> 36#include <mach/gpio.h>
37#include <plat/led.h> 37#include <plat/led.h>
38#include <plat/mux.h>
39#include <plat/usb.h> 38#include <plat/usb.h>
40#include <plat/board.h> 39#include <plat/board.h>
41#include <plat/common.h> 40#include <plat/common.h>
42#include <plat/gpmc.h> 41#include <plat/gpmc.h>
43#include <plat/control.h> 42#include <plat/control.h>
44 43
44#include "mux.h"
45
45/* LED & Switch macros */ 46/* LED & Switch macros */
46#define LED0_GPIO13 13 47#define LED0_GPIO13 13
47#define LED1_GPIO14 14 48#define LED1_GPIO14 14
@@ -244,7 +245,7 @@ static inline void __init apollon_init_smc91x(void)
244 apollon_smc91x_resources[0].end = base + 0x30f; 245 apollon_smc91x_resources[0].end = base + 0x30f;
245 udelay(100); 246 udelay(100);
246 247
247 omap_cfg_reg(W4__24XX_GPIO74); 248 omap_mux_init_gpio(74, 0);
248 if (gpio_request(APOLLON_ETHR_GPIO_IRQ, "SMC91x irq") < 0) { 249 if (gpio_request(APOLLON_ETHR_GPIO_IRQ, "SMC91x irq") < 0) {
249 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", 250 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
250 APOLLON_ETHR_GPIO_IRQ); 251 APOLLON_ETHR_GPIO_IRQ);
@@ -286,15 +287,15 @@ static void __init omap_apollon_init_irq(void)
286static void __init apollon_led_init(void) 287static void __init apollon_led_init(void)
287{ 288{
288 /* LED0 - AA10 */ 289 /* LED0 - AA10 */
289 omap_cfg_reg(AA10_242X_GPIO13); 290 omap_mux_init_signal("vlynq_clk.gpio_13", 0);
290 gpio_request(LED0_GPIO13, "LED0"); 291 gpio_request(LED0_GPIO13, "LED0");
291 gpio_direction_output(LED0_GPIO13, 0); 292 gpio_direction_output(LED0_GPIO13, 0);
292 /* LED1 - AA6 */ 293 /* LED1 - AA6 */
293 omap_cfg_reg(AA6_242X_GPIO14); 294 omap_mux_init_signal("vlynq_rx1.gpio_14", 0);
294 gpio_request(LED1_GPIO14, "LED1"); 295 gpio_request(LED1_GPIO14, "LED1");
295 gpio_direction_output(LED1_GPIO14, 0); 296 gpio_direction_output(LED1_GPIO14, 0);
296 /* LED2 - AA4 */ 297 /* LED2 - AA4 */
297 omap_cfg_reg(AA4_242X_GPIO15); 298 omap_mux_init_signal("vlynq_rx0.gpio_15", 0);
298 gpio_request(LED2_GPIO15, "LED2"); 299 gpio_request(LED2_GPIO15, "LED2");
299 gpio_direction_output(LED2_GPIO15, 0); 300 gpio_direction_output(LED2_GPIO15, 0);
300} 301}
@@ -303,22 +304,35 @@ static void __init apollon_usb_init(void)
303{ 304{
304 /* USB device */ 305 /* USB device */
305 /* DEVICE_SUSPEND */ 306 /* DEVICE_SUSPEND */
306 omap_cfg_reg(P21_242X_GPIO12); 307 omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0);
307 gpio_request(12, "USB suspend"); 308 gpio_request(12, "USB suspend");
308 gpio_direction_output(12, 0); 309 gpio_direction_output(12, 0);
309 omap_usb_init(&apollon_usb_config); 310 omap2_usbfs_init(&apollon_usb_config);
310} 311}
311 312
313#ifdef CONFIG_OMAP_MUX
314static struct omap_board_mux board_mux[] __initdata = {
315 { .reg_offset = OMAP_MUX_TERMINATOR },
316};
317#else
318#define board_mux NULL
319#endif
320
312static void __init omap_apollon_init(void) 321static void __init omap_apollon_init(void)
313{ 322{
314 u32 v; 323 u32 v;
315 324
325 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
326
316 apollon_led_init(); 327 apollon_led_init();
317 apollon_flash_init(); 328 apollon_flash_init();
318 apollon_usb_init(); 329 apollon_usb_init();
319 330
320 /* REVISIT: where's the correct place */ 331 /* REVISIT: where's the correct place */
321 omap_cfg_reg(W19_24XX_SYS_NIRQ); 332 omap_mux_init_signal("sys_nirq", OMAP_PULL_ENA | OMAP_PULL_UP);
333
334 /* LCD PWR_EN */
335 omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP);
322 336
323 /* Use Interal loop-back in MMC/SDIO Module Input Clock selection */ 337 /* Use Interal loop-back in MMC/SDIO Module Input Clock selection */
324 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); 338 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 128b9329ef25..f8303f7bbe76 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -127,54 +127,50 @@ static struct omap2_hsmmc_info mmc[] = {
127 }, 127 },
128 {} /* Terminator */ 128 {} /* Terminator */
129}; 129};
130static struct omap_board_config_kernel devkit8000_config[] __initdata = {
131};
132 130
133static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev) 131static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
134{ 132{
135 twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1); 133 twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1);
136 twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0); 134 twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0);
137 135
136 if (gpio_is_valid(dssdev->reset_gpio))
137 gpio_set_value(dssdev->reset_gpio, 1);
138 return 0; 138 return 0;
139} 139}
140 140
141static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev) 141static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
142{ 142{
143 if (gpio_is_valid(dssdev->reset_gpio))
144 gpio_set_value(dssdev->reset_gpio, 0);
143} 145}
146
144static int devkit8000_panel_enable_dvi(struct omap_dss_device *dssdev) 147static int devkit8000_panel_enable_dvi(struct omap_dss_device *dssdev)
145{ 148{
149 if (gpio_is_valid(dssdev->reset_gpio))
150 gpio_set_value(dssdev->reset_gpio, 1);
146 return 0; 151 return 0;
147} 152}
148 153
149static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev) 154static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
150{ 155{
156 if (gpio_is_valid(dssdev->reset_gpio))
157 gpio_set_value(dssdev->reset_gpio, 0);
151} 158}
152 159
153static int devkit8000_panel_enable_tv(struct omap_dss_device *dssdev) 160static struct regulator_consumer_supply devkit8000_vmmc1_supply =
154{ 161 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
155
156 return 0;
157}
158
159static void devkit8000_panel_disable_tv(struct omap_dss_device *dssdev)
160{
161}
162
163 162
164static struct regulator_consumer_supply devkit8000_vmmc1_supply = {
165 .supply = "vmmc",
166};
167
168static struct regulator_consumer_supply devkit8000_vsim_supply = {
169 .supply = "vmmc_aux",
170};
171 163
164/* ads7846 on SPI */
165static struct regulator_consumer_supply devkit8000_vio_supply =
166 REGULATOR_SUPPLY("vcc", "spi2.0");
172 167
173static struct omap_dss_device devkit8000_lcd_device = { 168static struct omap_dss_device devkit8000_lcd_device = {
174 .name = "lcd", 169 .name = "lcd",
175 .driver_name = "innolux_at_panel", 170 .driver_name = "generic_panel",
176 .type = OMAP_DISPLAY_TYPE_DPI, 171 .type = OMAP_DISPLAY_TYPE_DPI,
177 .phy.dpi.data_lines = 24, 172 .phy.dpi.data_lines = 24,
173 .reset_gpio = -EINVAL, /* will be replaced */
178 .platform_enable = devkit8000_panel_enable_lcd, 174 .platform_enable = devkit8000_panel_enable_lcd,
179 .platform_disable = devkit8000_panel_disable_lcd, 175 .platform_disable = devkit8000_panel_disable_lcd,
180}; 176};
@@ -183,6 +179,7 @@ static struct omap_dss_device devkit8000_dvi_device = {
183 .driver_name = "generic_panel", 179 .driver_name = "generic_panel",
184 .type = OMAP_DISPLAY_TYPE_DPI, 180 .type = OMAP_DISPLAY_TYPE_DPI,
185 .phy.dpi.data_lines = 24, 181 .phy.dpi.data_lines = 24,
182 .reset_gpio = -EINVAL, /* will be replaced */
186 .platform_enable = devkit8000_panel_enable_dvi, 183 .platform_enable = devkit8000_panel_enable_dvi,
187 .platform_disable = devkit8000_panel_disable_dvi, 184 .platform_disable = devkit8000_panel_disable_dvi,
188}; 185};
@@ -192,8 +189,6 @@ static struct omap_dss_device devkit8000_tv_device = {
192 .driver_name = "venc", 189 .driver_name = "venc",
193 .type = OMAP_DISPLAY_TYPE_VENC, 190 .type = OMAP_DISPLAY_TYPE_VENC,
194 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, 191 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
195 .platform_enable = devkit8000_panel_enable_tv,
196 .platform_disable = devkit8000_panel_disable_tv,
197}; 192};
198 193
199 194
@@ -217,10 +212,8 @@ static struct platform_device devkit8000_dss_device = {
217 }, 212 },
218}; 213};
219 214
220static struct regulator_consumer_supply devkit8000_vdda_dac_supply = { 215static struct regulator_consumer_supply devkit8000_vdda_dac_supply =
221 .supply = "vdda_dac", 216 REGULATOR_SUPPLY("vdda_dac", "omapdss");
222 .dev = &devkit8000_dss_device.dev,
223};
224 217
225static int board_keymap[] = { 218static int board_keymap[] = {
226 KEY(0, 0, KEY_1), 219 KEY(0, 0, KEY_1),
@@ -267,7 +260,21 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
267 260
268 /* link regulators to MMC adapters */ 261 /* link regulators to MMC adapters */
269 devkit8000_vmmc1_supply.dev = mmc[0].dev; 262 devkit8000_vmmc1_supply.dev = mmc[0].dev;
270 devkit8000_vsim_supply.dev = mmc[0].dev; 263
264 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
265 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
266
267 /* gpio + 1 is "LCD_PWREN" (out, active high) */
268 devkit8000_lcd_device.reset_gpio = gpio + 1;
269 gpio_request(devkit8000_lcd_device.reset_gpio, "LCD_PWREN");
270 /* Disable until needed */
271 gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0);
272
273 /* gpio + 7 is "DVI_PD" (out, active low) */
274 devkit8000_dvi_device.reset_gpio = gpio + 7;
275 gpio_request(devkit8000_dvi_device.reset_gpio, "DVI PowerDown");
276 /* Disable until needed */
277 gpio_direction_output(devkit8000_dvi_device.reset_gpio, 0);
271 278
272 return 0; 279 return 0;
273} 280}
@@ -283,16 +290,8 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
283 .setup = devkit8000_twl_gpio_setup, 290 .setup = devkit8000_twl_gpio_setup,
284}; 291};
285 292
286static struct regulator_consumer_supply devkit8000_vpll2_supplies[] = { 293static struct regulator_consumer_supply devkit8000_vpll1_supply =
287 { 294 REGULATOR_SUPPLY("vdds_dsi", "omapdss");
288 .supply = "vdvi",
289 .dev = &devkit8000_lcd_device.dev,
290 },
291 {
292 .supply = "vdds_dsi",
293 .dev = &devkit8000_dss_device.dev,
294 }
295};
296 295
297/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 296/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
298static struct regulator_init_data devkit8000_vmmc1 = { 297static struct regulator_init_data devkit8000_vmmc1 = {
@@ -309,21 +308,6 @@ static struct regulator_init_data devkit8000_vmmc1 = {
309 .consumer_supplies = &devkit8000_vmmc1_supply, 308 .consumer_supplies = &devkit8000_vmmc1_supply,
310}; 309};
311 310
312/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
313static struct regulator_init_data devkit8000_vsim = {
314 .constraints = {
315 .min_uV = 1800000,
316 .max_uV = 3000000,
317 .valid_modes_mask = REGULATOR_MODE_NORMAL
318 | REGULATOR_MODE_STANDBY,
319 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
320 | REGULATOR_CHANGE_MODE
321 | REGULATOR_CHANGE_STATUS,
322 },
323 .num_consumer_supplies = 1,
324 .consumer_supplies = &devkit8000_vsim_supply,
325};
326
327/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ 311/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
328static struct regulator_init_data devkit8000_vdac = { 312static struct regulator_init_data devkit8000_vdac = {
329 .constraints = { 313 .constraints = {
@@ -338,10 +322,9 @@ static struct regulator_init_data devkit8000_vdac = {
338 .consumer_supplies = &devkit8000_vdda_dac_supply, 322 .consumer_supplies = &devkit8000_vdda_dac_supply,
339}; 323};
340 324
341/* VPLL2 for digital video outputs */ 325/* VPLL1 for digital video outputs */
342static struct regulator_init_data devkit8000_vpll2 = { 326static struct regulator_init_data devkit8000_vpll1 = {
343 .constraints = { 327 .constraints = {
344 .name = "VDVI",
345 .min_uV = 1800000, 328 .min_uV = 1800000,
346 .max_uV = 1800000, 329 .max_uV = 1800000,
347 .valid_modes_mask = REGULATOR_MODE_NORMAL 330 .valid_modes_mask = REGULATOR_MODE_NORMAL
@@ -349,8 +332,23 @@ static struct regulator_init_data devkit8000_vpll2 = {
349 .valid_ops_mask = REGULATOR_CHANGE_MODE 332 .valid_ops_mask = REGULATOR_CHANGE_MODE
350 | REGULATOR_CHANGE_STATUS, 333 | REGULATOR_CHANGE_STATUS,
351 }, 334 },
352 .num_consumer_supplies = ARRAY_SIZE(devkit8000_vpll2_supplies), 335 .num_consumer_supplies = 1,
353 .consumer_supplies = devkit8000_vpll2_supplies, 336 .consumer_supplies = &devkit8000_vpll1_supply,
337};
338
339/* VAUX4 for ads7846 and nubs */
340static struct regulator_init_data devkit8000_vio = {
341 .constraints = {
342 .min_uV = 1800000,
343 .max_uV = 1800000,
344 .apply_uV = true,
345 .valid_modes_mask = REGULATOR_MODE_NORMAL
346 | REGULATOR_MODE_STANDBY,
347 .valid_ops_mask = REGULATOR_CHANGE_MODE
348 | REGULATOR_CHANGE_STATUS,
349 },
350 .num_consumer_supplies = 1,
351 .consumer_supplies = &devkit8000_vio_supply,
354}; 352};
355 353
356static struct twl4030_usb_data devkit8000_usb_data = { 354static struct twl4030_usb_data devkit8000_usb_data = {
@@ -375,15 +373,15 @@ static struct twl4030_platform_data devkit8000_twldata = {
375 .gpio = &devkit8000_gpio_data, 373 .gpio = &devkit8000_gpio_data,
376 .codec = &devkit8000_codec_data, 374 .codec = &devkit8000_codec_data,
377 .vmmc1 = &devkit8000_vmmc1, 375 .vmmc1 = &devkit8000_vmmc1,
378 .vsim = &devkit8000_vsim,
379 .vdac = &devkit8000_vdac, 376 .vdac = &devkit8000_vdac,
380 .vpll2 = &devkit8000_vpll2, 377 .vpll1 = &devkit8000_vpll1,
378 .vio = &devkit8000_vio,
381 .keypad = &devkit8000_kp_data, 379 .keypad = &devkit8000_kp_data,
382}; 380};
383 381
384static struct i2c_board_info __initdata devkit8000_i2c_boardinfo[] = { 382static struct i2c_board_info __initdata devkit8000_i2c_boardinfo[] = {
385 { 383 {
386 I2C_BOARD_INFO("twl4030", 0x48), 384 I2C_BOARD_INFO("tps65930", 0x48),
387 .flags = I2C_CLIENT_WAKE, 385 .flags = I2C_CLIENT_WAKE,
388 .irq = INT_34XX_SYS_NIRQ, 386 .irq = INT_34XX_SYS_NIRQ,
389 .platform_data = &devkit8000_twldata, 387 .platform_data = &devkit8000_twldata,
@@ -465,8 +463,6 @@ static struct platform_device keys_gpio = {
465 463
466static void __init devkit8000_init_irq(void) 464static void __init devkit8000_init_irq(void)
467{ 465{
468 omap_board_config = devkit8000_config;
469 omap_board_config_size = ARRAY_SIZE(devkit8000_config);
470 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 466 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
471 mt46h32m32lf6_sdrc_params); 467 mt46h32m32lf6_sdrc_params);
472 omap_init_irq(); 468 omap_init_irq();
@@ -811,8 +807,6 @@ static void __init devkit8000_init(void)
811 devkit8000_i2c_init(); 807 devkit8000_i2c_init();
812 platform_add_devices(devkit8000_devices, 808 platform_add_devices(devkit8000_devices,
813 ARRAY_SIZE(devkit8000_devices)); 809 ARRAY_SIZE(devkit8000_devices));
814 omap_board_config = devkit8000_config;
815 omap_board_config_size = ARRAY_SIZE(devkit8000_config);
816 810
817 spi_register_board_info(devkit8000_spi_board_info, 811 spi_register_board_info(devkit8000_spi_board_info,
818 ARRAY_SIZE(devkit8000_spi_board_info)); 812 ARRAY_SIZE(devkit8000_spi_board_info));
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 16cc06860670..9a7f790d8c3a 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -26,7 +26,6 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include <mach/gpio.h> 28#include <mach/gpio.h>
29#include <plat/mux.h>
30#include <plat/usb.h> 29#include <plat/usb.h>
31#include <plat/board.h> 30#include <plat/board.h>
32#include <plat/common.h> 31#include <plat/common.h>
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 0665f2c8dc8e..3240c6a7d9e7 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -33,7 +33,6 @@
33 33
34#include <plat/control.h> 34#include <plat/control.h>
35#include <mach/gpio.h> 35#include <mach/gpio.h>
36#include <plat/mux.h>
37#include <plat/usb.h> 36#include <plat/usb.h>
38#include <plat/board.h> 37#include <plat/board.h>
39#include <plat/common.h> 38#include <plat/common.h>
@@ -42,6 +41,8 @@
42#include <plat/dma.h> 41#include <plat/dma.h>
43#include <plat/gpmc.h> 42#include <plat/gpmc.h>
44 43
44#include "mux.h"
45
45#define H4_FLASH_CS 0 46#define H4_FLASH_CS 0
46#define H4_SMC91X_CS 1 47#define H4_SMC91X_CS 1
47 48
@@ -246,7 +247,7 @@ static inline void __init h4_init_debug(void)
246 247
247 udelay(100); 248 udelay(100);
248 249
249 omap_cfg_reg(M15_24XX_GPIO92); 250 omap_mux_init_gpio(92, 0);
250 if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0) 251 if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0)
251 gpmc_cs_free(eth_cs); 252 gpmc_cs_free(eth_cs);
252 253
@@ -272,27 +273,6 @@ static struct omap_lcd_config h4_lcd_config __initdata = {
272}; 273};
273 274
274static struct omap_usb_config h4_usb_config __initdata = { 275static struct omap_usb_config h4_usb_config __initdata = {
275#ifdef CONFIG_MACH_OMAP2_H4_USB1
276 /* NOTE: usb1 could also be used with 3 wire signaling */
277 .pins[1] = 4,
278#endif
279
280#ifdef CONFIG_MACH_OMAP_H4_OTG
281 /* S1.10 ON -- USB OTG port
282 * usb0 switched to Mini-AB port and isp1301 transceiver;
283 * S2.POS3 = OFF, S2.POS4 = ON ... to allow battery charging
284 */
285 .otg = 1,
286 .pins[0] = 4,
287#ifdef CONFIG_USB_GADGET_OMAP
288 /* use OTG cable, or standard A-to-MiniB */
289 .hmc_mode = 0x14, /* 0:dev/otg 1:host 2:disable */
290#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
291 /* use OTG cable, or NONSTANDARD (B-to-MiniB) */
292 .hmc_mode = 0x11, /* 0:host 1:host 2:disable */
293#endif /* XX */
294
295#else
296 /* S1.10 OFF -- usb "download port" 276 /* S1.10 OFF -- usb "download port"
297 * usb0 switched to Mini-B port and isp1105 transceiver; 277 * usb0 switched to Mini-B port and isp1105 transceiver;
298 * S2.POS3 = ON, S2.POS4 = OFF ... to enable battery charging 278 * S2.POS3 = ON, S2.POS4 = OFF ... to enable battery charging
@@ -301,7 +281,6 @@ static struct omap_usb_config h4_usb_config __initdata = {
301 .pins[0] = 3, 281 .pins[0] = 3,
302/* .hmc_mode = 0x14,*/ /* 0:dev 1:host 2:disable */ 282/* .hmc_mode = 0x14,*/ /* 0:dev 1:host 2:disable */
303 .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */ 283 .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */
304#endif
305}; 284};
306 285
307static struct omap_board_config_kernel h4_config[] = { 286static struct omap_board_config_kernel h4_config[] = {
@@ -338,31 +317,54 @@ static struct i2c_board_info __initdata h4_i2c_board_info[] = {
338 }, 317 },
339}; 318};
340 319
320#ifdef CONFIG_OMAP_MUX
321static struct omap_board_mux board_mux[] __initdata = {
322 { .reg_offset = OMAP_MUX_TERMINATOR },
323};
324#else
325#define board_mux NULL
326#endif
327
341static void __init omap_h4_init(void) 328static void __init omap_h4_init(void)
342{ 329{
330 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF);
331
343 /* 332 /*
344 * Make sure the serial ports are muxed on at this point. 333 * Make sure the serial ports are muxed on at this point.
345 * You have to mux them off in device drivers later on 334 * You have to mux them off in device drivers later on
346 * if not needed. 335 * if not needed.
347 */ 336 */
348#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
349 omap_cfg_reg(K15_24XX_UART3_TX);
350 omap_cfg_reg(K14_24XX_UART3_RX);
351#endif
352 337
353#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) 338#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
339 omap_mux_init_gpio(88, OMAP_PULL_ENA | OMAP_PULL_UP);
340 omap_mux_init_gpio(89, OMAP_PULL_ENA | OMAP_PULL_UP);
341 omap_mux_init_gpio(124, OMAP_PULL_ENA | OMAP_PULL_UP);
342 omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP);
354 if (omap_has_menelaus()) { 343 if (omap_has_menelaus()) {
344 omap_mux_init_signal("sdrc_a14.gpio0",
345 OMAP_PULL_ENA | OMAP_PULL_UP);
346 omap_mux_init_signal("vlynq_rx0.gpio_15", 0);
347 omap_mux_init_signal("gpio_98", 0);
355 row_gpios[5] = 0; 348 row_gpios[5] = 0;
356 col_gpios[2] = 15; 349 col_gpios[2] = 15;
357 col_gpios[6] = 18; 350 col_gpios[6] = 18;
351 } else {
352 omap_mux_init_signal("gpio_96", OMAP_PULL_ENA | OMAP_PULL_UP);
353 omap_mux_init_signal("gpio_100", 0);
354 omap_mux_init_signal("gpio_98", 0);
358 } 355 }
356 omap_mux_init_signal("gpio_90", 0);
357 omap_mux_init_signal("gpio_91", 0);
358 omap_mux_init_signal("gpio_36", 0);
359 omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0);
360 omap_mux_init_signal("gpio_97", 0);
359#endif 361#endif
360 362
361 i2c_register_board_info(1, h4_i2c_board_info, 363 i2c_register_board_info(1, h4_i2c_board_info,
362 ARRAY_SIZE(h4_i2c_board_info)); 364 ARRAY_SIZE(h4_i2c_board_info));
363 365
364 platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); 366 platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
365 omap_usb_init(&h4_usb_config); 367 omap2_usbfs_init(&h4_usb_config);
366 omap_serial_init(); 368 omap_serial_init();
367} 369}
368 370
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 3ccc34ebdcc7..5b9bbdc983bd 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -33,6 +33,8 @@
33#include <plat/mmc.h> 33#include <plat/mmc.h>
34#include <plat/serial.h> 34#include <plat/serial.h>
35 35
36#include "mux.h"
37
36static int slot1_cover_open; 38static int slot1_cover_open;
37static int slot2_cover_open; 39static int slot2_cover_open;
38static struct device *mmc_device; 40static struct device *mmc_device;
@@ -649,8 +651,17 @@ static void __init n8x0_init_irq(void)
649 omap_gpio_init(); 651 omap_gpio_init();
650} 652}
651 653
654#ifdef CONFIG_OMAP_MUX
655static struct omap_board_mux board_mux[] __initdata = {
656 { .reg_offset = OMAP_MUX_TERMINATOR },
657};
658#else
659#define board_mux NULL
660#endif
661
652static void __init n8x0_init_machine(void) 662static void __init n8x0_init_machine(void)
653{ 663{
664 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
654 /* FIXME: add n810 spi devices */ 665 /* FIXME: add n810 spi devices */
655 spi_register_board_info(n800_spi_board_info, 666 spi_register_board_info(n800_spi_board_info,
656 ARRAY_SIZE(n800_spi_board_info)); 667 ARRAY_SIZE(n800_spi_board_info));
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index db06dc910ba7..a58bdef1b4da 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -25,6 +25,9 @@
25#include <linux/spi/ads7846.h> 25#include <linux/spi/ads7846.h>
26#include <linux/regulator/machine.h> 26#include <linux/regulator/machine.h>
27#include <linux/i2c/twl.h> 27#include <linux/i2c/twl.h>
28#include <linux/spi/wl12xx.h>
29#include <linux/mtd/partitions.h>
30#include <linux/mtd/nand.h>
28#include <linux/leds.h> 31#include <linux/leds.h>
29#include <linux/input.h> 32#include <linux/input.h>
30#include <linux/input/matrix_keypad.h> 33#include <linux/input/matrix_keypad.h>
@@ -41,15 +44,49 @@
41#include <plat/mcspi.h> 44#include <plat/mcspi.h>
42#include <plat/usb.h> 45#include <plat/usb.h>
43#include <plat/display.h> 46#include <plat/display.h>
47#include <plat/nand.h>
44 48
45#include "mux.h" 49#include "mux.h"
46#include "sdram-micron-mt46h32m32lf-6.h" 50#include "sdram-micron-mt46h32m32lf-6.h"
47#include "hsmmc.h" 51#include "hsmmc.h"
48 52
53#define PANDORA_WIFI_IRQ_GPIO 21
54#define PANDORA_WIFI_NRESET_GPIO 23
49#define OMAP3_PANDORA_TS_GPIO 94 55#define OMAP3_PANDORA_TS_GPIO 94
50 56
51/* hardware debounce: (value + 1) * 31us */ 57#define NAND_BLOCK_SIZE SZ_128K
52#define GPIO_DEBOUNCE_TIME 127 58
59static struct mtd_partition omap3pandora_nand_partitions[] = {
60 {
61 .name = "xloader",
62 .offset = 0,
63 .size = 4 * NAND_BLOCK_SIZE,
64 .mask_flags = MTD_WRITEABLE
65 }, {
66 .name = "uboot",
67 .offset = MTDPART_OFS_APPEND,
68 .size = 15 * NAND_BLOCK_SIZE,
69 }, {
70 .name = "uboot-env",
71 .offset = MTDPART_OFS_APPEND,
72 .size = 1 * NAND_BLOCK_SIZE,
73 }, {
74 .name = "boot",
75 .offset = MTDPART_OFS_APPEND,
76 .size = 80 * NAND_BLOCK_SIZE,
77 }, {
78 .name = "rootfs",
79 .offset = MTDPART_OFS_APPEND,
80 .size = MTDPART_SIZ_FULL,
81 },
82};
83
84static struct omap_nand_platform_data pandora_nand_data = {
85 .cs = 0,
86 .devsize = 1, /* '0' for 8-bit, '1' for 16-bit device */
87 .parts = omap3pandora_nand_partitions,
88 .nr_parts = ARRAY_SIZE(omap3pandora_nand_partitions),
89};
53 90
54static struct gpio_led pandora_gpio_leds[] = { 91static struct gpio_led pandora_gpio_leds[] = {
55 { 92 {
@@ -88,6 +125,7 @@ static struct platform_device pandora_leds_gpio = {
88 .type = ev_type, \ 125 .type = ev_type, \
89 .code = ev_code, \ 126 .code = ev_code, \
90 .active_low = act_low, \ 127 .active_low = act_low, \
128 .debounce_interval = 4, \
91 .desc = "btn " descr, \ 129 .desc = "btn " descr, \
92} 130}
93 131
@@ -99,14 +137,14 @@ static struct gpio_keys_button pandora_gpio_keys[] = {
99 GPIO_BUTTON_LOW(103, KEY_DOWN, "down"), 137 GPIO_BUTTON_LOW(103, KEY_DOWN, "down"),
100 GPIO_BUTTON_LOW(96, KEY_LEFT, "left"), 138 GPIO_BUTTON_LOW(96, KEY_LEFT, "left"),
101 GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"), 139 GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"),
102 GPIO_BUTTON_LOW(109, KEY_KP1, "game 1"), 140 GPIO_BUTTON_LOW(109, KEY_PAGEUP, "game 1"),
103 GPIO_BUTTON_LOW(111, KEY_KP2, "game 2"), 141 GPIO_BUTTON_LOW(111, KEY_END, "game 2"),
104 GPIO_BUTTON_LOW(106, KEY_KP3, "game 3"), 142 GPIO_BUTTON_LOW(106, KEY_PAGEDOWN, "game 3"),
105 GPIO_BUTTON_LOW(101, KEY_KP4, "game 4"), 143 GPIO_BUTTON_LOW(101, KEY_HOME, "game 4"),
106 GPIO_BUTTON_LOW(102, BTN_TL, "l"), 144 GPIO_BUTTON_LOW(102, KEY_RIGHTSHIFT, "l"),
107 GPIO_BUTTON_LOW(97, BTN_TL2, "l2"), 145 GPIO_BUTTON_LOW(97, KEY_KPPLUS, "l2"),
108 GPIO_BUTTON_LOW(105, BTN_TR, "r"), 146 GPIO_BUTTON_LOW(105, KEY_RIGHTCTRL, "r"),
109 GPIO_BUTTON_LOW(107, BTN_TR2, "r2"), 147 GPIO_BUTTON_LOW(107, KEY_KPMINUS, "r2"),
110 GPIO_BUTTON_LOW(104, KEY_LEFTCTRL, "ctrl"), 148 GPIO_BUTTON_LOW(104, KEY_LEFTCTRL, "ctrl"),
111 GPIO_BUTTON_LOW(99, KEY_MENU, "menu"), 149 GPIO_BUTTON_LOW(99, KEY_MENU, "menu"),
112 GPIO_BUTTON_LOW(176, KEY_COFFEE, "hold"), 150 GPIO_BUTTON_LOW(176, KEY_COFFEE, "hold"),
@@ -127,14 +165,7 @@ static struct platform_device pandora_keys_gpio = {
127 }, 165 },
128}; 166};
129 167
130static void __init pandora_keys_gpio_init(void) 168static const uint32_t board_keymap[] = {
131{
132 /* set debounce time for GPIO banks 4 and 6 */
133 gpio_set_debounce(32 * 3, GPIO_DEBOUNCE_TIME);
134 gpio_set_debounce(32 * 5, GPIO_DEBOUNCE_TIME);
135}
136
137static int board_keymap[] = {
138 /* row, col, code */ 169 /* row, col, code */
139 KEY(0, 0, KEY_9), 170 KEY(0, 0, KEY_9),
140 KEY(0, 1, KEY_8), 171 KEY(0, 1, KEY_8),
@@ -255,12 +286,33 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
255static int omap3pandora_twl_gpio_setup(struct device *dev, 286static int omap3pandora_twl_gpio_setup(struct device *dev,
256 unsigned gpio, unsigned ngpio) 287 unsigned gpio, unsigned ngpio)
257{ 288{
289 int ret, gpio_32khz;
290
258 /* gpio + {0,1} is "mmc{0,1}_cd" (input/IRQ) */ 291 /* gpio + {0,1} is "mmc{0,1}_cd" (input/IRQ) */
259 omap3pandora_mmc[0].gpio_cd = gpio + 0; 292 omap3pandora_mmc[0].gpio_cd = gpio + 0;
260 omap3pandora_mmc[1].gpio_cd = gpio + 1; 293 omap3pandora_mmc[1].gpio_cd = gpio + 1;
261 omap2_hsmmc_init(omap3pandora_mmc); 294 omap2_hsmmc_init(omap3pandora_mmc);
262 295
296 /* gpio + 13 drives 32kHz buffer for wifi module */
297 gpio_32khz = gpio + 13;
298 ret = gpio_request(gpio_32khz, "wifi 32kHz");
299 if (ret < 0) {
300 pr_err("Cannot get GPIO line %d, ret=%d\n", gpio_32khz, ret);
301 goto fail;
302 }
303
304 ret = gpio_direction_output(gpio_32khz, 1);
305 if (ret < 0) {
306 pr_err("Cannot set GPIO line %d, ret=%d\n", gpio_32khz, ret);
307 goto fail_direction;
308 }
309
263 return 0; 310 return 0;
311
312fail_direction:
313 gpio_free(gpio_32khz);
314fail:
315 return -ENODEV;
264} 316}
265 317
266static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { 318static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
@@ -539,10 +591,67 @@ static void __init omap3pandora_init_irq(void)
539 omap_gpio_init(); 591 omap_gpio_init();
540} 592}
541 593
594static void pandora_wl1251_set_power(bool enable)
595{
596 /*
597 * Keep power always on until wl1251_sdio driver learns to re-init
598 * the chip after powering it down and back up.
599 */
600}
601
602static struct wl12xx_platform_data pandora_wl1251_pdata = {
603 .set_power = pandora_wl1251_set_power,
604 .use_eeprom = true,
605};
606
607static struct platform_device pandora_wl1251_data = {
608 .name = "wl1251_data",
609 .id = -1,
610 .dev = {
611 .platform_data = &pandora_wl1251_pdata,
612 },
613};
614
615static void pandora_wl1251_init(void)
616{
617 int ret;
618
619 ret = gpio_request(PANDORA_WIFI_IRQ_GPIO, "wl1251 irq");
620 if (ret < 0)
621 goto fail;
622
623 ret = gpio_direction_input(PANDORA_WIFI_IRQ_GPIO);
624 if (ret < 0)
625 goto fail_irq;
626
627 pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
628 if (pandora_wl1251_pdata.irq < 0)
629 goto fail_irq;
630
631 ret = gpio_request(PANDORA_WIFI_NRESET_GPIO, "wl1251 nreset");
632 if (ret < 0)
633 goto fail_irq;
634
635 /* start powered so that it probes with MMC subsystem */
636 ret = gpio_direction_output(PANDORA_WIFI_NRESET_GPIO, 1);
637 if (ret < 0)
638 goto fail_nreset;
639
640 return;
641
642fail_nreset:
643 gpio_free(PANDORA_WIFI_NRESET_GPIO);
644fail_irq:
645 gpio_free(PANDORA_WIFI_IRQ_GPIO);
646fail:
647 printk(KERN_ERR "wl1251 board initialisation failed\n");
648}
649
542static struct platform_device *omap3pandora_devices[] __initdata = { 650static struct platform_device *omap3pandora_devices[] __initdata = {
543 &pandora_leds_gpio, 651 &pandora_leds_gpio,
544 &pandora_keys_gpio, 652 &pandora_keys_gpio,
545 &pandora_dss_device, 653 &pandora_dss_device,
654 &pandora_wl1251_data,
546}; 655};
547 656
548static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 657static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
@@ -575,6 +684,7 @@ static void __init omap3pandora_init(void)
575{ 684{
576 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 685 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
577 omap3pandora_i2c_init(); 686 omap3pandora_i2c_init();
687 pandora_wl1251_init();
578 platform_add_devices(omap3pandora_devices, 688 platform_add_devices(omap3pandora_devices,
579 ARRAY_SIZE(omap3pandora_devices)); 689 ARRAY_SIZE(omap3pandora_devices));
580 omap_serial_init(); 690 omap_serial_init();
@@ -582,8 +692,8 @@ static void __init omap3pandora_init(void)
582 ARRAY_SIZE(omap3pandora_spi_board_info)); 692 ARRAY_SIZE(omap3pandora_spi_board_info));
583 omap3pandora_ads7846_init(); 693 omap3pandora_ads7846_init();
584 usb_ehci_init(&ehci_pdata); 694 usb_ehci_init(&ehci_pdata);
585 pandora_keys_gpio_init();
586 usb_musb_init(&musb_board_data); 695 usb_musb_init(&musb_board_data);
696 gpmc_nand_init(&pandora_nand_data);
587 697
588 /* Ensure SDRC pins are mux'd for self-refresh */ 698 /* Ensure SDRC pins are mux'd for self-refresh */
589 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 699 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
new file mode 100644
index 000000000000..c03d1d56db56
--- /dev/null
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -0,0 +1,304 @@
1/*
2 * Board support file for OMAP4430 based PandaBoard.
3 *
4 * Copyright (C) 2010 Texas Instruments
5 *
6 * Author: David Anders <x0132446@ti.com>
7 *
8 * Based on mach-omap2/board-4430sdp.c
9 *
10 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
11 *
12 * Based on mach-omap2/board-3430sdp.c
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 */
18
19#include <linux/kernel.h>
20#include <linux/init.h>
21#include <linux/platform_device.h>
22#include <linux/io.h>
23#include <linux/gpio.h>
24#include <linux/usb/otg.h>
25#include <linux/i2c/twl.h>
26#include <linux/regulator/machine.h>
27
28#include <mach/hardware.h>
29#include <mach/omap4-common.h>
30#include <asm/mach-types.h>
31#include <asm/mach/arch.h>
32#include <asm/mach/map.h>
33
34#include <plat/board.h>
35#include <plat/common.h>
36#include <plat/control.h>
37#include <plat/timer-gp.h>
38#include <plat/usb.h>
39#include <plat/mmc.h>
40#include "hsmmc.h"
41
42
43static void __init omap4_panda_init_irq(void)
44{
45 omap2_init_common_hw(NULL, NULL);
46 gic_init_irq();
47 omap_gpio_init();
48}
49
50static struct omap_musb_board_data musb_board_data = {
51 .interface_type = MUSB_INTERFACE_UTMI,
52 .mode = MUSB_PERIPHERAL,
53 .power = 100,
54};
55
56static struct omap2_hsmmc_info mmc[] = {
57 {
58 .mmc = 1,
59 .wires = 8,
60 .gpio_wp = -EINVAL,
61 },
62 {} /* Terminator */
63};
64
65static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
66 {
67 .supply = "vmmc",
68 .dev_name = "mmci-omap-hs.0",
69 },
70 {
71 .supply = "vmmc",
72 .dev_name = "mmci-omap-hs.1",
73 },
74};
75
76static int omap4_twl6030_hsmmc_late_init(struct device *dev)
77{
78 int ret = 0;
79 struct platform_device *pdev = container_of(dev,
80 struct platform_device, dev);
81 struct omap_mmc_platform_data *pdata = dev->platform_data;
82
83 /* Setting MMC1 Card detect Irq */
84 if (pdev->id == 0)
85 pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
86 MMCDETECT_INTR_OFFSET;
87 return ret;
88}
89
90static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
91{
92 struct omap_mmc_platform_data *pdata = dev->platform_data;
93
94 pdata->init = omap4_twl6030_hsmmc_late_init;
95}
96
97static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
98{
99 struct omap2_hsmmc_info *c;
100
101 omap2_hsmmc_init(controllers);
102 for (c = controllers; c->mmc; c++)
103 omap4_twl6030_hsmmc_set_late_init(c->dev);
104
105 return 0;
106}
107
108static struct regulator_init_data omap4_panda_vaux1 = {
109 .constraints = {
110 .min_uV = 1000000,
111 .max_uV = 3000000,
112 .apply_uV = true,
113 .valid_modes_mask = REGULATOR_MODE_NORMAL
114 | REGULATOR_MODE_STANDBY,
115 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
116 | REGULATOR_CHANGE_MODE
117 | REGULATOR_CHANGE_STATUS,
118 },
119};
120
121static struct regulator_init_data omap4_panda_vaux2 = {
122 .constraints = {
123 .min_uV = 1200000,
124 .max_uV = 2800000,
125 .apply_uV = true,
126 .valid_modes_mask = REGULATOR_MODE_NORMAL
127 | REGULATOR_MODE_STANDBY,
128 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
129 | REGULATOR_CHANGE_MODE
130 | REGULATOR_CHANGE_STATUS,
131 },
132};
133
134static struct regulator_init_data omap4_panda_vaux3 = {
135 .constraints = {
136 .min_uV = 1000000,
137 .max_uV = 3000000,
138 .apply_uV = true,
139 .valid_modes_mask = REGULATOR_MODE_NORMAL
140 | REGULATOR_MODE_STANDBY,
141 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
142 | REGULATOR_CHANGE_MODE
143 | REGULATOR_CHANGE_STATUS,
144 },
145};
146
147/* VMMC1 for MMC1 card */
148static struct regulator_init_data omap4_panda_vmmc = {
149 .constraints = {
150 .min_uV = 1200000,
151 .max_uV = 3000000,
152 .apply_uV = true,
153 .valid_modes_mask = REGULATOR_MODE_NORMAL
154 | REGULATOR_MODE_STANDBY,
155 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
156 | REGULATOR_CHANGE_MODE
157 | REGULATOR_CHANGE_STATUS,
158 },
159 .num_consumer_supplies = 2,
160 .consumer_supplies = omap4_panda_vmmc_supply,
161};
162
163static struct regulator_init_data omap4_panda_vpp = {
164 .constraints = {
165 .min_uV = 1800000,
166 .max_uV = 2500000,
167 .apply_uV = true,
168 .valid_modes_mask = REGULATOR_MODE_NORMAL
169 | REGULATOR_MODE_STANDBY,
170 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
171 | REGULATOR_CHANGE_MODE
172 | REGULATOR_CHANGE_STATUS,
173 },
174};
175
176static struct regulator_init_data omap4_panda_vusim = {
177 .constraints = {
178 .min_uV = 1200000,
179 .max_uV = 2900000,
180 .apply_uV = true,
181 .valid_modes_mask = REGULATOR_MODE_NORMAL
182 | REGULATOR_MODE_STANDBY,
183 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
184 | REGULATOR_CHANGE_MODE
185 | REGULATOR_CHANGE_STATUS,
186 },
187};
188
189static struct regulator_init_data omap4_panda_vana = {
190 .constraints = {
191 .min_uV = 2100000,
192 .max_uV = 2100000,
193 .apply_uV = true,
194 .valid_modes_mask = REGULATOR_MODE_NORMAL
195 | REGULATOR_MODE_STANDBY,
196 .valid_ops_mask = REGULATOR_CHANGE_MODE
197 | REGULATOR_CHANGE_STATUS,
198 },
199};
200
201static struct regulator_init_data omap4_panda_vcxio = {
202 .constraints = {
203 .min_uV = 1800000,
204 .max_uV = 1800000,
205 .apply_uV = true,
206 .valid_modes_mask = REGULATOR_MODE_NORMAL
207 | REGULATOR_MODE_STANDBY,
208 .valid_ops_mask = REGULATOR_CHANGE_MODE
209 | REGULATOR_CHANGE_STATUS,
210 },
211};
212
213static struct regulator_init_data omap4_panda_vdac = {
214 .constraints = {
215 .min_uV = 1800000,
216 .max_uV = 1800000,
217 .apply_uV = true,
218 .valid_modes_mask = REGULATOR_MODE_NORMAL
219 | REGULATOR_MODE_STANDBY,
220 .valid_ops_mask = REGULATOR_CHANGE_MODE
221 | REGULATOR_CHANGE_STATUS,
222 },
223};
224
225static struct regulator_init_data omap4_panda_vusb = {
226 .constraints = {
227 .min_uV = 3300000,
228 .max_uV = 3300000,
229 .apply_uV = true,
230 .valid_modes_mask = REGULATOR_MODE_NORMAL
231 | REGULATOR_MODE_STANDBY,
232 .valid_ops_mask = REGULATOR_CHANGE_MODE
233 | REGULATOR_CHANGE_STATUS,
234 },
235};
236
237static struct twl4030_platform_data omap4_panda_twldata = {
238 .irq_base = TWL6030_IRQ_BASE,
239 .irq_end = TWL6030_IRQ_END,
240
241 /* Regulators */
242 .vmmc = &omap4_panda_vmmc,
243 .vpp = &omap4_panda_vpp,
244 .vusim = &omap4_panda_vusim,
245 .vana = &omap4_panda_vana,
246 .vcxio = &omap4_panda_vcxio,
247 .vdac = &omap4_panda_vdac,
248 .vusb = &omap4_panda_vusb,
249 .vaux1 = &omap4_panda_vaux1,
250 .vaux2 = &omap4_panda_vaux2,
251 .vaux3 = &omap4_panda_vaux3,
252};
253
254static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = {
255 {
256 I2C_BOARD_INFO("twl6030", 0x48),
257 .flags = I2C_CLIENT_WAKE,
258 .irq = OMAP44XX_IRQ_SYS_1N,
259 .platform_data = &omap4_panda_twldata,
260 },
261};
262static int __init omap4_panda_i2c_init(void)
263{
264 /*
265 * Phoenix Audio IC needs I2C1 to
266 * start with 400 KHz or less
267 */
268 omap_register_i2c_bus(1, 400, omap4_panda_i2c_boardinfo,
269 ARRAY_SIZE(omap4_panda_i2c_boardinfo));
270 omap_register_i2c_bus(2, 400, NULL, 0);
271 omap_register_i2c_bus(3, 400, NULL, 0);
272 omap_register_i2c_bus(4, 400, NULL, 0);
273 return 0;
274}
275static void __init omap4_panda_init(void)
276{
277 int status;
278
279 omap4_panda_i2c_init();
280 omap_serial_init();
281 omap4_twl6030_hsmmc_init(mmc);
282 /* OMAP4 Panda uses internal transceiver so register nop transceiver */
283 usb_nop_xceiv_register();
284 /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
285 if (!cpu_is_omap44xx())
286 usb_musb_init(&musb_board_data);
287}
288
289static void __init omap4_panda_map_io(void)
290{
291 omap2_set_globals_443x();
292 omap44xx_map_common_io();
293}
294
295MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
296 /* Maintainer: David Anders - Texas Instruments Inc */
297 .phys_io = 0x48000000,
298 .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
299 .boot_params = 0x80000100,
300 .map_io = omap4_panda_map_io,
301 .init_irq = omap4_panda_init_irq,
302 .init_machine = omap4_panda_init,
303 .timer = &omap_timer,
304MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 03483920ed6e..9a5eb87425fc 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -25,7 +25,6 @@
25#include <linux/mmc/host.h> 25#include <linux/mmc/host.h>
26 26
27#include <plat/mcspi.h> 27#include <plat/mcspi.h>
28#include <plat/mux.h>
29#include <plat/board.h> 28#include <plat/board.h>
30#include <plat/common.h> 29#include <plat/common.h>
31#include <plat/dma.h> 30#include <plat/dma.h>
@@ -33,6 +32,11 @@
33#include <plat/onenand.h> 32#include <plat/onenand.h>
34#include <plat/gpmc-smc91x.h> 33#include <plat/gpmc-smc91x.h>
35 34
35#include <sound/tlv320aic3x.h>
36#include <sound/tpa6130a2-plat.h>
37
38#include <../drivers/staging/iio/light/tsl2563.h>
39
36#include "mux.h" 40#include "mux.h"
37#include "hsmmc.h" 41#include "hsmmc.h"
38 42
@@ -51,6 +55,12 @@ enum {
51 55
52static struct wl12xx_platform_data wl1251_pdata; 56static struct wl12xx_platform_data wl1251_pdata;
53 57
58#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE)
59static struct tsl2563_platform_data rx51_tsl2563_platform_data = {
60 .cover_comp_gain = 16,
61};
62#endif
63
54static struct omap2_mcspi_device_config wl1251_mcspi_config = { 64static struct omap2_mcspi_device_config wl1251_mcspi_config = {
55 .turbo_mode = 0, 65 .turbo_mode = 0,
56 .single_channel = 1, 66 .single_channel = 1,
@@ -311,48 +321,29 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
311 {} /* Terminator */ 321 {} /* Terminator */
312}; 322};
313 323
314static struct regulator_consumer_supply rx51_vmmc1_supply = { 324static struct regulator_consumer_supply rx51_vmmc1_supply =
315 .supply = "vmmc", 325 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
316 .dev_name = "mmci-omap-hs.0",
317};
318 326
319static struct regulator_consumer_supply rx51_vaux3_supply = { 327static struct regulator_consumer_supply rx51_vaux3_supply =
320 .supply = "vmmc", 328 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
321 .dev_name = "mmci-omap-hs.1",
322};
323 329
324static struct regulator_consumer_supply rx51_vsim_supply = { 330static struct regulator_consumer_supply rx51_vsim_supply =
325 .supply = "vmmc_aux", 331 REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
326 .dev_name = "mmci-omap-hs.1",
327};
328 332
329static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { 333static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
330 /* tlv320aic3x analog supplies */ 334 /* tlv320aic3x analog supplies */
331 { 335 REGULATOR_SUPPLY("AVDD", "2-0018"),
332 .supply = "AVDD", 336 REGULATOR_SUPPLY("DRVDD", "2-0018"),
333 .dev_name = "2-0018", 337 /* tpa6130a2 */
334 }, 338 REGULATOR_SUPPLY("Vdd", "2-0060"),
335 {
336 .supply = "DRVDD",
337 .dev_name = "2-0018",
338 },
339 /* Keep vmmc as last item. It is not iterated for newer boards */ 339 /* Keep vmmc as last item. It is not iterated for newer boards */
340 { 340 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
341 .supply = "vmmc",
342 .dev_name = "mmci-omap-hs.1",
343 },
344}; 341};
345 342
346static struct regulator_consumer_supply rx51_vio_supplies[] = { 343static struct regulator_consumer_supply rx51_vio_supplies[] = {
347 /* tlv320aic3x digital supplies */ 344 /* tlv320aic3x digital supplies */
348 { 345 REGULATOR_SUPPLY("IOVDD", "2-0018"),
349 .supply = "IOVDD", 346 REGULATOR_SUPPLY("DVDD", "2-0018"),
350 .dev_name = "2-0018"
351 },
352 {
353 .supply = "DVDD",
354 .dev_name = "2-0018"
355 },
356}; 347};
357 348
358#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) 349#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
@@ -373,6 +364,7 @@ static struct regulator_init_data rx51_vaux1 = {
373 .name = "V28", 364 .name = "V28",
374 .min_uV = 2800000, 365 .min_uV = 2800000,
375 .max_uV = 2800000, 366 .max_uV = 2800000,
367 .always_on = true, /* due battery cover sensor */
376 .valid_modes_mask = REGULATOR_MODE_NORMAL 368 .valid_modes_mask = REGULATOR_MODE_NORMAL
377 | REGULATOR_MODE_STANDBY, 369 | REGULATOR_MODE_STANDBY,
378 .valid_ops_mask = REGULATOR_CHANGE_MODE 370 .valid_ops_mask = REGULATOR_CHANGE_MODE
@@ -718,6 +710,15 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
718 .vio = &rx51_vio, 710 .vio = &rx51_vio,
719}; 711};
720 712
713static struct aic3x_pdata rx51_aic3x_data __initdata = {
714 .gpio_reset = 60,
715};
716
717static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = {
718 .id = TPA6130A2,
719 .power_gpio = 98,
720};
721
721static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { 722static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = {
722 { 723 {
723 I2C_BOARD_INFO("twl5030", 0x48), 724 I2C_BOARD_INFO("twl5030", 0x48),
@@ -730,7 +731,18 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = {
730static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { 731static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = {
731 { 732 {
732 I2C_BOARD_INFO("tlv320aic3x", 0x18), 733 I2C_BOARD_INFO("tlv320aic3x", 0x18),
734 .platform_data = &rx51_aic3x_data,
735 },
736#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE)
737 {
738 I2C_BOARD_INFO("tsl2563", 0x29),
739 .platform_data = &rx51_tsl2563_platform_data,
733 }, 740 },
741#endif
742 {
743 I2C_BOARD_INFO("tpa6130a2", 0x60),
744 .platform_data = &rx51_tpa6130a2_data,
745 }
734}; 746};
735 747
736static int __init rx51_i2c_init(void) 748static int __init rx51_i2c_init(void)
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
index b743a4f42649..5a1005ba9815 100644
--- a/arch/arm/mach-omap2/board-rx51-video.c
+++ b/arch/arm/mach-omap2/board-rx51-video.c
@@ -16,7 +16,6 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17 17
18#include <asm/mach-types.h> 18#include <asm/mach-types.h>
19#include <plat/mux.h>
20#include <plat/display.h> 19#include <plat/display.h>
21#include <plat/vram.h> 20#include <plat/vram.h>
22#include <plat/mcspi.h> 21#include <plat/mcspi.h>
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 803ef14cbf2d..1520a2c14149 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -71,6 +71,19 @@ static struct twl4030_platform_data zoom2_twldata = {
71 71
72#ifdef CONFIG_OMAP_MUX 72#ifdef CONFIG_OMAP_MUX
73static struct omap_board_mux board_mux[] __initdata = { 73static struct omap_board_mux board_mux[] __initdata = {
74 /* WLAN IRQ - GPIO 162 */
75 OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
76 /* WLAN POWER ENABLE - GPIO 101 */
77 OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
78 /* WLAN SDIO: MMC3 CMD */
79 OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP),
80 /* WLAN SDIO: MMC3 CLK */
81 OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
82 /* WLAN SDIO: MMC3 DAT[0-3] */
83 OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
84 OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
85 OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
86 OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
74 { .reg_offset = OMAP_MUX_TERMINATOR }, 87 { .reg_offset = OMAP_MUX_TERMINATOR },
75}; 88};
76#else 89#else
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c
index 33147042485f..7d1704693acb 100644
--- a/arch/arm/mach-omap2/board-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -46,6 +46,19 @@ static void __init omap_zoom_init_irq(void)
46 46
47#ifdef CONFIG_OMAP_MUX 47#ifdef CONFIG_OMAP_MUX
48static struct omap_board_mux board_mux[] __initdata = { 48static struct omap_board_mux board_mux[] __initdata = {
49 /* WLAN IRQ - GPIO 162 */
50 OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
51 /* WLAN POWER ENABLE - GPIO 101 */
52 OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
53 /* WLAN SDIO: MMC3 CMD */
54 OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP),
55 /* WLAN SDIO: MMC3 CLK */
56 OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
57 /* WLAN SDIO: MMC3 DAT[0-3] */
58 OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
59 OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
60 OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
61 OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
49 { .reg_offset = OMAP_MUX_TERMINATOR }, 62 { .reg_offset = OMAP_MUX_TERMINATOR },
50}; 63};
51#else 64#else
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 03e6c9ed82a4..162a9be3cbb1 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -25,7 +25,6 @@
25#include <plat/control.h> 25#include <plat/control.h>
26#include <plat/tc.h> 26#include <plat/tc.h>
27#include <plat/board.h> 27#include <plat/board.h>
28#include <plat/mux.h>
29#include <mach/gpio.h> 28#include <mach/gpio.h>
30#include <plat/mmc.h> 29#include <plat/mmc.h>
31#include <plat/dma.h> 30#include <plat/dma.h>
@@ -230,64 +229,7 @@ static inline void omap_init_mbox(void)
230static inline void omap_init_mbox(void) { } 229static inline void omap_init_mbox(void) { }
231#endif /* CONFIG_OMAP_MBOX_FWK */ 230#endif /* CONFIG_OMAP_MBOX_FWK */
232 231
233#if defined(CONFIG_OMAP_STI)
234
235#if defined(CONFIG_ARCH_OMAP2)
236
237#define OMAP2_STI_BASE 0x48068000
238#define OMAP2_STI_CHANNEL_BASE 0x54000000
239#define OMAP2_STI_IRQ 4
240
241static struct resource sti_resources[] = {
242 {
243 .start = OMAP2_STI_BASE,
244 .end = OMAP2_STI_BASE + 0x7ff,
245 .flags = IORESOURCE_MEM,
246 },
247 {
248 .start = OMAP2_STI_CHANNEL_BASE,
249 .end = OMAP2_STI_CHANNEL_BASE + SZ_64K - 1,
250 .flags = IORESOURCE_MEM,
251 },
252 {
253 .start = OMAP2_STI_IRQ,
254 .flags = IORESOURCE_IRQ,
255 }
256};
257#elif defined(CONFIG_ARCH_OMAP3)
258
259#define OMAP3_SDTI_BASE 0x54500000
260#define OMAP3_SDTI_CHANNEL_BASE 0x54600000
261
262static struct resource sti_resources[] = {
263 {
264 .start = OMAP3_SDTI_BASE,
265 .end = OMAP3_SDTI_BASE + 0xFFF,
266 .flags = IORESOURCE_MEM,
267 },
268 {
269 .start = OMAP3_SDTI_CHANNEL_BASE,
270 .end = OMAP3_SDTI_CHANNEL_BASE + SZ_1M - 1,
271 .flags = IORESOURCE_MEM,
272 }
273};
274
275#endif
276
277static struct platform_device sti_device = {
278 .name = "sti",
279 .id = -1,
280 .num_resources = ARRAY_SIZE(sti_resources),
281 .resource = sti_resources,
282};
283
284static inline void omap_init_sti(void)
285{
286 platform_device_register(&sti_device);
287}
288#else
289static inline void omap_init_sti(void) {} 232static inline void omap_init_sti(void) {}
290#endif
291 233
292#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) 234#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
293 235
@@ -672,19 +614,19 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
672 OMAP_PIN_INPUT_PULLUP); 614 OMAP_PIN_INPUT_PULLUP);
673 615
674 if (cpu_is_omap2420() && controller_nr == 0) { 616 if (cpu_is_omap2420() && controller_nr == 0) {
675 omap_cfg_reg(H18_24XX_MMC_CMD); 617 omap_mux_init_signal("sdmmc_cmd", 0);
676 omap_cfg_reg(H15_24XX_MMC_CLKI); 618 omap_mux_init_signal("sdmmc_clki", 0);
677 omap_cfg_reg(G19_24XX_MMC_CLKO); 619 omap_mux_init_signal("sdmmc_clko", 0);
678 omap_cfg_reg(F20_24XX_MMC_DAT0); 620 omap_mux_init_signal("sdmmc_dat0", 0);
679 omap_cfg_reg(F19_24XX_MMC_DAT_DIR0); 621 omap_mux_init_signal("sdmmc_dat_dir0", 0);
680 omap_cfg_reg(G18_24XX_MMC_CMD_DIR); 622 omap_mux_init_signal("sdmmc_cmd_dir", 0);
681 if (mmc_controller->slots[0].wires == 4) { 623 if (mmc_controller->slots[0].wires == 4) {
682 omap_cfg_reg(H14_24XX_MMC_DAT1); 624 omap_mux_init_signal("sdmmc_dat1", 0);
683 omap_cfg_reg(E19_24XX_MMC_DAT2); 625 omap_mux_init_signal("sdmmc_dat2", 0);
684 omap_cfg_reg(D19_24XX_MMC_DAT3); 626 omap_mux_init_signal("sdmmc_dat3", 0);
685 omap_cfg_reg(E20_24XX_MMC_DAT_DIR1); 627 omap_mux_init_signal("sdmmc_dat_dir1", 0);
686 omap_cfg_reg(F18_24XX_MMC_DAT_DIR2); 628 omap_mux_init_signal("sdmmc_dat_dir2", 0);
687 omap_cfg_reg(E18_24XX_MMC_DAT_DIR3); 629 omap_mux_init_signal("sdmmc_dat_dir3", 0);
688 } 630 }
689 631
690 /* 632 /*
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index 7951ae1447ee..79c478c4cb1c 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -21,32 +21,19 @@
21 21
22#include <plat/cpu.h> 22#include <plat/cpu.h>
23#include <plat/i2c.h> 23#include <plat/i2c.h>
24#include <plat/mux.h>
25 24
26#include "mux.h" 25#include "mux.h"
27 26
28void __init omap2_i2c_mux_pins(int bus_id) 27void __init omap2_i2c_mux_pins(int bus_id)
29{ 28{
30 if (cpu_is_omap24xx()) { 29 char mux_name[sizeof("i2c2_scl.i2c2_scl")];
31 const int omap24xx_pins[][2] = {
32 { M19_24XX_I2C1_SCL, L15_24XX_I2C1_SDA },
33 { J15_24XX_I2C2_SCL, H19_24XX_I2C2_SDA },
34 };
35 int scl, sda;
36
37 scl = omap24xx_pins[bus_id - 1][0];
38 sda = omap24xx_pins[bus_id - 1][1];
39 omap_cfg_reg(sda);
40 omap_cfg_reg(scl);
41 }
42 30
43 /* First I2C bus is not muxable */ 31 /* First I2C bus is not muxable */
44 if (cpu_is_omap34xx() && bus_id > 1) { 32 if (bus_id == 1)
45 char mux_name[sizeof("i2c2_scl.i2c2_scl")]; 33 return;
46 34
47 sprintf(mux_name, "i2c%i_scl.i2c%i_scl", bus_id, bus_id); 35 sprintf(mux_name, "i2c%i_scl.i2c%i_scl", bus_id, bus_id);
48 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT); 36 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
49 sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id); 37 sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id);
50 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT); 38 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
51 }
52} 39}
diff --git a/arch/arm/mach-omap2/include/mach/omap4-common.h b/arch/arm/mach-omap2/include/mach/omap4-common.h
index 423af3a6dd31..2744dfee1ff4 100644
--- a/arch/arm/mach-omap2/include/mach/omap4-common.h
+++ b/arch/arm/mach-omap2/include/mach/omap4-common.h
@@ -13,6 +13,13 @@
13#ifndef OMAP_ARCH_OMAP4_COMMON_H 13#ifndef OMAP_ARCH_OMAP4_COMMON_H
14#define OMAP_ARCH_OMAP4_COMMON_H 14#define OMAP_ARCH_OMAP4_COMMON_H
15 15
16/*
17 * wfi used in low power code. Directly opcode is used instead
18 * of instruction to avoid mulit-omap build break
19 */
20#define do_wfi() \
21 __asm__ __volatile__ (".word 0xe320f003" : : : "memory")
22
16#ifdef CONFIG_CACHE_L2X0 23#ifdef CONFIG_CACHE_L2X0
17extern void __iomem *l2cache_base; 24extern void __iomem *l2cache_base;
18#endif 25#endif
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3cfb425ea67e..b12d715dee5b 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -28,7 +28,6 @@
28 28
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30 30
31#include <plat/mux.h>
32#include <plat/sram.h> 31#include <plat/sram.h>
33#include <plat/sdrc.h> 32#include <plat/sdrc.h>
34#include <plat/gpmc.h> 33#include <plat/gpmc.h>
@@ -324,7 +323,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
324 omap2430_hwmod_init(); 323 omap2430_hwmod_init();
325 else if (cpu_is_omap34xx()) 324 else if (cpu_is_omap34xx())
326 omap3xxx_hwmod_init(); 325 omap3xxx_hwmod_init();
327 omap2_mux_init();
328 /* The OPP tables have to be registered before a clk init */ 326 /* The OPP tables have to be registered before a clk init */
329 omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); 327 omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
330 328
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index e82da680d908..14ee686b6492 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -44,9 +44,13 @@
44#define MMU_IRQ_EMUMISS (1 << 2) 44#define MMU_IRQ_EMUMISS (1 << 2)
45#define MMU_IRQ_TRANSLATIONFAULT (1 << 1) 45#define MMU_IRQ_TRANSLATIONFAULT (1 << 1)
46#define MMU_IRQ_TLBMISS (1 << 0) 46#define MMU_IRQ_TLBMISS (1 << 0)
47#define MMU_IRQ_MASK \ 47
48 (MMU_IRQ_MULTIHITFAULT | MMU_IRQ_TABLEWALKFAULT | MMU_IRQ_EMUMISS | \ 48#define __MMU_IRQ_FAULT \
49 MMU_IRQ_TRANSLATIONFAULT) 49 (MMU_IRQ_MULTIHITFAULT | MMU_IRQ_EMUMISS | MMU_IRQ_TRANSLATIONFAULT)
50#define MMU_IRQ_MASK \
51 (__MMU_IRQ_FAULT | MMU_IRQ_TABLEWALKFAULT | MMU_IRQ_TLBMISS)
52#define MMU_IRQ_TWL_MASK (__MMU_IRQ_FAULT | MMU_IRQ_TABLEWALKFAULT)
53#define MMU_IRQ_TLB_MISS_MASK (__MMU_IRQ_FAULT | MMU_IRQ_TLBMISS)
50 54
51/* MMU_CNTL */ 55/* MMU_CNTL */
52#define MMU_CNTL_SHIFT 1 56#define MMU_CNTL_SHIFT 1
@@ -61,6 +65,26 @@
61 ((pgsz) == MMU_CAM_PGSZ_64K) ? 0xffff0000 : \ 65 ((pgsz) == MMU_CAM_PGSZ_64K) ? 0xffff0000 : \
62 ((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0) 66 ((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0)
63 67
68
69static void __iommu_set_twl(struct iommu *obj, bool on)
70{
71 u32 l = iommu_read_reg(obj, MMU_CNTL);
72
73 if (on)
74 iommu_write_reg(obj, MMU_IRQ_TWL_MASK, MMU_IRQENABLE);
75 else
76 iommu_write_reg(obj, MMU_IRQ_TLB_MISS_MASK, MMU_IRQENABLE);
77
78 l &= ~MMU_CNTL_MASK;
79 if (on)
80 l |= (MMU_CNTL_MMU_EN | MMU_CNTL_TWL_EN);
81 else
82 l |= (MMU_CNTL_MMU_EN);
83
84 iommu_write_reg(obj, l, MMU_CNTL);
85}
86
87
64static int omap2_iommu_enable(struct iommu *obj) 88static int omap2_iommu_enable(struct iommu *obj)
65{ 89{
66 u32 l, pa; 90 u32 l, pa;
@@ -96,13 +120,9 @@ static int omap2_iommu_enable(struct iommu *obj)
96 l |= (MMU_SYS_IDLE_SMART | MMU_SYS_AUTOIDLE); 120 l |= (MMU_SYS_IDLE_SMART | MMU_SYS_AUTOIDLE);
97 iommu_write_reg(obj, l, MMU_SYSCONFIG); 121 iommu_write_reg(obj, l, MMU_SYSCONFIG);
98 122
99 iommu_write_reg(obj, MMU_IRQ_MASK, MMU_IRQENABLE);
100 iommu_write_reg(obj, pa, MMU_TTB); 123 iommu_write_reg(obj, pa, MMU_TTB);
101 124
102 l = iommu_read_reg(obj, MMU_CNTL); 125 __iommu_set_twl(obj, true);
103 l &= ~MMU_CNTL_MASK;
104 l |= (MMU_CNTL_MMU_EN | MMU_CNTL_TWL_EN);
105 iommu_write_reg(obj, l, MMU_CNTL);
106 126
107 return 0; 127 return 0;
108} 128}
@@ -118,6 +138,11 @@ static void omap2_iommu_disable(struct iommu *obj)
118 dev_dbg(obj->dev, "%s is shutting down\n", obj->name); 138 dev_dbg(obj->dev, "%s is shutting down\n", obj->name);
119} 139}
120 140
141static void omap2_iommu_set_twl(struct iommu *obj, bool on)
142{
143 __iommu_set_twl(obj, false);
144}
145
121static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) 146static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra)
122{ 147{
123 int i; 148 int i;
@@ -147,7 +172,7 @@ static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra)
147 printk("\n"); 172 printk("\n");
148 173
149 iommu_write_reg(obj, stat, MMU_IRQSTATUS); 174 iommu_write_reg(obj, stat, MMU_IRQSTATUS);
150 omap2_iommu_disable(obj); 175
151 return stat; 176 return stat;
152} 177}
153 178
@@ -300,6 +325,7 @@ static const struct iommu_functions omap2_iommu_ops = {
300 325
301 .enable = omap2_iommu_enable, 326 .enable = omap2_iommu_enable,
302 .disable = omap2_iommu_disable, 327 .disable = omap2_iommu_disable,
328 .set_twl = omap2_iommu_set_twl,
303 .fault_isr = omap2_iommu_fault_isr, 329 .fault_isr = omap2_iommu_fault_isr,
304 330
305 .tlb_read_cr = omap2_tlb_read_cr, 331 .tlb_read_cr = omap2_tlb_read_cr,
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index c29337074ad3..87aa4c9597cc 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -20,17 +20,18 @@
20 20
21#include <mach/irqs.h> 21#include <mach/irqs.h>
22#include <plat/dma.h> 22#include <plat/dma.h>
23#include <plat/mux.h>
24#include <plat/cpu.h> 23#include <plat/cpu.h>
25#include <plat/mcbsp.h> 24#include <plat/mcbsp.h>
26 25
26#include "mux.h"
27
27static void omap2_mcbsp2_mux_setup(void) 28static void omap2_mcbsp2_mux_setup(void)
28{ 29{
29 omap_cfg_reg(Y15_24XX_MCBSP2_CLKX); 30 omap_mux_init_signal("eac_ac_sclk.mcbsp2_clkx", OMAP_PULL_ENA);
30 omap_cfg_reg(R14_24XX_MCBSP2_FSX); 31 omap_mux_init_signal("eac_ac_fs.mcbsp2_fsx", OMAP_PULL_ENA);
31 omap_cfg_reg(W15_24XX_MCBSP2_DR); 32 omap_mux_init_signal("eac_ac_din.mcbsp2_dr", OMAP_PULL_ENA);
32 omap_cfg_reg(V15_24XX_MCBSP2_DX); 33 omap_mux_init_signal("eac_ac_dout.mcbsp2_dx", OMAP_PULL_ENA);
33 omap_cfg_reg(V14_24XX_GPIO117); 34 omap_mux_init_gpio(117, OMAP_PULL_ENA);
34 /* 35 /*
35 * TODO: Need to add MUX settings for OMAP 2430 SDP 36 * TODO: Need to add MUX settings for OMAP 2430 SDP
36 */ 37 */
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 8b3d26935a39..ab403b2ed26b 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -37,12 +37,12 @@
37#include <asm/system.h> 37#include <asm/system.h>
38 38
39#include <plat/control.h> 39#include <plat/control.h>
40#include <plat/mux.h>
41 40
42#include "mux.h" 41#include "mux.h"
43 42
44#define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ 43#define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */
45#define OMAP_MUX_BASE_SZ 0x5ca 44#define OMAP_MUX_BASE_SZ 0x5ca
45#define MUXABLE_GPIO_MODE3 BIT(0)
46 46
47struct omap_mux_entry { 47struct omap_mux_entry {
48 struct omap_mux mux; 48 struct omap_mux mux;
@@ -51,6 +51,7 @@ struct omap_mux_entry {
51 51
52static unsigned long mux_phys; 52static unsigned long mux_phys;
53static void __iomem *mux_base; 53static void __iomem *mux_base;
54static u8 omap_mux_flags;
54 55
55u16 omap_mux_read(u16 reg) 56u16 omap_mux_read(u16 reg)
56{ 57{
@@ -76,301 +77,6 @@ void omap_mux_write_array(struct omap_board_mux *board_mux)
76 } 77 }
77} 78}
78 79
79#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_OMAP_MUX)
80
81static struct omap_mux_cfg arch_mux_cfg;
82
83/* NOTE: See mux.h for the enumeration */
84
85static struct pin_config __initdata_or_module omap24xx_pins[] = {
86/*
87 * description mux mux pull pull debug
88 * offset mode ena type
89 */
90
91/* 24xx I2C */
92MUX_CFG_24XX("M19_24XX_I2C1_SCL", 0x111, 0, 0, 0, 1)
93MUX_CFG_24XX("L15_24XX_I2C1_SDA", 0x112, 0, 0, 0, 1)
94MUX_CFG_24XX("J15_24XX_I2C2_SCL", 0x113, 0, 0, 1, 1)
95MUX_CFG_24XX("H19_24XX_I2C2_SDA", 0x114, 0, 0, 0, 1)
96
97/* Menelaus interrupt */
98MUX_CFG_24XX("W19_24XX_SYS_NIRQ", 0x12c, 0, 1, 1, 1)
99
100/* 24xx clocks */
101MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1)
102
103/* 24xx GPMC chipselects, wait pin monitoring */
104MUX_CFG_24XX("E2_GPMC_NCS2", 0x08e, 0, 1, 1, 1)
105MUX_CFG_24XX("L2_GPMC_NCS7", 0x093, 0, 1, 1, 1)
106MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1)
107MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1)
108MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1)
109MUX_CFG_24XX("P1_GPMC_WAIT3", 0x09d, 0, 1, 1, 1)
110
111/* 24xx McBSP */
112MUX_CFG_24XX("Y15_24XX_MCBSP2_CLKX", 0x124, 1, 1, 0, 1)
113MUX_CFG_24XX("R14_24XX_MCBSP2_FSX", 0x125, 1, 1, 0, 1)
114MUX_CFG_24XX("W15_24XX_MCBSP2_DR", 0x126, 1, 1, 0, 1)
115MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1)
116
117/* 24xx GPIO */
118MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1)
119MUX_CFG_24XX("P21_242X_GPIO12", 0x0ca, 3, 0, 0, 1)
120MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1)
121MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1)
122MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1)
123MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1)
124MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1)
125MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1)
126MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1)
127MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1)
128MUX_CFG_24XX("N15_24XX_GPIO85", 0x103, 3, 0, 0, 1)
129MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1)
130MUX_CFG_24XX("P20_24XX_GPIO93", 0x10b, 3, 0, 0, 1)
131MUX_CFG_24XX("P18_24XX_GPIO95", 0x10d, 3, 0, 0, 1)
132MUX_CFG_24XX("M18_24XX_GPIO96", 0x10e, 3, 0, 0, 1)
133MUX_CFG_24XX("L14_24XX_GPIO97", 0x10f, 3, 0, 0, 1)
134MUX_CFG_24XX("J15_24XX_GPIO99", 0x113, 3, 1, 1, 1)
135MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1)
136MUX_CFG_24XX("P14_24XX_GPIO125", 0x140, 3, 1, 1, 1)
137
138/* 242x DBG GPIO */
139MUX_CFG_24XX("V4_242X_GPIO49", 0xd3, 3, 0, 0, 1)
140MUX_CFG_24XX("W2_242X_GPIO50", 0xd4, 3, 0, 0, 1)
141MUX_CFG_24XX("U4_242X_GPIO51", 0xd5, 3, 0, 0, 1)
142MUX_CFG_24XX("V3_242X_GPIO52", 0xd6, 3, 0, 0, 1)
143MUX_CFG_24XX("V2_242X_GPIO53", 0xd7, 3, 0, 0, 1)
144MUX_CFG_24XX("V6_242X_GPIO53", 0xcf, 3, 0, 0, 1)
145MUX_CFG_24XX("T4_242X_GPIO54", 0xd8, 3, 0, 0, 1)
146MUX_CFG_24XX("Y4_242X_GPIO54", 0xd0, 3, 0, 0, 1)
147MUX_CFG_24XX("T3_242X_GPIO55", 0xd9, 3, 0, 0, 1)
148MUX_CFG_24XX("U2_242X_GPIO56", 0xda, 3, 0, 0, 1)
149
150/* 24xx external DMA requests */
151MUX_CFG_24XX("AA10_242X_DMAREQ0", 0x0e5, 2, 0, 0, 1)
152MUX_CFG_24XX("AA6_242X_DMAREQ1", 0x0e6, 2, 0, 0, 1)
153MUX_CFG_24XX("E4_242X_DMAREQ2", 0x074, 2, 0, 0, 1)
154MUX_CFG_24XX("G4_242X_DMAREQ3", 0x073, 2, 0, 0, 1)
155MUX_CFG_24XX("D3_242X_DMAREQ4", 0x072, 2, 0, 0, 1)
156MUX_CFG_24XX("E3_242X_DMAREQ5", 0x071, 2, 0, 0, 1)
157
158/* UART3 */
159MUX_CFG_24XX("K15_24XX_UART3_TX", 0x118, 0, 0, 0, 1)
160MUX_CFG_24XX("K14_24XX_UART3_RX", 0x119, 0, 0, 0, 1)
161
162/* MMC/SDIO */
163MUX_CFG_24XX("G19_24XX_MMC_CLKO", 0x0f3, 0, 0, 0, 1)
164MUX_CFG_24XX("H18_24XX_MMC_CMD", 0x0f4, 0, 0, 0, 1)
165MUX_CFG_24XX("F20_24XX_MMC_DAT0", 0x0f5, 0, 0, 0, 1)
166MUX_CFG_24XX("H14_24XX_MMC_DAT1", 0x0f6, 0, 0, 0, 1)
167MUX_CFG_24XX("E19_24XX_MMC_DAT2", 0x0f7, 0, 0, 0, 1)
168MUX_CFG_24XX("D19_24XX_MMC_DAT3", 0x0f8, 0, 0, 0, 1)
169MUX_CFG_24XX("F19_24XX_MMC_DAT_DIR0", 0x0f9, 0, 0, 0, 1)
170MUX_CFG_24XX("E20_24XX_MMC_DAT_DIR1", 0x0fa, 0, 0, 0, 1)
171MUX_CFG_24XX("F18_24XX_MMC_DAT_DIR2", 0x0fb, 0, 0, 0, 1)
172MUX_CFG_24XX("E18_24XX_MMC_DAT_DIR3", 0x0fc, 0, 0, 0, 1)
173MUX_CFG_24XX("G18_24XX_MMC_CMD_DIR", 0x0fd, 0, 0, 0, 1)
174MUX_CFG_24XX("H15_24XX_MMC_CLKI", 0x0fe, 0, 0, 0, 1)
175
176/* Full speed USB */
177MUX_CFG_24XX("J20_24XX_USB0_PUEN", 0x11d, 0, 0, 0, 1)
178MUX_CFG_24XX("J19_24XX_USB0_VP", 0x11e, 0, 0, 0, 1)
179MUX_CFG_24XX("K20_24XX_USB0_VM", 0x11f, 0, 0, 0, 1)
180MUX_CFG_24XX("J18_24XX_USB0_RCV", 0x120, 0, 0, 0, 1)
181MUX_CFG_24XX("K19_24XX_USB0_TXEN", 0x121, 0, 0, 0, 1)
182MUX_CFG_24XX("J14_24XX_USB0_SE0", 0x122, 0, 0, 0, 1)
183MUX_CFG_24XX("K18_24XX_USB0_DAT", 0x123, 0, 0, 0, 1)
184
185MUX_CFG_24XX("N14_24XX_USB1_SE0", 0x0ed, 2, 0, 0, 1)
186MUX_CFG_24XX("W12_24XX_USB1_SE0", 0x0dd, 3, 0, 0, 1)
187MUX_CFG_24XX("P15_24XX_USB1_DAT", 0x0ee, 2, 0, 0, 1)
188MUX_CFG_24XX("R13_24XX_USB1_DAT", 0x0e0, 3, 0, 0, 1)
189MUX_CFG_24XX("W20_24XX_USB1_TXEN", 0x0ec, 2, 0, 0, 1)
190MUX_CFG_24XX("P13_24XX_USB1_TXEN", 0x0df, 3, 0, 0, 1)
191MUX_CFG_24XX("V19_24XX_USB1_RCV", 0x0eb, 2, 0, 0, 1)
192MUX_CFG_24XX("V12_24XX_USB1_RCV", 0x0de, 3, 0, 0, 1)
193
194MUX_CFG_24XX("AA10_24XX_USB2_SE0", 0x0e5, 2, 0, 0, 1)
195MUX_CFG_24XX("Y11_24XX_USB2_DAT", 0x0e8, 2, 0, 0, 1)
196MUX_CFG_24XX("AA12_24XX_USB2_TXEN", 0x0e9, 2, 0, 0, 1)
197MUX_CFG_24XX("AA6_24XX_USB2_RCV", 0x0e6, 2, 0, 0, 1)
198MUX_CFG_24XX("AA4_24XX_USB2_TLLSE0", 0x0e7, 2, 0, 0, 1)
199
200/* Keypad GPIO*/
201MUX_CFG_24XX("T19_24XX_KBR0", 0x106, 3, 1, 1, 1)
202MUX_CFG_24XX("R19_24XX_KBR1", 0x107, 3, 1, 1, 1)
203MUX_CFG_24XX("V18_24XX_KBR2", 0x139, 3, 1, 1, 1)
204MUX_CFG_24XX("M21_24XX_KBR3", 0xc9, 3, 1, 1, 1)
205MUX_CFG_24XX("E5__24XX_KBR4", 0x138, 3, 1, 1, 1)
206MUX_CFG_24XX("M18_24XX_KBR5", 0x10e, 3, 1, 1, 1)
207MUX_CFG_24XX("R20_24XX_KBC0", 0x108, 3, 0, 0, 1)
208MUX_CFG_24XX("M14_24XX_KBC1", 0x109, 3, 0, 0, 1)
209MUX_CFG_24XX("H19_24XX_KBC2", 0x114, 3, 0, 0, 1)
210MUX_CFG_24XX("V17_24XX_KBC3", 0x135, 3, 0, 0, 1)
211MUX_CFG_24XX("P21_24XX_KBC4", 0xca, 3, 0, 0, 1)
212MUX_CFG_24XX("L14_24XX_KBC5", 0x10f, 3, 0, 0, 1)
213MUX_CFG_24XX("N19_24XX_KBC6", 0x110, 3, 0, 0, 1)
214
215/* 24xx Menelaus Keypad GPIO */
216MUX_CFG_24XX("B3__24XX_KBR5", 0x30, 3, 1, 1, 1)
217MUX_CFG_24XX("AA4_24XX_KBC2", 0xe7, 3, 0, 0, 1)
218MUX_CFG_24XX("B13_24XX_KBC6", 0x110, 3, 0, 0, 1)
219
220/* 2430 USB */
221MUX_CFG_24XX("AD9_2430_USB0_PUEN", 0x133, 4, 0, 0, 1)
222MUX_CFG_24XX("Y11_2430_USB0_VP", 0x134, 4, 0, 0, 1)
223MUX_CFG_24XX("AD7_2430_USB0_VM", 0x135, 4, 0, 0, 1)
224MUX_CFG_24XX("AE7_2430_USB0_RCV", 0x136, 4, 0, 0, 1)
225MUX_CFG_24XX("AD4_2430_USB0_TXEN", 0x137, 4, 0, 0, 1)
226MUX_CFG_24XX("AF9_2430_USB0_SE0", 0x138, 4, 0, 0, 1)
227MUX_CFG_24XX("AE6_2430_USB0_DAT", 0x139, 4, 0, 0, 1)
228MUX_CFG_24XX("AD24_2430_USB1_SE0", 0x107, 2, 0, 0, 1)
229MUX_CFG_24XX("AB24_2430_USB1_RCV", 0x108, 2, 0, 0, 1)
230MUX_CFG_24XX("Y25_2430_USB1_TXEN", 0x109, 2, 0, 0, 1)
231MUX_CFG_24XX("AA26_2430_USB1_DAT", 0x10A, 2, 0, 0, 1)
232
233/* 2430 HS-USB */
234MUX_CFG_24XX("AD9_2430_USB0HS_DATA3", 0x133, 0, 0, 0, 1)
235MUX_CFG_24XX("Y11_2430_USB0HS_DATA4", 0x134, 0, 0, 0, 1)
236MUX_CFG_24XX("AD7_2430_USB0HS_DATA5", 0x135, 0, 0, 0, 1)
237MUX_CFG_24XX("AE7_2430_USB0HS_DATA6", 0x136, 0, 0, 0, 1)
238MUX_CFG_24XX("AD4_2430_USB0HS_DATA2", 0x137, 0, 0, 0, 1)
239MUX_CFG_24XX("AF9_2430_USB0HS_DATA0", 0x138, 0, 0, 0, 1)
240MUX_CFG_24XX("AE6_2430_USB0HS_DATA1", 0x139, 0, 0, 0, 1)
241MUX_CFG_24XX("AE8_2430_USB0HS_CLK", 0x13A, 0, 0, 0, 1)
242MUX_CFG_24XX("AD8_2430_USB0HS_DIR", 0x13B, 0, 0, 0, 1)
243MUX_CFG_24XX("AE5_2430_USB0HS_STP", 0x13c, 0, 1, 1, 1)
244MUX_CFG_24XX("AE9_2430_USB0HS_NXT", 0x13D, 0, 0, 0, 1)
245MUX_CFG_24XX("AC7_2430_USB0HS_DATA7", 0x13E, 0, 0, 0, 1)
246
247/* 2430 McBSP */
248MUX_CFG_24XX("AD6_2430_MCBSP_CLKS", 0x011E, 0, 0, 0, 1)
249
250MUX_CFG_24XX("AB2_2430_MCBSP1_CLKR", 0x011A, 0, 0, 0, 1)
251MUX_CFG_24XX("AD5_2430_MCBSP1_FSR", 0x011B, 0, 0, 0, 1)
252MUX_CFG_24XX("AA1_2430_MCBSP1_DX", 0x011C, 0, 0, 0, 1)
253MUX_CFG_24XX("AF3_2430_MCBSP1_DR", 0x011D, 0, 0, 0, 1)
254MUX_CFG_24XX("AB3_2430_MCBSP1_FSX", 0x011F, 0, 0, 0, 1)
255MUX_CFG_24XX("Y9_2430_MCBSP1_CLKX", 0x0120, 0, 0, 0, 1)
256
257MUX_CFG_24XX("AC10_2430_MCBSP2_FSX", 0x012E, 1, 0, 0, 1)
258MUX_CFG_24XX("AD16_2430_MCBSP2_CLX", 0x012F, 1, 0, 0, 1)
259MUX_CFG_24XX("AE13_2430_MCBSP2_DX", 0x0130, 1, 0, 0, 1)
260MUX_CFG_24XX("AD13_2430_MCBSP2_DR", 0x0131, 1, 0, 0, 1)
261MUX_CFG_24XX("AC10_2430_MCBSP2_FSX_OFF",0x012E, 0, 0, 0, 1)
262MUX_CFG_24XX("AD16_2430_MCBSP2_CLX_OFF",0x012F, 0, 0, 0, 1)
263MUX_CFG_24XX("AE13_2430_MCBSP2_DX_OFF", 0x0130, 0, 0, 0, 1)
264MUX_CFG_24XX("AD13_2430_MCBSP2_DR_OFF", 0x0131, 0, 0, 0, 1)
265
266MUX_CFG_24XX("AC9_2430_MCBSP3_CLKX", 0x0103, 0, 0, 0, 1)
267MUX_CFG_24XX("AE4_2430_MCBSP3_FSX", 0x0104, 0, 0, 0, 1)
268MUX_CFG_24XX("AE2_2430_MCBSP3_DR", 0x0105, 0, 0, 0, 1)
269MUX_CFG_24XX("AF4_2430_MCBSP3_DX", 0x0106, 0, 0, 0, 1)
270
271MUX_CFG_24XX("N3_2430_MCBSP4_CLKX", 0x010B, 1, 0, 0, 1)
272MUX_CFG_24XX("AD23_2430_MCBSP4_DR", 0x010C, 1, 0, 0, 1)
273MUX_CFG_24XX("AB25_2430_MCBSP4_DX", 0x010D, 1, 0, 0, 1)
274MUX_CFG_24XX("AC25_2430_MCBSP4_FSX", 0x010E, 1, 0, 0, 1)
275
276MUX_CFG_24XX("AE16_2430_MCBSP5_CLKX", 0x00ED, 1, 0, 0, 1)
277MUX_CFG_24XX("AF12_2430_MCBSP5_FSX", 0x00ED, 1, 0, 0, 1)
278MUX_CFG_24XX("K7_2430_MCBSP5_DX", 0x00EF, 1, 0, 0, 1)
279MUX_CFG_24XX("M1_2430_MCBSP5_DR", 0x00F0, 1, 0, 0, 1)
280
281/* 2430 MCSPI1 */
282MUX_CFG_24XX("Y18_2430_MCSPI1_CLK", 0x010F, 0, 0, 0, 1)
283MUX_CFG_24XX("AD15_2430_MCSPI1_SIMO", 0x0110, 0, 0, 0, 1)
284MUX_CFG_24XX("AE17_2430_MCSPI1_SOMI", 0x0111, 0, 0, 0, 1)
285MUX_CFG_24XX("U1_2430_MCSPI1_CS0", 0x0112, 0, 0, 0, 1)
286
287/* Touchscreen GPIO */
288MUX_CFG_24XX("AF19_2430_GPIO_85", 0x0113, 3, 0, 0, 1)
289
290};
291
292#define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins)
293
294#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
295
296static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg)
297{
298 u16 orig;
299 u8 warn = 0, debug = 0;
300
301 orig = omap_mux_read(cfg->mux_reg - OMAP_MUX_BASE_OFFSET);
302
303#ifdef CONFIG_OMAP_MUX_DEBUG
304 debug = cfg->debug;
305#endif
306 warn = (orig != reg);
307 if (debug || warn)
308 printk(KERN_WARNING
309 "MUX: setup %s (0x%p): 0x%04x -> 0x%04x\n",
310 cfg->name, omap_ctrl_base_get() + cfg->mux_reg,
311 orig, reg);
312}
313#else
314#define omap2_cfg_debug(x, y) do {} while (0)
315#endif
316
317static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg)
318{
319 static DEFINE_SPINLOCK(mux_spin_lock);
320 unsigned long flags;
321 u8 reg = 0;
322
323 spin_lock_irqsave(&mux_spin_lock, flags);
324 reg |= cfg->mask & 0x7;
325 if (cfg->pull_val)
326 reg |= OMAP2_PULL_ENA;
327 if (cfg->pu_pd_val)
328 reg |= OMAP2_PULL_UP;
329 omap2_cfg_debug(cfg, reg);
330 omap_mux_write(reg, cfg->mux_reg - OMAP_MUX_BASE_OFFSET);
331 spin_unlock_irqrestore(&mux_spin_lock, flags);
332
333 return 0;
334}
335
336int __init omap2_mux_init(void)
337{
338 u32 mux_pbase;
339
340 if (cpu_is_omap2420())
341 mux_pbase = OMAP2420_CTRL_BASE + OMAP_MUX_BASE_OFFSET;
342 else if (cpu_is_omap2430())
343 mux_pbase = OMAP243X_CTRL_BASE + OMAP_MUX_BASE_OFFSET;
344 else
345 return -ENODEV;
346
347 mux_base = ioremap(mux_pbase, OMAP_MUX_BASE_SZ);
348 if (!mux_base) {
349 printk(KERN_ERR "mux: Could not ioremap\n");
350 return -ENODEV;
351 }
352
353 if (cpu_is_omap24xx()) {
354 arch_mux_cfg.pins = omap24xx_pins;
355 arch_mux_cfg.size = OMAP24XX_PINS_SZ;
356 arch_mux_cfg.cfg_reg = omap24xx_cfg_reg;
357
358 return omap_mux_register(&arch_mux_cfg);
359 }
360
361 return 0;
362}
363
364#else
365int __init omap2_mux_init(void)
366{
367 return 0;
368}
369#endif /* CONFIG_OMAP_MUX */
370
371/*----------------------------------------------------------------------------*/
372
373#ifdef CONFIG_ARCH_OMAP3
374static LIST_HEAD(muxmodes); 80static LIST_HEAD(muxmodes);
375static DEFINE_MUTEX(muxmode_mutex); 81static DEFINE_MUTEX(muxmode_mutex);
376 82
@@ -381,6 +87,9 @@ static char *omap_mux_options;
381int __init omap_mux_init_gpio(int gpio, int val) 87int __init omap_mux_init_gpio(int gpio, int val)
382{ 88{
383 struct omap_mux_entry *e; 89 struct omap_mux_entry *e;
90 struct omap_mux *gpio_mux;
91 u16 old_mode;
92 u16 mux_mode;
384 int found = 0; 93 int found = 0;
385 94
386 if (!gpio) 95 if (!gpio)
@@ -389,31 +98,33 @@ int __init omap_mux_init_gpio(int gpio, int val)
389 list_for_each_entry(e, &muxmodes, node) { 98 list_for_each_entry(e, &muxmodes, node) {
390 struct omap_mux *m = &e->mux; 99 struct omap_mux *m = &e->mux;
391 if (gpio == m->gpio) { 100 if (gpio == m->gpio) {
392 u16 old_mode; 101 gpio_mux = m;
393 u16 mux_mode;
394
395 old_mode = omap_mux_read(m->reg_offset);
396 mux_mode = val & ~(OMAP_MUX_NR_MODES - 1);
397 mux_mode |= OMAP_MUX_MODE4;
398 printk(KERN_DEBUG "mux: Setting signal "
399 "%s.gpio%i 0x%04x -> 0x%04x\n",
400 m->muxnames[0], gpio, old_mode, mux_mode);
401 omap_mux_write(mux_mode, m->reg_offset);
402 found++; 102 found++;
403 } 103 }
404 } 104 }
405 105
406 if (found == 1) 106 if (found == 0) {
407 return 0; 107 printk(KERN_ERR "mux: Could not set gpio%i\n", gpio);
108 return -ENODEV;
109 }
408 110
409 if (found > 1) { 111 if (found > 1) {
410 printk(KERN_ERR "mux: Multiple gpio paths for gpio%i\n", gpio); 112 printk(KERN_INFO "mux: Multiple gpio paths (%d) for gpio%i\n",
113 found, gpio);
411 return -EINVAL; 114 return -EINVAL;
412 } 115 }
413 116
414 printk(KERN_ERR "mux: Could not set gpio%i\n", gpio); 117 old_mode = omap_mux_read(gpio_mux->reg_offset);
118 mux_mode = val & ~(OMAP_MUX_NR_MODES - 1);
119 if (omap_mux_flags & MUXABLE_GPIO_MODE3)
120 mux_mode |= OMAP_MUX_MODE3;
121 else
122 mux_mode |= OMAP_MUX_MODE4;
123 printk(KERN_DEBUG "mux: Setting signal %s.gpio%i 0x%04x -> 0x%04x\n",
124 gpio_mux->muxnames[0], gpio, old_mode, mux_mode);
125 omap_mux_write(mux_mode, gpio_mux->reg_offset);
415 126
416 return -ENODEV; 127 return 0;
417} 128}
418 129
419int __init omap_mux_init_signal(char *muxname, int val) 130int __init omap_mux_init_signal(char *muxname, int val)
@@ -1032,6 +743,9 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size,
1032 return -ENODEV; 743 return -ENODEV;
1033 } 744 }
1034 745
746 if (cpu_is_omap24xx())
747 omap_mux_flags = MUXABLE_GPIO_MODE3;
748
1035 omap_mux_init_package(superset, package_subset, package_balls); 749 omap_mux_init_package(superset, package_subset, package_balls);
1036 omap_mux_init_list(superset); 750 omap_mux_init_list(superset);
1037 omap_mux_init_signals(board_mux); 751 omap_mux_init_signals(board_mux);
@@ -1039,5 +753,3 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size,
1039 return 0; 753 return 0;
1040} 754}
1041 755
1042#endif /* CONFIG_ARCH_OMAP3 */
1043
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h
index 480abc56e605..a8e040c2c7e9 100644
--- a/arch/arm/mach-omap2/mux.h
+++ b/arch/arm/mach-omap2/mux.h
@@ -7,6 +7,8 @@
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9 9
10#include "mux2420.h"
11#include "mux2430.h"
10#include "mux34xx.h" 12#include "mux34xx.h"
11 13
12#define OMAP_MUX_TERMINATOR 0xffff 14#define OMAP_MUX_TERMINATOR 0xffff
@@ -56,10 +58,12 @@
56 58
57/* Flags for omap_mux_init */ 59/* Flags for omap_mux_init */
58#define OMAP_PACKAGE_MASK 0xffff 60#define OMAP_PACKAGE_MASK 0xffff
59#define OMAP_PACKAGE_CBP 4 /* 515-pin 0.40 0.50 */ 61#define OMAP_PACKAGE_CBP 6 /* 515-pin 0.40 0.50 */
60#define OMAP_PACKAGE_CUS 3 /* 423-pin 0.65 */ 62#define OMAP_PACKAGE_CUS 5 /* 423-pin 0.65 */
61#define OMAP_PACKAGE_CBB 2 /* 515-pin 0.40 0.50 */ 63#define OMAP_PACKAGE_CBB 4 /* 515-pin 0.40 0.50 */
62#define OMAP_PACKAGE_CBC 1 /* 515-pin 0.50 0.65 */ 64#define OMAP_PACKAGE_CBC 3 /* 515-pin 0.50 0.65 */
65#define OMAP_PACKAGE_ZAC 2 /* 24xx 447-pin POP */
66#define OMAP_PACKAGE_ZAF 1 /* 2420 447-pin SIP */
63 67
64 68
65#define OMAP_MUX_NR_MODES 8 /* Available modes */ 69#define OMAP_MUX_NR_MODES 8 /* Available modes */
@@ -102,7 +106,7 @@ struct omap_board_mux {
102 u16 value; 106 u16 value;
103}; 107};
104 108
105#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_ARCH_OMAP3) 109#if defined(CONFIG_OMAP_MUX)
106 110
107/** 111/**
108 * omap_mux_init_gpio - initialize a signal based on the GPIO number 112 * omap_mux_init_gpio - initialize a signal based on the GPIO number
@@ -171,6 +175,20 @@ void omap_mux_write(u16 val, u16 mux_offset);
171void omap_mux_write_array(struct omap_board_mux *board_mux); 175void omap_mux_write_array(struct omap_board_mux *board_mux);
172 176
173/** 177/**
178 * omap2420_mux_init() - initialize mux system with board specific set
179 * @board_mux: Board specific mux table
180 * @flags: OMAP package type used for the board
181 */
182int omap2420_mux_init(struct omap_board_mux *board_mux, int flags);
183
184/**
185 * omap2430_mux_init() - initialize mux system with board specific set
186 * @board_mux: Board specific mux table
187 * @flags: OMAP package type used for the board
188 */
189int omap2430_mux_init(struct omap_board_mux *board_mux, int flags);
190
191/**
174 * omap3_mux_init() - initialize mux system with board specific set 192 * omap3_mux_init() - initialize mux system with board specific set
175 * @board_mux: Board specific mux table 193 * @board_mux: Board specific mux table
176 * @flags: OMAP package type used for the board 194 * @flags: OMAP package type used for the board
diff --git a/arch/arm/mach-omap2/mux2420.c b/arch/arm/mach-omap2/mux2420.c
new file mode 100644
index 000000000000..fdb04a7eb8aa
--- /dev/null
+++ b/arch/arm/mach-omap2/mux2420.c
@@ -0,0 +1,688 @@
1/*
2 * Copyright (C) 2010 Nokia
3 * Copyright (C) 2010 Texas Instruments
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#include <linux/module.h>
11#include <linux/init.h>
12
13#include "mux.h"
14
15#ifdef CONFIG_OMAP_MUX
16
17#define _OMAP2420_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \
18{ \
19 .reg_offset = (OMAP2420_CONTROL_PADCONF_##M0##_OFFSET), \
20 .gpio = (g), \
21 .muxnames = { m0, m1, m2, m3, m4, m5, m6, m7 }, \
22}
23
24#else
25
26#define _OMAP2420_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \
27{ \
28 .reg_offset = (OMAP2420_CONTROL_PADCONF_##M0##_OFFSET), \
29 .gpio = (g), \
30}
31
32#endif
33
34#define _OMAP2420_BALLENTRY(M0, bb, bt) \
35{ \
36 .reg_offset = (OMAP2420_CONTROL_PADCONF_##M0##_OFFSET), \
37 .balls = { bb, bt }, \
38}
39
40/*
41 * Superset of all mux modes for omap2420
42 */
43static struct omap_mux __initdata omap2420_muxmodes[] = {
44 _OMAP2420_MUXENTRY(CAM_D0, 54,
45 "cam_d0", "hw_dbg2", "sti_dout", "gpio_54",
46 NULL, NULL, "etk_d2", NULL),
47 _OMAP2420_MUXENTRY(CAM_D1, 53,
48 "cam_d1", "hw_dbg3", "sti_din", "gpio_53",
49 NULL, NULL, "etk_d3", NULL),
50 _OMAP2420_MUXENTRY(CAM_D2, 52,
51 "cam_d2", "hw_dbg4", "mcbsp1_clkx", "gpio_52",
52 NULL, NULL, "etk_d4", NULL),
53 _OMAP2420_MUXENTRY(CAM_D3, 51,
54 "cam_d3", "hw_dbg5", "mcbsp1_dr", "gpio_51",
55 NULL, NULL, "etk_d5", NULL),
56 _OMAP2420_MUXENTRY(CAM_D4, 50,
57 "cam_d4", "hw_dbg6", "mcbsp1_fsr", "gpio_50",
58 NULL, NULL, "etk_d6", NULL),
59 _OMAP2420_MUXENTRY(CAM_D5, 49,
60 "cam_d5", "hw_dbg7", "mcbsp1_clkr", "gpio_49",
61 NULL, NULL, "etk_d7", NULL),
62 _OMAP2420_MUXENTRY(CAM_D6, 0,
63 "cam_d6", "hw_dbg8", NULL, NULL,
64 NULL, NULL, "etk_d8", NULL),
65 _OMAP2420_MUXENTRY(CAM_D7, 0,
66 "cam_d7", "hw_dbg9", NULL, NULL,
67 NULL, NULL, "etk_d9", NULL),
68 _OMAP2420_MUXENTRY(CAM_D8, 54,
69 "cam_d8", "hw_dbg10", NULL, "gpio_54",
70 NULL, NULL, "etk_d10", NULL),
71 _OMAP2420_MUXENTRY(CAM_D9, 53,
72 "cam_d9", "hw_dbg11", NULL, "gpio_53",
73 NULL, NULL, "etk_d11", NULL),
74 _OMAP2420_MUXENTRY(CAM_HS, 55,
75 "cam_hs", "hw_dbg1", "mcbsp1_dx", "gpio_55",
76 NULL, NULL, "etk_d1", NULL),
77 _OMAP2420_MUXENTRY(CAM_LCLK, 57,
78 "cam_lclk", NULL, "mcbsp_clks", "gpio_57",
79 NULL, NULL, "etk_c1", NULL),
80 _OMAP2420_MUXENTRY(CAM_VS, 56,
81 "cam_vs", "hw_dbg0", "mcbsp1_fsx", "gpio_56",
82 NULL, NULL, "etk_d0", NULL),
83 _OMAP2420_MUXENTRY(CAM_XCLK, 0,
84 "cam_xclk", NULL, "sti_clk", NULL,
85 NULL, NULL, "etk_c2", NULL),
86 _OMAP2420_MUXENTRY(DSS_ACBIAS, 48,
87 "dss_acbias", NULL, "mcbsp2_fsx", "gpio_48",
88 NULL, NULL, NULL, NULL),
89 _OMAP2420_MUXENTRY(DSS_DATA10, 40,
90 "dss_data10", NULL, NULL, "gpio_40",
91 NULL, NULL, NULL, NULL),
92 _OMAP2420_MUXENTRY(DSS_DATA11, 41,
93 "dss_data11", NULL, NULL, "gpio_41",
94 NULL, NULL, NULL, NULL),
95 _OMAP2420_MUXENTRY(DSS_DATA12, 42,
96 "dss_data12", NULL, NULL, "gpio_42",
97 NULL, NULL, NULL, NULL),
98 _OMAP2420_MUXENTRY(DSS_DATA13, 43,
99 "dss_data13", NULL, NULL, "gpio_43",
100 NULL, NULL, NULL, NULL),
101 _OMAP2420_MUXENTRY(DSS_DATA14, 44,
102 "dss_data14", NULL, NULL, "gpio_44",
103 NULL, NULL, NULL, NULL),
104 _OMAP2420_MUXENTRY(DSS_DATA15, 45,
105 "dss_data15", NULL, NULL, "gpio_45",
106 NULL, NULL, NULL, NULL),
107 _OMAP2420_MUXENTRY(DSS_DATA16, 46,
108 "dss_data16", NULL, NULL, "gpio_46",
109 NULL, NULL, NULL, NULL),
110 _OMAP2420_MUXENTRY(DSS_DATA17, 47,
111 "dss_data17", NULL, NULL, "gpio_47",
112 NULL, NULL, NULL, NULL),
113 _OMAP2420_MUXENTRY(DSS_DATA8, 38,
114 "dss_data8", NULL, NULL, "gpio_38",
115 NULL, NULL, NULL, NULL),
116 _OMAP2420_MUXENTRY(DSS_DATA9, 39,
117 "dss_data9", NULL, NULL, "gpio_39",
118 NULL, NULL, NULL, NULL),
119 _OMAP2420_MUXENTRY(EAC_AC_DIN, 115,
120 "eac_ac_din", "mcbsp2_dr", NULL, "gpio_115",
121 NULL, NULL, NULL, NULL),
122 _OMAP2420_MUXENTRY(EAC_AC_DOUT, 116,
123 "eac_ac_dout", "mcbsp2_dx", NULL, "gpio_116",
124 NULL, NULL, NULL, NULL),
125 _OMAP2420_MUXENTRY(EAC_AC_FS, 114,
126 "eac_ac_fs", "mcbsp2_fsx", NULL, "gpio_114",
127 NULL, NULL, NULL, NULL),
128 _OMAP2420_MUXENTRY(EAC_AC_MCLK, 117,
129 "eac_ac_mclk", NULL, NULL, "gpio_117",
130 NULL, NULL, NULL, NULL),
131 _OMAP2420_MUXENTRY(EAC_AC_RST, 118,
132 "eac_ac_rst", "eac_bt_din", NULL, "gpio_118",
133 NULL, NULL, NULL, NULL),
134 _OMAP2420_MUXENTRY(EAC_AC_SCLK, 113,
135 "eac_ac_sclk", "mcbsp2_clkx", NULL, "gpio_113",
136 NULL, NULL, NULL, NULL),
137 _OMAP2420_MUXENTRY(EAC_BT_DIN, 73,
138 "eac_bt_din", NULL, NULL, "gpio_73",
139 NULL, NULL, "etk_d9", NULL),
140 _OMAP2420_MUXENTRY(EAC_BT_DOUT, 74,
141 "eac_bt_dout", NULL, "sti_clk", "gpio_74",
142 NULL, NULL, "etk_d8", NULL),
143 _OMAP2420_MUXENTRY(EAC_BT_FS, 72,
144 "eac_bt_fs", NULL, NULL, "gpio_72",
145 NULL, NULL, "etk_d10", NULL),
146 _OMAP2420_MUXENTRY(EAC_BT_SCLK, 71,
147 "eac_bt_sclk", NULL, NULL, "gpio_71",
148 NULL, NULL, "etk_d11", NULL),
149 _OMAP2420_MUXENTRY(GPIO_119, 119,
150 "gpio_119", NULL, "sti_din", "gpio_119",
151 NULL, "sys_boot0", "etk_d12", NULL),
152 _OMAP2420_MUXENTRY(GPIO_120, 120,
153 "gpio_120", NULL, "sti_dout", "gpio_120",
154 "cam_d9", "sys_boot1", "etk_d13", NULL),
155 _OMAP2420_MUXENTRY(GPIO_121, 121,
156 "gpio_121", NULL, NULL, "gpio_121",
157 "jtag_emu2", "sys_boot2", "etk_d14", NULL),
158 _OMAP2420_MUXENTRY(GPIO_122, 122,
159 "gpio_122", NULL, NULL, "gpio_122",
160 "jtag_emu3", "sys_boot3", "etk_d15", NULL),
161 _OMAP2420_MUXENTRY(GPIO_124, 124,
162 "gpio_124", NULL, NULL, "gpio_124",
163 NULL, "sys_boot5", NULL, NULL),
164 _OMAP2420_MUXENTRY(GPIO_125, 125,
165 "gpio_125", "sys_jtagsel1", "sys_jtagsel2", "gpio_125",
166 NULL, NULL, NULL, NULL),
167 _OMAP2420_MUXENTRY(GPIO_36, 36,
168 "gpio_36", NULL, NULL, "gpio_36",
169 NULL, "sys_boot4", NULL, NULL),
170 _OMAP2420_MUXENTRY(GPIO_62, 62,
171 "gpio_62", "uart1_rx", "usb1_dat", "gpio_62",
172 NULL, NULL, NULL, NULL),
173 _OMAP2420_MUXENTRY(GPIO_6, 6,
174 "gpio_6", "tv_detpulse", NULL, "gpio_6",
175 NULL, NULL, NULL, NULL),
176 _OMAP2420_MUXENTRY(GPMC_A10, 3,
177 "gpmc_a10", NULL, "sys_ndmareq5", "gpio_3",
178 NULL, NULL, NULL, NULL),
179 _OMAP2420_MUXENTRY(GPMC_A1, 12,
180 "gpmc_a1", "dss_data18", NULL, "gpio_12",
181 NULL, NULL, NULL, NULL),
182 _OMAP2420_MUXENTRY(GPMC_A2, 11,
183 "gpmc_a2", "dss_data19", NULL, "gpio_11",
184 NULL, NULL, NULL, NULL),
185 _OMAP2420_MUXENTRY(GPMC_A3, 10,
186 "gpmc_a3", "dss_data20", NULL, "gpio_10",
187 NULL, NULL, NULL, NULL),
188 _OMAP2420_MUXENTRY(GPMC_A4, 9,
189 "gpmc_a4", "dss_data21", NULL, "gpio_9",
190 NULL, NULL, NULL, NULL),
191 _OMAP2420_MUXENTRY(GPMC_A5, 8,
192 "gpmc_a5", "dss_data22", NULL, "gpio_8",
193 NULL, NULL, NULL, NULL),
194 _OMAP2420_MUXENTRY(GPMC_A6, 7,
195 "gpmc_a6", "dss_data23", NULL, "gpio_7",
196 NULL, NULL, NULL, NULL),
197 _OMAP2420_MUXENTRY(GPMC_A7, 6,
198 "gpmc_a7", NULL, "sys_ndmareq2", "gpio_6",
199 NULL, NULL, NULL, NULL),
200 _OMAP2420_MUXENTRY(GPMC_A8, 5,
201 "gpmc_a8", NULL, "sys_ndmareq3", "gpio_5",
202 NULL, NULL, NULL, NULL),
203 _OMAP2420_MUXENTRY(GPMC_A9, 4,
204 "gpmc_a9", NULL, "sys_ndmareq4", "gpio_4",
205 NULL, NULL, NULL, NULL),
206 _OMAP2420_MUXENTRY(GPMC_CLK, 21,
207 "gpmc_clk", NULL, NULL, "gpio_21",
208 NULL, NULL, NULL, NULL),
209 _OMAP2420_MUXENTRY(GPMC_D10, 18,
210 "gpmc_d10", "ssi2_rdy_rx", NULL, "gpio_18",
211 NULL, NULL, NULL, NULL),
212 _OMAP2420_MUXENTRY(GPMC_D11, 17,
213 "gpmc_d11", "ssi2_flag_rx", NULL, "gpio_17",
214 NULL, NULL, NULL, NULL),
215 _OMAP2420_MUXENTRY(GPMC_D12, 16,
216 "gpmc_d12", "ssi2_dat_rx", NULL, "gpio_16",
217 NULL, NULL, NULL, NULL),
218 _OMAP2420_MUXENTRY(GPMC_D13, 15,
219 "gpmc_d13", "ssi2_rdy_tx", NULL, "gpio_15",
220 NULL, NULL, NULL, NULL),
221 _OMAP2420_MUXENTRY(GPMC_D14, 14,
222 "gpmc_d14", "ssi2_flag_tx", NULL, "gpio_14",
223 NULL, NULL, NULL, NULL),
224 _OMAP2420_MUXENTRY(GPMC_D15, 13,
225 "gpmc_d15", "ssi2_dat_tx", NULL, "gpio_13",
226 NULL, NULL, NULL, NULL),
227 _OMAP2420_MUXENTRY(GPMC_D8, 20,
228 "gpmc_d8", NULL, NULL, "gpio_20",
229 NULL, NULL, NULL, NULL),
230 _OMAP2420_MUXENTRY(GPMC_D9, 19,
231 "gpmc_d9", "ssi2_wake", NULL, "gpio_19",
232 NULL, NULL, NULL, NULL),
233 _OMAP2420_MUXENTRY(GPMC_NBE0, 29,
234 "gpmc_nbe0", NULL, NULL, "gpio_29",
235 NULL, NULL, NULL, NULL),
236 _OMAP2420_MUXENTRY(GPMC_NBE1, 30,
237 "gpmc_nbe1", NULL, NULL, "gpio_30",
238 NULL, NULL, NULL, NULL),
239 _OMAP2420_MUXENTRY(GPMC_NCS1, 22,
240 "gpmc_ncs1", NULL, NULL, "gpio_22",
241 NULL, NULL, NULL, NULL),
242 _OMAP2420_MUXENTRY(GPMC_NCS2, 23,
243 "gpmc_ncs2", NULL, NULL, "gpio_23",
244 NULL, NULL, NULL, NULL),
245 _OMAP2420_MUXENTRY(GPMC_NCS3, 24,
246 "gpmc_ncs3", "gpmc_io_dir", NULL, "gpio_24",
247 NULL, NULL, NULL, NULL),
248 _OMAP2420_MUXENTRY(GPMC_NCS4, 25,
249 "gpmc_ncs4", NULL, NULL, "gpio_25",
250 NULL, NULL, NULL, NULL),
251 _OMAP2420_MUXENTRY(GPMC_NCS5, 26,
252 "gpmc_ncs5", NULL, NULL, "gpio_26",
253 NULL, NULL, NULL, NULL),
254 _OMAP2420_MUXENTRY(GPMC_NCS6, 27,
255 "gpmc_ncs6", NULL, NULL, "gpio_27",
256 NULL, NULL, NULL, NULL),
257 _OMAP2420_MUXENTRY(GPMC_NCS7, 28,
258 "gpmc_ncs7", "gpmc_io_dir", "gpio_28", NULL,
259 NULL, NULL, NULL, NULL),
260 _OMAP2420_MUXENTRY(GPMC_NWP, 31,
261 "gpmc_nwp", NULL, NULL, "gpio_31",
262 NULL, NULL, NULL, NULL),
263 _OMAP2420_MUXENTRY(GPMC_WAIT1, 33,
264 "gpmc_wait1", NULL, NULL, "gpio_33",
265 NULL, NULL, NULL, NULL),
266 _OMAP2420_MUXENTRY(GPMC_WAIT2, 34,
267 "gpmc_wait2", NULL, NULL, "gpio_34",
268 NULL, NULL, NULL, NULL),
269 _OMAP2420_MUXENTRY(GPMC_WAIT3, 35,
270 "gpmc_wait3", NULL, NULL, "gpio_35",
271 NULL, NULL, NULL, NULL),
272 _OMAP2420_MUXENTRY(HDQ_SIO, 101,
273 "hdq_sio", "usb2_tllse0", "sys_altclk", "gpio_101",
274 NULL, NULL, NULL, NULL),
275 _OMAP2420_MUXENTRY(I2C2_SCL, 99,
276 "i2c2_scl", NULL, "gpt9_pwm_evt", "gpio_99",
277 NULL, NULL, NULL, NULL),
278 _OMAP2420_MUXENTRY(I2C2_SDA, 100,
279 "i2c2_sda", NULL, "spi2_ncs1", "gpio_100",
280 NULL, NULL, NULL, NULL),
281 _OMAP2420_MUXENTRY(JTAG_EMU0, 127,
282 "jtag_emu0", NULL, NULL, "gpio_127",
283 NULL, NULL, NULL, NULL),
284 _OMAP2420_MUXENTRY(JTAG_EMU1, 126,
285 "jtag_emu1", NULL, NULL, "gpio_126",
286 NULL, NULL, NULL, NULL),
287 _OMAP2420_MUXENTRY(MCBSP1_CLKR, 92,
288 "mcbsp1_clkr", "ssi2_dat_tx", "vlynq_tx1", "gpio_92",
289 NULL, NULL, NULL, NULL),
290 _OMAP2420_MUXENTRY(MCBSP1_CLKX, 98,
291 "mcbsp1_clkx", "ssi2_wake", "vlynq_nla", "gpio_98",
292 NULL, NULL, NULL, NULL),
293 _OMAP2420_MUXENTRY(MCBSP1_DR, 95,
294 "mcbsp1_dr", "ssi2_dat_rx", "vlynq_rx1", "gpio_95",
295 NULL, NULL, NULL, NULL),
296 _OMAP2420_MUXENTRY(MCBSP1_DX, 94,
297 "mcbsp1_dx", "ssi2_rdy_tx", "vlynq_clk", "gpio_94",
298 NULL, NULL, NULL, NULL),
299 _OMAP2420_MUXENTRY(MCBSP1_FSR, 93,
300 "mcbsp1_fsr", "ssi2_flag_tx", "vlynq_tx0", "gpio_93",
301 "spi2_ncs1", NULL, NULL, NULL),
302 _OMAP2420_MUXENTRY(MCBSP1_FSX, 97,
303 "mcbsp1_fsx", "ssi2_rdy_rx", NULL, "gpio_97",
304 NULL, NULL, NULL, NULL),
305 _OMAP2420_MUXENTRY(MCBSP2_CLKX, 12,
306 "mcbsp2_clkx", NULL, "dss_data23", "gpio_12",
307 NULL, NULL, NULL, NULL),
308 _OMAP2420_MUXENTRY(MCBSP2_DR, 11,
309 "mcbsp2_dr", NULL, "dss_data22", "gpio_11",
310 NULL, NULL, NULL, NULL),
311 _OMAP2420_MUXENTRY(MCBSP_CLKS, 96,
312 "mcbsp_clks", "ssi2_flag_rx", "vlynq_rx0", "gpio_96",
313 NULL, NULL, NULL, NULL),
314 _OMAP2420_MUXENTRY(MMC_CLKI, 59,
315 "sdmmc_clki", "ms_clki", NULL, "gpio_59",
316 NULL, NULL, NULL, NULL),
317 _OMAP2420_MUXENTRY(MMC_CLKO, 0,
318 "sdmmc_clko", "ms_clko", NULL, NULL,
319 NULL, NULL, NULL, NULL),
320 _OMAP2420_MUXENTRY(MMC_CMD_DIR, 8,
321 "sdmmc_cmd_dir", NULL, NULL, "gpio_8",
322 NULL, NULL, NULL, NULL),
323 _OMAP2420_MUXENTRY(MMC_CMD, 0,
324 "sdmmc_cmd", "ms_bs", NULL, NULL,
325 NULL, NULL, NULL, NULL),
326 _OMAP2420_MUXENTRY(MMC_DAT_DIR0, 7,
327 "sdmmc_dat_dir0", "ms_dat0_dir", NULL, "gpio_7",
328 NULL, NULL, NULL, NULL),
329 _OMAP2420_MUXENTRY(MMC_DAT0, 0,
330 "sdmmc_dat0", "ms_dat0", NULL, NULL,
331 NULL, NULL, NULL, NULL),
332 _OMAP2420_MUXENTRY(MMC_DAT_DIR1, 78,
333 "sdmmc_dat_dir1", "ms_datu_dir", "uart2_rts", "gpio_78",
334 NULL, NULL, NULL, NULL),
335 _OMAP2420_MUXENTRY(MMC_DAT1, 75,
336 "sdmmc_dat1", "ms_dat1", NULL, "gpio_75",
337 NULL, NULL, NULL, NULL),
338 _OMAP2420_MUXENTRY(MMC_DAT_DIR2, 79,
339 "sdmmc_dat_dir2", "ms_datu_dir", "uart2_tx", "gpio_79",
340 NULL, NULL, NULL, NULL),
341 _OMAP2420_MUXENTRY(MMC_DAT2, 76,
342 "sdmmc_dat2", "ms_dat2", "uart2_cts", "gpio_76",
343 NULL, NULL, NULL, NULL),
344 _OMAP2420_MUXENTRY(MMC_DAT_DIR3, 80,
345 "sdmmc_dat_dir3", "ms_datu_dir", "uart2_rx", "gpio_80",
346 NULL, NULL, NULL, NULL),
347 _OMAP2420_MUXENTRY(MMC_DAT3, 77,
348 "sdmmc_dat3", "ms_dat3", NULL, "gpio_77",
349 NULL, NULL, NULL, NULL),
350 _OMAP2420_MUXENTRY(SDRC_A12, 2,
351 "sdrc_a12", NULL, NULL, "gpio_2",
352 NULL, NULL, NULL, NULL),
353 _OMAP2420_MUXENTRY(SDRC_A13, 1,
354 "sdrc_a13", NULL, NULL, "gpio_1",
355 NULL, NULL, NULL, NULL),
356 _OMAP2420_MUXENTRY(SDRC_A14, 0,
357 "sdrc_a14", NULL, NULL, "gpio_0",
358 NULL, NULL, NULL, NULL),
359 _OMAP2420_MUXENTRY(SDRC_CKE1, 38,
360 "sdrc_cke1", NULL, NULL, "gpio_38",
361 NULL, NULL, NULL, NULL),
362 _OMAP2420_MUXENTRY(SDRC_NCS1, 37,
363 "sdrc_ncs1", NULL, NULL, "gpio_37",
364 NULL, NULL, NULL, NULL),
365 _OMAP2420_MUXENTRY(SPI1_CLK, 81,
366 "spi1_clk", NULL, NULL, "gpio_81",
367 NULL, NULL, NULL, NULL),
368 _OMAP2420_MUXENTRY(SPI1_NCS0, 84,
369 "spi1_ncs0", NULL, NULL, "gpio_84",
370 NULL, NULL, NULL, NULL),
371 _OMAP2420_MUXENTRY(SPI1_NCS1, 85,
372 "spi1_ncs1", NULL, NULL, "gpio_85",
373 NULL, NULL, NULL, NULL),
374 _OMAP2420_MUXENTRY(SPI1_NCS2, 86,
375 "spi1_ncs2", NULL, NULL, "gpio_86",
376 NULL, NULL, NULL, NULL),
377 _OMAP2420_MUXENTRY(SPI1_NCS3, 87,
378 "spi1_ncs3", NULL, NULL, "gpio_87",
379 NULL, NULL, NULL, NULL),
380 _OMAP2420_MUXENTRY(SPI1_SIMO, 82,
381 "spi1_simo", NULL, NULL, "gpio_82",
382 NULL, NULL, NULL, NULL),
383 _OMAP2420_MUXENTRY(SPI1_SOMI, 83,
384 "spi1_somi", NULL, NULL, "gpio_83",
385 NULL, NULL, NULL, NULL),
386 _OMAP2420_MUXENTRY(SPI2_CLK, 88,
387 "spi2_clk", NULL, NULL, "gpio_88",
388 NULL, NULL, NULL, NULL),
389 _OMAP2420_MUXENTRY(SPI2_NCS0, 91,
390 "spi2_ncs0", "gpt12_pwm_evt", NULL, "gpio_91",
391 NULL, NULL, NULL, NULL),
392 _OMAP2420_MUXENTRY(SPI2_SIMO, 89,
393 "spi2_simo", "gpt10_pwm_evt", NULL, "gpio_89",
394 NULL, NULL, NULL, NULL),
395 _OMAP2420_MUXENTRY(SPI2_SOMI, 90,
396 "spi2_somi", "gpt11_pwm_evt", NULL, "gpio_90",
397 NULL, NULL, NULL, NULL),
398 _OMAP2420_MUXENTRY(SSI1_DAT_RX, 63,
399 "ssi1_dat_rx", "eac_md_sclk", NULL, "gpio_63",
400 NULL, NULL, NULL, NULL),
401 _OMAP2420_MUXENTRY(SSI1_DAT_TX, 59,
402 "ssi1_dat_tx", "uart1_tx", "usb1_se0", "gpio_59",
403 NULL, NULL, NULL, NULL),
404 _OMAP2420_MUXENTRY(SSI1_FLAG_RX, 64,
405 "ssi1_flag_rx", "eac_md_din", NULL, "gpio_64",
406 NULL, NULL, NULL, NULL),
407 _OMAP2420_MUXENTRY(SSI1_FLAG_TX, 25,
408 "ssi1_flag_tx", "uart1_rts", "usb1_rcv", "gpio_25",
409 NULL, NULL, NULL, NULL),
410 _OMAP2420_MUXENTRY(SSI1_RDY_RX, 65,
411 "ssi1_rdy_rx", "eac_md_dout", NULL, "gpio_65",
412 NULL, NULL, NULL, NULL),
413 _OMAP2420_MUXENTRY(SSI1_RDY_TX, 61,
414 "ssi1_rdy_tx", "uart1_cts", "usb1_txen", "gpio_61",
415 NULL, NULL, NULL, NULL),
416 _OMAP2420_MUXENTRY(SSI1_WAKE, 66,
417 "ssi1_wake", "eac_md_fs", NULL, "gpio_66",
418 NULL, NULL, NULL, NULL),
419 _OMAP2420_MUXENTRY(SYS_CLKOUT, 123,
420 "sys_clkout", NULL, NULL, "gpio_123",
421 NULL, NULL, NULL, NULL),
422 _OMAP2420_MUXENTRY(SYS_CLKREQ, 52,
423 "sys_clkreq", NULL, NULL, "gpio_52",
424 NULL, NULL, NULL, NULL),
425 _OMAP2420_MUXENTRY(SYS_NIRQ, 60,
426 "sys_nirq", NULL, NULL, "gpio_60",
427 NULL, NULL, NULL, NULL),
428 _OMAP2420_MUXENTRY(UART1_CTS, 32,
429 "uart1_cts", NULL, "dss_data18", "gpio_32",
430 NULL, NULL, NULL, NULL),
431 _OMAP2420_MUXENTRY(UART1_RTS, 8,
432 "uart1_rts", NULL, "dss_data19", "gpio_8",
433 NULL, NULL, NULL, NULL),
434 _OMAP2420_MUXENTRY(UART1_RX, 10,
435 "uart1_rx", NULL, "dss_data21", "gpio_10",
436 NULL, NULL, NULL, NULL),
437 _OMAP2420_MUXENTRY(UART1_TX, 9,
438 "uart1_tx", NULL, "dss_data20", "gpio_9",
439 NULL, NULL, NULL, NULL),
440 _OMAP2420_MUXENTRY(UART2_CTS, 67,
441 "uart2_cts", "usb1_rcv", "gpt9_pwm_evt", "gpio_67",
442 NULL, NULL, NULL, NULL),
443 _OMAP2420_MUXENTRY(UART2_RTS, 68,
444 "uart2_rts", "usb1_txen", "gpt10_pwm_evt", "gpio_68",
445 NULL, NULL, NULL, NULL),
446 _OMAP2420_MUXENTRY(UART2_RX, 70,
447 "uart2_rx", "usb1_dat", "gpt12_pwm_evt", "gpio_70",
448 NULL, NULL, NULL, NULL),
449 _OMAP2420_MUXENTRY(UART2_TX, 69,
450 "uart2_tx", "usb1_se0", "gpt11_pwm_evt", "gpio_69",
451 NULL, NULL, NULL, NULL),
452 _OMAP2420_MUXENTRY(UART3_CTS_RCTX, 102,
453 "uart3_cts_rctx", "uart3_rx_irrx", NULL, "gpio_102",
454 NULL, NULL, NULL, NULL),
455 _OMAP2420_MUXENTRY(UART3_RTS_SD, 103,
456 "uart3_rts_sd", "uart3_tx_irtx", NULL, "gpio_103",
457 NULL, NULL, NULL, NULL),
458 _OMAP2420_MUXENTRY(UART3_RX_IRRX, 105,
459 "uart3_rx_irrx", NULL, NULL, "gpio_105",
460 NULL, NULL, NULL, NULL),
461 _OMAP2420_MUXENTRY(UART3_TX_IRTX, 104,
462 "uart3_tx_irtx", "uart3_cts_rctx", NULL, "gpio_104",
463 NULL, NULL, NULL, NULL),
464 _OMAP2420_MUXENTRY(USB0_DAT, 112,
465 "usb0_dat", "uart3_rx_irrx", "uart2_rx", "gpio_112",
466 "uart2_tx", NULL, NULL, NULL),
467 _OMAP2420_MUXENTRY(USB0_PUEN, 106,
468 "usb0_puen", "mcbsp2_dx", NULL, "gpio_106",
469 NULL, NULL, NULL, NULL),
470 _OMAP2420_MUXENTRY(USB0_RCV, 109,
471 "usb0_rcv", "mcbsp2_fsx", NULL, "gpio_109",
472 "uart2_cts", NULL, NULL, NULL),
473 _OMAP2420_MUXENTRY(USB0_SE0, 111,
474 "usb0_se0", "uart3_tx_irtx", "uart2_tx", "gpio_111",
475 "uart2_rx", NULL, NULL, NULL),
476 _OMAP2420_MUXENTRY(USB0_TXEN, 110,
477 "usb0_txen", "uart3_cts_rctx", "uart2_cts", "gpio_110",
478 NULL, NULL, NULL, NULL),
479 _OMAP2420_MUXENTRY(USB0_VM, 108,
480 "usb0_vm", "mcbsp2_clkx", NULL, "gpio_108",
481 "uart2_rx", NULL, NULL, NULL),
482 _OMAP2420_MUXENTRY(USB0_VP, 107,
483 "usb0_vp", "mcbsp2_dr", NULL, "gpio_107",
484 NULL, NULL, NULL, NULL),
485 _OMAP2420_MUXENTRY(VLYNQ_CLK, 13,
486 "vlynq_clk", "usb2_se0", "sys_ndmareq0", "gpio_13",
487 NULL, NULL, NULL, NULL),
488 _OMAP2420_MUXENTRY(VLYNQ_NLA, 58,
489 "vlynq_nla", NULL, NULL, "gpio_58",
490 "cam_d6", NULL, NULL, NULL),
491 _OMAP2420_MUXENTRY(VLYNQ_RX0, 15,
492 "vlynq_rx0", "usb2_tllse0", NULL, "gpio_15",
493 "cam_d7", NULL, NULL, NULL),
494 _OMAP2420_MUXENTRY(VLYNQ_RX1, 14,
495 "vlynq_rx1", "usb2_rcv", "sys_ndmareq1", "gpio_14",
496 "cam_d8", NULL, NULL, NULL),
497 _OMAP2420_MUXENTRY(VLYNQ_TX0, 17,
498 "vlynq_tx0", "usb2_txen", NULL, "gpio_17",
499 NULL, NULL, NULL, NULL),
500 _OMAP2420_MUXENTRY(VLYNQ_TX1, 16,
501 "vlynq_tx1", "usb2_dat", "sys_clkout2", "gpio_16",
502 NULL, NULL, NULL, NULL),
503 { .reg_offset = OMAP_MUX_TERMINATOR },
504};
505
506/*
507 * Balls for 447-pin POP package
508 */
509#ifdef CONFIG_DEBUG_FS
510struct omap_ball __initdata omap2420_pop_ball[] = {
511 _OMAP2420_BALLENTRY(CAM_D0, "y4", NULL),
512 _OMAP2420_BALLENTRY(CAM_D1, "y3", NULL),
513 _OMAP2420_BALLENTRY(CAM_D2, "u7", NULL),
514 _OMAP2420_BALLENTRY(CAM_D3, "ab3", NULL),
515 _OMAP2420_BALLENTRY(CAM_D4, "v2", NULL),
516 _OMAP2420_BALLENTRY(CAM_D5, "ad3", NULL),
517 _OMAP2420_BALLENTRY(CAM_D6, "aa4", NULL),
518 _OMAP2420_BALLENTRY(CAM_D7, "ab4", NULL),
519 _OMAP2420_BALLENTRY(CAM_D8, "ac6", NULL),
520 _OMAP2420_BALLENTRY(CAM_D9, "ac7", NULL),
521 _OMAP2420_BALLENTRY(CAM_HS, "v4", NULL),
522 _OMAP2420_BALLENTRY(CAM_LCLK, "ad6", NULL),
523 _OMAP2420_BALLENTRY(CAM_VS, "p7", NULL),
524 _OMAP2420_BALLENTRY(CAM_XCLK, "w4", NULL),
525 _OMAP2420_BALLENTRY(DSS_ACBIAS, "ae8", NULL),
526 _OMAP2420_BALLENTRY(DSS_DATA10, "ac12", NULL),
527 _OMAP2420_BALLENTRY(DSS_DATA11, "ae11", NULL),
528 _OMAP2420_BALLENTRY(DSS_DATA12, "ae13", NULL),
529 _OMAP2420_BALLENTRY(DSS_DATA13, "ad13", NULL),
530 _OMAP2420_BALLENTRY(DSS_DATA14, "ac13", NULL),
531 _OMAP2420_BALLENTRY(DSS_DATA15, "y12", NULL),
532 _OMAP2420_BALLENTRY(DSS_DATA16, "ad14", NULL),
533 _OMAP2420_BALLENTRY(DSS_DATA17, "y13", NULL),
534 _OMAP2420_BALLENTRY(DSS_DATA8, "ad11", NULL),
535 _OMAP2420_BALLENTRY(DSS_DATA9, "ad12", NULL),
536 _OMAP2420_BALLENTRY(EAC_AC_DIN, "ad19", NULL),
537 _OMAP2420_BALLENTRY(EAC_AC_DOUT, "af22", NULL),
538 _OMAP2420_BALLENTRY(EAC_AC_FS, "ad16", NULL),
539 _OMAP2420_BALLENTRY(EAC_AC_MCLK, "y17", NULL),
540 _OMAP2420_BALLENTRY(EAC_AC_RST, "ae22", NULL),
541 _OMAP2420_BALLENTRY(EAC_AC_SCLK, "ac18", NULL),
542 _OMAP2420_BALLENTRY(EAC_BT_DIN, "u8", NULL),
543 _OMAP2420_BALLENTRY(EAC_BT_DOUT, "ad5", NULL),
544 _OMAP2420_BALLENTRY(EAC_BT_FS, "w7", NULL),
545 _OMAP2420_BALLENTRY(EAC_BT_SCLK, "ad4", NULL),
546 _OMAP2420_BALLENTRY(GPIO_119, "af6", NULL),
547 _OMAP2420_BALLENTRY(GPIO_120, "af4", NULL),
548 _OMAP2420_BALLENTRY(GPIO_121, "ae6", NULL),
549 _OMAP2420_BALLENTRY(GPIO_122, "w3", NULL),
550 _OMAP2420_BALLENTRY(GPIO_124, "y19", NULL),
551 _OMAP2420_BALLENTRY(GPIO_125, "ae24", NULL),
552 _OMAP2420_BALLENTRY(GPIO_36, "y18", NULL),
553 _OMAP2420_BALLENTRY(GPIO_6, "d6", NULL),
554 _OMAP2420_BALLENTRY(GPIO_62, "ad18", NULL),
555 _OMAP2420_BALLENTRY(GPMC_A1, "m8", NULL),
556 _OMAP2420_BALLENTRY(GPMC_A10, "d5", NULL),
557 _OMAP2420_BALLENTRY(GPMC_A2, "w9", NULL),
558 _OMAP2420_BALLENTRY(GPMC_A3, "af10", NULL),
559 _OMAP2420_BALLENTRY(GPMC_A4, "w8", NULL),
560 _OMAP2420_BALLENTRY(GPMC_A5, "ae16", NULL),
561 _OMAP2420_BALLENTRY(GPMC_A6, "af9", NULL),
562 _OMAP2420_BALLENTRY(GPMC_A7, "e4", NULL),
563 _OMAP2420_BALLENTRY(GPMC_A8, "j7", NULL),
564 _OMAP2420_BALLENTRY(GPMC_A9, "ae18", NULL),
565 _OMAP2420_BALLENTRY(GPMC_CLK, "p1", "l1"),
566 _OMAP2420_BALLENTRY(GPMC_D10, "t1", "n1"),
567 _OMAP2420_BALLENTRY(GPMC_D11, "u2", "p2"),
568 _OMAP2420_BALLENTRY(GPMC_D12, "u1", "p1"),
569 _OMAP2420_BALLENTRY(GPMC_D13, "p2", "m1"),
570 _OMAP2420_BALLENTRY(GPMC_D14, "h2", "j2"),
571 _OMAP2420_BALLENTRY(GPMC_D15, "h1", "k2"),
572 _OMAP2420_BALLENTRY(GPMC_D8, "v1", "r1"),
573 _OMAP2420_BALLENTRY(GPMC_D9, "y1", "t1"),
574 _OMAP2420_BALLENTRY(GPMC_NBE0, "af12", "aa10"),
575 _OMAP2420_BALLENTRY(GPMC_NBE1, "u3", NULL),
576 _OMAP2420_BALLENTRY(GPMC_NCS1, "af14", "w1"),
577 _OMAP2420_BALLENTRY(GPMC_NCS2, "g4", NULL),
578 _OMAP2420_BALLENTRY(GPMC_NCS3, "t8", NULL),
579 _OMAP2420_BALLENTRY(GPMC_NCS4, "h8", NULL),
580 _OMAP2420_BALLENTRY(GPMC_NCS5, "k3", NULL),
581 _OMAP2420_BALLENTRY(GPMC_NCS6, "m7", NULL),
582 _OMAP2420_BALLENTRY(GPMC_NCS7, "p3", NULL),
583 _OMAP2420_BALLENTRY(GPMC_NWP, "ae15", "y5"),
584 _OMAP2420_BALLENTRY(GPMC_WAIT1, "ae20", "y8"),
585 _OMAP2420_BALLENTRY(GPMC_WAIT2, "n2", NULL),
586 _OMAP2420_BALLENTRY(GPMC_WAIT3, "t4", NULL),
587 _OMAP2420_BALLENTRY(HDQ_SIO, "t23", NULL),
588 _OMAP2420_BALLENTRY(I2C2_SCL, "l2", NULL),
589 _OMAP2420_BALLENTRY(I2C2_SDA, "k19", NULL),
590 _OMAP2420_BALLENTRY(JTAG_EMU0, "n24", NULL),
591 _OMAP2420_BALLENTRY(JTAG_EMU1, "ac22", NULL),
592 _OMAP2420_BALLENTRY(MCBSP1_CLKR, "y24", NULL),
593 _OMAP2420_BALLENTRY(MCBSP1_CLKX, "t19", NULL),
594 _OMAP2420_BALLENTRY(MCBSP1_DR, "u23", NULL),
595 _OMAP2420_BALLENTRY(MCBSP1_DX, "r24", NULL),
596 _OMAP2420_BALLENTRY(MCBSP1_FSR, "r20", NULL),
597 _OMAP2420_BALLENTRY(MCBSP1_FSX, "r23", NULL),
598 _OMAP2420_BALLENTRY(MCBSP2_CLKX, "t24", NULL),
599 _OMAP2420_BALLENTRY(MCBSP2_DR, "p20", NULL),
600 _OMAP2420_BALLENTRY(MCBSP_CLKS, "p23", NULL),
601 _OMAP2420_BALLENTRY(MMC_CLKI, "c23", NULL),
602 _OMAP2420_BALLENTRY(MMC_CLKO, "h23", NULL),
603 _OMAP2420_BALLENTRY(MMC_CMD, "j23", NULL),
604 _OMAP2420_BALLENTRY(MMC_CMD_DIR, "j24", NULL),
605 _OMAP2420_BALLENTRY(MMC_DAT0, "h17", NULL),
606 _OMAP2420_BALLENTRY(MMC_DAT_DIR0, "f23", NULL),
607 _OMAP2420_BALLENTRY(MMC_DAT1, "g19", NULL),
608 _OMAP2420_BALLENTRY(MMC_DAT_DIR1, "d23", NULL),
609 _OMAP2420_BALLENTRY(MMC_DAT2, "h20", NULL),
610 _OMAP2420_BALLENTRY(MMC_DAT_DIR2, "g23", NULL),
611 _OMAP2420_BALLENTRY(MMC_DAT3, "d24", NULL),
612 _OMAP2420_BALLENTRY(MMC_DAT_DIR3, "e23", NULL),
613 _OMAP2420_BALLENTRY(SDRC_A12, "w26", "r21"),
614 _OMAP2420_BALLENTRY(SDRC_A13, "w25", "aa15"),
615 _OMAP2420_BALLENTRY(SDRC_A14, "aa26", "y12"),
616 _OMAP2420_BALLENTRY(SDRC_CKE1, "ae25", "y13"),
617 _OMAP2420_BALLENTRY(SDRC_NCS1, "y25", "t20"),
618 _OMAP2420_BALLENTRY(SPI1_CLK, "y23", NULL),
619 _OMAP2420_BALLENTRY(SPI1_NCS0, "w24", NULL),
620 _OMAP2420_BALLENTRY(SPI1_NCS1, "w23", NULL),
621 _OMAP2420_BALLENTRY(SPI1_NCS2, "v23", NULL),
622 _OMAP2420_BALLENTRY(SPI1_NCS3, "u20", NULL),
623 _OMAP2420_BALLENTRY(SPI1_SIMO, "h10", NULL),
624 _OMAP2420_BALLENTRY(SPI1_SOMI, "v19", NULL),
625 _OMAP2420_BALLENTRY(SPI2_CLK, "v24", NULL),
626 _OMAP2420_BALLENTRY(SPI2_NCS0, "aa24", NULL),
627 _OMAP2420_BALLENTRY(SPI2_SIMO, "u24", NULL),
628 _OMAP2420_BALLENTRY(SPI2_SOMI, "v25", NULL),
629 _OMAP2420_BALLENTRY(SSI1_DAT_RX, "w15", NULL),
630 _OMAP2420_BALLENTRY(SSI1_DAT_TX, "w13", NULL),
631 _OMAP2420_BALLENTRY(SSI1_FLAG_RX, "af11", NULL),
632 _OMAP2420_BALLENTRY(SSI1_FLAG_TX, "ac15", NULL),
633 _OMAP2420_BALLENTRY(SSI1_RDY_RX, "ac16", NULL),
634 _OMAP2420_BALLENTRY(SSI1_RDY_TX, "af15", NULL),
635 _OMAP2420_BALLENTRY(SSI1_WAKE, "ad15", NULL),
636 _OMAP2420_BALLENTRY(SYS_CLKOUT, "ae19", NULL),
637 _OMAP2420_BALLENTRY(SYS_CLKREQ, "ad20", NULL),
638 _OMAP2420_BALLENTRY(SYS_NIRQ, "y20", NULL),
639 _OMAP2420_BALLENTRY(UART1_CTS, "g20", NULL),
640 _OMAP2420_BALLENTRY(UART1_RTS, "k20", NULL),
641 _OMAP2420_BALLENTRY(UART1_RX, "t20", NULL),
642 _OMAP2420_BALLENTRY(UART1_TX, "h12", NULL),
643 _OMAP2420_BALLENTRY(UART2_CTS, "ac24", NULL),
644 _OMAP2420_BALLENTRY(UART2_RTS, "w20", NULL),
645 _OMAP2420_BALLENTRY(UART2_RX, "ad24", NULL),
646 _OMAP2420_BALLENTRY(UART2_TX, "ab24", NULL),
647 _OMAP2420_BALLENTRY(UART3_CTS_RCTX, "k24", NULL),
648 _OMAP2420_BALLENTRY(UART3_RTS_SD, "m20", NULL),
649 _OMAP2420_BALLENTRY(UART3_RX_IRRX, "h24", NULL),
650 _OMAP2420_BALLENTRY(UART3_TX_IRTX, "g24", NULL),
651 _OMAP2420_BALLENTRY(USB0_DAT, "j25", NULL),
652 _OMAP2420_BALLENTRY(USB0_PUEN, "l23", NULL),
653 _OMAP2420_BALLENTRY(USB0_RCV, "k23", NULL),
654 _OMAP2420_BALLENTRY(USB0_SE0, "l24", NULL),
655 _OMAP2420_BALLENTRY(USB0_TXEN, "m24", NULL),
656 _OMAP2420_BALLENTRY(USB0_VM, "n23", NULL),
657 _OMAP2420_BALLENTRY(USB0_VP, "m23", NULL),
658 _OMAP2420_BALLENTRY(VLYNQ_CLK, "w12", NULL),
659 _OMAP2420_BALLENTRY(VLYNQ_NLA, "ae10", NULL),
660 _OMAP2420_BALLENTRY(VLYNQ_RX0, "ad7", NULL),
661 _OMAP2420_BALLENTRY(VLYNQ_RX1, "w10", NULL),
662 _OMAP2420_BALLENTRY(VLYNQ_TX0, "y15", NULL),
663 _OMAP2420_BALLENTRY(VLYNQ_TX1, "w14", NULL),
664 { .reg_offset = OMAP_MUX_TERMINATOR },
665};
666#else
667#define omap2420_pop_ball NULL
668#endif
669
670int __init omap2420_mux_init(struct omap_board_mux *board_subset, int flags)
671{
672 struct omap_ball *package_balls = NULL;
673
674 switch (flags & OMAP_PACKAGE_MASK) {
675 case OMAP_PACKAGE_ZAC:
676 package_balls = omap2420_pop_ball;
677 break;
678 case OMAP_PACKAGE_ZAF:
679 /* REVISIT: Please add data */
680 default:
681 pr_warning("mux: No ball data available for omap2420 package\n");
682 }
683
684 return omap_mux_init(OMAP2420_CONTROL_PADCONF_MUX_PBASE,
685 OMAP2420_CONTROL_PADCONF_MUX_SIZE,
686 omap2420_muxmodes, NULL, board_subset,
687 package_balls);
688}
diff --git a/arch/arm/mach-omap2/mux2420.h b/arch/arm/mach-omap2/mux2420.h
new file mode 100644
index 000000000000..0f555aa847b5
--- /dev/null
+++ b/arch/arm/mach-omap2/mux2420.h
@@ -0,0 +1,282 @@
1/*
2 * Copyright (C) 2009 Nokia
3 * Copyright (C) 2009 Texas Instruments
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#define OMAP2420_CONTROL_PADCONF_MUX_PBASE 0x48000030LU
11
12#define OMAP2420_MUX(mode0, mux_value) \
13{ \
14 .reg_offset = (OMAP2420_CONTROL_PADCONF_##mode0##_OFFSET), \
15 .value = (mux_value), \
16}
17
18/*
19 * OMAP2420 CONTROL_PADCONF* register offsets for pin-muxing
20 *
21 * Extracted from the TRM. Add 0x48000030 to these values to get the
22 * absolute addresses. The name in the macro is the mode-0 name of
23 * the pin. NOTE: These registers are 8-bits wide.
24 */
25#define OMAP2420_CONTROL_PADCONF_SDRC_A14_OFFSET 0x000
26#define OMAP2420_CONTROL_PADCONF_SDRC_A13_OFFSET 0x001
27#define OMAP2420_CONTROL_PADCONF_SDRC_A12_OFFSET 0x002
28#define OMAP2420_CONTROL_PADCONF_SDRC_BA1_OFFSET 0x003
29#define OMAP2420_CONTROL_PADCONF_SDRC_BA0_OFFSET 0x004
30#define OMAP2420_CONTROL_PADCONF_SDRC_A11_OFFSET 0x005
31#define OMAP2420_CONTROL_PADCONF_SDRC_A10_OFFSET 0x006
32#define OMAP2420_CONTROL_PADCONF_SDRC_A9_OFFSET 0x007
33#define OMAP2420_CONTROL_PADCONF_SDRC_A8_OFFSET 0x008
34#define OMAP2420_CONTROL_PADCONF_SDRC_A7_OFFSET 0x009
35#define OMAP2420_CONTROL_PADCONF_SDRC_A6_OFFSET 0x00a
36#define OMAP2420_CONTROL_PADCONF_SDRC_A5_OFFSET 0x00b
37#define OMAP2420_CONTROL_PADCONF_SDRC_A4_OFFSET 0x00c
38#define OMAP2420_CONTROL_PADCONF_SDRC_A3_OFFSET 0x00d
39#define OMAP2420_CONTROL_PADCONF_SDRC_A2_OFFSET 0x00e
40#define OMAP2420_CONTROL_PADCONF_SDRC_A1_OFFSET 0x00f
41#define OMAP2420_CONTROL_PADCONF_SDRC_A0_OFFSET 0x010
42#define OMAP2420_CONTROL_PADCONF_SDRC_D31_OFFSET 0x021
43#define OMAP2420_CONTROL_PADCONF_SDRC_D30_OFFSET 0x022
44#define OMAP2420_CONTROL_PADCONF_SDRC_D29_OFFSET 0x023
45#define OMAP2420_CONTROL_PADCONF_SDRC_D28_OFFSET 0x024
46#define OMAP2420_CONTROL_PADCONF_SDRC_D27_OFFSET 0x025
47#define OMAP2420_CONTROL_PADCONF_SDRC_D26_OFFSET 0x026
48#define OMAP2420_CONTROL_PADCONF_SDRC_D25_OFFSET 0x027
49#define OMAP2420_CONTROL_PADCONF_SDRC_D24_OFFSET 0x028
50#define OMAP2420_CONTROL_PADCONF_SDRC_D23_OFFSET 0x029
51#define OMAP2420_CONTROL_PADCONF_SDRC_D22_OFFSET 0x02a
52#define OMAP2420_CONTROL_PADCONF_SDRC_D21_OFFSET 0x02b
53#define OMAP2420_CONTROL_PADCONF_SDRC_D20_OFFSET 0x02c
54#define OMAP2420_CONTROL_PADCONF_SDRC_D19_OFFSET 0x02d
55#define OMAP2420_CONTROL_PADCONF_SDRC_D18_OFFSET 0x02e
56#define OMAP2420_CONTROL_PADCONF_SDRC_D17_OFFSET 0x02f
57#define OMAP2420_CONTROL_PADCONF_SDRC_D16_OFFSET 0x030
58#define OMAP2420_CONTROL_PADCONF_SDRC_D15_OFFSET 0x031
59#define OMAP2420_CONTROL_PADCONF_SDRC_D14_OFFSET 0x032
60#define OMAP2420_CONTROL_PADCONF_SDRC_D13_OFFSET 0x033
61#define OMAP2420_CONTROL_PADCONF_SDRC_D12_OFFSET 0x034
62#define OMAP2420_CONTROL_PADCONF_SDRC_D11_OFFSET 0x035
63#define OMAP2420_CONTROL_PADCONF_SDRC_D10_OFFSET 0x036
64#define OMAP2420_CONTROL_PADCONF_SDRC_D9_OFFSET 0x037
65#define OMAP2420_CONTROL_PADCONF_SDRC_D8_OFFSET 0x038
66#define OMAP2420_CONTROL_PADCONF_SDRC_D7_OFFSET 0x039
67#define OMAP2420_CONTROL_PADCONF_SDRC_D6_OFFSET 0x03a
68#define OMAP2420_CONTROL_PADCONF_SDRC_D5_OFFSET 0x03b
69#define OMAP2420_CONTROL_PADCONF_SDRC_D4_OFFSET 0x03c
70#define OMAP2420_CONTROL_PADCONF_SDRC_D3_OFFSET 0x03d
71#define OMAP2420_CONTROL_PADCONF_SDRC_D2_OFFSET 0x03e
72#define OMAP2420_CONTROL_PADCONF_SDRC_D1_OFFSET 0x03f
73#define OMAP2420_CONTROL_PADCONF_SDRC_D0_OFFSET 0x040
74#define OMAP2420_CONTROL_PADCONF_GPMC_A10_OFFSET 0x041
75#define OMAP2420_CONTROL_PADCONF_GPMC_A9_OFFSET 0x042
76#define OMAP2420_CONTROL_PADCONF_GPMC_A8_OFFSET 0x043
77#define OMAP2420_CONTROL_PADCONF_GPMC_A7_OFFSET 0x044
78#define OMAP2420_CONTROL_PADCONF_GPMC_A6_OFFSET 0x045
79#define OMAP2420_CONTROL_PADCONF_GPMC_A5_OFFSET 0x046
80#define OMAP2420_CONTROL_PADCONF_GPMC_A4_OFFSET 0x047
81#define OMAP2420_CONTROL_PADCONF_GPMC_A3_OFFSET 0x048
82#define OMAP2420_CONTROL_PADCONF_GPMC_A2_OFFSET 0x049
83#define OMAP2420_CONTROL_PADCONF_GPMC_A1_OFFSET 0x04a
84#define OMAP2420_CONTROL_PADCONF_GPMC_D15_OFFSET 0x04b
85#define OMAP2420_CONTROL_PADCONF_GPMC_D14_OFFSET 0x04c
86#define OMAP2420_CONTROL_PADCONF_GPMC_D13_OFFSET 0x04d
87#define OMAP2420_CONTROL_PADCONF_GPMC_D12_OFFSET 0x04e
88#define OMAP2420_CONTROL_PADCONF_GPMC_D11_OFFSET 0x04f
89#define OMAP2420_CONTROL_PADCONF_GPMC_D10_OFFSET 0x050
90#define OMAP2420_CONTROL_PADCONF_GPMC_D9_OFFSET 0x051
91#define OMAP2420_CONTROL_PADCONF_GPMC_D8_OFFSET 0x052
92#define OMAP2420_CONTROL_PADCONF_GPMC_D7_OFFSET 0x053
93#define OMAP2420_CONTROL_PADCONF_GPMC_D6_OFFSET 0x054
94#define OMAP2420_CONTROL_PADCONF_GPMC_D5_OFFSET 0x055
95#define OMAP2420_CONTROL_PADCONF_GPMC_D4_OFFSET 0x056
96#define OMAP2420_CONTROL_PADCONF_GPMC_D3_OFFSET 0x057
97#define OMAP2420_CONTROL_PADCONF_GPMC_D2_OFFSET 0x058
98#define OMAP2420_CONTROL_PADCONF_GPMC_D1_OFFSET 0x059
99#define OMAP2420_CONTROL_PADCONF_GPMC_D0_OFFSET 0x05a
100#define OMAP2420_CONTROL_PADCONF_GPMC_CLK_OFFSET 0x05b
101#define OMAP2420_CONTROL_PADCONF_GPMC_NCS0_OFFSET 0x05c
102#define OMAP2420_CONTROL_PADCONF_GPMC_NCS1_OFFSET 0x05d
103#define OMAP2420_CONTROL_PADCONF_GPMC_NCS2_OFFSET 0x05e
104#define OMAP2420_CONTROL_PADCONF_GPMC_NCS3_OFFSET 0x05f
105#define OMAP2420_CONTROL_PADCONF_GPMC_NCS4_OFFSET 0x060
106#define OMAP2420_CONTROL_PADCONF_GPMC_NCS5_OFFSET 0x061
107#define OMAP2420_CONTROL_PADCONF_GPMC_NCS6_OFFSET 0x062
108#define OMAP2420_CONTROL_PADCONF_GPMC_NCS7_OFFSET 0x063
109#define OMAP2420_CONTROL_PADCONF_GPMC_NALE_ALE_OFFSET 0x064
110#define OMAP2420_CONTROL_PADCONF_GPMC_NOE_OFFSET 0x065
111#define OMAP2420_CONTROL_PADCONF_GPMC_NWE_OFFSET 0x066
112#define OMAP2420_CONTROL_PADCONF_GPMC_NBE0_OFFSET 0x067
113#define OMAP2420_CONTROL_PADCONF_GPMC_NBE1_OFFSET 0x068
114#define OMAP2420_CONTROL_PADCONF_GPMC_NWP_OFFSET 0x069
115#define OMAP2420_CONTROL_PADCONF_GPMC_WAIT0_OFFSET 0x06a
116#define OMAP2420_CONTROL_PADCONF_GPMC_WAIT1_OFFSET 0x06b
117#define OMAP2420_CONTROL_PADCONF_GPMC_WAIT2_OFFSET 0x06c
118#define OMAP2420_CONTROL_PADCONF_GPMC_WAIT3_OFFSET 0x06d
119#define OMAP2420_CONTROL_PADCONF_SDRC_CLK_OFFSET 0x06e
120#define OMAP2420_CONTROL_PADCONF_SDRC_NCLK_OFFSET 0x06f
121#define OMAP2420_CONTROL_PADCONF_SDRC_NCS0_OFFSET 0x070
122#define OMAP2420_CONTROL_PADCONF_SDRC_NCS1_OFFSET 0x071
123#define OMAP2420_CONTROL_PADCONF_SDRC_CKE0_OFFSET 0x072
124#define OMAP2420_CONTROL_PADCONF_SDRC_CKE1_OFFSET 0x073
125#define OMAP2420_CONTROL_PADCONF_SDRC_NRAS_OFFSET 0x074
126#define OMAP2420_CONTROL_PADCONF_SDRC_NCAS_OFFSET 0x075
127#define OMAP2420_CONTROL_PADCONF_SDRC_NWE_OFFSET 0x076
128#define OMAP2420_CONTROL_PADCONF_SDRC_DM0_OFFSET 0x077
129#define OMAP2420_CONTROL_PADCONF_SDRC_DM1_OFFSET 0x078
130#define OMAP2420_CONTROL_PADCONF_SDRC_DM2_OFFSET 0x079
131#define OMAP2420_CONTROL_PADCONF_SDRC_DM3_OFFSET 0x07a
132#define OMAP2420_CONTROL_PADCONF_SDRC_DQS0_OFFSET 0x07f
133#define OMAP2420_CONTROL_PADCONF_SDRC_DQS1_OFFSET 0x080
134#define OMAP2420_CONTROL_PADCONF_SDRC_DQS2_OFFSET 0x081
135#define OMAP2420_CONTROL_PADCONF_SDRC_DQS3_OFFSET 0x082
136#define OMAP2420_CONTROL_PADCONF_DSS_DATA0_OFFSET 0x083
137#define OMAP2420_CONTROL_PADCONF_DSS_DATA1_OFFSET 0x084
138#define OMAP2420_CONTROL_PADCONF_DSS_DATA2_OFFSET 0x085
139#define OMAP2420_CONTROL_PADCONF_DSS_DATA3_OFFSET 0x086
140#define OMAP2420_CONTROL_PADCONF_DSS_DATA4_OFFSET 0x087
141#define OMAP2420_CONTROL_PADCONF_DSS_DATA5_OFFSET 0x088
142#define OMAP2420_CONTROL_PADCONF_DSS_DATA6_OFFSET 0x089
143#define OMAP2420_CONTROL_PADCONF_DSS_DATA7_OFFSET 0x08a
144#define OMAP2420_CONTROL_PADCONF_DSS_DATA8_OFFSET 0x08b
145#define OMAP2420_CONTROL_PADCONF_DSS_DATA9_OFFSET 0x08c
146#define OMAP2420_CONTROL_PADCONF_DSS_DATA10_OFFSET 0x08d
147#define OMAP2420_CONTROL_PADCONF_DSS_DATA11_OFFSET 0x08e
148#define OMAP2420_CONTROL_PADCONF_DSS_DATA12_OFFSET 0x08f
149#define OMAP2420_CONTROL_PADCONF_DSS_DATA13_OFFSET 0x090
150#define OMAP2420_CONTROL_PADCONF_DSS_DATA14_OFFSET 0x091
151#define OMAP2420_CONTROL_PADCONF_DSS_DATA15_OFFSET 0x092
152#define OMAP2420_CONTROL_PADCONF_DSS_DATA16_OFFSET 0x093
153#define OMAP2420_CONTROL_PADCONF_DSS_DATA17_OFFSET 0x094
154#define OMAP2420_CONTROL_PADCONF_UART1_CTS_OFFSET 0x095
155#define OMAP2420_CONTROL_PADCONF_UART1_RTS_OFFSET 0x096
156#define OMAP2420_CONTROL_PADCONF_UART1_TX_OFFSET 0x097
157#define OMAP2420_CONTROL_PADCONF_UART1_RX_OFFSET 0x098
158#define OMAP2420_CONTROL_PADCONF_MCBSP2_DR_OFFSET 0x099
159#define OMAP2420_CONTROL_PADCONF_MCBSP2_CLKX_OFFSET 0x09a
160#define OMAP2420_CONTROL_PADCONF_DSS_PCL_OFFSET 0x09b
161#define OMAP2420_CONTROL_PADCONF_DSS_VSYNC_OFFSET 0x09c
162#define OMAP2420_CONTROL_PADCONF_DSS_HSYNC_OFFSET 0x09d
163#define OMAP2420_CONTROL_PADCONF_DSS_ACBIAS_OFFSET 0x09e
164#define OMAP2420_CONTROL_PADCONF_CAM_D9_OFFSET 0x09f
165#define OMAP2420_CONTROL_PADCONF_CAM_D8_OFFSET 0x0a0
166#define OMAP2420_CONTROL_PADCONF_CAM_D7_OFFSET 0x0a1
167#define OMAP2420_CONTROL_PADCONF_CAM_D6_OFFSET 0x0a2
168#define OMAP2420_CONTROL_PADCONF_CAM_D5_OFFSET 0x0a3
169#define OMAP2420_CONTROL_PADCONF_CAM_D4_OFFSET 0x0a4
170#define OMAP2420_CONTROL_PADCONF_CAM_D3_OFFSET 0x0a5
171#define OMAP2420_CONTROL_PADCONF_CAM_D2_OFFSET 0x0a6
172#define OMAP2420_CONTROL_PADCONF_CAM_D1_OFFSET 0x0a7
173#define OMAP2420_CONTROL_PADCONF_CAM_D0_OFFSET 0x0a8
174#define OMAP2420_CONTROL_PADCONF_CAM_HS_OFFSET 0x0a9
175#define OMAP2420_CONTROL_PADCONF_CAM_VS_OFFSET 0x0aa
176#define OMAP2420_CONTROL_PADCONF_CAM_LCLK_OFFSET 0x0ab
177#define OMAP2420_CONTROL_PADCONF_CAM_XCLK_OFFSET 0x0ac
178#define OMAP2420_CONTROL_PADCONF_SSI1_DAT_TX_OFFSET 0x0ad
179#define OMAP2420_CONTROL_PADCONF_SSI1_FLAG_TX_OFFSET 0x0ae
180#define OMAP2420_CONTROL_PADCONF_SSI1_RDY_TX_OFFSET 0x0af
181#define OMAP2420_CONTROL_PADCONF_GPIO_62_OFFSET 0x0b0
182#define OMAP2420_CONTROL_PADCONF_SSI1_DAT_RX_OFFSET 0x0b1
183#define OMAP2420_CONTROL_PADCONF_SSI1_FLAG_RX_OFFSET 0x0b2
184#define OMAP2420_CONTROL_PADCONF_SSI1_RDY_RX_OFFSET 0x0b3
185#define OMAP2420_CONTROL_PADCONF_SSI1_WAKE_OFFSET 0x0b4
186#define OMAP2420_CONTROL_PADCONF_VLYNQ_CLK_OFFSET 0x0b5
187#define OMAP2420_CONTROL_PADCONF_VLYNQ_RX1_OFFSET 0x0b6
188#define OMAP2420_CONTROL_PADCONF_VLYNQ_RX0_OFFSET 0x0b7
189#define OMAP2420_CONTROL_PADCONF_VLYNQ_TX1_OFFSET 0x0b8
190#define OMAP2420_CONTROL_PADCONF_VLYNQ_TX0_OFFSET 0x0b9
191#define OMAP2420_CONTROL_PADCONF_VLYNQ_NLA_OFFSET 0x0ba
192#define OMAP2420_CONTROL_PADCONF_UART2_CTS_OFFSET 0x0bb
193#define OMAP2420_CONTROL_PADCONF_UART2_RTS_OFFSET 0x0bc
194#define OMAP2420_CONTROL_PADCONF_UART2_TX_OFFSET 0x0bd
195#define OMAP2420_CONTROL_PADCONF_UART2_RX_OFFSET 0x0be
196#define OMAP2420_CONTROL_PADCONF_EAC_BT_SCLK_OFFSET 0x0bf
197#define OMAP2420_CONTROL_PADCONF_EAC_BT_FS_OFFSET 0x0c0
198#define OMAP2420_CONTROL_PADCONF_EAC_BT_DIN_OFFSET 0x0c1
199#define OMAP2420_CONTROL_PADCONF_EAC_BT_DOUT_OFFSET 0x0c2
200#define OMAP2420_CONTROL_PADCONF_MMC_CLKO_OFFSET 0x0c3
201#define OMAP2420_CONTROL_PADCONF_MMC_CMD_OFFSET 0x0c4
202#define OMAP2420_CONTROL_PADCONF_MMC_DAT0_OFFSET 0x0c5
203#define OMAP2420_CONTROL_PADCONF_MMC_DAT1_OFFSET 0x0c6
204#define OMAP2420_CONTROL_PADCONF_MMC_DAT2_OFFSET 0x0c7
205#define OMAP2420_CONTROL_PADCONF_MMC_DAT3_OFFSET 0x0c8
206#define OMAP2420_CONTROL_PADCONF_MMC_DAT_DIR0_OFFSET 0x0c9
207#define OMAP2420_CONTROL_PADCONF_MMC_DAT_DIR1_OFFSET 0x0ca
208#define OMAP2420_CONTROL_PADCONF_MMC_DAT_DIR2_OFFSET 0x0cb
209#define OMAP2420_CONTROL_PADCONF_MMC_DAT_DIR3_OFFSET 0x0cc
210#define OMAP2420_CONTROL_PADCONF_MMC_CMD_DIR_OFFSET 0x0cd
211#define OMAP2420_CONTROL_PADCONF_MMC_CLKI_OFFSET 0x0ce
212#define OMAP2420_CONTROL_PADCONF_SPI1_CLK_OFFSET 0x0cf
213#define OMAP2420_CONTROL_PADCONF_SPI1_SIMO_OFFSET 0x0d0
214#define OMAP2420_CONTROL_PADCONF_SPI1_SOMI_OFFSET 0x0d1
215#define OMAP2420_CONTROL_PADCONF_SPI1_NCS0_OFFSET 0x0d2
216#define OMAP2420_CONTROL_PADCONF_SPI1_NCS1_OFFSET 0x0d3
217#define OMAP2420_CONTROL_PADCONF_SPI1_NCS2_OFFSET 0x0d4
218#define OMAP2420_CONTROL_PADCONF_SPI1_NCS3_OFFSET 0x0d5
219#define OMAP2420_CONTROL_PADCONF_SPI2_CLK_OFFSET 0x0d6
220#define OMAP2420_CONTROL_PADCONF_SPI2_SIMO_OFFSET 0x0d7
221#define OMAP2420_CONTROL_PADCONF_SPI2_SOMI_OFFSET 0x0d8
222#define OMAP2420_CONTROL_PADCONF_SPI2_NCS0_OFFSET 0x0d9
223#define OMAP2420_CONTROL_PADCONF_MCBSP1_CLKR_OFFSET 0x0da
224#define OMAP2420_CONTROL_PADCONF_MCBSP1_FSR_OFFSET 0x0db
225#define OMAP2420_CONTROL_PADCONF_MCBSP1_DX_OFFSET 0x0dc
226#define OMAP2420_CONTROL_PADCONF_MCBSP1_DR_OFFSET 0x0dd
227#define OMAP2420_CONTROL_PADCONF_MCBSP_CLKS_OFFSET 0x0de
228#define OMAP2420_CONTROL_PADCONF_MCBSP1_FSX_OFFSET 0x0df
229#define OMAP2420_CONTROL_PADCONF_MCBSP1_CLKX_OFFSET 0x0e0
230#define OMAP2420_CONTROL_PADCONF_I2C1_SCL_OFFSET 0x0e1
231#define OMAP2420_CONTROL_PADCONF_I2C1_SDA_OFFSET 0x0e2
232#define OMAP2420_CONTROL_PADCONF_I2C2_SCL_OFFSET 0x0e3
233#define OMAP2420_CONTROL_PADCONF_I2C2_SDA_OFFSET 0x0e4
234#define OMAP2420_CONTROL_PADCONF_HDQ_SIO_OFFSET 0x0e5
235#define OMAP2420_CONTROL_PADCONF_UART3_CTS_RCTX_OFFSET 0x0e6
236#define OMAP2420_CONTROL_PADCONF_UART3_RTS_SD_OFFSET 0x0e7
237#define OMAP2420_CONTROL_PADCONF_UART3_TX_IRTX_OFFSET 0x0e8
238#define OMAP2420_CONTROL_PADCONF_UART3_RX_IRRX_OFFSET 0x0e9
239#define OMAP2420_CONTROL_PADCONF_TV_CVBS_OFFSET 0x0ea
240#define OMAP2420_CONTROL_PADCONF_TV_VREF_OFFSET 0x0eb
241#define OMAP2420_CONTROL_PADCONF_TV_RREF_OFFSET 0x0ec
242#define OMAP2420_CONTROL_PADCONF_USB0_PUEN_OFFSET 0x0ed
243#define OMAP2420_CONTROL_PADCONF_USB0_VP_OFFSET 0x0ee
244#define OMAP2420_CONTROL_PADCONF_USB0_VM_OFFSET 0x0ef
245#define OMAP2420_CONTROL_PADCONF_USB0_RCV_OFFSET 0x0f0
246#define OMAP2420_CONTROL_PADCONF_USB0_TXEN_OFFSET 0x0f1
247#define OMAP2420_CONTROL_PADCONF_USB0_SE0_OFFSET 0x0f2
248#define OMAP2420_CONTROL_PADCONF_USB0_DAT_OFFSET 0x0f3
249#define OMAP2420_CONTROL_PADCONF_EAC_AC_SCLK_OFFSET 0x0f4
250#define OMAP2420_CONTROL_PADCONF_EAC_AC_FS_OFFSET 0x0f5
251#define OMAP2420_CONTROL_PADCONF_EAC_AC_DIN_OFFSET 0x0f6
252#define OMAP2420_CONTROL_PADCONF_EAC_AC_DOUT_OFFSET 0x0f7
253#define OMAP2420_CONTROL_PADCONF_EAC_AC_MCLK_OFFSET 0x0f8
254#define OMAP2420_CONTROL_PADCONF_EAC_AC_RST_OFFSET 0x0f9
255#define OMAP2420_CONTROL_PADCONF_SYS_NRESPWRON_OFFSET 0x0fa
256#define OMAP2420_CONTROL_PADCONF_SYS_NRESWARM_OFFSET 0x0fb
257#define OMAP2420_CONTROL_PADCONF_SYS_NIRQ_OFFSET 0x0fc
258#define OMAP2420_CONTROL_PADCONF_SYS_NV_OFFSET 0x0fd
259#define OMAP2420_CONTROL_PADCONF_GPIO_119_OFFSET 0x0fe
260#define OMAP2420_CONTROL_PADCONF_GPIO_120_OFFSET 0x0ff
261#define OMAP2420_CONTROL_PADCONF_GPIO_121_OFFSET 0x100
262#define OMAP2420_CONTROL_PADCONF_GPIO_122_OFFSET 0x101
263#define OMAP2420_CONTROL_PADCONF_SYS_32K_OFFSET 0x102
264#define OMAP2420_CONTROL_PADCONF_SYS_XTALIN_OFFSET 0x103
265#define OMAP2420_CONTROL_PADCONF_SYS_XTALOUT_OFFSET 0x104
266#define OMAP2420_CONTROL_PADCONF_GPIO_36_OFFSET 0x105
267#define OMAP2420_CONTROL_PADCONF_SYS_CLKREQ_OFFSET 0x106
268#define OMAP2420_CONTROL_PADCONF_SYS_CLKOUT_OFFSET 0x107
269#define OMAP2420_CONTROL_PADCONF_GPIO_6_OFFSET 0x108
270#define OMAP2420_CONTROL_PADCONF_GPIO_124_OFFSET 0x109
271#define OMAP2420_CONTROL_PADCONF_GPIO_125_OFFSET 0x10a
272#define OMAP2420_CONTROL_PADCONF_JTAG_EMU1_OFFSET 0x10b
273#define OMAP2420_CONTROL_PADCONF_JTAG_EMU0_OFFSET 0x10c
274#define OMAP2420_CONTROL_PADCONF_JTAG_NTRST_OFFSET 0x10d
275#define OMAP2420_CONTROL_PADCONF_JTAG_TCK_OFFSET 0x10e
276#define OMAP2420_CONTROL_PADCONF_JTAG_RTCK_OFFSET 0x10f
277#define OMAP2420_CONTROL_PADCONF_JTAG_TMS_OFFSET 0x110
278#define OMAP2420_CONTROL_PADCONF_JTAG_TDI_OFFSET 0x111
279#define OMAP2420_CONTROL_PADCONF_JTAG_TDO_OFFSET 0x112
280
281#define OMAP2420_CONTROL_PADCONF_MUX_SIZE \
282 (OMAP2420_CONTROL_PADCONF_JTAG_TDO_OFFSET + 0x1)
diff --git a/arch/arm/mach-omap2/mux2430.c b/arch/arm/mach-omap2/mux2430.c
new file mode 100644
index 000000000000..7dcaaa8af32a
--- /dev/null
+++ b/arch/arm/mach-omap2/mux2430.c
@@ -0,0 +1,791 @@
1/*
2 * Copyright (C) 2010 Nokia
3 * Copyright (C) 2010 Texas Instruments
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#include <linux/module.h>
11#include <linux/init.h>
12
13#include "mux.h"
14
15#ifdef CONFIG_OMAP_MUX
16
17#define _OMAP2430_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \
18{ \
19 .reg_offset = (OMAP2430_CONTROL_PADCONF_##M0##_OFFSET), \
20 .gpio = (g), \
21 .muxnames = { m0, m1, m2, m3, m4, m5, m6, m7 }, \
22}
23
24#else
25
26#define _OMAP2430_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \
27{ \
28 .reg_offset = (OMAP2430_CONTROL_PADCONF_##M0##_OFFSET), \
29 .gpio = (g), \
30}
31
32#endif
33
34#define _OMAP2430_BALLENTRY(M0, bb, bt) \
35{ \
36 .reg_offset = (OMAP2430_CONTROL_PADCONF_##M0##_OFFSET), \
37 .balls = { bb, bt }, \
38}
39
40/*
41 * Superset of all mux modes for omap2430
42 */
43static struct omap_mux __initdata omap2430_muxmodes[] = {
44 _OMAP2430_MUXENTRY(CAM_D0, 133,
45 "cam_d0", "hw_dbg0", "sti_dout", "gpio_133",
46 NULL, NULL, "etk_d2", "safe_mode"),
47 _OMAP2430_MUXENTRY(CAM_D10, 146,
48 "cam_d10", NULL, NULL, "gpio_146",
49 NULL, NULL, "etk_d12", "safe_mode"),
50 _OMAP2430_MUXENTRY(CAM_D11, 145,
51 "cam_d11", NULL, NULL, "gpio_145",
52 NULL, NULL, "etk_d13", "safe_mode"),
53 _OMAP2430_MUXENTRY(CAM_D1, 132,
54 "cam_d1", "hw_dbg1", "sti_din", "gpio_132",
55 NULL, NULL, "etk_d3", "safe_mode"),
56 _OMAP2430_MUXENTRY(CAM_D2, 129,
57 "cam_d2", "hw_dbg2", "mcbsp1_clkx", "gpio_129",
58 NULL, NULL, "etk_d4", "safe_mode"),
59 _OMAP2430_MUXENTRY(CAM_D3, 128,
60 "cam_d3", "hw_dbg3", "mcbsp1_dr", "gpio_128",
61 NULL, NULL, "etk_d5", "safe_mode"),
62 _OMAP2430_MUXENTRY(CAM_D4, 143,
63 "cam_d4", "hw_dbg4", "mcbsp1_fsr", "gpio_143",
64 NULL, NULL, "etk_d6", "safe_mode"),
65 _OMAP2430_MUXENTRY(CAM_D5, 112,
66 "cam_d5", "hw_dbg5", "mcbsp1_clkr", "gpio_112",
67 NULL, NULL, "etk_d7", "safe_mode"),
68 _OMAP2430_MUXENTRY(CAM_D6, 137,
69 "cam_d6", "hw_dbg6", NULL, "gpio_137",
70 NULL, NULL, "etk_d8", "safe_mode"),
71 _OMAP2430_MUXENTRY(CAM_D7, 136,
72 "cam_d7", "hw_dbg7", NULL, "gpio_136",
73 NULL, NULL, "etk_d9", "safe_mode"),
74 _OMAP2430_MUXENTRY(CAM_D8, 135,
75 "cam_d8", "hw_dbg8", NULL, "gpio_135",
76 NULL, NULL, "etk_d10", "safe_mode"),
77 _OMAP2430_MUXENTRY(CAM_D9, 134,
78 "cam_d9", "hw_dbg9", NULL, "gpio_134",
79 NULL, NULL, "etk_d11", "safe_mode"),
80 _OMAP2430_MUXENTRY(CAM_HS, 11,
81 "cam_hs", "hw_dbg10", "mcbsp1_dx", "gpio_11",
82 NULL, NULL, "etk_d1", "safe_mode"),
83 _OMAP2430_MUXENTRY(CAM_LCLK, 0,
84 "cam_lclk", NULL, "mcbsp_clks", NULL,
85 NULL, NULL, "etk_c1", "safe_mode"),
86 _OMAP2430_MUXENTRY(CAM_VS, 12,
87 "cam_vs", "hw_dbg11", "mcbsp1_fsx", "gpio_12",
88 NULL, NULL, "etk_d0", "safe_mode"),
89 _OMAP2430_MUXENTRY(CAM_XCLK, 0,
90 "cam_xclk", NULL, "sti_clk", NULL,
91 NULL, NULL, "etk_c2", NULL),
92 _OMAP2430_MUXENTRY(DSS_ACBIAS, 48,
93 "dss_acbias", NULL, "mcbsp2_fsx", "gpio_48",
94 NULL, NULL, NULL, "safe_mode"),
95 _OMAP2430_MUXENTRY(DSS_DATA0, 40,
96 "dss_data0", "uart1_cts", NULL, "gpio_40",
97 NULL, NULL, NULL, "safe_mode"),
98 _OMAP2430_MUXENTRY(DSS_DATA10, 128,
99 "dss_data10", "sdi_data1n", NULL, "gpio_128",
100 NULL, NULL, NULL, "safe_mode"),
101 _OMAP2430_MUXENTRY(DSS_DATA11, 129,
102 "dss_data11", "sdi_data1p", NULL, "gpio_129",
103 NULL, NULL, NULL, "safe_mode"),
104 _OMAP2430_MUXENTRY(DSS_DATA12, 130,
105 "dss_data12", "sdi_data2n", NULL, "gpio_130",
106 NULL, NULL, NULL, "safe_mode"),
107 _OMAP2430_MUXENTRY(DSS_DATA13, 131,
108 "dss_data13", "sdi_data2p", NULL, "gpio_131",
109 NULL, NULL, NULL, "safe_mode"),
110 _OMAP2430_MUXENTRY(DSS_DATA14, 132,
111 "dss_data14", "sdi_data3n", NULL, "gpio_132",
112 NULL, NULL, NULL, "safe_mode"),
113 _OMAP2430_MUXENTRY(DSS_DATA15, 133,
114 "dss_data15", "sdi_data3p", NULL, "gpio_133",
115 NULL, NULL, NULL, "safe_mode"),
116 _OMAP2430_MUXENTRY(DSS_DATA16, 46,
117 "dss_data16", NULL, NULL, "gpio_46",
118 NULL, NULL, NULL, "safe_mode"),
119 _OMAP2430_MUXENTRY(DSS_DATA17, 47,
120 "dss_data17", NULL, NULL, "gpio_47",
121 NULL, NULL, NULL, "safe_mode"),
122 _OMAP2430_MUXENTRY(DSS_DATA1, 41,
123 "dss_data1", "uart1_rts", NULL, "gpio_41",
124 NULL, NULL, NULL, "safe_mode"),
125 _OMAP2430_MUXENTRY(DSS_DATA2, 42,
126 "dss_data2", "uart1_tx", NULL, "gpio_42",
127 NULL, NULL, NULL, "safe_mode"),
128 _OMAP2430_MUXENTRY(DSS_DATA3, 43,
129 "dss_data3", "uart1_rx", NULL, "gpio_43",
130 NULL, NULL, NULL, "safe_mode"),
131 _OMAP2430_MUXENTRY(DSS_DATA4, 44,
132 "dss_data4", "uart3_rx_irrx", NULL, "gpio_44",
133 NULL, NULL, NULL, "safe_mode"),
134 _OMAP2430_MUXENTRY(DSS_DATA5, 45,
135 "dss_data5", "uart3_tx_irtx", NULL, "gpio_45",
136 NULL, NULL, NULL, "safe_mode"),
137 _OMAP2430_MUXENTRY(DSS_DATA6, 144,
138 "dss_data6", NULL, NULL, "gpio_144",
139 NULL, NULL, NULL, "safe_mode"),
140 _OMAP2430_MUXENTRY(DSS_DATA7, 147,
141 "dss_data7", NULL, NULL, "gpio_147",
142 NULL, NULL, NULL, "safe_mode"),
143 _OMAP2430_MUXENTRY(DSS_DATA8, 38,
144 "dss_data8", NULL, NULL, "gpio_38",
145 NULL, NULL, NULL, "safe_mode"),
146 _OMAP2430_MUXENTRY(DSS_DATA9, 39,
147 "dss_data9", NULL, NULL, "gpio_39",
148 NULL, NULL, NULL, "safe_mode"),
149 _OMAP2430_MUXENTRY(DSS_HSYNC, 110,
150 "dss_hsync", NULL, NULL, "gpio_110",
151 NULL, NULL, NULL, "safe_mode"),
152 _OMAP2430_MUXENTRY(GPIO_113, 113,
153 "gpio_113", "mcbsp2_clkx", NULL, "gpio_113",
154 NULL, NULL, NULL, "safe_mode"),
155 _OMAP2430_MUXENTRY(GPIO_114, 114,
156 "gpio_114", "mcbsp2_fsx", NULL, "gpio_114",
157 NULL, NULL, NULL, "safe_mode"),
158 _OMAP2430_MUXENTRY(GPIO_115, 115,
159 "gpio_115", "mcbsp2_dr", NULL, "gpio_115",
160 NULL, NULL, NULL, "safe_mode"),
161 _OMAP2430_MUXENTRY(GPIO_116, 116,
162 "gpio_116", "mcbsp2_dx", NULL, "gpio_116",
163 NULL, NULL, NULL, "safe_mode"),
164 _OMAP2430_MUXENTRY(GPIO_128, 128,
165 "gpio_128", NULL, "sti_din", "gpio_128",
166 NULL, "sys_boot0", NULL, "safe_mode"),
167 _OMAP2430_MUXENTRY(GPIO_129, 129,
168 "gpio_129", NULL, "sti_dout", "gpio_129",
169 NULL, "sys_boot1", NULL, "safe_mode"),
170 _OMAP2430_MUXENTRY(GPIO_130, 130,
171 "gpio_130", NULL, NULL, "gpio_130",
172 "jtag_emu2", "sys_boot2", NULL, "safe_mode"),
173 _OMAP2430_MUXENTRY(GPIO_131, 131,
174 "gpio_131", NULL, NULL, "gpio_131",
175 "jtag_emu3", "sys_boot3", NULL, "safe_mode"),
176 _OMAP2430_MUXENTRY(GPIO_132, 132,
177 "gpio_132", NULL, NULL, "gpio_132",
178 NULL, "sys_boot4", NULL, "safe_mode"),
179 _OMAP2430_MUXENTRY(GPIO_133, 133,
180 "gpio_133", NULL, NULL, "gpio_133",
181 NULL, "sys_boot5", NULL, "safe_mode"),
182 _OMAP2430_MUXENTRY(GPIO_134, 134,
183 "gpio_134", "ccp_datn", NULL, "gpio_134",
184 NULL, NULL, NULL, "safe_mode"),
185 _OMAP2430_MUXENTRY(GPIO_135, 135,
186 "gpio_135", "ccp_datp", NULL, "gpio_135",
187 NULL, NULL, NULL, "safe_mode"),
188 _OMAP2430_MUXENTRY(GPIO_136, 136,
189 "gpio_136", "ccp_clkn", NULL, "gpio_136",
190 NULL, NULL, NULL, "safe_mode"),
191 _OMAP2430_MUXENTRY(GPIO_137, 137,
192 "gpio_137", "ccp_clkp", NULL, "gpio_137",
193 NULL, NULL, NULL, "safe_mode"),
194 _OMAP2430_MUXENTRY(GPIO_138, 138,
195 "gpio_138", "spi3_clk", NULL, "gpio_138",
196 NULL, NULL, NULL, "safe_mode"),
197 _OMAP2430_MUXENTRY(GPIO_139, 139,
198 "gpio_139", "spi3_cs0", "sys_ndmareq3", "gpio_139",
199 NULL, NULL, NULL, "safe_mode"),
200 _OMAP2430_MUXENTRY(GPIO_140, 140,
201 "gpio_140", "spi3_simo", "sys_ndmareq4", "gpio_140",
202 NULL, NULL, "etk_d14", "safe_mode"),
203 _OMAP2430_MUXENTRY(GPIO_141, 141,
204 "gpio_141", "spi3_somi", NULL, "gpio_141",
205 NULL, NULL, NULL, "safe_mode"),
206 _OMAP2430_MUXENTRY(GPIO_142, 142,
207 "gpio_142", "spi3_cs1", "sys_ndmareq2", "gpio_142",
208 NULL, NULL, "etk_d15", "safe_mode"),
209 _OMAP2430_MUXENTRY(GPIO_148, 148,
210 "gpio_148", "mcbsp5_fsx", NULL, "gpio_148",
211 NULL, NULL, NULL, "safe_mode"),
212 _OMAP2430_MUXENTRY(GPIO_149, 149,
213 "gpio_149", "mcbsp5_dx", NULL, "gpio_149",
214 NULL, NULL, NULL, "safe_mode"),
215 _OMAP2430_MUXENTRY(GPIO_150, 150,
216 "gpio_150", "mcbsp5_dr", NULL, "gpio_150",
217 NULL, NULL, NULL, "safe_mode"),
218 _OMAP2430_MUXENTRY(GPIO_151, 151,
219 "gpio_151", "sys_pwrok", NULL, "gpio_151",
220 NULL, NULL, NULL, "safe_mode"),
221 _OMAP2430_MUXENTRY(GPIO_152, 152,
222 "gpio_152", "uart1_cts", "sys_ndmareq1", "gpio_152",
223 NULL, NULL, NULL, "safe_mode"),
224 _OMAP2430_MUXENTRY(GPIO_153, 153,
225 "gpio_153", "uart1_rx", "sys_ndmareq0", "gpio_153",
226 NULL, NULL, NULL, "safe_mode"),
227 _OMAP2430_MUXENTRY(GPIO_154, 154,
228 "gpio_154", "mcbsp5_clkx", NULL, "gpio_154",
229 NULL, NULL, NULL, "safe_mode"),
230 _OMAP2430_MUXENTRY(GPIO_63, 63,
231 "gpio_63", "mcbsp4_clkx", NULL, "gpio_63",
232 NULL, NULL, NULL, "safe_mode"),
233 _OMAP2430_MUXENTRY(GPIO_78, 78,
234 "gpio_78", NULL, "uart2_rts", "gpio_78",
235 "uart3_rts_sd", NULL, NULL, "safe_mode"),
236 _OMAP2430_MUXENTRY(GPIO_79, 79,
237 "gpio_79", "secure_indicator", "uart2_tx", "gpio_79",
238 "uart3_tx_irtx", NULL, NULL, "safe_mode"),
239 _OMAP2430_MUXENTRY(GPIO_7, 7,
240 "gpio_7", NULL, "uart2_cts", "gpio_7",
241 "uart3_cts_rctx", NULL, NULL, "safe_mode"),
242 _OMAP2430_MUXENTRY(GPIO_80, 80,
243 "gpio_80", NULL, "uart2_rx", "gpio_80",
244 "uart3_rx_irrx", NULL, NULL, "safe_mode"),
245 _OMAP2430_MUXENTRY(GPMC_A10, 3,
246 "gpmc_a10", NULL, "sys_ndmareq0", "gpio_3",
247 NULL, NULL, NULL, "safe_mode"),
248 _OMAP2430_MUXENTRY(GPMC_A1, 31,
249 "gpmc_a1", NULL, NULL, "gpio_31",
250 NULL, NULL, NULL, "safe_mode"),
251 _OMAP2430_MUXENTRY(GPMC_A2, 30,
252 "gpmc_a2", NULL, NULL, "gpio_30",
253 NULL, NULL, NULL, "safe_mode"),
254 _OMAP2430_MUXENTRY(GPMC_A3, 29,
255 "gpmc_a3", NULL, NULL, "gpio_29",
256 NULL, NULL, NULL, "safe_mode"),
257 _OMAP2430_MUXENTRY(GPMC_A4, 49,
258 "gpmc_a4", NULL, NULL, "gpio_49",
259 NULL, NULL, NULL, "safe_mode"),
260 _OMAP2430_MUXENTRY(GPMC_A5, 53,
261 "gpmc_a5", NULL, NULL, "gpio_53",
262 NULL, NULL, NULL, "safe_mode"),
263 _OMAP2430_MUXENTRY(GPMC_A6, 52,
264 "gpmc_a6", NULL, NULL, "gpio_52",
265 NULL, NULL, NULL, "safe_mode"),
266 _OMAP2430_MUXENTRY(GPMC_A7, 6,
267 "gpmc_a7", NULL, NULL, "gpio_6",
268 NULL, NULL, NULL, "safe_mode"),
269 _OMAP2430_MUXENTRY(GPMC_A8, 5,
270 "gpmc_a8", NULL, NULL, "gpio_5",
271 NULL, NULL, NULL, "safe_mode"),
272 _OMAP2430_MUXENTRY(GPMC_A9, 4,
273 "gpmc_a9", NULL, "sys_ndmareq1", "gpio_4",
274 NULL, NULL, NULL, "safe_mode"),
275 _OMAP2430_MUXENTRY(GPMC_CLK, 21,
276 "gpmc_clk", NULL, NULL, "gpio_21",
277 NULL, NULL, NULL, "safe_mode"),
278 _OMAP2430_MUXENTRY(GPMC_D10, 18,
279 "gpmc_d10", NULL, NULL, "gpio_18",
280 NULL, NULL, NULL, "safe_mode"),
281 _OMAP2430_MUXENTRY(GPMC_D11, 57,
282 "gpmc_d11", NULL, NULL, "gpio_57",
283 NULL, NULL, NULL, "safe_mode"),
284 _OMAP2430_MUXENTRY(GPMC_D12, 77,
285 "gpmc_d12", NULL, NULL, "gpio_77",
286 NULL, NULL, NULL, "safe_mode"),
287 _OMAP2430_MUXENTRY(GPMC_D13, 76,
288 "gpmc_d13", NULL, NULL, "gpio_76",
289 NULL, NULL, NULL, "safe_mode"),
290 _OMAP2430_MUXENTRY(GPMC_D14, 55,
291 "gpmc_d14", NULL, NULL, "gpio_55",
292 NULL, NULL, NULL, "safe_mode"),
293 _OMAP2430_MUXENTRY(GPMC_D15, 54,
294 "gpmc_d15", NULL, NULL, "gpio_54",
295 NULL, NULL, NULL, "safe_mode"),
296 _OMAP2430_MUXENTRY(GPMC_D8, 20,
297 "gpmc_d8", NULL, NULL, "gpio_20",
298 NULL, NULL, NULL, "safe_mode"),
299 _OMAP2430_MUXENTRY(GPMC_D9, 19,
300 "gpmc_d9", NULL, NULL, "gpio_19",
301 NULL, NULL, NULL, "safe_mode"),
302 _OMAP2430_MUXENTRY(GPMC_NCS1, 22,
303 "gpmc_ncs1", NULL, NULL, "gpio_22",
304 NULL, NULL, NULL, "safe_mode"),
305 _OMAP2430_MUXENTRY(GPMC_NCS2, 23,
306 "gpmc_ncs2", NULL, NULL, "gpio_23",
307 NULL, NULL, NULL, "safe_mode"),
308 _OMAP2430_MUXENTRY(GPMC_NCS3, 24,
309 "gpmc_ncs3", "gpmc_io_dir", NULL, "gpio_24",
310 NULL, NULL, NULL, "safe_mode"),
311 _OMAP2430_MUXENTRY(GPMC_NCS4, 25,
312 "gpmc_ncs4", NULL, NULL, "gpio_25",
313 NULL, NULL, NULL, "safe_mode"),
314 _OMAP2430_MUXENTRY(GPMC_NCS5, 26,
315 "gpmc_ncs5", NULL, NULL, "gpio_26",
316 NULL, NULL, NULL, "safe_mode"),
317 _OMAP2430_MUXENTRY(GPMC_NCS6, 27,
318 "gpmc_ncs6", NULL, NULL, "gpio_27",
319 NULL, NULL, NULL, "safe_mode"),
320 _OMAP2430_MUXENTRY(GPMC_NCS7, 28,
321 "gpmc_ncs7", "gpmc_io_dir", NULL, "gpio_28",
322 NULL, NULL, NULL, "safe_mode"),
323 _OMAP2430_MUXENTRY(GPMC_WAIT1, 33,
324 "gpmc_wait1", NULL, NULL, "gpio_33",
325 NULL, NULL, NULL, "safe_mode"),
326 _OMAP2430_MUXENTRY(GPMC_WAIT2, 34,
327 "gpmc_wait2", NULL, NULL, "gpio_34",
328 NULL, NULL, NULL, "safe_mode"),
329 _OMAP2430_MUXENTRY(GPMC_WAIT3, 35,
330 "gpmc_wait3", NULL, NULL, "gpio_35",
331 NULL, NULL, NULL, "safe_mode"),
332 _OMAP2430_MUXENTRY(HDQ_SIO, 101,
333 "hdq_sio", "usb2_tllse0", "sys_altclk", "gpio_101",
334 "uart3_rx_irrx", NULL, NULL, "safe_mode"),
335 _OMAP2430_MUXENTRY(I2C1_SCL, 50,
336 "i2c1_scl", NULL, NULL, "gpio_50",
337 NULL, NULL, NULL, "safe_mode"),
338 _OMAP2430_MUXENTRY(I2C1_SDA, 51,
339 "i2c1_sda", NULL, NULL, "gpio_51",
340 NULL, NULL, NULL, "safe_mode"),
341 _OMAP2430_MUXENTRY(I2C2_SCL, 99,
342 "i2c2_scl", NULL, NULL, "gpio_99",
343 NULL, NULL, NULL, "safe_mode"),
344 _OMAP2430_MUXENTRY(I2C2_SDA, 100,
345 "i2c2_sda", NULL, NULL, "gpio_100",
346 NULL, NULL, NULL, "safe_mode"),
347 _OMAP2430_MUXENTRY(JTAG_EMU0, 127,
348 "jtag_emu0", "secure_indicator", NULL, "gpio_127",
349 NULL, NULL, NULL, "safe_mode"),
350 _OMAP2430_MUXENTRY(JTAG_EMU1, 126,
351 "jtag_emu1", NULL, NULL, "gpio_126",
352 NULL, NULL, NULL, "safe_mode"),
353 _OMAP2430_MUXENTRY(MCBSP1_CLKR, 92,
354 "mcbsp1_clkr", "ssi2_dat_tx", NULL, "gpio_92",
355 NULL, NULL, NULL, "safe_mode"),
356 _OMAP2430_MUXENTRY(MCBSP1_CLKX, 98,
357 "mcbsp1_clkx", "ssi2_wake", NULL, "gpio_98",
358 NULL, NULL, NULL, "safe_mode"),
359 _OMAP2430_MUXENTRY(MCBSP1_DR, 95,
360 "mcbsp1_dr", "ssi2_dat_rx", NULL, "gpio_95",
361 NULL, NULL, NULL, "safe_mode"),
362 _OMAP2430_MUXENTRY(MCBSP1_DX, 94,
363 "mcbsp1_dx", "ssi2_rdy_tx", NULL, "gpio_94",
364 NULL, NULL, NULL, "safe_mode"),
365 _OMAP2430_MUXENTRY(MCBSP1_FSR, 93,
366 "mcbsp1_fsr", "ssi2_flag_tx", NULL, "gpio_93",
367 "spi2_cs1", NULL, NULL, "safe_mode"),
368 _OMAP2430_MUXENTRY(MCBSP1_FSX, 97,
369 "mcbsp1_fsx", "ssi2_rdy_rx", NULL, "gpio_97",
370 NULL, NULL, NULL, "safe_mode"),
371 _OMAP2430_MUXENTRY(MCBSP2_CLKX, 147,
372 "mcbsp2_clkx", "sdi_clkp", "dss_data23", "gpio_147",
373 NULL, NULL, NULL, "safe_mode"),
374 _OMAP2430_MUXENTRY(MCBSP2_DR, 144,
375 "mcbsp2_dr", "sdi_clkn", "dss_data22", "gpio_144",
376 NULL, NULL, NULL, "safe_mode"),
377 _OMAP2430_MUXENTRY(MCBSP3_CLKX, 71,
378 "mcbsp3_clkx", NULL, NULL, "gpio_71",
379 NULL, NULL, NULL, "safe_mode"),
380 _OMAP2430_MUXENTRY(MCBSP3_DR, 73,
381 "mcbsp3_dr", NULL, NULL, "gpio_73",
382 NULL, NULL, NULL, "safe_mode"),
383 _OMAP2430_MUXENTRY(MCBSP3_DX, 74,
384 "mcbsp3_dx", NULL, "sti_clk", "gpio_74",
385 NULL, NULL, NULL, "safe_mode"),
386 _OMAP2430_MUXENTRY(MCBSP3_FSX, 72,
387 "mcbsp3_fsx", NULL, NULL, "gpio_72",
388 NULL, NULL, NULL, "safe_mode"),
389 _OMAP2430_MUXENTRY(MCBSP_CLKS, 96,
390 "mcbsp_clks", "ssi2_flag_rx", NULL, "gpio_96",
391 NULL, NULL, NULL, "safe_mode"),
392 _OMAP2430_MUXENTRY(SDMMC1_CLKO, 0,
393 "sdmmc1_clko", "ms_clko", NULL, NULL,
394 NULL, "hw_dbg9", "hw_dbg3", "safe_mode"),
395 _OMAP2430_MUXENTRY(SDMMC1_CMD, 0,
396 "sdmmc1_cmd", "ms_bs", NULL, NULL,
397 NULL, "hw_dbg8", "hw_dbg2", "safe_mode"),
398 _OMAP2430_MUXENTRY(SDMMC1_DAT0, 0,
399 "sdmmc1_dat0", "ms_dat0", NULL, NULL,
400 NULL, "hw_dbg7", "hw_dbg1", "safe_mode"),
401 _OMAP2430_MUXENTRY(SDMMC1_DAT1, 75,
402 "sdmmc1_dat1", "ms_dat1", NULL, "gpio_75",
403 NULL, "hw_dbg6", "hw_dbg0", "safe_mode"),
404 _OMAP2430_MUXENTRY(SDMMC1_DAT2, 0,
405 "sdmmc1_dat2", "ms_dat2", NULL, NULL,
406 NULL, "hw_dbg5", "hw_dbg10", "safe_mode"),
407 _OMAP2430_MUXENTRY(SDMMC1_DAT3, 0,
408 "sdmmc1_dat3", "ms_dat3", NULL, NULL,
409 NULL, "hw_dbg4", "hw_dbg11", "safe_mode"),
410 _OMAP2430_MUXENTRY(SDMMC2_CLKO, 13,
411 "sdmmc2_clko", NULL, NULL, "gpio_13",
412 NULL, "spi3_clk", NULL, "safe_mode"),
413 _OMAP2430_MUXENTRY(SDMMC2_CMD, 15,
414 "sdmmc2_cmd", "usb2_rcv", NULL, "gpio_15",
415 NULL, "spi3_simo", NULL, "safe_mode"),
416 _OMAP2430_MUXENTRY(SDMMC2_DAT0, 16,
417 "sdmmc2_dat0", "usb2_tllse0", NULL, "gpio_16",
418 NULL, "spi3_somi", NULL, "safe_mode"),
419 _OMAP2430_MUXENTRY(SDMMC2_DAT1, 58,
420 "sdmmc2_dat1", "usb2_txen", NULL, "gpio_58",
421 NULL, NULL, NULL, "safe_mode"),
422 _OMAP2430_MUXENTRY(SDMMC2_DAT2, 17,
423 "sdmmc2_dat2", "usb2_dat", NULL, "gpio_17",
424 NULL, "spi3_cs1", NULL, "safe_mode"),
425 _OMAP2430_MUXENTRY(SDMMC2_DAT3, 14,
426 "sdmmc2_dat3", "usb2_se0", NULL, "gpio_14",
427 NULL, "spi3_cs0", NULL, "safe_mode"),
428 _OMAP2430_MUXENTRY(SDRC_A12, 2,
429 "sdrc_a12", NULL, NULL, "gpio_2",
430 NULL, NULL, NULL, "safe_mode"),
431 _OMAP2430_MUXENTRY(SDRC_A13, 1,
432 "sdrc_a13", NULL, NULL, "gpio_1",
433 NULL, NULL, NULL, "safe_mode"),
434 _OMAP2430_MUXENTRY(SDRC_A14, 0,
435 "sdrc_a14", NULL, NULL, "gpio_0",
436 NULL, NULL, NULL, "safe_mode"),
437 _OMAP2430_MUXENTRY(SDRC_CKE1, 36,
438 "sdrc_cke1", NULL, NULL, "gpio_36",
439 NULL, NULL, NULL, "safe_mode"),
440 _OMAP2430_MUXENTRY(SDRC_NCS1, 37,
441 "sdrc_ncs1", NULL, NULL, "gpio_37",
442 NULL, NULL, NULL, "safe_mode"),
443 _OMAP2430_MUXENTRY(SPI1_CLK, 81,
444 "spi1_clk", NULL, NULL, "gpio_81",
445 NULL, NULL, NULL, "safe_mode"),
446 _OMAP2430_MUXENTRY(SPI1_CS0, 84,
447 "spi1_cs0", NULL, NULL, "gpio_84",
448 NULL, NULL, NULL, "safe_mode"),
449 _OMAP2430_MUXENTRY(SPI1_CS1, 85,
450 "spi1_cs1", NULL, NULL, "gpio_85",
451 NULL, NULL, NULL, "safe_mode"),
452 _OMAP2430_MUXENTRY(SPI1_CS2, 86,
453 "spi1_cs2", NULL, NULL, "gpio_86",
454 NULL, NULL, NULL, "safe_mode"),
455 _OMAP2430_MUXENTRY(SPI1_CS3, 87,
456 "spi1_cs3", "spi2_cs1", NULL, "gpio_87",
457 NULL, NULL, NULL, "safe_mode"),
458 _OMAP2430_MUXENTRY(SPI1_SIMO, 82,
459 "spi1_simo", NULL, NULL, "gpio_82",
460 NULL, NULL, NULL, "safe_mode"),
461 _OMAP2430_MUXENTRY(SPI1_SOMI, 83,
462 "spi1_somi", NULL, NULL, "gpio_83",
463 NULL, NULL, NULL, "safe_mode"),
464 _OMAP2430_MUXENTRY(SPI2_CLK, 88,
465 "spi2_clk", "gpt9_pwm_evt", NULL, "gpio_88",
466 NULL, NULL, NULL, "safe_mode"),
467 _OMAP2430_MUXENTRY(SPI2_CS0, 91,
468 "spi2_cs0", "gpt12_pwm_evt", NULL, "gpio_91",
469 NULL, NULL, NULL, "safe_mode"),
470 _OMAP2430_MUXENTRY(SPI2_SIMO, 89,
471 "spi2_simo", "gpt10_pwm_evt", NULL, "gpio_89",
472 NULL, NULL, NULL, "safe_mode"),
473 _OMAP2430_MUXENTRY(SPI2_SOMI, 90,
474 "spi2_somi", "gpt11_pwm_evt", NULL, "gpio_90",
475 NULL, NULL, NULL, "safe_mode"),
476 _OMAP2430_MUXENTRY(SSI1_DAT_RX, 62,
477 "ssi1_dat_rx", "uart1_rx", "usb1_dat", "gpio_62",
478 NULL, NULL, NULL, "safe_mode"),
479 _OMAP2430_MUXENTRY(SSI1_DAT_TX, 59,
480 "ssi1_dat_tx", "uart1_tx", "usb1_se0", "gpio_59",
481 NULL, NULL, NULL, "safe_mode"),
482 _OMAP2430_MUXENTRY(SSI1_FLAG_RX, 64,
483 "ssi1_flag_rx", "mcbsp4_dr", NULL, "gpio_64",
484 NULL, NULL, NULL, "safe_mode"),
485 _OMAP2430_MUXENTRY(SSI1_FLAG_TX, 60,
486 "ssi1_flag_tx", "uart1_rts", "usb1_rcv", "gpio_60",
487 NULL, NULL, NULL, "safe_mode"),
488 _OMAP2430_MUXENTRY(SSI1_RDY_RX, 65,
489 "ssi1_rdy_rx", "mcbsp4_dx", NULL, "gpio_65",
490 NULL, NULL, NULL, "safe_mode"),
491 _OMAP2430_MUXENTRY(SSI1_RDY_TX, 61,
492 "ssi1_rdy_tx", "uart1_cts", "usb1_txen", "gpio_61",
493 NULL, NULL, NULL, "safe_mode"),
494 _OMAP2430_MUXENTRY(SSI1_WAKE, 66,
495 "ssi1_wake", "mcbsp4_fsx", NULL, "gpio_66",
496 NULL, NULL, NULL, "safe_mode"),
497 _OMAP2430_MUXENTRY(SYS_CLKOUT, 111,
498 "sys_clkout", NULL, NULL, "gpio_111",
499 NULL, NULL, NULL, "safe_mode"),
500 _OMAP2430_MUXENTRY(SYS_DRM_MSECURE, 118,
501 "sys_drm_msecure", NULL, "sys_ndmareq6", "gpio_118",
502 NULL, NULL, NULL, "safe_mode"),
503 _OMAP2430_MUXENTRY(SYS_NIRQ0, 56,
504 "sys_nirq0", NULL, NULL, "gpio_56",
505 NULL, NULL, NULL, "safe_mode"),
506 _OMAP2430_MUXENTRY(SYS_NIRQ1, 125,
507 "sys_nirq1", NULL, "sys_ndmareq5", "gpio_125",
508 NULL, NULL, NULL, "safe_mode"),
509 _OMAP2430_MUXENTRY(UART1_CTS, 32,
510 "uart1_cts", "sdi_vsync", "dss_data18", "gpio_32",
511 "mcbsp5_clkx", NULL, NULL, "safe_mode"),
512 _OMAP2430_MUXENTRY(UART1_RTS, 8,
513 "uart1_rts", "sdi_hsync", "dss_data19", "gpio_8",
514 "mcbsp5_fsx", NULL, NULL, "safe_mode"),
515 _OMAP2430_MUXENTRY(UART1_RX, 10,
516 "uart1_rx", "sdi_stp", "dss_data21", "gpio_10",
517 "mcbsp5_dr", NULL, NULL, "safe_mode"),
518 _OMAP2430_MUXENTRY(UART1_TX, 9,
519 "uart1_tx", "sdi_den", "dss_data20", "gpio_9",
520 "mcbsp5_dx", NULL, NULL, "safe_mode"),
521 _OMAP2430_MUXENTRY(UART2_CTS, 67,
522 "uart2_cts", "usb1_rcv", "gpt9_pwm_evt", "gpio_67",
523 NULL, NULL, NULL, "safe_mode"),
524 _OMAP2430_MUXENTRY(UART2_RTS, 68,
525 "uart2_rts", "usb1_txen", "gpt10_pwm_evt", "gpio_68",
526 NULL, NULL, NULL, "safe_mode"),
527 _OMAP2430_MUXENTRY(UART2_RX, 70,
528 "uart2_rx", "usb1_dat", "gpt12_pwm_evt", "gpio_70",
529 NULL, NULL, NULL, "safe_mode"),
530 _OMAP2430_MUXENTRY(UART2_TX, 69,
531 "uart2_tx", "usb1_se0", "gpt11_pwm_evt", "gpio_69",
532 NULL, NULL, NULL, "safe_mode"),
533 _OMAP2430_MUXENTRY(UART3_CTS_RCTX, 102,
534 "uart3_cts_rctx", "uart3_rx_irrx", NULL, "gpio_102",
535 NULL, NULL, NULL, "safe_mode"),
536 _OMAP2430_MUXENTRY(UART3_RTS_SD, 103,
537 "uart3_rts_sd", "uart3_tx_irtx", NULL, "gpio_103",
538 NULL, NULL, NULL, "safe_mode"),
539 _OMAP2430_MUXENTRY(UART3_RX_IRRX, 105,
540 "uart3_rx_irrx", NULL, NULL, "gpio_105",
541 NULL, NULL, NULL, "safe_mode"),
542 _OMAP2430_MUXENTRY(UART3_TX_IRTX, 104,
543 "uart3_tx_irtx", "uart3_cts_rctx", NULL, "gpio_104",
544 NULL, NULL, NULL, "safe_mode"),
545 _OMAP2430_MUXENTRY(USB0HS_CLK, 120,
546 "usb0hs_clk", NULL, NULL, "gpio_120",
547 NULL, NULL, NULL, "safe_mode"),
548 _OMAP2430_MUXENTRY(USB0HS_DATA0, 0,
549 "usb0hs_data0", "uart3_tx_irtx", NULL, NULL,
550 "usb0_txen", NULL, NULL, "safe_mode"),
551 _OMAP2430_MUXENTRY(USB0HS_DATA1, 0,
552 "usb0hs_data1", "uart3_rx_irrx", NULL, NULL,
553 "usb0_dat", NULL, NULL, "safe_mode"),
554 _OMAP2430_MUXENTRY(USB0HS_DATA2, 0,
555 "usb0hs_data2", "uart3_rts_sd", NULL, NULL,
556 "usb0_se0", NULL, NULL, "safe_mode"),
557 _OMAP2430_MUXENTRY(USB0HS_DATA3, 106,
558 "usb0hs_data3", NULL, "uart3_cts_rctx", "gpio_106",
559 "usb0_puen", NULL, NULL, "safe_mode"),
560 _OMAP2430_MUXENTRY(USB0HS_DATA4, 107,
561 "usb0hs_data4", "mcbsp2_dr", NULL, "gpio_107",
562 "usb0_vp", NULL, NULL, "safe_mode"),
563 _OMAP2430_MUXENTRY(USB0HS_DATA5, 108,
564 "usb0hs_data5", "mcbsp2_dx", NULL, "gpio_108",
565 "usb0_vm", NULL, NULL, "safe_mode"),
566 _OMAP2430_MUXENTRY(USB0HS_DATA6, 109,
567 "usb0hs_data6", "mcbsp2_fsx", NULL, "gpio_109",
568 "usb0_rcv", NULL, NULL, "safe_mode"),
569 _OMAP2430_MUXENTRY(USB0HS_DATA7, 124,
570 "usb0hs_data7", "mcbsp2_clkx", NULL, "gpio_124",
571 NULL, NULL, NULL, "safe_mode"),
572 _OMAP2430_MUXENTRY(USB0HS_DIR, 121,
573 "usb0hs_dir", NULL, NULL, "gpio_121",
574 NULL, NULL, NULL, "safe_mode"),
575 _OMAP2430_MUXENTRY(USB0HS_NXT, 123,
576 "usb0hs_nxt", NULL, NULL, "gpio_123",
577 NULL, NULL, NULL, "safe_mode"),
578 _OMAP2430_MUXENTRY(USB0HS_STP, 122,
579 "usb0hs_stp", NULL, NULL, "gpio_122",
580 NULL, NULL, NULL, "safe_mode"),
581 { .reg_offset = OMAP_MUX_TERMINATOR },
582};
583
584/*
585 * Balls for POP package
586 * 447-pin s-PBGA Package, 0.00mm Ball Pitch (Bottom)
587 */
588#ifdef CONFIG_DEBUG_FS
589struct omap_ball __initdata omap2430_pop_ball[] = {
590 _OMAP2430_BALLENTRY(CAM_D0, "t8", NULL),
591 _OMAP2430_BALLENTRY(CAM_D1, "t4", NULL),
592 _OMAP2430_BALLENTRY(CAM_D10, "r4", NULL),
593 _OMAP2430_BALLENTRY(CAM_D11, "w3", NULL),
594 _OMAP2430_BALLENTRY(CAM_D2, "r2", NULL),
595 _OMAP2430_BALLENTRY(CAM_D3, "u3", NULL),
596 _OMAP2430_BALLENTRY(CAM_D4, "u2", NULL),
597 _OMAP2430_BALLENTRY(CAM_D5, "v1", NULL),
598 _OMAP2430_BALLENTRY(CAM_D6, "t3", NULL),
599 _OMAP2430_BALLENTRY(CAM_D7, "r3", NULL),
600 _OMAP2430_BALLENTRY(CAM_D8, "u7", NULL),
601 _OMAP2430_BALLENTRY(CAM_D9, "t7", NULL),
602 _OMAP2430_BALLENTRY(CAM_HS, "p2", NULL),
603 _OMAP2430_BALLENTRY(CAM_LCLK, "r7", NULL),
604 _OMAP2430_BALLENTRY(CAM_VS, "n2", NULL),
605 _OMAP2430_BALLENTRY(CAM_XCLK, "p3", NULL),
606 _OMAP2430_BALLENTRY(DSS_ACBIAS, "y3", NULL),
607 _OMAP2430_BALLENTRY(DSS_DATA0, "v8", NULL),
608 _OMAP2430_BALLENTRY(DSS_DATA1, "w1", NULL),
609 _OMAP2430_BALLENTRY(DSS_DATA10, "k25", NULL),
610 _OMAP2430_BALLENTRY(DSS_DATA11, "j25", NULL),
611 _OMAP2430_BALLENTRY(DSS_DATA12, "k24", NULL),
612 _OMAP2430_BALLENTRY(DSS_DATA13, "j24", NULL),
613 _OMAP2430_BALLENTRY(DSS_DATA14, "h25", NULL),
614 _OMAP2430_BALLENTRY(DSS_DATA15, "g25", NULL),
615 _OMAP2430_BALLENTRY(DSS_DATA16, "ac3", NULL),
616 _OMAP2430_BALLENTRY(DSS_DATA17, "y7", NULL),
617 _OMAP2430_BALLENTRY(DSS_DATA2, "u8", NULL),
618 _OMAP2430_BALLENTRY(DSS_DATA3, "u4", NULL),
619 _OMAP2430_BALLENTRY(DSS_DATA4, "v3", NULL),
620 _OMAP2430_BALLENTRY(DSS_DATA5, "aa4", NULL),
621 _OMAP2430_BALLENTRY(DSS_DATA6, "w8", NULL),
622 _OMAP2430_BALLENTRY(DSS_DATA7, "y1", NULL),
623 _OMAP2430_BALLENTRY(DSS_DATA8, "aa2", NULL),
624 _OMAP2430_BALLENTRY(DSS_DATA9, "ab4", NULL),
625 _OMAP2430_BALLENTRY(DSS_HSYNC, "v2", NULL),
626 _OMAP2430_BALLENTRY(GPIO_113, "ad16", NULL),
627 _OMAP2430_BALLENTRY(GPIO_114, "ac10", NULL),
628 _OMAP2430_BALLENTRY(GPIO_115, "ad13", NULL),
629 _OMAP2430_BALLENTRY(GPIO_116, "ae15", NULL),
630 _OMAP2430_BALLENTRY(GPIO_128, "p1", NULL),
631 _OMAP2430_BALLENTRY(GPIO_129, "r1", NULL),
632 _OMAP2430_BALLENTRY(GPIO_130, "p7", NULL),
633 _OMAP2430_BALLENTRY(GPIO_131, "l8", NULL),
634 _OMAP2430_BALLENTRY(GPIO_132, "w24", NULL),
635 _OMAP2430_BALLENTRY(GPIO_133, "aa24", NULL),
636 _OMAP2430_BALLENTRY(GPIO_134, "ae12", NULL),
637 _OMAP2430_BALLENTRY(GPIO_135, "ae11", NULL),
638 _OMAP2430_BALLENTRY(GPIO_136, "ad12", NULL),
639 _OMAP2430_BALLENTRY(GPIO_137, "ad11", NULL),
640 _OMAP2430_BALLENTRY(GPIO_138, "y12", NULL),
641 _OMAP2430_BALLENTRY(GPIO_139, "ad17", NULL),
642 _OMAP2430_BALLENTRY(GPIO_140, "l7", NULL),
643 _OMAP2430_BALLENTRY(GPIO_141, "ac24", NULL),
644 _OMAP2430_BALLENTRY(GPIO_142, "m3", NULL),
645 _OMAP2430_BALLENTRY(GPIO_148, "af12", NULL),
646 _OMAP2430_BALLENTRY(GPIO_149, "k7", NULL),
647 _OMAP2430_BALLENTRY(GPIO_150, "m1", NULL),
648 _OMAP2430_BALLENTRY(GPIO_151, "ad14", NULL),
649 _OMAP2430_BALLENTRY(GPIO_152, "ad18", NULL),
650 _OMAP2430_BALLENTRY(GPIO_153, "u24", NULL),
651 _OMAP2430_BALLENTRY(GPIO_154, "ae16", NULL),
652 _OMAP2430_BALLENTRY(GPIO_63, "n3", NULL),
653 _OMAP2430_BALLENTRY(GPIO_7, "ac23", NULL),
654 _OMAP2430_BALLENTRY(GPIO_78, "ad10", NULL),
655 _OMAP2430_BALLENTRY(GPIO_79, "ae10", NULL),
656 _OMAP2430_BALLENTRY(GPIO_80, "ae13", NULL),
657 _OMAP2430_BALLENTRY(GPMC_A1, "a9", NULL),
658 _OMAP2430_BALLENTRY(GPMC_A10, "g12", NULL),
659 _OMAP2430_BALLENTRY(GPMC_A2, "b8", NULL),
660 _OMAP2430_BALLENTRY(GPMC_A3, "g10", NULL),
661 _OMAP2430_BALLENTRY(GPMC_A4, "g11", NULL),
662 _OMAP2430_BALLENTRY(GPMC_A5, "a10", NULL),
663 _OMAP2430_BALLENTRY(GPMC_A6, "g13", NULL),
664 _OMAP2430_BALLENTRY(GPMC_A7, "a6", NULL),
665 _OMAP2430_BALLENTRY(GPMC_A8, "h1", NULL),
666 _OMAP2430_BALLENTRY(GPMC_A9, "c8", NULL),
667 _OMAP2430_BALLENTRY(GPMC_CLK, "n1", "l1"),
668 _OMAP2430_BALLENTRY(GPMC_D10, "d1", "n1"),
669 _OMAP2430_BALLENTRY(GPMC_D11, "d2", "p2"),
670 _OMAP2430_BALLENTRY(GPMC_D12, "e1", "p1"),
671 _OMAP2430_BALLENTRY(GPMC_D13, "e3", "m1"),
672 _OMAP2430_BALLENTRY(GPMC_D14, "c7", "j2"),
673 _OMAP2430_BALLENTRY(GPMC_D15, "f3", "k2"),
674 _OMAP2430_BALLENTRY(GPMC_D8, "e2", "r1"),
675 _OMAP2430_BALLENTRY(GPMC_D9, "ab1", "t1"),
676 _OMAP2430_BALLENTRY(GPMC_NCS1, "ac1", "w1"),
677 _OMAP2430_BALLENTRY(GPMC_NCS2, "c6", NULL),
678 _OMAP2430_BALLENTRY(GPMC_NCS3, "b9", NULL),
679 _OMAP2430_BALLENTRY(GPMC_NCS4, "b4", NULL),
680 _OMAP2430_BALLENTRY(GPMC_NCS5, "a4", NULL),
681 _OMAP2430_BALLENTRY(GPMC_NCS6, "f1", NULL),
682 _OMAP2430_BALLENTRY(GPMC_NCS7, "a7", NULL),
683 _OMAP2430_BALLENTRY(GPMC_WAIT1, "j1", "y8"),
684 _OMAP2430_BALLENTRY(GPMC_WAIT2, "b7", NULL),
685 _OMAP2430_BALLENTRY(GPMC_WAIT3, "g14", NULL),
686 _OMAP2430_BALLENTRY(HDQ_SIO, "h20", NULL),
687 _OMAP2430_BALLENTRY(I2C1_SCL, "y17", NULL),
688 _OMAP2430_BALLENTRY(I2C1_SDA, "ac19", NULL),
689 _OMAP2430_BALLENTRY(I2C2_SCL, "n7", NULL),
690 _OMAP2430_BALLENTRY(I2C2_SDA, "m4", NULL),
691 _OMAP2430_BALLENTRY(JTAG_EMU0, "e25", NULL),
692 _OMAP2430_BALLENTRY(JTAG_EMU1, "e24", NULL),
693 _OMAP2430_BALLENTRY(MCBSP1_CLKR, "ab2", NULL),
694 _OMAP2430_BALLENTRY(MCBSP1_CLKX, "y9", NULL),
695 _OMAP2430_BALLENTRY(MCBSP1_DR, "af3", NULL),
696 _OMAP2430_BALLENTRY(MCBSP1_DX, "aa1", NULL),
697 _OMAP2430_BALLENTRY(MCBSP1_FSR, "ad5", NULL),
698 _OMAP2430_BALLENTRY(MCBSP1_FSX, "ab3", NULL),
699 _OMAP2430_BALLENTRY(MCBSP2_CLKX, "j26", NULL),
700 _OMAP2430_BALLENTRY(MCBSP2_DR, "k26", NULL),
701 _OMAP2430_BALLENTRY(MCBSP3_CLKX, "ac9", NULL),
702 _OMAP2430_BALLENTRY(MCBSP3_DR, "ae2", NULL),
703 _OMAP2430_BALLENTRY(MCBSP3_DX, "af4", NULL),
704 _OMAP2430_BALLENTRY(MCBSP3_FSX, "ae4", NULL),
705 _OMAP2430_BALLENTRY(MCBSP_CLKS, "ad6", NULL),
706 _OMAP2430_BALLENTRY(SDMMC1_CLKO, "n23", NULL),
707 _OMAP2430_BALLENTRY(SDMMC1_CMD, "l23", NULL),
708 _OMAP2430_BALLENTRY(SDMMC1_DAT0, "m24", NULL),
709 _OMAP2430_BALLENTRY(SDMMC1_DAT1, "p23", NULL),
710 _OMAP2430_BALLENTRY(SDMMC1_DAT2, "t20", NULL),
711 _OMAP2430_BALLENTRY(SDMMC1_DAT3, "r20", NULL),
712 _OMAP2430_BALLENTRY(SDMMC2_CLKO, "v26", NULL),
713 _OMAP2430_BALLENTRY(SDMMC2_CMD, "w20", NULL),
714 _OMAP2430_BALLENTRY(SDMMC2_DAT0, "v23", NULL),
715 _OMAP2430_BALLENTRY(SDMMC2_DAT1, "y24", NULL),
716 _OMAP2430_BALLENTRY(SDMMC2_DAT2, "v25", NULL),
717 _OMAP2430_BALLENTRY(SDMMC2_DAT3, "v24", NULL),
718 _OMAP2430_BALLENTRY(SDRC_A12, "w26", "r21"),
719 _OMAP2430_BALLENTRY(SDRC_A13, "af20", "aa15"),
720 _OMAP2430_BALLENTRY(SDRC_A14, "af16", "y12"),
721 _OMAP2430_BALLENTRY(SDRC_CKE1, "af15", "y13"),
722 _OMAP2430_BALLENTRY(SDRC_NCS1, "aa25", "t20"),
723 _OMAP2430_BALLENTRY(SPI1_CLK, "y18", NULL),
724 _OMAP2430_BALLENTRY(SPI1_CS0, "u1", NULL),
725 _OMAP2430_BALLENTRY(SPI1_CS1, "af19", NULL),
726 _OMAP2430_BALLENTRY(SPI1_CS2, "ae19", NULL),
727 _OMAP2430_BALLENTRY(SPI1_CS3, "h24", NULL),
728 _OMAP2430_BALLENTRY(SPI1_SIMO, "ad15", NULL),
729 _OMAP2430_BALLENTRY(SPI1_SOMI, "ae17", NULL),
730 _OMAP2430_BALLENTRY(SPI2_CLK, "y20", NULL),
731 _OMAP2430_BALLENTRY(SPI2_CS0, "y19", NULL),
732 _OMAP2430_BALLENTRY(SPI2_SIMO, "ac20", NULL),
733 _OMAP2430_BALLENTRY(SPI2_SOMI, "ad19", NULL),
734 _OMAP2430_BALLENTRY(SSI1_DAT_RX, "aa26", NULL),
735 _OMAP2430_BALLENTRY(SSI1_DAT_TX, "ad24", NULL),
736 _OMAP2430_BALLENTRY(SSI1_FLAG_RX, "ad23", NULL),
737 _OMAP2430_BALLENTRY(SSI1_FLAG_TX, "ab24", NULL),
738 _OMAP2430_BALLENTRY(SSI1_RDY_RX, "ab25", NULL),
739 _OMAP2430_BALLENTRY(SSI1_RDY_TX, "y25", NULL),
740 _OMAP2430_BALLENTRY(SSI1_WAKE, "ac25", NULL),
741 _OMAP2430_BALLENTRY(SYS_CLKOUT, "r25", NULL),
742 _OMAP2430_BALLENTRY(SYS_DRM_MSECURE, "ae3", NULL),
743 _OMAP2430_BALLENTRY(SYS_NIRQ0, "w25", NULL),
744 _OMAP2430_BALLENTRY(SYS_NIRQ1, "ad21", NULL),
745 _OMAP2430_BALLENTRY(UART1_CTS, "p24", NULL),
746 _OMAP2430_BALLENTRY(UART1_RTS, "p25", NULL),
747 _OMAP2430_BALLENTRY(UART1_RX, "n24", NULL),
748 _OMAP2430_BALLENTRY(UART1_TX, "r24", NULL),
749 _OMAP2430_BALLENTRY(UART2_CTS, "u25", NULL),
750 _OMAP2430_BALLENTRY(UART2_RTS, "t23", NULL),
751 _OMAP2430_BALLENTRY(UART2_RX, "t24", NULL),
752 _OMAP2430_BALLENTRY(UART2_TX, "u20", NULL),
753 _OMAP2430_BALLENTRY(UART3_CTS_RCTX, "m2", NULL),
754 _OMAP2430_BALLENTRY(UART3_RTS_SD, "k2", NULL),
755 _OMAP2430_BALLENTRY(UART3_RX_IRRX, "l3", NULL),
756 _OMAP2430_BALLENTRY(UART3_TX_IRTX, "l2", NULL),
757 _OMAP2430_BALLENTRY(USB0HS_CLK, "ae8", NULL),
758 _OMAP2430_BALLENTRY(USB0HS_DATA0, "ad4", NULL),
759 _OMAP2430_BALLENTRY(USB0HS_DATA1, "ae6", NULL),
760 _OMAP2430_BALLENTRY(USB0HS_DATA2, "af9", NULL),
761 _OMAP2430_BALLENTRY(USB0HS_DATA3, "ad9", NULL),
762 _OMAP2430_BALLENTRY(USB0HS_DATA4, "y11", NULL),
763 _OMAP2430_BALLENTRY(USB0HS_DATA5, "ad7", NULL),
764 _OMAP2430_BALLENTRY(USB0HS_DATA6, "ae7", NULL),
765 _OMAP2430_BALLENTRY(USB0HS_DATA7, "ac7", NULL),
766 _OMAP2430_BALLENTRY(USB0HS_DIR, "ad8", NULL),
767 _OMAP2430_BALLENTRY(USB0HS_NXT, "ae9", NULL),
768 _OMAP2430_BALLENTRY(USB0HS_STP, "ae5", NULL),
769 { .reg_offset = OMAP_MUX_TERMINATOR },
770};
771#else
772#define omap2430_pop_ball NULL
773#endif
774
775int __init omap2430_mux_init(struct omap_board_mux *board_subset, int flags)
776{
777 struct omap_ball *package_balls = NULL;
778
779 switch (flags & OMAP_PACKAGE_MASK) {
780 case OMAP_PACKAGE_ZAC:
781 package_balls = omap2430_pop_ball;
782 break;
783 default:
784 pr_warning("mux: No ball data available for omap2420 package\n");
785 }
786
787 return omap_mux_init(OMAP2430_CONTROL_PADCONF_MUX_PBASE,
788 OMAP2430_CONTROL_PADCONF_MUX_SIZE,
789 omap2430_muxmodes, NULL, board_subset,
790 package_balls);
791}
diff --git a/arch/arm/mach-omap2/mux2430.h b/arch/arm/mach-omap2/mux2430.h
new file mode 100644
index 000000000000..adbea0d03e08
--- /dev/null
+++ b/arch/arm/mach-omap2/mux2430.h
@@ -0,0 +1,370 @@
1/*
2 * Copyright (C) 2009 Nokia
3 * Copyright (C) 2009 Texas Instruments
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#define OMAP2430_CONTROL_PADCONF_MUX_PBASE 0x49002030LU
11
12#define OMAP2430_MUX(mode0, mux_value) \
13{ \
14 .reg_offset = (OMAP2430_CONTROL_PADCONF_##mode0##_OFFSET), \
15 .value = (mux_value), \
16}
17
18/*
19 * OMAP2430 CONTROL_PADCONF* register offsets for pin-muxing
20 *
21 * Extracted from the TRM. Add 0x49002030 to these values to get the
22 * absolute addresses. The name in the macro is the mode-0 name of
23 * the pin. NOTE: These registers are 8-bits wide.
24 *
25 * Note that these defines use SDMMC instead of MMC for compability
26 * with signal names used in 3630.
27 */
28#define OMAP2430_CONTROL_PADCONF_GPMC_CLK_OFFSET 0x000
29#define OMAP2430_CONTROL_PADCONF_GPMC_NCS0_OFFSET 0x001
30#define OMAP2430_CONTROL_PADCONF_GPMC_NCS1_OFFSET 0x002
31#define OMAP2430_CONTROL_PADCONF_GPMC_NCS2_OFFSET 0x003
32#define OMAP2430_CONTROL_PADCONF_GPMC_NCS3_OFFSET 0x004
33#define OMAP2430_CONTROL_PADCONF_GPMC_NCS4_OFFSET 0x005
34#define OMAP2430_CONTROL_PADCONF_GPMC_NCS5_OFFSET 0x006
35#define OMAP2430_CONTROL_PADCONF_GPMC_NCS6_OFFSET 0x007
36#define OMAP2430_CONTROL_PADCONF_GPMC_NCS7_OFFSET 0x008
37#define OMAP2430_CONTROL_PADCONF_GPMC_NADV_ALE_OFFSET 0x009
38#define OMAP2430_CONTROL_PADCONF_GPMC_NOE_NRE_OFFSET 0x00a
39#define OMAP2430_CONTROL_PADCONF_GPMC_NWE_OFFSET 0x00b
40#define OMAP2430_CONTROL_PADCONF_GPMC_NBE0_CLE_OFFSET 0x00c
41#define OMAP2430_CONTROL_PADCONF_GPMC_NBE1_OFFSET 0x00d
42#define OMAP2430_CONTROL_PADCONF_GPMC_NWP_OFFSET 0x00e
43#define OMAP2430_CONTROL_PADCONF_GPMC_WAIT0_OFFSET 0x00f
44#define OMAP2430_CONTROL_PADCONF_GPMC_WAIT1_OFFSET 0x010
45#define OMAP2430_CONTROL_PADCONF_GPMC_WAIT2_OFFSET 0x011
46#define OMAP2430_CONTROL_PADCONF_GPMC_WAIT3_OFFSET 0x012
47#define OMAP2430_CONTROL_PADCONF_SDRC_CLK_OFFSET 0x013
48#define OMAP2430_CONTROL_PADCONF_SDRC_NCLK_OFFSET 0x014
49#define OMAP2430_CONTROL_PADCONF_SDRC_NCS0_OFFSET 0x015
50#define OMAP2430_CONTROL_PADCONF_SDRC_NCS1_OFFSET 0x016
51#define OMAP2430_CONTROL_PADCONF_SDRC_CKE0_OFFSET 0x017
52#define OMAP2430_CONTROL_PADCONF_SDRC_CKE1_OFFSET 0x018
53#define OMAP2430_CONTROL_PADCONF_SDRC_NRAS_OFFSET 0x019
54#define OMAP2430_CONTROL_PADCONF_SDRC_NCAS_OFFSET 0x01a
55#define OMAP2430_CONTROL_PADCONF_SDRC_NWE_OFFSET 0x01b
56#define OMAP2430_CONTROL_PADCONF_SDRC_DM0_OFFSET 0x01c
57#define OMAP2430_CONTROL_PADCONF_SDRC_DM1_OFFSET 0x01d
58#define OMAP2430_CONTROL_PADCONF_SDRC_DM2_OFFSET 0x01e
59#define OMAP2430_CONTROL_PADCONF_SDRC_DM3_OFFSET 0x01f
60#define OMAP2430_CONTROL_PADCONF_SDRC_DQS0_OFFSET 0x020
61#define OMAP2430_CONTROL_PADCONF_SDRC_DQS1_OFFSET 0x021
62#define OMAP2430_CONTROL_PADCONF_SDRC_DQS2_OFFSET 0x022
63#define OMAP2430_CONTROL_PADCONF_SDRC_DQS3_OFFSET 0x023
64#define OMAP2430_CONTROL_PADCONF_SDRC_A14_OFFSET 0x024
65#define OMAP2430_CONTROL_PADCONF_SDRC_A13_OFFSET 0x025
66#define OMAP2430_CONTROL_PADCONF_SDRC_A12_OFFSET 0x026
67#define OMAP2430_CONTROL_PADCONF_SDRC_BA1_OFFSET 0x027
68#define OMAP2430_CONTROL_PADCONF_SDRC_BA0_OFFSET 0x028
69#define OMAP2430_CONTROL_PADCONF_SDRC_A11_OFFSET 0x029
70#define OMAP2430_CONTROL_PADCONF_SDRC_A10_OFFSET 0x02a
71#define OMAP2430_CONTROL_PADCONF_SDRC_A9_OFFSET 0x02b
72#define OMAP2430_CONTROL_PADCONF_SDRC_A8_OFFSET 0x02c
73#define OMAP2430_CONTROL_PADCONF_SDRC_A7_OFFSET 0x02d
74#define OMAP2430_CONTROL_PADCONF_SDRC_A6_OFFSET 0x02e
75#define OMAP2430_CONTROL_PADCONF_SDRC_A5_OFFSET 0x02f
76#define OMAP2430_CONTROL_PADCONF_SDRC_A4_OFFSET 0x030
77#define OMAP2430_CONTROL_PADCONF_SDRC_A3_OFFSET 0x031
78#define OMAP2430_CONTROL_PADCONF_SDRC_A2_OFFSET 0x032
79#define OMAP2430_CONTROL_PADCONF_SDRC_A1_OFFSET 0x033
80#define OMAP2430_CONTROL_PADCONF_SDRC_A0_OFFSET 0x034
81#define OMAP2430_CONTROL_PADCONF_SDRC_D31_OFFSET 0x035
82#define OMAP2430_CONTROL_PADCONF_SDRC_D30_OFFSET 0x036
83#define OMAP2430_CONTROL_PADCONF_SDRC_D29_OFFSET 0x037
84#define OMAP2430_CONTROL_PADCONF_SDRC_D28_OFFSET 0x038
85#define OMAP2430_CONTROL_PADCONF_SDRC_D27_OFFSET 0x039
86#define OMAP2430_CONTROL_PADCONF_SDRC_D26_OFFSET 0x03a
87#define OMAP2430_CONTROL_PADCONF_SDRC_D25_OFFSET 0x03b
88#define OMAP2430_CONTROL_PADCONF_SDRC_D24_OFFSET 0x03c
89#define OMAP2430_CONTROL_PADCONF_SDRC_D23_OFFSET 0x03d
90#define OMAP2430_CONTROL_PADCONF_SDRC_D22_OFFSET 0x03e
91#define OMAP2430_CONTROL_PADCONF_SDRC_D21_OFFSET 0x03f
92#define OMAP2430_CONTROL_PADCONF_SDRC_D20_OFFSET 0x040
93#define OMAP2430_CONTROL_PADCONF_SDRC_D19_OFFSET 0x041
94#define OMAP2430_CONTROL_PADCONF_SDRC_D18_OFFSET 0x042
95#define OMAP2430_CONTROL_PADCONF_SDRC_D17_OFFSET 0x043
96#define OMAP2430_CONTROL_PADCONF_SDRC_D16_OFFSET 0x044
97#define OMAP2430_CONTROL_PADCONF_SDRC_D15_OFFSET 0x045
98#define OMAP2430_CONTROL_PADCONF_SDRC_D14_OFFSET 0x046
99#define OMAP2430_CONTROL_PADCONF_SDRC_D13_OFFSET 0x047
100#define OMAP2430_CONTROL_PADCONF_SDRC_D12_OFFSET 0x048
101#define OMAP2430_CONTROL_PADCONF_SDRC_D11_OFFSET 0x049
102#define OMAP2430_CONTROL_PADCONF_SDRC_D10_OFFSET 0x04a
103#define OMAP2430_CONTROL_PADCONF_SDRC_D9_OFFSET 0x04b
104#define OMAP2430_CONTROL_PADCONF_SDRC_D8_OFFSET 0x04c
105#define OMAP2430_CONTROL_PADCONF_SDRC_D7_OFFSET 0x04d
106#define OMAP2430_CONTROL_PADCONF_SDRC_D6_OFFSET 0x04e
107#define OMAP2430_CONTROL_PADCONF_SDRC_D5_OFFSET 0x04f
108#define OMAP2430_CONTROL_PADCONF_SDRC_D4_OFFSET 0x050
109#define OMAP2430_CONTROL_PADCONF_SDRC_D3_OFFSET 0x051
110#define OMAP2430_CONTROL_PADCONF_SDRC_D2_OFFSET 0x052
111#define OMAP2430_CONTROL_PADCONF_SDRC_D1_OFFSET 0x053
112#define OMAP2430_CONTROL_PADCONF_SDRC_D0_OFFSET 0x054
113#define OMAP2430_CONTROL_PADCONF_GPMC_A10_OFFSET 0x055
114#define OMAP2430_CONTROL_PADCONF_GPMC_A9_OFFSET 0x056
115#define OMAP2430_CONTROL_PADCONF_GPMC_A8_OFFSET 0x057
116#define OMAP2430_CONTROL_PADCONF_GPMC_A7_OFFSET 0x058
117#define OMAP2430_CONTROL_PADCONF_GPMC_A6_OFFSET 0x059
118#define OMAP2430_CONTROL_PADCONF_GPMC_A5_OFFSET 0x05a
119#define OMAP2430_CONTROL_PADCONF_GPMC_A4_OFFSET 0x05b
120#define OMAP2430_CONTROL_PADCONF_GPMC_A3_OFFSET 0x05c
121#define OMAP2430_CONTROL_PADCONF_GPMC_A2_OFFSET 0x05d
122#define OMAP2430_CONTROL_PADCONF_GPMC_A1_OFFSET 0x05e
123#define OMAP2430_CONTROL_PADCONF_GPMC_D15_OFFSET 0x05f
124#define OMAP2430_CONTROL_PADCONF_GPMC_D14_OFFSET 0x060
125#define OMAP2430_CONTROL_PADCONF_GPMC_D13_OFFSET 0x061
126#define OMAP2430_CONTROL_PADCONF_GPMC_D12_OFFSET 0x062
127#define OMAP2430_CONTROL_PADCONF_GPMC_D11_OFFSET 0x063
128#define OMAP2430_CONTROL_PADCONF_GPMC_D10_OFFSET 0x064
129#define OMAP2430_CONTROL_PADCONF_GPMC_D9_OFFSET 0x065
130#define OMAP2430_CONTROL_PADCONF_GPMC_D8_OFFSET 0x066
131#define OMAP2430_CONTROL_PADCONF_GPMC_D7_OFFSET 0x067
132#define OMAP2430_CONTROL_PADCONF_GPMC_D6_OFFSET 0x068
133#define OMAP2430_CONTROL_PADCONF_GPMC_D5_OFFSET 0x069
134#define OMAP2430_CONTROL_PADCONF_GPMC_D4_OFFSET 0x06a
135#define OMAP2430_CONTROL_PADCONF_GPMC_D3_OFFSET 0x06b
136#define OMAP2430_CONTROL_PADCONF_GPMC_D2_OFFSET 0x06c
137#define OMAP2430_CONTROL_PADCONF_GPMC_D1_OFFSET 0x06d
138#define OMAP2430_CONTROL_PADCONF_GPMC_D0_OFFSET 0x06e
139#define OMAP2430_CONTROL_PADCONF_DSS_DATA0_OFFSET 0x06f
140#define OMAP2430_CONTROL_PADCONF_DSS_DATA1_OFFSET 0x070
141#define OMAP2430_CONTROL_PADCONF_DSS_DATA2_OFFSET 0x071
142#define OMAP2430_CONTROL_PADCONF_DSS_DATA3_OFFSET 0x072
143#define OMAP2430_CONTROL_PADCONF_DSS_DATA4_OFFSET 0x073
144#define OMAP2430_CONTROL_PADCONF_DSS_DATA5_OFFSET 0x074
145#define OMAP2430_CONTROL_PADCONF_DSS_DATA6_OFFSET 0x075
146#define OMAP2430_CONTROL_PADCONF_DSS_DATA7_OFFSET 0x076
147#define OMAP2430_CONTROL_PADCONF_DSS_DATA8_OFFSET 0x077
148#define OMAP2430_CONTROL_PADCONF_DSS_DATA9_OFFSET 0x078
149#define OMAP2430_CONTROL_PADCONF_DSS_DATA10_OFFSET 0x079
150#define OMAP2430_CONTROL_PADCONF_DSS_DATA11_OFFSET 0x07a
151#define OMAP2430_CONTROL_PADCONF_DSS_DATA12_OFFSET 0x07b
152#define OMAP2430_CONTROL_PADCONF_DSS_DATA13_OFFSET 0x07c
153#define OMAP2430_CONTROL_PADCONF_DSS_DATA14_OFFSET 0x07d
154#define OMAP2430_CONTROL_PADCONF_DSS_DATA15_OFFSET 0x07e
155#define OMAP2430_CONTROL_PADCONF_DSS_DATA16_OFFSET 0x07f
156#define OMAP2430_CONTROL_PADCONF_DSS_DATA17_OFFSET 0x080
157#define OMAP2430_CONTROL_PADCONF_UART1_CTS_OFFSET 0x081
158#define OMAP2430_CONTROL_PADCONF_UART1_RTS_OFFSET 0x082
159#define OMAP2430_CONTROL_PADCONF_UART1_TX_OFFSET 0x083
160#define OMAP2430_CONTROL_PADCONF_UART1_RX_OFFSET 0x084
161#define OMAP2430_CONTROL_PADCONF_MCBSP2_DR_OFFSET 0x085
162#define OMAP2430_CONTROL_PADCONF_MCBSP2_CLKX_OFFSET 0x086
163#define OMAP2430_CONTROL_PADCONF_DSS_PCLK_OFFSET 0x087
164#define OMAP2430_CONTROL_PADCONF_DSS_VSYNC_OFFSET 0x088
165#define OMAP2430_CONTROL_PADCONF_DSS_HSYNC_OFFSET 0x089
166#define OMAP2430_CONTROL_PADCONF_DSS_ACBIAS_OFFSET 0x08a
167#define OMAP2430_CONTROL_PADCONF_SYS_NRESPWRON_OFFSET 0x08b
168#define OMAP2430_CONTROL_PADCONF_SYS_NRESWARM_OFFSET 0x08c
169#define OMAP2430_CONTROL_PADCONF_SYS_NIRQ0_OFFSET 0x08d
170#define OMAP2430_CONTROL_PADCONF_SYS_NIRQ1_OFFSET 0x08e
171#define OMAP2430_CONTROL_PADCONF_SYS_VMODE_OFFSET 0x08f
172#define OMAP2430_CONTROL_PADCONF_GPIO_128_OFFSET 0x090
173#define OMAP2430_CONTROL_PADCONF_GPIO_129_OFFSET 0x091
174#define OMAP2430_CONTROL_PADCONF_GPIO_130_OFFSET 0x092
175#define OMAP2430_CONTROL_PADCONF_GPIO_131_OFFSET 0x093
176#define OMAP2430_CONTROL_PADCONF_SYS_32K_OFFSET 0x094
177#define OMAP2430_CONTROL_PADCONF_SYS_XTALIN_OFFSET 0x095
178#define OMAP2430_CONTROL_PADCONF_SYS_XTALOUT_OFFSET 0x096
179#define OMAP2430_CONTROL_PADCONF_GPIO_132_OFFSET 0x097
180#define OMAP2430_CONTROL_PADCONF_SYS_CLKREQ_OFFSET 0x098
181#define OMAP2430_CONTROL_PADCONF_SYS_CLKOUT_OFFSET 0x099
182#define OMAP2430_CONTROL_PADCONF_GPIO_151_OFFSET 0x09a
183#define OMAP2430_CONTROL_PADCONF_GPIO_133_OFFSET 0x09b
184#define OMAP2430_CONTROL_PADCONF_JTAG_EMU1_OFFSET 0x09c
185#define OMAP2430_CONTROL_PADCONF_JTAG_EMU0_OFFSET 0x09d
186#define OMAP2430_CONTROL_PADCONF_JTAG_NTRST_OFFSET 0x09e
187#define OMAP2430_CONTROL_PADCONF_JTAG_TCK_OFFSET 0x09f
188#define OMAP2430_CONTROL_PADCONF_JTAG_RTCK_OFFSET 0x0a0
189#define OMAP2430_CONTROL_PADCONF_JTAG_TMS_OFFSET 0x0a1
190#define OMAP2430_CONTROL_PADCONF_JTAG_TDI_OFFSET 0x0a2
191#define OMAP2430_CONTROL_PADCONF_JTAG_TDO_OFFSET 0x0a3
192#define OMAP2430_CONTROL_PADCONF_CAM_D9_OFFSET 0x0a4
193#define OMAP2430_CONTROL_PADCONF_CAM_D8_OFFSET 0x0a5
194#define OMAP2430_CONTROL_PADCONF_CAM_D7_OFFSET 0x0a6
195#define OMAP2430_CONTROL_PADCONF_CAM_D6_OFFSET 0x0a7
196#define OMAP2430_CONTROL_PADCONF_CAM_D5_OFFSET 0x0a8
197#define OMAP2430_CONTROL_PADCONF_CAM_D4_OFFSET 0x0a9
198#define OMAP2430_CONTROL_PADCONF_CAM_D3_OFFSET 0x0aa
199#define OMAP2430_CONTROL_PADCONF_CAM_D2_OFFSET 0x0ab
200#define OMAP2430_CONTROL_PADCONF_CAM_D1_OFFSET 0x0ac
201#define OMAP2430_CONTROL_PADCONF_CAM_D0_OFFSET 0x0ad
202#define OMAP2430_CONTROL_PADCONF_CAM_HS_OFFSET 0x0ae
203#define OMAP2430_CONTROL_PADCONF_CAM_VS_OFFSET 0x0af
204#define OMAP2430_CONTROL_PADCONF_CAM_LCLK_OFFSET 0x0b0
205#define OMAP2430_CONTROL_PADCONF_CAM_XCLK_OFFSET 0x0b1
206#define OMAP2430_CONTROL_PADCONF_CAM_D11_OFFSET 0x0b2
207#define OMAP2430_CONTROL_PADCONF_CAM_D10_OFFSET 0x0b3
208#define OMAP2430_CONTROL_PADCONF_GPIO_134_OFFSET 0x0b4
209#define OMAP2430_CONTROL_PADCONF_GPIO_135_OFFSET 0x0b5
210#define OMAP2430_CONTROL_PADCONF_GPIO_136_OFFSET 0x0b6
211#define OMAP2430_CONTROL_PADCONF_GPIO_137_OFFSET 0x0b7
212#define OMAP2430_CONTROL_PADCONF_GPIO_138_OFFSET 0x0b8
213#define OMAP2430_CONTROL_PADCONF_GPIO_139_OFFSET 0x0b9
214#define OMAP2430_CONTROL_PADCONF_GPIO_140_OFFSET 0x0ba
215#define OMAP2430_CONTROL_PADCONF_GPIO_141_OFFSET 0x0bb
216#define OMAP2430_CONTROL_PADCONF_GPIO_142_OFFSET 0x0bc
217#define OMAP2430_CONTROL_PADCONF_GPIO_154_OFFSET 0x0bd
218#define OMAP2430_CONTROL_PADCONF_GPIO_148_OFFSET 0x0be
219#define OMAP2430_CONTROL_PADCONF_GPIO_149_OFFSET 0x0bf
220#define OMAP2430_CONTROL_PADCONF_GPIO_150_OFFSET 0x0c0
221#define OMAP2430_CONTROL_PADCONF_GPIO_152_OFFSET 0x0c1
222#define OMAP2430_CONTROL_PADCONF_GPIO_153_OFFSET 0x0c2
223#define OMAP2430_CONTROL_PADCONF_SDMMC1_CLKO_OFFSET 0x0c3
224#define OMAP2430_CONTROL_PADCONF_SDMMC1_CMD_OFFSET 0x0c4
225#define OMAP2430_CONTROL_PADCONF_SDMMC1_DAT0_OFFSET 0x0c5
226#define OMAP2430_CONTROL_PADCONF_SDMMC1_DAT1_OFFSET 0x0c6
227#define OMAP2430_CONTROL_PADCONF_SDMMC1_DAT2_OFFSET 0x0c7
228#define OMAP2430_CONTROL_PADCONF_SDMMC1_DAT3_OFFSET 0x0c8
229#define OMAP2430_CONTROL_PADCONF_SDMMC2_CLKO_OFFSET 0x0c9
230#define OMAP2430_CONTROL_PADCONF_SDMMC2_DAT3_OFFSET 0x0ca
231#define OMAP2430_CONTROL_PADCONF_SDMMC2_CMD_OFFSET 0x0cb
232#define OMAP2430_CONTROL_PADCONF_SDMMC2_DAT0_OFFSET 0x0cc
233#define OMAP2430_CONTROL_PADCONF_SDMMC2_DAT2_OFFSET 0x0cd
234#define OMAP2430_CONTROL_PADCONF_SDMMC2_DAT1_OFFSET 0x0ce
235#define OMAP2430_CONTROL_PADCONF_UART2_CTS_OFFSET 0x0cf
236#define OMAP2430_CONTROL_PADCONF_UART2_RTS_OFFSET 0x0d0
237#define OMAP2430_CONTROL_PADCONF_UART2_TX_OFFSET 0x0d1
238#define OMAP2430_CONTROL_PADCONF_UART2_RX_OFFSET 0x0d2
239#define OMAP2430_CONTROL_PADCONF_MCBSP3_CLKX_OFFSET 0x0d3
240#define OMAP2430_CONTROL_PADCONF_MCBSP3_FSX_OFFSET 0x0d4
241#define OMAP2430_CONTROL_PADCONF_MCBSP3_DR_OFFSET 0x0d5
242#define OMAP2430_CONTROL_PADCONF_MCBSP3_DX_OFFSET 0x0d6
243#define OMAP2430_CONTROL_PADCONF_SSI1_DAT_TX_OFFSET 0x0d7
244#define OMAP2430_CONTROL_PADCONF_SSI1_FLAG_TX_OFFSET 0x0d8
245#define OMAP2430_CONTROL_PADCONF_SSI1_RDY_TX_OFFSET 0x0d9
246#define OMAP2430_CONTROL_PADCONF_SSI1_DAT_RX_OFFSET 0x0da
247#define OMAP2430_CONTROL_PADCONF_GPIO_63_OFFSET 0x0db
248#define OMAP2430_CONTROL_PADCONF_SSI1_FLAG_RX_OFFSET 0x0dc
249#define OMAP2430_CONTROL_PADCONF_SSI1_RDY_RX_OFFSET 0x0dd
250#define OMAP2430_CONTROL_PADCONF_SSI1_WAKE_OFFSET 0x0de
251#define OMAP2430_CONTROL_PADCONF_SPI1_CLK_OFFSET 0x0df
252#define OMAP2430_CONTROL_PADCONF_SPI1_SIMO_OFFSET 0x0e0
253#define OMAP2430_CONTROL_PADCONF_SPI1_SOMI_OFFSET 0x0e1
254#define OMAP2430_CONTROL_PADCONF_SPI1_CS0_OFFSET 0x0e2
255#define OMAP2430_CONTROL_PADCONF_SPI1_CS1_OFFSET 0x0e3
256#define OMAP2430_CONTROL_PADCONF_SPI1_CS2_OFFSET 0x0e4
257#define OMAP2430_CONTROL_PADCONF_SPI1_CS3_OFFSET 0x0e5
258#define OMAP2430_CONTROL_PADCONF_SPI2_CLK_OFFSET 0x0e6
259#define OMAP2430_CONTROL_PADCONF_SPI2_SIMO_OFFSET 0x0e7
260#define OMAP2430_CONTROL_PADCONF_SPI2_SOMI_OFFSET 0x0e8
261#define OMAP2430_CONTROL_PADCONF_SPI2_CS0_OFFSET 0x0e9
262#define OMAP2430_CONTROL_PADCONF_MCBSP1_CLKR_OFFSET 0x0ea
263#define OMAP2430_CONTROL_PADCONF_MCBSP1_FSR_OFFSET 0x0eb
264#define OMAP2430_CONTROL_PADCONF_MCBSP1_DX_OFFSET 0x0ec
265#define OMAP2430_CONTROL_PADCONF_MCBSP1_DR_OFFSET 0x0ed
266#define OMAP2430_CONTROL_PADCONF_MCBSP_CLKS_OFFSET 0x0ee
267#define OMAP2430_CONTROL_PADCONF_MCBSP1_FSX_OFFSET 0x0ef
268#define OMAP2430_CONTROL_PADCONF_MCBSP1_CLKX_OFFSET 0x0f0
269#define OMAP2430_CONTROL_PADCONF_I2C1_SCL_OFFSET 0x0f1
270#define OMAP2430_CONTROL_PADCONF_I2C1_SDA_OFFSET 0x0f2
271#define OMAP2430_CONTROL_PADCONF_I2C2_SCL_OFFSET 0x0f3
272#define OMAP2430_CONTROL_PADCONF_I2C2_SDA_OFFSET 0x0f4
273#define OMAP2430_CONTROL_PADCONF_HDQ_SIO_OFFSET 0x0f5
274#define OMAP2430_CONTROL_PADCONF_UART3_CTS_RCTX_OFFSET 0x0f6
275#define OMAP2430_CONTROL_PADCONF_UART3_RTS_SD_OFFSET 0x0f7
276#define OMAP2430_CONTROL_PADCONF_UART3_TX_IRTX_OFFSET 0x0f8
277#define OMAP2430_CONTROL_PADCONF_UART3_RX_IRRX_OFFSET 0x0f9
278#define OMAP2430_CONTROL_PADCONF_GPIO_7_OFFSET 0x0fa
279#define OMAP2430_CONTROL_PADCONF_GPIO_78_OFFSET 0x0fb
280#define OMAP2430_CONTROL_PADCONF_GPIO_79_OFFSET 0x0fc
281#define OMAP2430_CONTROL_PADCONF_GPIO_80_OFFSET 0x0fd
282#define OMAP2430_CONTROL_PADCONF_GPIO_113_OFFSET 0x0fe
283#define OMAP2430_CONTROL_PADCONF_GPIO_114_OFFSET 0x0ff
284#define OMAP2430_CONTROL_PADCONF_GPIO_115_OFFSET 0x100
285#define OMAP2430_CONTROL_PADCONF_GPIO_116_OFFSET 0x101
286#define OMAP2430_CONTROL_PADCONF_SYS_DRM_MSECURE_OFFSET 0x102
287#define OMAP2430_CONTROL_PADCONF_USB0HS_DATA3_OFFSET 0x103
288#define OMAP2430_CONTROL_PADCONF_USB0HS_DATA4_OFFSET 0x104
289#define OMAP2430_CONTROL_PADCONF_USB0HS_DATA5_OFFSET 0x105
290#define OMAP2430_CONTROL_PADCONF_USB0HS_DATA6_OFFSET 0x106
291#define OMAP2430_CONTROL_PADCONF_USB0HS_DATA2_OFFSET 0x107
292#define OMAP2430_CONTROL_PADCONF_USB0HS_DATA0_OFFSET 0x108
293#define OMAP2430_CONTROL_PADCONF_USB0HS_DATA1_OFFSET 0x109
294#define OMAP2430_CONTROL_PADCONF_USB0HS_CLK_OFFSET 0x10a
295#define OMAP2430_CONTROL_PADCONF_USB0HS_DIR_OFFSET 0x10b
296#define OMAP2430_CONTROL_PADCONF_USB0HS_STP_OFFSET 0x10c
297#define OMAP2430_CONTROL_PADCONF_USB0HS_NXT_OFFSET 0x10d
298#define OMAP2430_CONTROL_PADCONF_USB0HS_DATA7_OFFSET 0x10e
299#define OMAP2430_CONTROL_PADCONF_TV_OUT_OFFSET 0x10f
300#define OMAP2430_CONTROL_PADCONF_TV_VREF_OFFSET 0x110
301#define OMAP2430_CONTROL_PADCONF_TV_RSET_OFFSET 0x111
302#define OMAP2430_CONTROL_PADCONF_TV_VFB_OFFSET 0x112
303#define OMAP2430_CONTROL_PADCONF_TV_DACOUT_OFFSET 0x113
304#define OMAP2430_CONTROL_PADCONF_AD2DMCAD0_OFFSET 0x114
305#define OMAP2430_CONTROL_PADCONF_AD2DMCAD1_OFFSET 0x115
306#define OMAP2430_CONTROL_PADCONF_AD2DMCAD2_OFFSET 0x116
307#define OMAP2430_CONTROL_PADCONF_AD2DMCAD3_OFFSET 0x117
308#define OMAP2430_CONTROL_PADCONF_AD2DMCAD4_OFFSET 0x118
309#define OMAP2430_CONTROL_PADCONF_AD2DMCAD5_OFFSET 0x119
310#define OMAP2430_CONTROL_PADCONF_AD2DMCAD6_OFFSET 0x11a
311#define OMAP2430_CONTROL_PADCONF_AD2DMCAD7_OFFSET 0x11b
312#define OMAP2430_CONTROL_PADCONF_AD2DMCAD8_OFFSET 0x11c
313#define OMAP2430_CONTROL_PADCONF_AD2DMCAD9_OFFSET 0x11d
314#define OMAP2430_CONTROL_PADCONF_AD2DMCAD10_OFFSET 0x11e
315#define OMAP2430_CONTROL_PADCONF_AD2DMCAD11_OFFSET 0x11f
316#define OMAP2430_CONTROL_PADCONF_AD2DMCAD12_OFFSET 0x120
317#define OMAP2430_CONTROL_PADCONF_AD2DMCAD13_OFFSET 0x121
318#define OMAP2430_CONTROL_PADCONF_AD2DMCAD14_OFFSET 0x122
319#define OMAP2430_CONTROL_PADCONF_AD2DMCAD15_OFFSET 0x123
320#define OMAP2430_CONTROL_PADCONF_AD2DMCAD16_OFFSET 0x124
321#define OMAP2430_CONTROL_PADCONF_AD2DMCAD17_OFFSET 0x125
322#define OMAP2430_CONTROL_PADCONF_AD2DMCAD18_OFFSET 0x126
323#define OMAP2430_CONTROL_PADCONF_AD2DMCAD19_OFFSET 0x127
324#define OMAP2430_CONTROL_PADCONF_AD2DMCAD20_OFFSET 0x128
325#define OMAP2430_CONTROL_PADCONF_AD2DMCAD21_OFFSET 0x129
326#define OMAP2430_CONTROL_PADCONF_AD2DMCAD22_OFFSET 0x12a
327#define OMAP2430_CONTROL_PADCONF_AD2DMCAD23_OFFSET 0x12b
328#define OMAP2430_CONTROL_PADCONF_AD2DMCAD24_OFFSET 0x12c
329#define OMAP2430_CONTROL_PADCONF_AD2DMCAD25_OFFSET 0x12d
330#define OMAP2430_CONTROL_PADCONF_AD2DMCAD26_OFFSET 0x12e
331#define OMAP2430_CONTROL_PADCONF_AD2DMCAD27_OFFSET 0x12f
332#define OMAP2430_CONTROL_PADCONF_AD2DMCAD28_OFFSET 0x130
333#define OMAP2430_CONTROL_PADCONF_AD2DMCAD29_OFFSET 0x131
334#define OMAP2430_CONTROL_PADCONF_AD2DMCAD30_OFFSET 0x132
335#define OMAP2430_CONTROL_PADCONF_AD2DMCAD31_OFFSET 0x133
336#define OMAP2430_CONTROL_PADCONF_AD2DMCAD32_OFFSET 0x134
337#define OMAP2430_CONTROL_PADCONF_AD2DMCAD33_OFFSET 0x135
338#define OMAP2430_CONTROL_PADCONF_AD2DMCAD34_OFFSET 0x136
339#define OMAP2430_CONTROL_PADCONF_AD2DMCAD35_OFFSET 0x137
340#define OMAP2430_CONTROL_PADCONF_AD2DMCAD36_OFFSET 0x138
341#define OMAP2430_CONTROL_PADCONF_AD2DMCAD37_OFFSET 0x139
342#define OMAP2430_CONTROL_PADCONF_AD2DMWRITE_OFFSET 0x13a
343#define OMAP2430_CONTROL_PADCONF_D2DCLK26MI_OFFSET 0x13b
344#define OMAP2430_CONTROL_PADCONF_D2DNRESPWRON1_OFFSET 0x13c
345#define OMAP2430_CONTROL_PADCONF_D2DNRESWARM_OFFSET 0x13d
346#define OMAP2430_CONTROL_PADCONF_D2DARM9NIRQ_OFFSET 0x13e
347#define OMAP2430_CONTROL_PADCONF_D2DUMA2P6FIQ_OFFSET 0x13f
348#define OMAP2430_CONTROL_PADCONF_D2DSPINT_OFFSET 0x140
349#define OMAP2430_CONTROL_PADCONF_D2DFRINT_OFFSET 0x141
350#define OMAP2430_CONTROL_PADCONF_D2DDMAREQ0_OFFSET 0x142
351#define OMAP2430_CONTROL_PADCONF_D2DDMAREQ1_OFFSET 0x143
352#define OMAP2430_CONTROL_PADCONF_D2DDMAREQ2_OFFSET 0x144
353#define OMAP2430_CONTROL_PADCONF_D2DDMAREQ3_OFFSET 0x145
354#define OMAP2430_CONTROL_PADCONF_D2DN3GTRST_OFFSET 0x146
355#define OMAP2430_CONTROL_PADCONF_D2DN3GTDI_OFFSET 0x147
356#define OMAP2430_CONTROL_PADCONF_D2DN3GTDO_OFFSET 0x148
357#define OMAP2430_CONTROL_PADCONF_D2DN3GTMS_OFFSET 0x149
358#define OMAP2430_CONTROL_PADCONF_D2DN3GTCK_OFFSET 0x14a
359#define OMAP2430_CONTROL_PADCONF_D2DN3GRTCK_OFFSET 0x14b
360#define OMAP2430_CONTROL_PADCONF_D2DMSTDBY_OFFSET 0x14c
361#define OMAP2430_CONTROL_PADCONF_AD2DSREAD_OFFSET 0x14d
362#define OMAP2430_CONTROL_PADCONF_D2DSWAKEUP_OFFSET 0x14e
363#define OMAP2430_CONTROL_PADCONF_D2DIDLEREQ_OFFSET 0x14f
364#define OMAP2430_CONTROL_PADCONF_D2DIDLEACK_OFFSET 0x150
365#define OMAP2430_CONTROL_PADCONF_D2DSPARE0_OFFSET 0x151
366#define OMAP2430_CONTROL_PADCONF_AD2DSWRITE_OFFSET 0x152
367#define OMAP2430_CONTROL_PADCONF_AD2DMREAD_OFFSET 0x153
368
369#define OMAP2430_CONTROL_PADCONF_MUX_SIZE \
370 (OMAP2430_CONTROL_PADCONF_AD2DMREAD_OFFSET + 0x1)
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c
index 2ff4dce95ee8..f64d7eea3451 100644
--- a/arch/arm/mach-omap2/mux34xx.c
+++ b/arch/arm/mach-omap2/mux34xx.c
@@ -2032,19 +2032,19 @@ int __init omap3_mux_init(struct omap_board_mux *board_subset, int flags)
2032 struct omap_ball *package_balls; 2032 struct omap_ball *package_balls;
2033 2033
2034 switch (flags & OMAP_PACKAGE_MASK) { 2034 switch (flags & OMAP_PACKAGE_MASK) {
2035 case (OMAP_PACKAGE_CBC): 2035 case OMAP_PACKAGE_CBC:
2036 package_subset = omap3_cbc_subset; 2036 package_subset = omap3_cbc_subset;
2037 package_balls = omap3_cbc_ball; 2037 package_balls = omap3_cbc_ball;
2038 break; 2038 break;
2039 case (OMAP_PACKAGE_CBB): 2039 case OMAP_PACKAGE_CBB:
2040 package_subset = omap3_cbb_subset; 2040 package_subset = omap3_cbb_subset;
2041 package_balls = omap3_cbb_ball; 2041 package_balls = omap3_cbb_ball;
2042 break; 2042 break;
2043 case (OMAP_PACKAGE_CUS): 2043 case OMAP_PACKAGE_CUS:
2044 package_subset = omap3_cus_subset; 2044 package_subset = omap3_cus_subset;
2045 package_balls = omap3_cus_ball; 2045 package_balls = omap3_cus_ball;
2046 break; 2046 break;
2047 case (OMAP_PACKAGE_CBP): 2047 case OMAP_PACKAGE_CBP:
2048 package_subset = omap36xx_cbp_subset; 2048 package_subset = omap36xx_cbp_subset;
2049 package_balls = omap36xx_cbp_ball; 2049 package_balls = omap36xx_cbp_ball;
2050 break; 2050 break;
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
index ef0e7a00dd6c..6ae937a06cc1 100644
--- a/arch/arm/mach-omap2/omap-headsmp.S
+++ b/arch/arm/mach-omap2/omap-headsmp.S
@@ -47,19 +47,3 @@ hold: ldr r12,=0x103
47 b secondary_startup 47 b secondary_startup
48END(omap_secondary_startup) 48END(omap_secondary_startup)
49 49
50
51ENTRY(omap_modify_auxcoreboot0)
52 stmfd sp!, {r1-r12, lr}
53 ldr r12, =0x104
54 dsb
55 smc #0
56 ldmfd sp!, {r1-r12, pc}
57END(omap_modify_auxcoreboot0)
58
59ENTRY(omap_auxcoreboot_addr)
60 stmfd sp!, {r2-r12, lr}
61 ldr r12, =0x105
62 dsb
63 smc #0
64 ldmfd sp!, {r2-r12, pc}
65END(omap_auxcoreboot_addr)
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
new file mode 100644
index 000000000000..6cee456ca542
--- /dev/null
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -0,0 +1,79 @@
1/*
2 * OMAP4 SMP cpu-hotplug support
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc.
5 * Author:
6 * Santosh Shilimkar <santosh.shilimkar@ti.com>
7 *
8 * Platform file needed for the OMAP4 SMP. This file is based on arm
9 * realview smp platform.
10 * Copyright (c) 2002 ARM Limited.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include <linux/kernel.h>
18#include <linux/errno.h>
19#include <linux/smp.h>
20#include <linux/completion.h>
21
22#include <asm/cacheflush.h>
23#include <mach/omap4-common.h>
24
25static DECLARE_COMPLETION(cpu_killed);
26
27int platform_cpu_kill(unsigned int cpu)
28{
29 return wait_for_completion_timeout(&cpu_killed, 5000);
30}
31
32/*
33 * platform-specific code to shutdown a CPU
34 * Called with IRQs disabled
35 */
36void platform_cpu_die(unsigned int cpu)
37{
38 unsigned int this_cpu = hard_smp_processor_id();
39
40 if (cpu != this_cpu) {
41 pr_crit("platform_cpu_die running on %u, should be %u\n",
42 this_cpu, cpu);
43 BUG();
44 }
45 pr_notice("CPU%u: shutdown\n", cpu);
46 complete(&cpu_killed);
47 flush_cache_all();
48 dsb();
49
50 /*
51 * we're ready for shutdown now, so do it
52 */
53 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
54 printk(KERN_CRIT "Secure clear status failed\n");
55
56 for (;;) {
57 /*
58 * Execute WFI
59 */
60 do_wfi();
61
62 if (omap_read_auxcoreboot0() == cpu) {
63 /*
64 * OK, proper wakeup, we're done
65 */
66 break;
67 }
68 pr_debug("CPU%u: spurious wakeup call\n", cpu);
69 }
70}
71
72int platform_cpu_disable(unsigned int cpu)
73{
74 /*
75 * we don't allow CPU 0 to be shutdown (it is still too special
76 * e.g. clock tick interrupts)
77 */
78 return cpu == 0 ? -EPERM : 0;
79}
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index eb9bee73e0cb..f5a1aad1a5c0 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -59,7 +59,7 @@ static struct platform_device *omap3_iommu_pdev[NR_OMAP3_IOMMU_DEVICES];
59static struct iommu_device omap4_devices[] = { 59static struct iommu_device omap4_devices[] = {
60 { 60 {
61 .base = OMAP4_MMU1_BASE, 61 .base = OMAP4_MMU1_BASE,
62 .irq = INT_44XX_DUCATI_MMU_IRQ, 62 .irq = OMAP44XX_IRQ_DUCATI_MMU,
63 .pdata = { 63 .pdata = {
64 .name = "ducati", 64 .name = "ducati",
65 .nr_tlb_entries = 32, 65 .nr_tlb_entries = 32,
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 1cf52313759e..af3c20c8d3f9 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -73,9 +73,10 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
73 * the AuxCoreBoot1 register is updated with cpu state 73 * the AuxCoreBoot1 register is updated with cpu state
74 * A barrier is added to ensure that write buffer is drained 74 * A barrier is added to ensure that write buffer is drained
75 */ 75 */
76 omap_modify_auxcoreboot0(0x200, 0x0); 76 omap_modify_auxcoreboot0(0x200, 0xfffffdff);
77 flush_cache_all(); 77 flush_cache_all();
78 smp_wmb(); 78 smp_wmb();
79 smp_cross_call(cpumask_of(cpu));
79 80
80 /* 81 /*
81 * Now the secondary core is starting up let it run its 82 * Now the secondary core is starting up let it run its
diff --git a/arch/arm/mach-omap2/omap44xx-smc.S b/arch/arm/mach-omap2/omap44xx-smc.S
index f61c7771ca47..1980dc31a1a2 100644
--- a/arch/arm/mach-omap2/omap44xx-smc.S
+++ b/arch/arm/mach-omap2/omap44xx-smc.S
@@ -30,3 +30,28 @@ ENTRY(omap_smc1)
30 smc #0 30 smc #0
31 ldmfd sp!, {r2-r12, pc} 31 ldmfd sp!, {r2-r12, pc}
32END(omap_smc1) 32END(omap_smc1)
33
34ENTRY(omap_modify_auxcoreboot0)
35 stmfd sp!, {r1-r12, lr}
36 ldr r12, =0x104
37 dsb
38 smc #0
39 ldmfd sp!, {r1-r12, pc}
40END(omap_modify_auxcoreboot0)
41
42ENTRY(omap_auxcoreboot_addr)
43 stmfd sp!, {r2-r12, lr}
44 ldr r12, =0x105
45 dsb
46 smc #0
47 ldmfd sp!, {r2-r12, pc}
48END(omap_auxcoreboot_addr)
49
50ENTRY(omap_read_auxcoreboot0)
51 stmfd sp!, {r2-r12, lr}
52 ldr r12, =0x103
53 dsb
54 smc #0
55 mov r0, r0, lsr #9
56 ldmfd sp!, {r2-r12, pc}
57END(omap_read_auxcoreboot0)
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index e321281ab6e1..6aeedeacdad8 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -39,7 +39,6 @@
39#include <plat/clock.h> 39#include <plat/clock.h>
40#include <plat/sram.h> 40#include <plat/sram.h>
41#include <plat/control.h> 41#include <plat/control.h>
42#include <plat/mux.h>
43#include <plat/dma.h> 42#include <plat/dma.h>
44#include <plat/board.h> 43#include <plat/board.h>
45 44
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
new file mode 100644
index 000000000000..54544b4fc76b
--- /dev/null
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -0,0 +1,135 @@
1/*
2 * OMAP4 Power Management Routines
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc.
5 * Rajendra Nayak <rnayak@ti.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/pm.h>
13#include <linux/suspend.h>
14#include <linux/module.h>
15#include <linux/list.h>
16#include <linux/err.h>
17#include <linux/slab.h>
18
19#include <plat/powerdomain.h>
20#include <mach/omap4-common.h>
21
22struct power_state {
23 struct powerdomain *pwrdm;
24 u32 next_state;
25#ifdef CONFIG_SUSPEND
26 u32 saved_state;
27#endif
28 struct list_head node;
29};
30
31static LIST_HEAD(pwrst_list);
32
33#ifdef CONFIG_SUSPEND
34static int omap4_pm_prepare(void)
35{
36 disable_hlt();
37 return 0;
38}
39
40static int omap4_pm_suspend(void)
41{
42 do_wfi();
43 return 0;
44}
45
46static int omap4_pm_enter(suspend_state_t suspend_state)
47{
48 int ret = 0;
49
50 switch (suspend_state) {
51 case PM_SUSPEND_STANDBY:
52 case PM_SUSPEND_MEM:
53 ret = omap4_pm_suspend();
54 break;
55 default:
56 ret = -EINVAL;
57 }
58
59 return ret;
60}
61
62static void omap4_pm_finish(void)
63{
64 enable_hlt();
65 return;
66}
67
68static int omap4_pm_begin(suspend_state_t state)
69{
70 return 0;
71}
72
73static void omap4_pm_end(void)
74{
75 return;
76}
77
78static struct platform_suspend_ops omap_pm_ops = {
79 .begin = omap4_pm_begin,
80 .end = omap4_pm_end,
81 .prepare = omap4_pm_prepare,
82 .enter = omap4_pm_enter,
83 .finish = omap4_pm_finish,
84 .valid = suspend_valid_only_mem,
85};
86#endif /* CONFIG_SUSPEND */
87
88static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
89{
90 struct power_state *pwrst;
91
92 if (!pwrdm->pwrsts)
93 return 0;
94
95 pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC);
96 if (!pwrst)
97 return -ENOMEM;
98 pwrst->pwrdm = pwrdm;
99 pwrst->next_state = PWRDM_POWER_ON;
100 list_add(&pwrst->node, &pwrst_list);
101
102 return pwrdm_set_next_pwrst(pwrst->pwrdm, pwrst->next_state);
103}
104
105/**
106 * omap4_pm_init - Init routine for OMAP4 PM
107 *
108 * Initializes all powerdomain and clockdomain target states
109 * and all PRCM settings.
110 */
111static int __init omap4_pm_init(void)
112{
113 int ret;
114
115 if (!cpu_is_omap44xx())
116 return -ENODEV;
117
118 pr_err("Power Management for TI OMAP4.\n");
119
120#ifdef CONFIG_PM
121 ret = pwrdm_for_each(pwrdms_setup, NULL);
122 if (ret) {
123 pr_err("Failed to setup powerdomains\n");
124 goto err2;
125 }
126#endif
127
128#ifdef CONFIG_SUSPEND
129 suspend_set_ops(&omap_pm_ops);
130#endif /* CONFIG_SUSPEND */
131
132err2:
133 return ret;
134}
135late_initcall(omap4_pm_init);
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 3771254dfa81..566e991ede81 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -37,6 +37,9 @@
37#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 37#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52
38#define UART_OMAP_WER 0x17 /* Wake-up enable register */ 38#define UART_OMAP_WER 0x17 /* Wake-up enable register */
39 39
40#define UART_ERRATA_FIFO_FULL_ABORT (0x1 << 0)
41#define UART_ERRATA_i202_MDR1_ACCESS (0x1 << 1)
42
40/* 43/*
41 * NOTE: By default the serial timeout is disabled as it causes lost characters 44 * NOTE: By default the serial timeout is disabled as it causes lost characters
42 * over the serial ports. This means that the UART clocks will stay on until 45 * over the serial ports. This means that the UART clocks will stay on until
@@ -64,6 +67,7 @@ struct omap_uart_state {
64 struct list_head node; 67 struct list_head node;
65 struct platform_device pdev; 68 struct platform_device pdev;
66 69
70 u32 errata;
67#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) 71#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
68 int context_valid; 72 int context_valid;
69 73
@@ -74,6 +78,7 @@ struct omap_uart_state {
74 u16 sysc; 78 u16 sysc;
75 u16 scr; 79 u16 scr;
76 u16 wer; 80 u16 wer;
81 u16 mcr;
77#endif 82#endif
78}; 83};
79 84
@@ -180,6 +185,42 @@ static inline void __init omap_uart_reset(struct omap_uart_state *uart)
180 185
181#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) 186#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
182 187
188/*
189 * Work Around for Errata i202 (3430 - 1.12, 3630 - 1.6)
190 * The access to uart register after MDR1 Access
191 * causes UART to corrupt data.
192 *
193 * Need a delay =
194 * 5 L4 clock cycles + 5 UART functional clock cycle (@48MHz = ~0.2uS)
195 * give 10 times as much
196 */
197static void omap_uart_mdr1_errataset(struct omap_uart_state *uart, u8 mdr1_val,
198 u8 fcr_val)
199{
200 struct plat_serial8250_port *p = uart->p;
201 u8 timeout = 255;
202
203 serial_write_reg(p, UART_OMAP_MDR1, mdr1_val);
204 udelay(2);
205 serial_write_reg(p, UART_FCR, fcr_val | UART_FCR_CLEAR_XMIT |
206 UART_FCR_CLEAR_RCVR);
207 /*
208 * Wait for FIFO to empty: when empty, RX_FIFO_E bit is 0 and
209 * TX_FIFO_E bit is 1.
210 */
211 while (UART_LSR_THRE != (serial_read_reg(p, UART_LSR) &
212 (UART_LSR_THRE | UART_LSR_DR))) {
213 timeout--;
214 if (!timeout) {
215 /* Should *never* happen. we warn and carry on */
216 dev_crit(&uart->pdev.dev, "Errata i202: timedout %x\n",
217 serial_read_reg(p, UART_LSR));
218 break;
219 }
220 udelay(1);
221 }
222}
223
183static void omap_uart_save_context(struct omap_uart_state *uart) 224static void omap_uart_save_context(struct omap_uart_state *uart)
184{ 225{
185 u16 lcr = 0; 226 u16 lcr = 0;
@@ -197,6 +238,9 @@ static void omap_uart_save_context(struct omap_uart_state *uart)
197 uart->sysc = serial_read_reg(p, UART_OMAP_SYSC); 238 uart->sysc = serial_read_reg(p, UART_OMAP_SYSC);
198 uart->scr = serial_read_reg(p, UART_OMAP_SCR); 239 uart->scr = serial_read_reg(p, UART_OMAP_SCR);
199 uart->wer = serial_read_reg(p, UART_OMAP_WER); 240 uart->wer = serial_read_reg(p, UART_OMAP_WER);
241 serial_write_reg(p, UART_LCR, 0x80);
242 uart->mcr = serial_read_reg(p, UART_MCR);
243 serial_write_reg(p, UART_LCR, lcr);
200 244
201 uart->context_valid = 1; 245 uart->context_valid = 1;
202} 246}
@@ -214,7 +258,10 @@ static void omap_uart_restore_context(struct omap_uart_state *uart)
214 258
215 uart->context_valid = 0; 259 uart->context_valid = 0;
216 260
217 serial_write_reg(p, UART_OMAP_MDR1, 0x7); 261 if (uart->errata & UART_ERRATA_i202_MDR1_ACCESS)
262 omap_uart_mdr1_errataset(uart, 0x07, 0xA0);
263 else
264 serial_write_reg(p, UART_OMAP_MDR1, 0x7);
218 serial_write_reg(p, UART_LCR, 0xBF); /* Config B mode */ 265 serial_write_reg(p, UART_LCR, 0xBF); /* Config B mode */
219 efr = serial_read_reg(p, UART_EFR); 266 efr = serial_read_reg(p, UART_EFR);
220 serial_write_reg(p, UART_EFR, UART_EFR_ECB); 267 serial_write_reg(p, UART_EFR, UART_EFR_ECB);
@@ -225,14 +272,18 @@ static void omap_uart_restore_context(struct omap_uart_state *uart)
225 serial_write_reg(p, UART_DLM, uart->dlh); 272 serial_write_reg(p, UART_DLM, uart->dlh);
226 serial_write_reg(p, UART_LCR, 0x0); /* Operational mode */ 273 serial_write_reg(p, UART_LCR, 0x0); /* Operational mode */
227 serial_write_reg(p, UART_IER, uart->ier); 274 serial_write_reg(p, UART_IER, uart->ier);
228 serial_write_reg(p, UART_FCR, 0xA1); 275 serial_write_reg(p, UART_LCR, 0x80);
276 serial_write_reg(p, UART_MCR, uart->mcr);
229 serial_write_reg(p, UART_LCR, 0xBF); /* Config B mode */ 277 serial_write_reg(p, UART_LCR, 0xBF); /* Config B mode */
230 serial_write_reg(p, UART_EFR, efr); 278 serial_write_reg(p, UART_EFR, efr);
231 serial_write_reg(p, UART_LCR, UART_LCR_WLEN8); 279 serial_write_reg(p, UART_LCR, UART_LCR_WLEN8);
232 serial_write_reg(p, UART_OMAP_SCR, uart->scr); 280 serial_write_reg(p, UART_OMAP_SCR, uart->scr);
233 serial_write_reg(p, UART_OMAP_WER, uart->wer); 281 serial_write_reg(p, UART_OMAP_WER, uart->wer);
234 serial_write_reg(p, UART_OMAP_SYSC, uart->sysc); 282 serial_write_reg(p, UART_OMAP_SYSC, uart->sysc);
235 serial_write_reg(p, UART_OMAP_MDR1, 0x00); /* UART 16x mode */ 283 if (uart->errata & UART_ERRATA_i202_MDR1_ACCESS)
284 omap_uart_mdr1_errataset(uart, 0x00, 0xA1);
285 else
286 serial_write_reg(p, UART_OMAP_MDR1, 0x00); /* UART 16x mode */
236} 287}
237#else 288#else
238static inline void omap_uart_save_context(struct omap_uart_state *uart) {} 289static inline void omap_uart_save_context(struct omap_uart_state *uart) {}
@@ -489,8 +540,8 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
489 } 540 }
490 uart->wk_mask = wk_mask; 541 uart->wk_mask = wk_mask;
491 } else { 542 } else {
492 uart->wk_en = 0; 543 uart->wk_en = NULL;
493 uart->wk_st = 0; 544 uart->wk_st = NULL;
494 uart->wk_mask = 0; 545 uart->wk_mask = 0;
495 uart->padconf = 0; 546 uart->padconf = 0;
496 } 547 }
@@ -552,7 +603,8 @@ static ssize_t sleep_timeout_store(struct device *dev,
552 return n; 603 return n;
553} 604}
554 605
555DEVICE_ATTR(sleep_timeout, 0644, sleep_timeout_show, sleep_timeout_store); 606static DEVICE_ATTR(sleep_timeout, 0644, sleep_timeout_show,
607 sleep_timeout_store);
556#define DEV_CREATE_FILE(dev, attr) WARN_ON(device_create_file(dev, attr)) 608#define DEV_CREATE_FILE(dev, attr) WARN_ON(device_create_file(dev, attr))
557#else 609#else
558static inline void omap_uart_idle_init(struct omap_uart_state *uart) {} 610static inline void omap_uart_idle_init(struct omap_uart_state *uart) {}
@@ -749,14 +801,20 @@ void __init omap_serial_init_port(int port)
749 * omap3xxx: Never read empty UART fifo on UARTs 801 * omap3xxx: Never read empty UART fifo on UARTs
750 * with IP rev >=0x52 802 * with IP rev >=0x52
751 */ 803 */
752 if (cpu_is_omap44xx()) { 804 if (cpu_is_omap44xx())
753 uart->p->serial_in = serial_in_override; 805 uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
754 uart->p->serial_out = serial_out_override; 806 else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
755 } else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF) 807 >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
756 >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) { 808 uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
809
810 if (uart->errata & UART_ERRATA_FIFO_FULL_ABORT) {
757 uart->p->serial_in = serial_in_override; 811 uart->p->serial_in = serial_in_override;
758 uart->p->serial_out = serial_out_override; 812 uart->p->serial_out = serial_out_override;
759 } 813 }
814
815 /* Enable the MDR1 errata for OMAP3 */
816 if (cpu_is_omap34xx())
817 uart->errata |= UART_ERRATA_i202_MDR1_ACCESS;
760} 818}
761 819
762/** 820/**
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c
index d72d1ac30333..b11bf385d360 100644
--- a/arch/arm/mach-omap2/usb-ehci.c
+++ b/arch/arm/mach-omap2/usb-ehci.c
@@ -23,7 +23,6 @@
23#include <linux/dma-mapping.h> 23#include <linux/dma-mapping.h>
24 24
25#include <asm/io.h> 25#include <asm/io.h>
26#include <plat/mux.h>
27 26
28#include <mach/hardware.h> 27#include <mach/hardware.h>
29#include <mach/irqs.h> 28#include <mach/irqs.h>
diff --git a/arch/arm/mach-omap2/usb-fs.c b/arch/arm/mach-omap2/usb-fs.c
new file mode 100644
index 000000000000..a216d88b04b5
--- /dev/null
+++ b/arch/arm/mach-omap2/usb-fs.c
@@ -0,0 +1,359 @@
1/*
2 * Platform level USB initialization for FS USB OTG controller on omap1 and 24xx
3 *
4 * Copyright (C) 2004 Texas Instruments, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/module.h>
22#include <linux/kernel.h>
23#include <linux/types.h>
24#include <linux/errno.h>
25#include <linux/init.h>
26#include <linux/platform_device.h>
27#include <linux/clk.h>
28#include <linux/err.h>
29
30#include <asm/irq.h>
31
32#include <plat/control.h>
33#include <plat/usb.h>
34#include <plat/board.h>
35
36#define INT_USB_IRQ_GEN INT_24XX_USB_IRQ_GEN
37#define INT_USB_IRQ_NISO INT_24XX_USB_IRQ_NISO
38#define INT_USB_IRQ_ISO INT_24XX_USB_IRQ_ISO
39#define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN
40#define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG
41
42#include "mux.h"
43
44#if defined(CONFIG_ARCH_OMAP2)
45
46#ifdef CONFIG_USB_GADGET_OMAP
47
48static struct resource udc_resources[] = {
49 /* order is significant! */
50 { /* registers */
51 .start = UDC_BASE,
52 .end = UDC_BASE + 0xff,
53 .flags = IORESOURCE_MEM,
54 }, { /* general IRQ */
55 .start = INT_USB_IRQ_GEN,
56 .flags = IORESOURCE_IRQ,
57 }, { /* PIO IRQ */
58 .start = INT_USB_IRQ_NISO,
59 .flags = IORESOURCE_IRQ,
60 }, { /* SOF IRQ */
61 .start = INT_USB_IRQ_ISO,
62 .flags = IORESOURCE_IRQ,
63 },
64};
65
66static u64 udc_dmamask = ~(u32)0;
67
68static struct platform_device udc_device = {
69 .name = "omap_udc",
70 .id = -1,
71 .dev = {
72 .dma_mask = &udc_dmamask,
73 .coherent_dma_mask = 0xffffffff,
74 },
75 .num_resources = ARRAY_SIZE(udc_resources),
76 .resource = udc_resources,
77};
78
79static inline void udc_device_init(struct omap_usb_config *pdata)
80{
81 pdata->udc_device = &udc_device;
82}
83
84#else
85
86static inline void udc_device_init(struct omap_usb_config *pdata)
87{
88}
89
90#endif
91
92#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
93
94/* The dmamask must be set for OHCI to work */
95static u64 ohci_dmamask = ~(u32)0;
96
97static struct resource ohci_resources[] = {
98 {
99 .start = OMAP_OHCI_BASE,
100 .end = OMAP_OHCI_BASE + 0xff,
101 .flags = IORESOURCE_MEM,
102 },
103 {
104 .start = INT_USB_IRQ_HGEN,
105 .flags = IORESOURCE_IRQ,
106 },
107};
108
109static struct platform_device ohci_device = {
110 .name = "ohci",
111 .id = -1,
112 .dev = {
113 .dma_mask = &ohci_dmamask,
114 .coherent_dma_mask = 0xffffffff,
115 },
116 .num_resources = ARRAY_SIZE(ohci_resources),
117 .resource = ohci_resources,
118};
119
120static inline void ohci_device_init(struct omap_usb_config *pdata)
121{
122 pdata->ohci_device = &ohci_device;
123}
124
125#else
126
127static inline void ohci_device_init(struct omap_usb_config *pdata)
128{
129}
130
131#endif
132
133#if defined(CONFIG_USB_OTG) && defined(CONFIG_ARCH_OMAP_OTG)
134
135static struct resource otg_resources[] = {
136 /* order is significant! */
137 {
138 .start = OTG_BASE,
139 .end = OTG_BASE + 0xff,
140 .flags = IORESOURCE_MEM,
141 }, {
142 .start = INT_USB_IRQ_OTG,
143 .flags = IORESOURCE_IRQ,
144 },
145};
146
147static struct platform_device otg_device = {
148 .name = "omap_otg",
149 .id = -1,
150 .num_resources = ARRAY_SIZE(otg_resources),
151 .resource = otg_resources,
152};
153
154static inline void otg_device_init(struct omap_usb_config *pdata)
155{
156 pdata->otg_device = &otg_device;
157}
158
159#else
160
161static inline void otg_device_init(struct omap_usb_config *pdata)
162{
163}
164
165#endif
166
167static void omap2_usb_devconf_clear(u8 port, u32 mask)
168{
169 u32 r;
170
171 r = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
172 r &= ~USBTXWRMODEI(port, mask);
173 omap_ctrl_writel(r, OMAP2_CONTROL_DEVCONF0);
174}
175
176static void omap2_usb_devconf_set(u8 port, u32 mask)
177{
178 u32 r;
179
180 r = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
181 r |= USBTXWRMODEI(port, mask);
182 omap_ctrl_writel(r, OMAP2_CONTROL_DEVCONF0);
183}
184
185static void omap2_usb2_disable_5pinbitll(void)
186{
187 u32 r;
188
189 r = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
190 r &= ~(USBTXWRMODEI(2, USB_BIDIR_TLL) | USBT2TLL5PI);
191 omap_ctrl_writel(r, OMAP2_CONTROL_DEVCONF0);
192}
193
194static void omap2_usb2_enable_5pinunitll(void)
195{
196 u32 r;
197
198 r = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
199 r |= USBTXWRMODEI(2, USB_UNIDIR_TLL) | USBT2TLL5PI;
200 omap_ctrl_writel(r, OMAP2_CONTROL_DEVCONF0);
201}
202
203static u32 __init omap2_usb0_init(unsigned nwires, unsigned is_device)
204{
205 u32 syscon1 = 0;
206
207 omap2_usb_devconf_clear(0, USB_BIDIR_TLL);
208
209 if (nwires == 0)
210 return 0;
211
212 if (is_device)
213 omap_mux_init_signal("usb0_puen", 0);
214
215 omap_mux_init_signal("usb0_dat", 0);
216 omap_mux_init_signal("usb0_txen", 0);
217 omap_mux_init_signal("usb0_se0", 0);
218 if (nwires != 3)
219 omap_mux_init_signal("usb0_rcv", 0);
220
221 switch (nwires) {
222 case 3:
223 syscon1 = 2;
224 omap2_usb_devconf_set(0, USB_BIDIR);
225 break;
226 case 4:
227 syscon1 = 1;
228 omap2_usb_devconf_set(0, USB_BIDIR);
229 break;
230 case 6:
231 syscon1 = 3;
232 omap_mux_init_signal("usb0_vp", 0);
233 omap_mux_init_signal("usb0_vm", 0);
234 omap2_usb_devconf_set(0, USB_UNIDIR);
235 break;
236 default:
237 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n",
238 0, nwires);
239 }
240
241 return syscon1 << 16;
242}
243
244static u32 __init omap2_usb1_init(unsigned nwires)
245{
246 u32 syscon1 = 0;
247
248 omap2_usb_devconf_clear(1, USB_BIDIR_TLL);
249
250 if (nwires == 0)
251 return 0;
252
253 /* NOTE: board-specific code must set up pin muxing for usb1,
254 * since each signal could come out on either of two balls.
255 */
256
257 switch (nwires) {
258 case 2:
259 /* NOTE: board-specific code must override this setting if
260 * this TLL link is not using DP/DM
261 */
262 syscon1 = 1;
263 omap2_usb_devconf_set(1, USB_BIDIR_TLL);
264 break;
265 case 3:
266 syscon1 = 2;
267 omap2_usb_devconf_set(1, USB_BIDIR);
268 break;
269 case 4:
270 syscon1 = 1;
271 omap2_usb_devconf_set(1, USB_BIDIR);
272 break;
273 case 6:
274 default:
275 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n",
276 1, nwires);
277 }
278
279 return syscon1 << 20;
280}
281
282static u32 __init omap2_usb2_init(unsigned nwires, unsigned alt_pingroup)
283{
284 u32 syscon1 = 0;
285
286 omap2_usb2_disable_5pinbitll();
287 alt_pingroup = 0;
288
289 /* NOTE omap1 erratum: must leave USB2_UNI_R set if usb0 in use */
290 if (alt_pingroup || nwires == 0)
291 return 0;
292
293 omap_mux_init_signal("usb2_dat", 0);
294 omap_mux_init_signal("usb2_se0", 0);
295 if (nwires > 2)
296 omap_mux_init_signal("usb2_txen", 0);
297 if (nwires > 3)
298 omap_mux_init_signal("usb2_rcv", 0);
299
300 switch (nwires) {
301 case 2:
302 /* NOTE: board-specific code must override this setting if
303 * this TLL link is not using DP/DM
304 */
305 syscon1 = 1;
306 omap2_usb_devconf_set(2, USB_BIDIR_TLL);
307 break;
308 case 3:
309 syscon1 = 2;
310 omap2_usb_devconf_set(2, USB_BIDIR);
311 break;
312 case 4:
313 syscon1 = 1;
314 omap2_usb_devconf_set(2, USB_BIDIR);
315 break;
316 case 5:
317 /* NOTE: board-specific code must mux this setting depending
318 * on TLL link using DP/DM. Something must also
319 * set up OTG_SYSCON2.HMC_TLL{ATTACH,SPEED}
320 * 2420: hdq_sio.usb2_tllse0 or vlynq_rx0.usb2_tllse0
321 * 2430: hdq_sio.usb2_tllse0 or sdmmc2_dat0.usb2_tllse0
322 */
323
324 syscon1 = 3;
325 omap2_usb2_enable_5pinunitll();
326 break;
327 case 6:
328 default:
329 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n",
330 2, nwires);
331 }
332
333 return syscon1 << 24;
334}
335
336void __init omap2_usbfs_init(struct omap_usb_config *pdata)
337{
338 struct clk *ick;
339
340 if (!cpu_is_omap24xx())
341 return;
342
343 ick = clk_get(NULL, "usb_l4_ick");
344 if (IS_ERR(ick))
345 return;
346
347 clk_enable(ick);
348 pdata->usb0_init = omap2_usb0_init;
349 pdata->usb1_init = omap2_usb1_init;
350 pdata->usb2_init = omap2_usb2_init;
351 udc_device_init(pdata);
352 ohci_device_init(pdata);
353 otg_device_init(pdata);
354 omap_otg_init(pdata);
355 clk_disable(ick);
356 clk_put(ick);
357}
358
359#endif
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 96f6787e00b2..33a5cde1c227 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -28,7 +28,6 @@
28 28
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30#include <mach/irqs.h> 30#include <mach/irqs.h>
31#include <plat/mux.h>
32#include <plat/usb.h> 31#include <plat/usb.h>
33 32
34#ifdef CONFIG_USB_MUSB_SOC 33#ifdef CONFIG_USB_MUSB_SOC
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 10a2013c1104..64a0112b70a5 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -17,8 +17,8 @@
17#include <linux/usb/musb.h> 17#include <linux/usb/musb.h>
18 18
19#include <plat/gpmc.h> 19#include <plat/gpmc.h>
20#include <plat/mux.h>
21 20
21#include "mux.h"
22 22
23static u8 async_cs, sync_cs; 23static u8 async_cs, sync_cs;
24static unsigned refclk_psec; 24static unsigned refclk_psec;
@@ -325,17 +325,17 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
325 else { 325 else {
326 /* assume OMAP 2420 ES2.0 and later */ 326 /* assume OMAP 2420 ES2.0 and later */
327 if (dmachan & (1 << 0)) 327 if (dmachan & (1 << 0))
328 omap_cfg_reg(AA10_242X_DMAREQ0); 328 omap_mux_init_signal("sys_ndmareq0", 0);
329 if (dmachan & (1 << 1)) 329 if (dmachan & (1 << 1))
330 omap_cfg_reg(AA6_242X_DMAREQ1); 330 omap_mux_init_signal("sys_ndmareq1", 0);
331 if (dmachan & (1 << 2)) 331 if (dmachan & (1 << 2))
332 omap_cfg_reg(E4_242X_DMAREQ2); 332 omap_mux_init_signal("sys_ndmareq2", 0);
333 if (dmachan & (1 << 3)) 333 if (dmachan & (1 << 3))
334 omap_cfg_reg(G4_242X_DMAREQ3); 334 omap_mux_init_signal("sys_ndmareq3", 0);
335 if (dmachan & (1 << 4)) 335 if (dmachan & (1 << 4))
336 omap_cfg_reg(D3_242X_DMAREQ4); 336 omap_mux_init_signal("sys_ndmareq4", 0);
337 if (dmachan & (1 << 5)) 337 if (dmachan & (1 << 5))
338 omap_cfg_reg(E3_242X_DMAREQ5); 338 omap_mux_init_signal("sys_ndmareq5", 0);
339 } 339 }
340 340
341 /* so far so good ... register the device */ 341 /* so far so good ... register the device */