diff options
author | Tony Lindgren <tony@atomide.com> | 2009-12-11 19:16:33 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-12-11 19:16:33 -0500 |
commit | 15f45e6f27b0ef0719171978acadf073b066fb74 (patch) | |
tree | ade2c84bbfca7c3f41acf56330ef8c171649defb /arch/arm | |
parent | 4896e3940a063fb03195d05806d28970dc3f102b (diff) |
omap: mux: Remove old mux code for 34xx
Remove old mux code for 34xx
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 368 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mux.h | 226 |
11 files changed, 14 insertions, 589 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index ded3e875ec80..4cfb7b68dfad 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
32 | 32 | ||
33 | #include <plat/mcspi.h> | 33 | #include <plat/mcspi.h> |
34 | #include <plat/mux.h> | ||
35 | #include <plat/board.h> | 34 | #include <plat/board.h> |
36 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
37 | #include <plat/common.h> | 36 | #include <plat/common.h> |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 10a595548724..507c9222699d 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -38,7 +38,6 @@ | |||
38 | 38 | ||
39 | #include <plat/board.h> | 39 | #include <plat/board.h> |
40 | #include <plat/common.h> | 40 | #include <plat/common.h> |
41 | #include <plat/mux.h> | ||
42 | #include <plat/nand.h> | 41 | #include <plat/nand.h> |
43 | #include <plat/gpmc.h> | 42 | #include <plat/gpmc.h> |
44 | #include <plat/usb.h> | 43 | #include <plat/usb.h> |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 7e3217a18283..44239e3ec02e 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <plat/board.h> | 27 | #include <plat/board.h> |
28 | #include <plat/common.h> | 28 | #include <plat/common.h> |
29 | #include <plat/gpmc.h> | 29 | #include <plat/gpmc.h> |
30 | #include <plat/mux.h> | ||
31 | #include <plat/usb.h> | 30 | #include <plat/usb.h> |
32 | 31 | ||
33 | #include "mux.h" | 32 | #include "mux.h" |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 9e606b107ee6..6ada8029f9a8 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <plat/common.h> | 41 | #include <plat/common.h> |
42 | #include <plat/gpmc.h> | 42 | #include <plat/gpmc.h> |
43 | #include <plat/nand.h> | 43 | #include <plat/nand.h> |
44 | #include <plat/mux.h> | ||
45 | #include <plat/usb.h> | 44 | #include <plat/usb.h> |
46 | #include <plat/timer-gp.h> | 45 | #include <plat/timer-gp.h> |
47 | 46 | ||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 0457f615339f..18913e96e34d 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
39 | 39 | ||
40 | #include <plat/board.h> | 40 | #include <plat/board.h> |
41 | #include <plat/mux.h> | ||
42 | #include <plat/usb.h> | 41 | #include <plat/usb.h> |
43 | #include <plat/common.h> | 42 | #include <plat/common.h> |
44 | #include <plat/mcspi.h> | 43 | #include <plat/mcspi.h> |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index bca5ad9efe9c..c1cc99ce0e29 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
41 | #include <plat/mcspi.h> | 41 | #include <plat/mcspi.h> |
42 | #include <plat/usb.h> | 42 | #include <plat/usb.h> |
43 | #include <plat/mux.h> | ||
44 | 43 | ||
45 | #include "mux.h" | 44 | #include "mux.h" |
46 | #include "sdram-micron-mt46h32m32lf-6.h" | 45 | #include "sdram-micron-mt46h32m32lf-6.h" |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 1ebde4c3bf46..5b78a87217e0 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <plat/gpmc.h> | 44 | #include <plat/gpmc.h> |
45 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
46 | #include <plat/nand.h> | 46 | #include <plat/nand.h> |
47 | #include <plat/mux.h> | ||
48 | #include <plat/usb.h> | 47 | #include <plat/usb.h> |
49 | 48 | ||
50 | #include "mux.h" | 49 | #include "mux.h" |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index fd71c005105d..67bb3476b707 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
24 | 24 | ||
25 | #include <plat/mcspi.h> | 25 | #include <plat/mcspi.h> |
26 | #include <plat/mux.h> | ||
27 | #include <plat/board.h> | 26 | #include <plat/board.h> |
28 | #include <plat/common.h> | 27 | #include <plat/common.h> |
29 | #include <plat/dma.h> | 28 | #include <plat/dma.h> |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index ac9ea6007f27..a8749e8017b9 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <plat/sdrc.h> | 33 | #include <plat/sdrc.h> |
34 | #include <plat/gpmc.h> | 34 | #include <plat/gpmc.h> |
35 | #include <plat/serial.h> | 35 | #include <plat/serial.h> |
36 | #include <plat/mux.h> | ||
36 | #include <plat/vram.h> | 37 | #include <plat/vram.h> |
37 | 38 | ||
38 | #include "clock.h" | 39 | #include "clock.h" |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index d9684331e080..e071b3fd1878 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -67,13 +67,12 @@ static inline void omap_mux_write(u16 val, u16 reg) | |||
67 | __raw_writew(val, mux_base + reg); | 67 | __raw_writew(val, mux_base + reg); |
68 | } | 68 | } |
69 | 69 | ||
70 | #ifdef CONFIG_OMAP_MUX | 70 | #if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_OMAP_MUX) |
71 | 71 | ||
72 | static struct omap_mux_cfg arch_mux_cfg; | 72 | static struct omap_mux_cfg arch_mux_cfg; |
73 | 73 | ||
74 | /* NOTE: See mux.h for the enumeration */ | 74 | /* NOTE: See mux.h for the enumeration */ |
75 | 75 | ||
76 | #ifdef CONFIG_ARCH_OMAP24XX | ||
77 | static struct pin_config __initdata_or_module omap24xx_pins[] = { | 76 | static struct pin_config __initdata_or_module omap24xx_pins[] = { |
78 | /* | 77 | /* |
79 | * description mux mux pull pull debug | 78 | * description mux mux pull pull debug |
@@ -283,333 +282,8 @@ MUX_CFG_24XX("AF19_2430_GPIO_85", 0x0113, 3, 0, 0, 1) | |||
283 | 282 | ||
284 | #define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) | 283 | #define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) |
285 | 284 | ||
286 | #else | ||
287 | #define omap24xx_pins NULL | ||
288 | #define OMAP24XX_PINS_SZ 0 | ||
289 | #endif /* CONFIG_ARCH_OMAP24XX */ | ||
290 | |||
291 | #ifdef CONFIG_ARCH_OMAP34XX | ||
292 | static struct pin_config __initdata_or_module omap34xx_pins[] = { | ||
293 | /* | ||
294 | * Name, reg-offset, | ||
295 | * mux-mode | [active-mode | off-mode] | ||
296 | */ | ||
297 | |||
298 | /* 34xx I2C */ | ||
299 | MUX_CFG_34XX("K21_34XX_I2C1_SCL", 0x1ba, | ||
300 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
301 | MUX_CFG_34XX("J21_34XX_I2C1_SDA", 0x1bc, | ||
302 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
303 | MUX_CFG_34XX("AF15_34XX_I2C2_SCL", 0x1be, | ||
304 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
305 | MUX_CFG_34XX("AE15_34XX_I2C2_SDA", 0x1c0, | ||
306 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
307 | MUX_CFG_34XX("AF14_34XX_I2C3_SCL", 0x1c2, | ||
308 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
309 | MUX_CFG_34XX("AG14_34XX_I2C3_SDA", 0x1c4, | ||
310 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
311 | MUX_CFG_34XX("AD26_34XX_I2C4_SCL", 0xa00, | ||
312 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
313 | MUX_CFG_34XX("AE26_34XX_I2C4_SDA", 0xa02, | ||
314 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
315 | |||
316 | /* PHY - HSUSB: 12-pin ULPI PHY: Port 1*/ | ||
317 | MUX_CFG_34XX("Y8_3430_USB1HS_PHY_CLK", 0x5da, | ||
318 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT) | ||
319 | MUX_CFG_34XX("Y9_3430_USB1HS_PHY_STP", 0x5d8, | ||
320 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT) | ||
321 | MUX_CFG_34XX("AA14_3430_USB1HS_PHY_DIR", 0x5ec, | ||
322 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
323 | MUX_CFG_34XX("AA11_3430_USB1HS_PHY_NXT", 0x5ee, | ||
324 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
325 | MUX_CFG_34XX("W13_3430_USB1HS_PHY_D0", 0x5dc, | ||
326 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
327 | MUX_CFG_34XX("W12_3430_USB1HS_PHY_D1", 0x5de, | ||
328 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
329 | MUX_CFG_34XX("W11_3430_USB1HS_PHY_D2", 0x5e0, | ||
330 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
331 | MUX_CFG_34XX("Y11_3430_USB1HS_PHY_D3", 0x5ea, | ||
332 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
333 | MUX_CFG_34XX("W9_3430_USB1HS_PHY_D4", 0x5e4, | ||
334 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
335 | MUX_CFG_34XX("Y12_3430_USB1HS_PHY_D5", 0x5e6, | ||
336 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
337 | MUX_CFG_34XX("W8_3430_USB1HS_PHY_D6", 0x5e8, | ||
338 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
339 | MUX_CFG_34XX("Y13_3430_USB1HS_PHY_D7", 0x5e2, | ||
340 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
341 | |||
342 | /* PHY - HSUSB: 12-pin ULPI PHY: Port 2*/ | ||
343 | MUX_CFG_34XX("AA8_3430_USB2HS_PHY_CLK", 0x5f0, | ||
344 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT) | ||
345 | MUX_CFG_34XX("AA10_3430_USB2HS_PHY_STP", 0x5f2, | ||
346 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT) | ||
347 | MUX_CFG_34XX("AA9_3430_USB2HS_PHY_DIR", 0x5f4, | ||
348 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
349 | MUX_CFG_34XX("AB11_3430_USB2HS_PHY_NXT", 0x5f6, | ||
350 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
351 | MUX_CFG_34XX("AB10_3430_USB2HS_PHY_D0", 0x5f8, | ||
352 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
353 | MUX_CFG_34XX("AB9_3430_USB2HS_PHY_D1", 0x5fa, | ||
354 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
355 | MUX_CFG_34XX("W3_3430_USB2HS_PHY_D2", 0x1d4, | ||
356 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
357 | MUX_CFG_34XX("T4_3430_USB2HS_PHY_D3", 0x1de, | ||
358 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
359 | MUX_CFG_34XX("T3_3430_USB2HS_PHY_D4", 0x1d8, | ||
360 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
361 | MUX_CFG_34XX("R3_3430_USB2HS_PHY_D5", 0x1da, | ||
362 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
363 | MUX_CFG_34XX("R4_3430_USB2HS_PHY_D6", 0x1dc, | ||
364 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
365 | MUX_CFG_34XX("T2_3430_USB2HS_PHY_D7", 0x1d6, | ||
366 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
367 | |||
368 | /* TLL - HSUSB: 12-pin TLL Port 1*/ | ||
369 | MUX_CFG_34XX("Y8_3430_USB1HS_TLL_CLK", 0x5da, | ||
370 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
371 | MUX_CFG_34XX("Y9_3430_USB1HS_TLL_STP", 0x5d8, | ||
372 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLUP) | ||
373 | MUX_CFG_34XX("AA14_3430_USB1HS_TLL_DIR", 0x5ec, | ||
374 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
375 | MUX_CFG_34XX("AA11_3430_USB1HS_TLL_NXT", 0x5ee, | ||
376 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
377 | MUX_CFG_34XX("W13_3430_USB1HS_TLL_D0", 0x5dc, | ||
378 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
379 | MUX_CFG_34XX("W12_3430_USB1HS_TLL_D1", 0x5de, | ||
380 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
381 | MUX_CFG_34XX("W11_3430_USB1HS_TLL_D2", 0x5e0, | ||
382 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
383 | MUX_CFG_34XX("Y11_3430_USB1HS_TLL_D3", 0x5ea, | ||
384 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
385 | MUX_CFG_34XX("W9_3430_USB1HS_TLL_D4", 0x5e4, | ||
386 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
387 | MUX_CFG_34XX("Y12_3430_USB1HS_TLL_D5", 0x5e6, | ||
388 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
389 | MUX_CFG_34XX("W8_3430_USB1HS_TLL_D6", 0x5e8, | ||
390 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
391 | MUX_CFG_34XX("Y13_3430_USB1HS_TLL_D7", 0x5e2, | ||
392 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
393 | |||
394 | /* TLL - HSUSB: 12-pin TLL Port 2*/ | ||
395 | MUX_CFG_34XX("AA8_3430_USB2HS_TLL_CLK", 0x5f0, | ||
396 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
397 | MUX_CFG_34XX("AA10_3430_USB2HS_TLL_STP", 0x5f2, | ||
398 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLUP) | ||
399 | MUX_CFG_34XX("AA9_3430_USB2HS_TLL_DIR", 0x5f4, | ||
400 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
401 | MUX_CFG_34XX("AB11_3430_USB2HS_TLL_NXT", 0x5f6, | ||
402 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
403 | MUX_CFG_34XX("AB10_3430_USB2HS_TLL_D0", 0x5f8, | ||
404 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
405 | MUX_CFG_34XX("AB9_3430_USB2HS_TLL_D1", 0x5fa, | ||
406 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
407 | MUX_CFG_34XX("W3_3430_USB2HS_TLL_D2", 0x1d4, | ||
408 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
409 | MUX_CFG_34XX("T4_3430_USB2HS_TLL_D3", 0x1de, | ||
410 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
411 | MUX_CFG_34XX("T3_3430_USB2HS_TLL_D4", 0x1d8, | ||
412 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
413 | MUX_CFG_34XX("R3_3430_USB2HS_TLL_D5", 0x1da, | ||
414 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
415 | MUX_CFG_34XX("R4_3430_USB2HS_TLL_D6", 0x1dc, | ||
416 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
417 | MUX_CFG_34XX("T2_3430_USB2HS_TLL_D7", 0x1d6, | ||
418 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
419 | |||
420 | /* TLL - HSUSB: 12-pin TLL Port 3*/ | ||
421 | MUX_CFG_34XX("AA6_3430_USB3HS_TLL_CLK", 0x180, | ||
422 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
423 | MUX_CFG_34XX("AB3_3430_USB3HS_TLL_STP", 0x166, | ||
424 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLUP) | ||
425 | MUX_CFG_34XX("AA3_3430_USB3HS_TLL_DIR", 0x168, | ||
426 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
427 | MUX_CFG_34XX("Y3_3430_USB3HS_TLL_NXT", 0x16a, | ||
428 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
429 | MUX_CFG_34XX("AA5_3430_USB3HS_TLL_D0", 0x186, | ||
430 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
431 | MUX_CFG_34XX("Y4_3430_USB3HS_TLL_D1", 0x184, | ||
432 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
433 | MUX_CFG_34XX("Y5_3430_USB3HS_TLL_D2", 0x188, | ||
434 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
435 | MUX_CFG_34XX("W5_3430_USB3HS_TLL_D3", 0x18a, | ||
436 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
437 | MUX_CFG_34XX("AB12_3430_USB3HS_TLL_D4", 0x16c, | ||
438 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
439 | MUX_CFG_34XX("AB13_3430_USB3HS_TLL_D5", 0x16e, | ||
440 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
441 | MUX_CFG_34XX("AA13_3430_USB3HS_TLL_D6", 0x170, | ||
442 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
443 | MUX_CFG_34XX("AA12_3430_USB3HS_TLL_D7", 0x172, | ||
444 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
445 | |||
446 | /* PHY FSUSB: FS Serial for Port 1 (multiple PHY modes supported) */ | ||
447 | MUX_CFG_34XX("AF10_3430_USB1FS_PHY_MM1_RXDP", 0x5d8, | ||
448 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
449 | MUX_CFG_34XX("AG9_3430_USB1FS_PHY_MM1_RXDM", 0x5ee, | ||
450 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
451 | MUX_CFG_34XX("W13_3430_USB1FS_PHY_MM1_RXRCV", 0x5dc, | ||
452 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
453 | MUX_CFG_34XX("W12_3430_USB1FS_PHY_MM1_TXSE0", 0x5de, | ||
454 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
455 | MUX_CFG_34XX("W11_3430_USB1FS_PHY_MM1_TXDAT", 0x5e0, | ||
456 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
457 | MUX_CFG_34XX("Y11_3430_USB1FS_PHY_MM1_TXEN_N", 0x5ea, | ||
458 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_OUTPUT) | ||
459 | |||
460 | /* PHY FSUSB: FS Serial for Port 2 (multiple PHY modes supported) */ | ||
461 | MUX_CFG_34XX("AF7_3430_USB2FS_PHY_MM2_RXDP", 0x5f2, | ||
462 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
463 | MUX_CFG_34XX("AH7_3430_USB2FS_PHY_MM2_RXDM", 0x5f6, | ||
464 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
465 | MUX_CFG_34XX("AB10_3430_USB2FS_PHY_MM2_RXRCV", 0x5f8, | ||
466 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
467 | MUX_CFG_34XX("AB9_3430_USB2FS_PHY_MM2_TXSE0", 0x5fa, | ||
468 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
469 | MUX_CFG_34XX("W3_3430_USB2FS_PHY_MM2_TXDAT", 0x1d4, | ||
470 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
471 | MUX_CFG_34XX("T4_3430_USB2FS_PHY_MM2_TXEN_N", 0x1de, | ||
472 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_OUTPUT) | ||
473 | |||
474 | /* PHY FSUSB: FS Serial for Port 3 (multiple PHY modes supported) */ | ||
475 | MUX_CFG_34XX("AH3_3430_USB3FS_PHY_MM3_RXDP", 0x166, | ||
476 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
477 | MUX_CFG_34XX("AE3_3430_USB3FS_PHY_MM3_RXDM", 0x16a, | ||
478 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
479 | MUX_CFG_34XX("AD1_3430_USB3FS_PHY_MM3_RXRCV", 0x186, | ||
480 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
481 | MUX_CFG_34XX("AE1_3430_USB3FS_PHY_MM3_TXSE0", 0x184, | ||
482 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
483 | MUX_CFG_34XX("AD2_3430_USB3FS_PHY_MM3_TXDAT", 0x188, | ||
484 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
485 | MUX_CFG_34XX("AC1_3430_USB3FS_PHY_MM3_TXEN_N", 0x18a, | ||
486 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_OUTPUT) | ||
487 | |||
488 | |||
489 | /* 34XX GPIO - bidirectional, unless the name has an "_OUT" suffix. | ||
490 | * (Always specify PIN_INPUT, except for names suffixed by "_OUT".) | ||
491 | * No internal pullup/pulldown without "_UP" or "_DOWN" suffix. | ||
492 | */ | ||
493 | MUX_CFG_34XX("AF26_34XX_GPIO0", 0x1e0, | ||
494 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
495 | MUX_CFG_34XX("AF22_34XX_GPIO9", 0xa18, | ||
496 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
497 | MUX_CFG_34XX("AG9_34XX_GPIO23", 0x5ee, | ||
498 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
499 | MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa, | ||
500 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
501 | MUX_CFG_34XX("U8_34XX_GPIO54_OUT", 0x0b4, | ||
502 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
503 | MUX_CFG_34XX("U8_34XX_GPIO54_DOWN", 0x0b4, | ||
504 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
505 | MUX_CFG_34XX("L8_34XX_GPIO63", 0x0ce, | ||
506 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
507 | MUX_CFG_34XX("G25_34XX_GPIO86_OUT", 0x0fc, | ||
508 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
509 | MUX_CFG_34XX("AG4_34XX_GPIO134_OUT", 0x160, | ||
510 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
511 | MUX_CFG_34XX("AF4_34XX_GPIO135_OUT", 0x162, | ||
512 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
513 | MUX_CFG_34XX("AE4_34XX_GPIO136_OUT", 0x164, | ||
514 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
515 | MUX_CFG_34XX("AF6_34XX_GPIO140_UP", 0x16c, | ||
516 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP) | ||
517 | MUX_CFG_34XX("AE6_34XX_GPIO141", 0x16e, | ||
518 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
519 | MUX_CFG_34XX("AF5_34XX_GPIO142", 0x170, | ||
520 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
521 | MUX_CFG_34XX("AE5_34XX_GPIO143", 0x172, | ||
522 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
523 | MUX_CFG_34XX("H19_34XX_GPIO164_OUT", 0x19c, | ||
524 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
525 | MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6, | ||
526 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
527 | |||
528 | /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */ | ||
529 | MUX_CFG_34XX("H16_34XX_SDRC_CKE0", 0x262, | ||
530 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) | ||
531 | MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264, | ||
532 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) | ||
533 | |||
534 | /* MMC1 */ | ||
535 | MUX_CFG_34XX("N28_3430_MMC1_CLK", 0x144, | ||
536 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
537 | MUX_CFG_34XX("M27_3430_MMC1_CMD", 0x146, | ||
538 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
539 | MUX_CFG_34XX("N27_3430_MMC1_DAT0", 0x148, | ||
540 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
541 | MUX_CFG_34XX("N26_3430_MMC1_DAT1", 0x14a, | ||
542 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
543 | MUX_CFG_34XX("N25_3430_MMC1_DAT2", 0x14c, | ||
544 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
545 | MUX_CFG_34XX("P28_3430_MMC1_DAT3", 0x14e, | ||
546 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
547 | MUX_CFG_34XX("P27_3430_MMC1_DAT4", 0x150, | ||
548 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
549 | MUX_CFG_34XX("P26_3430_MMC1_DAT5", 0x152, | ||
550 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
551 | MUX_CFG_34XX("R27_3430_MMC1_DAT6", 0x154, | ||
552 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
553 | MUX_CFG_34XX("R25_3430_MMC1_DAT7", 0x156, | ||
554 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
555 | |||
556 | /* MMC2 */ | ||
557 | MUX_CFG_34XX("AE2_3430_MMC2_CLK", 0x158, | ||
558 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
559 | MUX_CFG_34XX("AG5_3430_MMC2_CMD", 0x15A, | ||
560 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
561 | MUX_CFG_34XX("AH5_3430_MMC2_DAT0", 0x15c, | ||
562 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
563 | MUX_CFG_34XX("AH4_3430_MMC2_DAT1", 0x15e, | ||
564 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
565 | MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160, | ||
566 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
567 | MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162, | ||
568 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
569 | MUX_CFG_34XX("AE4_3430_MMC2_DAT4", 0x164, | ||
570 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
571 | MUX_CFG_34XX("AH3_3430_MMC2_DAT5", 0x166, | ||
572 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
573 | MUX_CFG_34XX("AF3_3430_MMC2_DAT6", 0x168, | ||
574 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
575 | MUX_CFG_34XX("AE3_3430_MMC2_DAT7", 0x16A, | ||
576 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
577 | |||
578 | /* MMC3 */ | ||
579 | MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8, | ||
580 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
581 | MUX_CFG_34XX("AC3_3430_MMC3_CMD", 0x1d0, | ||
582 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLUP) | ||
583 | MUX_CFG_34XX("AE11_3430_MMC3_DAT0", 0x5e4, | ||
584 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
585 | MUX_CFG_34XX("AH9_3430_MMC3_DAT1", 0x5e6, | ||
586 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
587 | MUX_CFG_34XX("AF13_3430_MMC3_DAT2", 0x5e8, | ||
588 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
589 | MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2, | ||
590 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
591 | |||
592 | /* SYS_NIRQ T2 INT1 */ | ||
593 | MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0, | ||
594 | OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP | | ||
595 | OMAP34XX_MUX_MODE0) | ||
596 | /* EHCI GPIO's on OMAP3EVM (Rev >= E) */ | ||
597 | MUX_CFG_34XX("AH14_34XX_GPIO21", 0x5ea, | ||
598 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP) | ||
599 | MUX_CFG_34XX("AF9_34XX_GPIO22", 0x5ec, | ||
600 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP) | ||
601 | MUX_CFG_34XX("U3_34XX_GPIO61", 0x0c8, | ||
602 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP) | ||
603 | }; | ||
604 | |||
605 | #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) | ||
606 | |||
607 | #else | ||
608 | #define omap34xx_pins NULL | ||
609 | #define OMAP34XX_PINS_SZ 0 | ||
610 | #endif /* CONFIG_ARCH_OMAP34XX */ | ||
611 | |||
612 | #if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS) | 285 | #if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS) |
286 | |||
613 | static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg) | 287 | static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg) |
614 | { | 288 | { |
615 | u16 orig; | 289 | u16 orig; |
@@ -631,7 +305,6 @@ static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 r | |||
631 | #define omap2_cfg_debug(x, y) do {} while (0) | 305 | #define omap2_cfg_debug(x, y) do {} while (0) |
632 | #endif | 306 | #endif |
633 | 307 | ||
634 | #ifdef CONFIG_ARCH_OMAP24XX | ||
635 | static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) | 308 | static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) |
636 | { | 309 | { |
637 | static DEFINE_SPINLOCK(mux_spin_lock); | 310 | static DEFINE_SPINLOCK(mux_spin_lock); |
@@ -650,28 +323,6 @@ static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) | |||
650 | 323 | ||
651 | return 0; | 324 | return 0; |
652 | } | 325 | } |
653 | #else | ||
654 | #define omap24xx_cfg_reg NULL | ||
655 | #endif | ||
656 | |||
657 | #ifdef CONFIG_ARCH_OMAP34XX | ||
658 | static int __init_or_module omap34xx_cfg_reg(const struct pin_config *cfg) | ||
659 | { | ||
660 | static DEFINE_SPINLOCK(mux_spin_lock); | ||
661 | unsigned long flags; | ||
662 | u16 reg = 0; | ||
663 | |||
664 | spin_lock_irqsave(&mux_spin_lock, flags); | ||
665 | reg |= cfg->mux_val; | ||
666 | omap2_cfg_debug(cfg, reg); | ||
667 | omap_mux_write(reg, cfg->mux_reg - OMAP_MUX_BASE_OFFSET); | ||
668 | spin_unlock_irqrestore(&mux_spin_lock, flags); | ||
669 | |||
670 | return 0; | ||
671 | } | ||
672 | #else | ||
673 | #define omap34xx_cfg_reg NULL | ||
674 | #endif | ||
675 | 326 | ||
676 | int __init omap2_mux_init(void) | 327 | int __init omap2_mux_init(void) |
677 | { | 328 | { |
@@ -694,21 +345,23 @@ int __init omap2_mux_init(void) | |||
694 | arch_mux_cfg.pins = omap24xx_pins; | 345 | arch_mux_cfg.pins = omap24xx_pins; |
695 | arch_mux_cfg.size = OMAP24XX_PINS_SZ; | 346 | arch_mux_cfg.size = OMAP24XX_PINS_SZ; |
696 | arch_mux_cfg.cfg_reg = omap24xx_cfg_reg; | 347 | arch_mux_cfg.cfg_reg = omap24xx_cfg_reg; |
697 | } else if (cpu_is_omap34xx()) { | 348 | |
698 | arch_mux_cfg.pins = omap34xx_pins; | 349 | return omap_mux_register(&arch_mux_cfg); |
699 | arch_mux_cfg.size = OMAP34XX_PINS_SZ; | ||
700 | arch_mux_cfg.cfg_reg = omap34xx_cfg_reg; | ||
701 | } | 350 | } |
702 | 351 | ||
703 | return omap_mux_register(&arch_mux_cfg); | 352 | return 0; |
704 | } | 353 | } |
705 | 354 | ||
355 | #else | ||
356 | int __init omap2_mux_init(void) | ||
357 | { | ||
358 | return 0; | ||
359 | } | ||
706 | #endif /* CONFIG_OMAP_MUX */ | 360 | #endif /* CONFIG_OMAP_MUX */ |
707 | 361 | ||
708 | /*----------------------------------------------------------------------------*/ | 362 | /*----------------------------------------------------------------------------*/ |
709 | 363 | ||
710 | #ifdef CONFIG_ARCH_OMAP34XX | 364 | #ifdef CONFIG_ARCH_OMAP34XX |
711 | |||
712 | static LIST_HEAD(muxmodes); | 365 | static LIST_HEAD(muxmodes); |
713 | static DEFINE_MUTEX(muxmode_mutex); | 366 | static DEFINE_MUTEX(muxmode_mutex); |
714 | 367 | ||
@@ -1353,3 +1006,4 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size, | |||
1353 | } | 1006 | } |
1354 | 1007 | ||
1355 | #endif /* CONFIG_ARCH_OMAP34XX */ | 1008 | #endif /* CONFIG_ARCH_OMAP34XX */ |
1009 | |||
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h index ba77de601501..6067cf79f088 100644 --- a/arch/arm/plat-omap/include/plat/mux.h +++ b/arch/arm/plat-omap/include/plat/mux.h | |||
@@ -130,58 +130,11 @@ | |||
130 | #define OMAP2_PULL_UP (1 << 4) | 130 | #define OMAP2_PULL_UP (1 << 4) |
131 | #define OMAP2_ALTELECTRICALSEL (1 << 5) | 131 | #define OMAP2_ALTELECTRICALSEL (1 << 5) |
132 | 132 | ||
133 | /* 34xx specific mux bit defines */ | ||
134 | #define OMAP3_INPUT_EN (1 << 8) | ||
135 | #define OMAP3_OFF_EN (1 << 9) | ||
136 | #define OMAP3_OFFOUT_EN (1 << 10) | ||
137 | #define OMAP3_OFFOUT_VAL (1 << 11) | ||
138 | #define OMAP3_OFF_PULL_EN (1 << 12) | ||
139 | #define OMAP3_OFF_PULL_UP (1 << 13) | ||
140 | #define OMAP3_WAKEUP_EN (1 << 14) | ||
141 | |||
142 | /* 34xx mux mode options for each pin. See TRM for options */ | ||
143 | #define OMAP34XX_MUX_MODE0 0 | ||
144 | #define OMAP34XX_MUX_MODE1 1 | ||
145 | #define OMAP34XX_MUX_MODE2 2 | ||
146 | #define OMAP34XX_MUX_MODE3 3 | ||
147 | #define OMAP34XX_MUX_MODE4 4 | ||
148 | #define OMAP34XX_MUX_MODE5 5 | ||
149 | #define OMAP34XX_MUX_MODE6 6 | ||
150 | #define OMAP34XX_MUX_MODE7 7 | ||
151 | |||
152 | /* 34xx active pin states */ | ||
153 | #define OMAP34XX_PIN_OUTPUT 0 | ||
154 | #define OMAP34XX_PIN_INPUT OMAP3_INPUT_EN | ||
155 | #define OMAP34XX_PIN_INPUT_PULLUP (OMAP2_PULL_ENA | OMAP3_INPUT_EN \ | ||
156 | | OMAP2_PULL_UP) | ||
157 | #define OMAP34XX_PIN_INPUT_PULLDOWN (OMAP2_PULL_ENA | OMAP3_INPUT_EN) | ||
158 | |||
159 | /* 34xx off mode states */ | ||
160 | #define OMAP34XX_PIN_OFF_NONE 0 | ||
161 | #define OMAP34XX_PIN_OFF_OUTPUT_HIGH (OMAP3_OFF_EN | OMAP3_OFFOUT_EN \ | ||
162 | | OMAP3_OFFOUT_VAL) | ||
163 | #define OMAP34XX_PIN_OFF_OUTPUT_LOW (OMAP3_OFF_EN | OMAP3_OFFOUT_EN) | ||
164 | #define OMAP34XX_PIN_OFF_INPUT_PULLUP (OMAP3_OFF_EN | OMAP3_OFF_PULL_EN \ | ||
165 | | OMAP3_OFF_PULL_UP) | ||
166 | #define OMAP34XX_PIN_OFF_INPUT_PULLDOWN (OMAP3_OFF_EN | OMAP3_OFF_PULL_EN) | ||
167 | #define OMAP34XX_PIN_OFF_WAKEUPENABLE OMAP3_WAKEUP_EN | ||
168 | |||
169 | #define MUX_CFG_34XX(desc, reg_offset, mux_value) { \ | ||
170 | .name = desc, \ | ||
171 | .debug = 0, \ | ||
172 | .mux_reg = reg_offset, \ | ||
173 | .mux_val = mux_value \ | ||
174 | }, | ||
175 | |||
176 | struct pin_config { | 133 | struct pin_config { |
177 | char *name; | 134 | char *name; |
178 | const unsigned int mux_reg; | 135 | const unsigned int mux_reg; |
179 | unsigned char debug; | 136 | unsigned char debug; |
180 | 137 | ||
181 | #if defined(CONFIG_ARCH_OMAP34XX) | ||
182 | u16 mux_val; /* Wake-up, off mode, pull, mux mode */ | ||
183 | #endif | ||
184 | |||
185 | #if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP24XX) | 138 | #if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP24XX) |
186 | const unsigned char mask_offset; | 139 | const unsigned char mask_offset; |
187 | const unsigned char mask; | 140 | const unsigned char mask; |
@@ -681,181 +634,6 @@ enum omap24xx_index { | |||
681 | 634 | ||
682 | }; | 635 | }; |
683 | 636 | ||
684 | enum omap34xx_index { | ||
685 | /* 34xx I2C */ | ||
686 | K21_34XX_I2C1_SCL, | ||
687 | J21_34XX_I2C1_SDA, | ||
688 | AF15_34XX_I2C2_SCL, | ||
689 | AE15_34XX_I2C2_SDA, | ||
690 | AF14_34XX_I2C3_SCL, | ||
691 | AG14_34XX_I2C3_SDA, | ||
692 | AD26_34XX_I2C4_SCL, | ||
693 | AE26_34XX_I2C4_SDA, | ||
694 | |||
695 | /* PHY - HSUSB: 12-pin ULPI PHY: Port 1*/ | ||
696 | Y8_3430_USB1HS_PHY_CLK, | ||
697 | Y9_3430_USB1HS_PHY_STP, | ||
698 | AA14_3430_USB1HS_PHY_DIR, | ||
699 | AA11_3430_USB1HS_PHY_NXT, | ||
700 | W13_3430_USB1HS_PHY_DATA0, | ||
701 | W12_3430_USB1HS_PHY_DATA1, | ||
702 | W11_3430_USB1HS_PHY_DATA2, | ||
703 | Y11_3430_USB1HS_PHY_DATA3, | ||
704 | W9_3430_USB1HS_PHY_DATA4, | ||
705 | Y12_3430_USB1HS_PHY_DATA5, | ||
706 | W8_3430_USB1HS_PHY_DATA6, | ||
707 | Y13_3430_USB1HS_PHY_DATA7, | ||
708 | |||
709 | /* PHY - HSUSB: 12-pin ULPI PHY: Port 2*/ | ||
710 | AA8_3430_USB2HS_PHY_CLK, | ||
711 | AA10_3430_USB2HS_PHY_STP, | ||
712 | AA9_3430_USB2HS_PHY_DIR, | ||
713 | AB11_3430_USB2HS_PHY_NXT, | ||
714 | AB10_3430_USB2HS_PHY_DATA0, | ||
715 | AB9_3430_USB2HS_PHY_DATA1, | ||
716 | W3_3430_USB2HS_PHY_DATA2, | ||
717 | T4_3430_USB2HS_PHY_DATA3, | ||
718 | T3_3430_USB2HS_PHY_DATA4, | ||
719 | R3_3430_USB2HS_PHY_DATA5, | ||
720 | R4_3430_USB2HS_PHY_DATA6, | ||
721 | T2_3430_USB2HS_PHY_DATA7, | ||
722 | |||
723 | |||
724 | /* TLL - HSUSB: 12-pin TLL Port 1*/ | ||
725 | Y8_3430_USB1HS_TLL_CLK, | ||
726 | Y9_3430_USB1HS_TLL_STP, | ||
727 | AA14_3430_USB1HS_TLL_DIR, | ||
728 | AA11_3430_USB1HS_TLL_NXT, | ||
729 | W13_3430_USB1HS_TLL_DATA0, | ||
730 | W12_3430_USB1HS_TLL_DATA1, | ||
731 | W11_3430_USB1HS_TLL_DATA2, | ||
732 | Y11_3430_USB1HS_TLL_DATA3, | ||
733 | W9_3430_USB1HS_TLL_DATA4, | ||
734 | Y12_3430_USB1HS_TLL_DATA5, | ||
735 | W8_3430_USB1HS_TLL_DATA6, | ||
736 | Y13_3430_USB1HS_TLL_DATA7, | ||
737 | |||
738 | /* TLL - HSUSB: 12-pin TLL Port 2*/ | ||
739 | AA8_3430_USB2HS_TLL_CLK, | ||
740 | AA10_3430_USB2HS_TLL_STP, | ||
741 | AA9_3430_USB2HS_TLL_DIR, | ||
742 | AB11_3430_USB2HS_TLL_NXT, | ||
743 | AB10_3430_USB2HS_TLL_DATA0, | ||
744 | AB9_3430_USB2HS_TLL_DATA1, | ||
745 | W3_3430_USB2HS_TLL_DATA2, | ||
746 | T4_3430_USB2HS_TLL_DATA3, | ||
747 | T3_3430_USB2HS_TLL_DATA4, | ||
748 | R3_3430_USB2HS_TLL_DATA5, | ||
749 | R4_3430_USB2HS_TLL_DATA6, | ||
750 | T2_3430_USB2HS_TLL_DATA7, | ||
751 | |||
752 | /* TLL - HSUSB: 12-pin TLL Port 3*/ | ||
753 | AA6_3430_USB3HS_TLL_CLK, | ||
754 | AB3_3430_USB3HS_TLL_STP, | ||
755 | AA3_3430_USB3HS_TLL_DIR, | ||
756 | Y3_3430_USB3HS_TLL_NXT, | ||
757 | AA5_3430_USB3HS_TLL_DATA0, | ||
758 | Y4_3430_USB3HS_TLL_DATA1, | ||
759 | Y5_3430_USB3HS_TLL_DATA2, | ||
760 | W5_3430_USB3HS_TLL_DATA3, | ||
761 | AB12_3430_USB3HS_TLL_DATA4, | ||
762 | AB13_3430_USB3HS_TLL_DATA5, | ||
763 | AA13_3430_USB3HS_TLL_DATA6, | ||
764 | AA12_3430_USB3HS_TLL_DATA7, | ||
765 | |||
766 | /* PHY FSUSB: FS Serial for Port 1 (multiple PHY modes supported) */ | ||
767 | AF10_3430_USB1FS_PHY_MM1_RXDP, | ||
768 | AG9_3430_USB1FS_PHY_MM1_RXDM, | ||
769 | W13_3430_USB1FS_PHY_MM1_RXRCV, | ||
770 | W12_3430_USB1FS_PHY_MM1_TXSE0, | ||
771 | W11_3430_USB1FS_PHY_MM1_TXDAT, | ||
772 | Y11_3430_USB1FS_PHY_MM1_TXEN_N, | ||
773 | |||
774 | /* PHY FSUSB: FS Serial for Port 2 (multiple PHY modes supported) */ | ||
775 | AF7_3430_USB2FS_PHY_MM2_RXDP, | ||
776 | AH7_3430_USB2FS_PHY_MM2_RXDM, | ||
777 | AB10_3430_USB2FS_PHY_MM2_RXRCV, | ||
778 | AB9_3430_USB2FS_PHY_MM2_TXSE0, | ||
779 | W3_3430_USB2FS_PHY_MM2_TXDAT, | ||
780 | T4_3430_USB2FS_PHY_MM2_TXEN_N, | ||
781 | |||
782 | /* PHY FSUSB: FS Serial for Port 3 (multiple PHY modes supported) */ | ||
783 | AH3_3430_USB3FS_PHY_MM3_RXDP, | ||
784 | AE3_3430_USB3FS_PHY_MM3_RXDM, | ||
785 | AD1_3430_USB3FS_PHY_MM3_RXRCV, | ||
786 | AE1_3430_USB3FS_PHY_MM3_TXSE0, | ||
787 | AD2_3430_USB3FS_PHY_MM3_TXDAT, | ||
788 | AC1_3430_USB3FS_PHY_MM3_TXEN_N, | ||
789 | |||
790 | /* 34xx GPIO | ||
791 | * - normally these are bidirectional, no internal pullup/pulldown | ||
792 | * - "_UP" suffix (GPIO3_UP) if internal pullup is configured | ||
793 | * - "_DOWN" suffix (GPIO3_DOWN) with internal pulldown | ||
794 | * - "_OUT" suffix (GPIO3_OUT) for output-only pins (unlike 24xx) | ||
795 | */ | ||
796 | AF26_34XX_GPIO0, | ||
797 | AF22_34XX_GPIO9, | ||
798 | AG9_34XX_GPIO23, | ||
799 | AH8_34XX_GPIO29, | ||
800 | U8_34XX_GPIO54_OUT, | ||
801 | U8_34XX_GPIO54_DOWN, | ||
802 | L8_34XX_GPIO63, | ||
803 | G25_34XX_GPIO86_OUT, | ||
804 | AG4_34XX_GPIO134_OUT, | ||
805 | AF4_34XX_GPIO135_OUT, | ||
806 | AE4_34XX_GPIO136_OUT, | ||
807 | AF6_34XX_GPIO140_UP, | ||
808 | AE6_34XX_GPIO141, | ||
809 | AF5_34XX_GPIO142, | ||
810 | AE5_34XX_GPIO143, | ||
811 | H19_34XX_GPIO164_OUT, | ||
812 | J25_34XX_GPIO170, | ||
813 | |||
814 | /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */ | ||
815 | H16_34XX_SDRC_CKE0, | ||
816 | H17_34XX_SDRC_CKE1, | ||
817 | |||
818 | /* MMC1 */ | ||
819 | N28_3430_MMC1_CLK, | ||
820 | M27_3430_MMC1_CMD, | ||
821 | N27_3430_MMC1_DAT0, | ||
822 | N26_3430_MMC1_DAT1, | ||
823 | N25_3430_MMC1_DAT2, | ||
824 | P28_3430_MMC1_DAT3, | ||
825 | P27_3430_MMC1_DAT4, | ||
826 | P26_3430_MMC1_DAT5, | ||
827 | R27_3430_MMC1_DAT6, | ||
828 | R25_3430_MMC1_DAT7, | ||
829 | |||
830 | /* MMC2 */ | ||
831 | AE2_3430_MMC2_CLK, | ||
832 | AG5_3430_MMC2_CMD, | ||
833 | AH5_3430_MMC2_DAT0, | ||
834 | AH4_3430_MMC2_DAT1, | ||
835 | AG4_3430_MMC2_DAT2, | ||
836 | AF4_3430_MMC2_DAT3, | ||
837 | AE4_3430_MMC2_DAT4, | ||
838 | AH3_3430_MMC2_DAT5, | ||
839 | AF3_3430_MMC2_DAT6, | ||
840 | AE3_3430_MMC2_DAT7, | ||
841 | |||
842 | /* MMC3 */ | ||
843 | AF10_3430_MMC3_CLK, | ||
844 | AC3_3430_MMC3_CMD, | ||
845 | AE11_3430_MMC3_DAT0, | ||
846 | AH9_3430_MMC3_DAT1, | ||
847 | AF13_3430_MMC3_DAT2, | ||
848 | AF13_3430_MMC3_DAT3, | ||
849 | |||
850 | /* SYS_NIRQ T2 INT1 */ | ||
851 | AF26_34XX_SYS_NIRQ, | ||
852 | |||
853 | /* EHCI GPIO's for OMAP3EVM (Rev >= E) */ | ||
854 | AH14_34XX_GPIO21, | ||
855 | AF9_34XX_GPIO22, | ||
856 | U3_34XX_GPIO61, | ||
857 | }; | ||
858 | |||
859 | struct omap_mux_cfg { | 637 | struct omap_mux_cfg { |
860 | struct pin_config *pins; | 638 | struct pin_config *pins; |
861 | unsigned long size; | 639 | unsigned long size; |
@@ -865,14 +643,14 @@ struct omap_mux_cfg { | |||
865 | #ifdef CONFIG_OMAP_MUX | 643 | #ifdef CONFIG_OMAP_MUX |
866 | /* setup pin muxing in Linux */ | 644 | /* setup pin muxing in Linux */ |
867 | extern int omap1_mux_init(void); | 645 | extern int omap1_mux_init(void); |
868 | extern int omap2_mux_init(void); | ||
869 | extern int omap_mux_register(struct omap_mux_cfg *); | 646 | extern int omap_mux_register(struct omap_mux_cfg *); |
870 | extern int omap_cfg_reg(unsigned long reg_cfg); | 647 | extern int omap_cfg_reg(unsigned long reg_cfg); |
871 | #else | 648 | #else |
872 | /* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ | 649 | /* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ |
873 | static inline int omap1_mux_init(void) { return 0; } | 650 | static inline int omap1_mux_init(void) { return 0; } |
874 | static inline int omap2_mux_init(void) { return 0; } | ||
875 | static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } | 651 | static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } |
876 | #endif | 652 | #endif |
877 | 653 | ||
654 | extern int omap2_mux_init(void); | ||
655 | |||
878 | #endif | 656 | #endif |