blob: 8bcd7a3685d86063921826182cf1fdc12cc99057 [file] [log] [blame]
wdenk8ed96042005-01-09 23:16:25 +00001/*
2 * (C) Copyright 2004
3 * Texas Instruments, <www.ti.com>
4 * Richard Woodruff <r-woodruff2@ti.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (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,
19 * MA 02111-1307 USA
20 */
21#ifndef _OMAP2420_MUX_H_
22#define _OMAP2420_MUX_H_
23
24#ifndef __ASSEMBLY__
25typedef unsigned char uint8;
26typedef unsigned int uint32;
27
28void muxSetupSDRC(void);
29void muxSetupGPMC(void);
30void muxSetupUsb0(void);
Peter Pearse5ca98812007-11-09 15:24:26 +000031void muxSetupUsbHost(void);
wdenk8ed96042005-01-09 23:16:25 +000032void muxSetupUart3(void);
33void muxSetupI2C1(void);
34void muxSetupUART1(void);
35void muxSetupLCD(void);
36void muxSetupCamera(void);
37void muxSetupMMCSD(void) ;
38void muxSetupTouchScreen(void) ;
39void muxSetupHDQ(void);
40#endif
41
42#define USB_OTG_CTRL ((volatile uint32 *)0x4805E30C)
43
44/* Pin Muxing registers used for HDQ (Smart battery) */
45#define CONTROL_PADCONF_HDQ_SIO ((volatile unsigned char *)0x48000115)
46
47/* Pin Muxing registers used for GPMC */
48#define CONTROL_PADCONF_GPMC_D2_BYTE0 ((volatile unsigned char *)0x48000088)
49#define CONTROL_PADCONF_GPMC_D2_BYTE1 ((volatile unsigned char *)0x48000089)
50#define CONTROL_PADCONF_GPMC_D2_BYTE2 ((volatile unsigned char *)0x4800008A)
51#define CONTROL_PADCONF_GPMC_D2_BYTE3 ((volatile unsigned char *)0x4800008B)
52
53#define CONTROL_PADCONF_GPMC_NCS0_BYTE0 ((volatile unsigned char *)0x4800008C)
54#define CONTROL_PADCONF_GPMC_NCS0_BYTE1 ((volatile unsigned char *)0x4800008D)
55#define CONTROL_PADCONF_GPMC_NCS0_BYTE2 ((volatile unsigned char *)0x4800008E)
56#define CONTROL_PADCONF_GPMC_NCS0_BYTE3 ((volatile unsigned char *)0x4800008F)
57
58/* Pin Muxing registers used for SDRC */
59#define CONTROL_PADCONF_SDRC_NCS0_BYTE0 ((volatile unsigned char *)0x480000A0)
60#define CONTROL_PADCONF_SDRC_NCS0_BYTE1 ((volatile unsigned char *)0x480000A1)
61#define CONTROL_PADCONF_SDRC_NCS0_BYTE2 ((volatile unsigned char *)0x480000A2)
62#define CONTROL_PADCONF_SDRC_NCS0_BYTE3 ((volatile unsigned char *)0x480000A3)
63
64#define CONTROL_PADCONF_SDRC_A14_BYTE0 ((volatile unsigned char *)0x48000030)
65#define CONTROL_PADCONF_SDRC_A14_BYTE1 ((volatile unsigned char *)0x48000031)
66#define CONTROL_PADCONF_SDRC_A14_BYTE2 ((volatile unsigned char *)0x48000032)
67#define CONTROL_PADCONF_SDRC_A14_BYTE3 ((volatile unsigned char *)0x48000033)
68
69/* Pin Muxing registers used for Touch Screen (SPI) */
70#define CONTROL_PADCONF_SPI1_CLK ((volatile unsigned char *)0x480000FF)
71#define CONTROL_PADCONF_SPI1_SIMO ((volatile unsigned char *)0x48000100)
72#define CONTROL_PADCONF_SPI1_SOMI ((volatile unsigned char *)0x48000101)
73#define CONTROL_PADCONF_SPI1_NCS0 ((volatile unsigned char *)0x48000102)
Peter Pearse5ca98812007-11-09 15:24:26 +000074#define CONTROL_PADCONF_SPI1_NCS1 ((volatile unsigned char *)0x48000103)
wdenk8ed96042005-01-09 23:16:25 +000075
76#define CONTROL_PADCONF_MCBSP1_FSR ((volatile unsigned char *)0x4800010B)
77
78/* Pin Muxing registers used for MMCSD */
79#define CONTROL_PADCONF_MMC_CLKI ((volatile unsigned char *)0x480000FE)
80#define CONTROL_PADCONF_MMC_CLKO ((volatile unsigned char *)0x480000F3)
81#define CONTROL_PADCONF_MMC_CMD ((volatile unsigned char *)0x480000F4)
82#define CONTROL_PADCONF_MMC_DAT0 ((volatile unsigned char *)0x480000F5)
83#define CONTROL_PADCONF_MMC_DAT1 ((volatile unsigned char *)0x480000F6)
84#define CONTROL_PADCONF_MMC_DAT2 ((volatile unsigned char *)0x480000F7)
85#define CONTROL_PADCONF_MMC_DAT3 ((volatile unsigned char *)0x480000F8)
86#define CONTROL_PADCONF_MMC_DAT_DIR0 ((volatile unsigned char *)0x480000F9)
87#define CONTROL_PADCONF_MMC_DAT_DIR1 ((volatile unsigned char *)0x480000FA)
88#define CONTROL_PADCONF_MMC_DAT_DIR2 ((volatile unsigned char *)0x480000FB)
89#define CONTROL_PADCONF_MMC_DAT_DIR3 ((volatile unsigned char *)0x480000FC)
90#define CONTROL_PADCONF_MMC_CMD_DIR ((volatile unsigned char *)0x480000FD)
91
92#define CONTROL_PADCONF_SDRC_A14 ((volatile unsigned char *)0x48000030)
93#define CONTROL_PADCONF_SDRC_A13 ((volatile unsigned char *)0x48000031)
94
95/* Pin Muxing registers used for CAMERA */
96#define CONTROL_PADCONF_SYS_NRESWARM ((volatile unsigned char *)0x4800012B)
97
98#define CONTROL_PADCONF_CAM_XCLK ((volatile unsigned char *)0x480000DC)
99#define CONTROL_PADCONF_CAM_LCLK ((volatile unsigned char *)0x480000DB)
100#define CONTROL_PADCONF_CAM_VS ((volatile unsigned char *)0x480000DA)
101#define CONTROL_PADCONF_CAM_HS ((volatile unsigned char *)0x480000D9)
102#define CONTROL_PADCONF_CAM_D0 ((volatile unsigned char *)0x480000D8)
103#define CONTROL_PADCONF_CAM_D1 ((volatile unsigned char *)0x480000D7)
104#define CONTROL_PADCONF_CAM_D2 ((volatile unsigned char *)0x480000D6)
105#define CONTROL_PADCONF_CAM_D3 ((volatile unsigned char *)0x480000D5)
106#define CONTROL_PADCONF_CAM_D4 ((volatile unsigned char *)0x480000D4)
107#define CONTROL_PADCONF_CAM_D5 ((volatile unsigned char *)0x480000D3)
108#define CONTROL_PADCONF_CAM_D6 ((volatile unsigned char *)0x480000D2)
109#define CONTROL_PADCONF_CAM_D7 ((volatile unsigned char *)0x480000D1)
110#define CONTROL_PADCONF_CAM_D8 ((volatile unsigned char *)0x480000D0)
111#define CONTROL_PADCONF_CAM_D9 ((volatile unsigned char *)0x480000CF)
112
113/* Pin Muxing registers used for LCD */
114#define CONTROL_PADCONF_DSS_D0 ((volatile unsigned char *)0x480000B3)
115#define CONTROL_PADCONF_DSS_D1 ((volatile unsigned char *)0x480000B4)
116#define CONTROL_PADCONF_DSS_D2 ((volatile unsigned char *)0x480000B5)
117#define CONTROL_PADCONF_DSS_D3 ((volatile unsigned char *)0x480000B6)
118#define CONTROL_PADCONF_DSS_D4 ((volatile unsigned char *)0x480000B7)
119#define CONTROL_PADCONF_DSS_D5 ((volatile unsigned char *)0x480000B8)
120#define CONTROL_PADCONF_DSS_D6 ((volatile unsigned char *)0x480000B9)
121#define CONTROL_PADCONF_DSS_D7 ((volatile unsigned char *)0x480000BA)
122#define CONTROL_PADCONF_DSS_D8 ((volatile unsigned char *)0x480000BB)
123#define CONTROL_PADCONF_DSS_D9 ((volatile unsigned char *)0x480000BC)
124#define CONTROL_PADCONF_DSS_D10 ((volatile unsigned char *)0x480000BD)
125#define CONTROL_PADCONF_DSS_D11 ((volatile unsigned char *)0x480000BE)
126#define CONTROL_PADCONF_DSS_D12 ((volatile unsigned char *)0x480000BF)
127#define CONTROL_PADCONF_DSS_D13 ((volatile unsigned char *)0x480000C0)
128#define CONTROL_PADCONF_DSS_D14 ((volatile unsigned char *)0x480000C1)
129#define CONTROL_PADCONF_DSS_D15 ((volatile unsigned char *)0x480000C2)
130#define CONTROL_PADCONF_DSS_D16 ((volatile unsigned char *)0x480000C3)
131#define CONTROL_PADCONF_DSS_D17 ((volatile unsigned char *)0x480000C4)
132#define CONTROL_PADCONF_DSS_PCLK ((volatile unsigned char *)0x480000CB)
133#define CONTROL_PADCONF_DSS_VSYNC ((volatile unsigned char *)0x480000CC)
134#define CONTROL_PADCONF_DSS_HSYNC ((volatile unsigned char *)0x480000CD)
135#define CONTROL_PADCONF_DSS_ACBIAS ((volatile unsigned char *)0x480000CE)
136
137/* Pin Muxing registers used for UART1 */
138#define CONTROL_PADCONF_UART1_CTS ((volatile unsigned char *)0x480000C5)
139#define CONTROL_PADCONF_UART1_RTS ((volatile unsigned char *)0x480000C6)
140#define CONTROL_PADCONF_UART1_TX ((volatile unsigned char *)0x480000C7)
141#define CONTROL_PADCONF_UART1_RX ((volatile unsigned char *)0x480000C8)
142
143/* Pin Muxing registers used for I2C1 */
144#define CONTROL_PADCONF_I2C1_SCL ((volatile unsigned char *)0x48000111)
145#define CONTROL_PADCONF_I2C1_SDA ((volatile unsigned char *)0x48000112)
146
147/* Pin Muxing registres used for USB0. */
148#define CONTROL_PADCONF_USB0_PUEN ((volatile uint8 *)0x4800011D)
149#define CONTROL_PADCONF_USB0_VP ((volatile uint8 *)0x4800011E)
150#define CONTROL_PADCONF_USB0_VM ((volatile uint8 *)0x4800011F)
151#define CONTROL_PADCONF_USB0_RCV ((volatile uint8 *)0x48000120)
152#define CONTROL_PADCONF_USB0_TXEN ((volatile uint8 *)0x48000121)
153#define CONTROL_PADCONF_USB0_SE0 ((volatile uint8 *)0x48000122)
154#define CONTROL_PADCONF_USB0_DAT ((volatile uint8 *)0x48000123)
155
156/* Pin Muxing registers used for UART3/IRDA */
157#define CONTROL_PADCONF_UART3_TX_IRTX ((volatile uint8 *)0x48000118)
158#define CONTROL_PADCONF_UART3_RX_IRRX ((volatile uint8 *)0x48000119)
159
160#endif