aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2006-12-06 20:13:54 -0500
committerTony Lindgren <tony@atomide.com>2007-05-10 18:51:09 -0400
commit7bbb3cc5c816fc167601ce9519adae5eced3ea6d (patch)
tree46230dd86d69905a2acbf76769036c9736156ae1 /arch
parentd30c7369666ff1687f668ea5a65b99d1f7e06144 (diff)
ARM: OMAP: 24xx pinmux updates
Add some OMAP 24xx pin mux declarations to support: - TUSB 6010 EVM (on H4) - All three full speed USB ports - GPIOs used with USB0 on Apollon and H4 For OMAP2, issue MUX_WARNINGS and debug messages correctly; and make the message look more like the OMAP1 message. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/mux.c33
-rw-r--r--arch/arm/plat-omap/mux.c19
2 files changed, 46 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index f538d0fdb13c..0439906d5da7 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -43,7 +43,7 @@ struct pin_config __initdata_or_module omap24xx_pins[] = {
43/* 24xx I2C */ 43/* 24xx I2C */
44MUX_CFG_24XX("M19_24XX_I2C1_SCL", 0x111, 0, 0, 0, 1) 44MUX_CFG_24XX("M19_24XX_I2C1_SCL", 0x111, 0, 0, 0, 1)
45MUX_CFG_24XX("L15_24XX_I2C1_SDA", 0x112, 0, 0, 0, 1) 45MUX_CFG_24XX("L15_24XX_I2C1_SDA", 0x112, 0, 0, 0, 1)
46MUX_CFG_24XX("J15_24XX_I2C2_SCL", 0x113, 0, 0, 0, 1) 46MUX_CFG_24XX("J15_24XX_I2C2_SCL", 0x113, 0, 0, 1, 1)
47MUX_CFG_24XX("H19_24XX_I2C2_SDA", 0x114, 0, 0, 0, 1) 47MUX_CFG_24XX("H19_24XX_I2C2_SDA", 0x114, 0, 0, 0, 1)
48 48
49/* Menelaus interrupt */ 49/* Menelaus interrupt */
@@ -52,7 +52,9 @@ MUX_CFG_24XX("W19_24XX_SYS_NIRQ", 0x12c, 0, 1, 1, 1)
52/* 24xx clocks */ 52/* 24xx clocks */
53MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1) 53MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1)
54 54
55/* 24xx GPMC wait pin monitoring */ 55/* 24xx GPMC chipselects, wait pin monitoring */
56MUX_CFG_24XX("E2_GPMC_NCS2", 0x08e, 0, 1, 1, 1)
57MUX_CFG_24XX("L2_GPMC_NCS7", 0x093, 0, 1, 1, 1)
56MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1) 58MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1)
57MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1) 59MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1)
58MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1) 60MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1)
@@ -66,6 +68,7 @@ MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1)
66 68
67/* 24xx GPIO */ 69/* 24xx GPIO */
68MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1) 70MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1)
71MUX_CFG_24XX("P21_242X_GPIO12", 0x0ca, 3, 0, 0, 1)
69MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1) 72MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1)
70MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1) 73MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1)
71MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1) 74MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1)
@@ -75,7 +78,9 @@ MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1)
75MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1) 78MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1)
76MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1) 79MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1)
77MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1) 80MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1)
81MUX_CFG_24XX("J15_24XX_GPIO99", 0x113, 3, 1, 1, 1)
78MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1) 82MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1)
83MUX_CFG_24XX("P14_24XX_GPIO125", 0x140, 3, 1, 1, 1)
79 84
80/* 242x DBG GPIO */ 85/* 242x DBG GPIO */
81MUX_CFG_24XX("V4_242X_GPIO49", 0xd3, 3, 0, 0, 1) 86MUX_CFG_24XX("V4_242X_GPIO49", 0xd3, 3, 0, 0, 1)
@@ -118,6 +123,30 @@ MUX_CFG_24XX("E18_24XX_MMC_DAT_DIR3", 0x0fc, 0, 0, 0, 1)
118MUX_CFG_24XX("G18_24XX_MMC_CMD_DIR", 0x0fd, 0, 0, 0, 1) 123MUX_CFG_24XX("G18_24XX_MMC_CMD_DIR", 0x0fd, 0, 0, 0, 1)
119MUX_CFG_24XX("H15_24XX_MMC_CLKI", 0x0fe, 0, 0, 0, 1) 124MUX_CFG_24XX("H15_24XX_MMC_CLKI", 0x0fe, 0, 0, 0, 1)
120 125
126/* Full speed USB */
127MUX_CFG_24XX("J20_24XX_USB0_PUEN", 0x11d, 0, 0, 0, 1)
128MUX_CFG_24XX("J19_24XX_USB0_VP", 0x11e, 0, 0, 0, 1)
129MUX_CFG_24XX("K20_24XX_USB0_VM", 0x11f, 0, 0, 0, 1)
130MUX_CFG_24XX("J18_24XX_USB0_RCV", 0x120, 0, 0, 0, 1)
131MUX_CFG_24XX("K19_24XX_USB0_TXEN", 0x121, 0, 0, 0, 1)
132MUX_CFG_24XX("J14_24XX_USB0_SE0", 0x122, 0, 0, 0, 1)
133MUX_CFG_24XX("K18_24XX_USB0_DAT", 0x123, 0, 0, 0, 1)
134
135MUX_CFG_24XX("N14_24XX_USB1_SE0", 0x0ed, 2, 0, 0, 1)
136MUX_CFG_24XX("W12_24XX_USB1_SE0", 0x0dd, 3, 0, 0, 1)
137MUX_CFG_24XX("P15_24XX_USB1_DAT", 0x0ee, 2, 0, 0, 1)
138MUX_CFG_24XX("R13_24XX_USB1_DAT", 0x0e0, 3, 0, 0, 1)
139MUX_CFG_24XX("W20_24XX_USB1_TXEN", 0x0ec, 2, 0, 0, 1)
140MUX_CFG_24XX("P13_24XX_USB1_TXEN", 0x0df, 3, 0, 0, 1)
141MUX_CFG_24XX("V19_24XX_USB1_RCV", 0x0eb, 2, 0, 0, 1)
142MUX_CFG_24XX("V12_24XX_USB1_RCV", 0x0de, 3, 0, 0, 1)
143
144MUX_CFG_24XX("AA10_24XX_USB2_SE0", 0x0e5, 2, 0, 0, 1)
145MUX_CFG_24XX("Y11_24XX_USB2_DAT", 0x0e8, 2, 0, 0, 1)
146MUX_CFG_24XX("AA12_24XX_USB2_TXEN", 0x0e9, 2, 0, 0, 1)
147MUX_CFG_24XX("AA6_24XX_USB2_RCV", 0x0e6, 2, 0, 0, 1)
148MUX_CFG_24XX("AA4_24XX_USB2_TLLSE0", 0x0e7, 2, 0, 0, 1)
149
121/* Keypad GPIO*/ 150/* Keypad GPIO*/
122MUX_CFG_24XX("T19_24XX_KBR0", 0x106, 3, 1, 1, 1) 151MUX_CFG_24XX("T19_24XX_KBR0", 0x106, 3, 1, 1, 1)
123MUX_CFG_24XX("R19_24XX_KBR1", 0x107, 3, 1, 1, 1) 152MUX_CFG_24XX("R19_24XX_KBR1", 0x107, 3, 1, 1, 1)
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c
index 6c798d288688..75211f20ccb3 100644
--- a/arch/arm/plat-omap/mux.c
+++ b/arch/arm/plat-omap/mux.c
@@ -83,10 +83,21 @@ int __init_or_module omap_cfg_reg(const unsigned long index)
83 reg |= OMAP24XX_PULL_ENA; 83 reg |= OMAP24XX_PULL_ENA;
84 if(cfg->pu_pd_val) 84 if(cfg->pu_pd_val)
85 reg |= OMAP24XX_PULL_UP; 85 reg |= OMAP24XX_PULL_UP;
86#ifdef CONFIG_OMAP_MUX_DEBUG 86#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
87 printk("Muxing %s (0x%08x): 0x%02x -> 0x%02x\n", 87 {
88 cfg->name, OMAP24XX_L4_BASE + cfg->mux_reg, 88 u8 orig = omap_readb(OMAP24XX_L4_BASE + cfg->mux_reg);
89 omap_readb(OMAP24XX_L4_BASE + cfg->mux_reg), reg); 89 u8 debug = 0;
90
91#ifdef CONFIG_OMAP_MUX_DEBUG
92 debug = cfg->debug;
93#endif
94 warn = (orig != reg);
95 if (debug || warn)
96 printk("MUX: setup %s (0x%08x): 0x%02x -> 0x%02x\n",
97 cfg->name,
98 OMAP24XX_L4_BASE + cfg->mux_reg,
99 orig, reg);
100 }
90#endif 101#endif
91 omap_writeb(reg, OMAP24XX_L4_BASE + cfg->mux_reg); 102 omap_writeb(reg, OMAP24XX_L4_BASE + cfg->mux_reg);
92 103