diff options
author | Arun KS <arunks@mistralsolutions.com> | 2008-12-10 20:36:54 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-12-10 20:36:54 -0500 |
commit | 2619bc327417f549f1c89d5ef9b4a4aa768f41a2 (patch) | |
tree | 6fa574a87a4c4178b3e493c95483ef5c71b08b8a | |
parent | da177247e89c672fc910cbbc4e24d7d578e2e0b2 (diff) |
ARM: OMAP3: Pin multiplexing updates for 24xx and 34xx
This patch adds some new pin multiplexing options
for McBSP and McSPI from Arun KS. Also add two more
GPIOs from David Brownell.
Also mark omap24xx_cfg_reg() static.
Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 44 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/mux.h | 41 |
2 files changed, 84 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index b1393673d95d..dacb41f130c0 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -203,6 +203,15 @@ MUX_CFG_24XX("AE9_2430_USB0HS_NXT", 0x13D, 0, 0, 0, 1) | |||
203 | MUX_CFG_24XX("AC7_2430_USB0HS_DATA7", 0x13E, 0, 0, 0, 1) | 203 | MUX_CFG_24XX("AC7_2430_USB0HS_DATA7", 0x13E, 0, 0, 0, 1) |
204 | 204 | ||
205 | /* 2430 McBSP */ | 205 | /* 2430 McBSP */ |
206 | MUX_CFG_24XX("AD6_2430_MCBSP_CLKS", 0x011E, 0, 0, 0, 1) | ||
207 | |||
208 | MUX_CFG_24XX("AB2_2430_MCBSP1_CLKR", 0x011A, 0, 0, 0, 1) | ||
209 | MUX_CFG_24XX("AD5_2430_MCBSP1_FSR", 0x011B, 0, 0, 0, 1) | ||
210 | MUX_CFG_24XX("AA1_2430_MCBSP1_DX", 0x011C, 0, 0, 0, 1) | ||
211 | MUX_CFG_24XX("AF3_2430_MCBSP1_DR", 0x011D, 0, 0, 0, 1) | ||
212 | MUX_CFG_24XX("AB3_2430_MCBSP1_FSX", 0x011F, 0, 0, 0, 1) | ||
213 | MUX_CFG_24XX("Y9_2430_MCBSP1_CLKX", 0x0120, 0, 0, 0, 1) | ||
214 | |||
206 | MUX_CFG_24XX("AC10_2430_MCBSP2_FSX", 0x012E, 1, 0, 0, 1) | 215 | MUX_CFG_24XX("AC10_2430_MCBSP2_FSX", 0x012E, 1, 0, 0, 1) |
207 | MUX_CFG_24XX("AD16_2430_MCBSP2_CLX", 0x012F, 1, 0, 0, 1) | 216 | MUX_CFG_24XX("AD16_2430_MCBSP2_CLX", 0x012F, 1, 0, 0, 1) |
208 | MUX_CFG_24XX("AE13_2430_MCBSP2_DX", 0x0130, 1, 0, 0, 1) | 217 | MUX_CFG_24XX("AE13_2430_MCBSP2_DX", 0x0130, 1, 0, 0, 1) |
@@ -211,6 +220,31 @@ MUX_CFG_24XX("AC10_2430_MCBSP2_FSX_OFF",0x012E, 0, 0, 0, 1) | |||
211 | MUX_CFG_24XX("AD16_2430_MCBSP2_CLX_OFF",0x012F, 0, 0, 0, 1) | 220 | MUX_CFG_24XX("AD16_2430_MCBSP2_CLX_OFF",0x012F, 0, 0, 0, 1) |
212 | MUX_CFG_24XX("AE13_2430_MCBSP2_DX_OFF", 0x0130, 0, 0, 0, 1) | 221 | MUX_CFG_24XX("AE13_2430_MCBSP2_DX_OFF", 0x0130, 0, 0, 0, 1) |
213 | MUX_CFG_24XX("AD13_2430_MCBSP2_DR_OFF", 0x0131, 0, 0, 0, 1) | 222 | MUX_CFG_24XX("AD13_2430_MCBSP2_DR_OFF", 0x0131, 0, 0, 0, 1) |
223 | |||
224 | MUX_CFG_24XX("AC9_2430_MCBSP3_CLKX", 0x0103, 0, 0, 0, 1) | ||
225 | MUX_CFG_24XX("AE4_2430_MCBSP3_FSX", 0x0104, 0, 0, 0, 1) | ||
226 | MUX_CFG_24XX("AE2_2430_MCBSP3_DR", 0x0105, 0, 0, 0, 1) | ||
227 | MUX_CFG_24XX("AF4_2430_MCBSP3_DX", 0x0106, 0, 0, 0, 1) | ||
228 | |||
229 | MUX_CFG_24XX("N3_2430_MCBSP4_CLKX", 0x010B, 1, 0, 0, 1) | ||
230 | MUX_CFG_24XX("AD23_2430_MCBSP4_DR", 0x010C, 1, 0, 0, 1) | ||
231 | MUX_CFG_24XX("AB25_2430_MCBSP4_DX", 0x010D, 1, 0, 0, 1) | ||
232 | MUX_CFG_24XX("AC25_2430_MCBSP4_FSX", 0x010E, 1, 0, 0, 1) | ||
233 | |||
234 | MUX_CFG_24XX("AE16_2430_MCBSP5_CLKX", 0x00ED, 1, 0, 0, 1) | ||
235 | MUX_CFG_24XX("AF12_2430_MCBSP5_FSX", 0x00ED, 1, 0, 0, 1) | ||
236 | MUX_CFG_24XX("K7_2430_MCBSP5_DX", 0x00EF, 1, 0, 0, 1) | ||
237 | MUX_CFG_24XX("M1_2430_MCBSP5_DR", 0x00F0, 1, 0, 0, 1) | ||
238 | |||
239 | /* 2430 MCSPI1 */ | ||
240 | MUX_CFG_24XX("Y18_2430_MCSPI1_CLK", 0x010F, 0, 0, 0, 1) | ||
241 | MUX_CFG_24XX("AD15_2430_MCSPI1_SIMO", 0x0110, 0, 0, 0, 1) | ||
242 | MUX_CFG_24XX("AE17_2430_MCSPI1_SOMI", 0x0111, 0, 0, 0, 1) | ||
243 | MUX_CFG_24XX("U1_2430_MCSPI1_CS0", 0x0112, 0, 0, 0, 1) | ||
244 | |||
245 | /* Touchscreen GPIO */ | ||
246 | MUX_CFG_24XX("AF19_2430_GPIO_85", 0x0113, 3, 0, 0, 1) | ||
247 | |||
214 | }; | 248 | }; |
215 | 249 | ||
216 | #define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) | 250 | #define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) |
@@ -417,6 +451,14 @@ MUX_CFG_34XX("AD2_3430_USB3FS_PHY_MM3_TXDAT", 0x188, | |||
417 | MUX_CFG_34XX("AC1_3430_USB3FS_PHY_MM3_TXEN_N", 0x18a, | 451 | MUX_CFG_34XX("AC1_3430_USB3FS_PHY_MM3_TXEN_N", 0x18a, |
418 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_OUTPUT) | 452 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_OUTPUT) |
419 | 453 | ||
454 | |||
455 | /* 34XX GPIO - bidirectional, unless the name has an "_OUT" suffix. | ||
456 | * No internal pullup/pulldown without "_UP" or "_DOWN" suffix. | ||
457 | */ | ||
458 | MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa, | ||
459 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
460 | MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6, | ||
461 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
420 | }; | 462 | }; |
421 | 463 | ||
422 | #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) | 464 | #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) |
@@ -452,7 +494,7 @@ static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 r | |||
452 | #endif | 494 | #endif |
453 | 495 | ||
454 | #ifdef CONFIG_ARCH_OMAP24XX | 496 | #ifdef CONFIG_ARCH_OMAP24XX |
455 | int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) | 497 | static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) |
456 | { | 498 | { |
457 | static DEFINE_SPINLOCK(mux_spin_lock); | 499 | static DEFINE_SPINLOCK(mux_spin_lock); |
458 | unsigned long flags; | 500 | unsigned long flags; |
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h index 6bbf1789bed5..f4362b8682c7 100644 --- a/arch/arm/plat-omap/include/mach/mux.h +++ b/arch/arm/plat-omap/include/mach/mux.h | |||
@@ -632,6 +632,15 @@ enum omap24xx_index { | |||
632 | AC7_2430_USB0HS_DATA7, | 632 | AC7_2430_USB0HS_DATA7, |
633 | 633 | ||
634 | /* 2430 McBSP */ | 634 | /* 2430 McBSP */ |
635 | AD6_2430_MCBSP_CLKS, | ||
636 | |||
637 | AB2_2430_MCBSP1_CLKR, | ||
638 | AD5_2430_MCBSP1_FSR, | ||
639 | AA1_2430_MCBSP1_DX, | ||
640 | AF3_2430_MCBSP1_DR, | ||
641 | AB3_2430_MCBSP1_FSX, | ||
642 | Y9_2430_MCBSP1_CLKX, | ||
643 | |||
635 | AC10_2430_MCBSP2_FSX, | 644 | AC10_2430_MCBSP2_FSX, |
636 | AD16_2430_MCBSP2_CLX, | 645 | AD16_2430_MCBSP2_CLX, |
637 | AE13_2430_MCBSP2_DX, | 646 | AE13_2430_MCBSP2_DX, |
@@ -641,6 +650,30 @@ enum omap24xx_index { | |||
641 | AE13_2430_MCBSP2_DX_OFF, | 650 | AE13_2430_MCBSP2_DX_OFF, |
642 | AD13_2430_MCBSP2_DR_OFF, | 651 | AD13_2430_MCBSP2_DR_OFF, |
643 | 652 | ||
653 | AC9_2430_MCBSP3_CLKX, | ||
654 | AE4_2430_MCBSP3_FSX, | ||
655 | AE2_2430_MCBSP3_DR, | ||
656 | AF4_2430_MCBSP3_DX, | ||
657 | |||
658 | N3_2430_MCBSP4_CLKX, | ||
659 | AD23_2430_MCBSP4_DR, | ||
660 | AB25_2430_MCBSP4_DX, | ||
661 | AC25_2430_MCBSP4_FSX, | ||
662 | |||
663 | AE16_2430_MCBSP5_CLKX, | ||
664 | AF12_2430_MCBSP5_FSX, | ||
665 | K7_2430_MCBSP5_DX, | ||
666 | M1_2430_MCBSP5_DR, | ||
667 | |||
668 | /* 2430 McSPI*/ | ||
669 | Y18_2430_MCSPI1_CLK, | ||
670 | AD15_2430_MCSPI1_SIMO, | ||
671 | AE17_2430_MCSPI1_SOMI, | ||
672 | U1_2430_MCSPI1_CS0, | ||
673 | |||
674 | /* Touchscreen GPIO */ | ||
675 | AF19_2430_GPIO_85, | ||
676 | |||
644 | }; | 677 | }; |
645 | 678 | ||
646 | enum omap34xx_index { | 679 | enum omap34xx_index { |
@@ -749,6 +782,14 @@ enum omap34xx_index { | |||
749 | AD2_3430_USB3FS_PHY_MM3_TXDAT, | 782 | AD2_3430_USB3FS_PHY_MM3_TXDAT, |
750 | AC1_3430_USB3FS_PHY_MM3_TXEN_N, | 783 | AC1_3430_USB3FS_PHY_MM3_TXEN_N, |
751 | 784 | ||
785 | /* 34xx GPIO | ||
786 | * - normally these are bidirectional, no internal pullup/pulldown | ||
787 | * - "_UP" suffix (GPIO3_UP) if internal pullup is configured | ||
788 | * - "_DOWN" suffix (GPIO3_DOWN) with internal pulldown | ||
789 | * - "_OUT" suffix (GPIO3_OUT) for output-only pins (unlike 24xx) | ||
790 | */ | ||
791 | AH8_34XX_GPIO29, | ||
792 | J25_34XX_GPIO170, | ||
752 | }; | 793 | }; |
753 | 794 | ||
754 | struct omap_mux_cfg { | 795 | struct omap_mux_cfg { |