blob: f16bc99bc5e114937a1d495227b604165062c9f3 [file] [log] [blame]
Cyril Chemparathy692a7af2010-06-07 14:13:32 -04001/*
2 * TNETV107X: Pinmux APIs
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
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 as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22#ifndef __ASM_ARCH_MUX_H
23#define __ASM_ARCH_MUX_H
24
25struct pin_config {
26 unsigned char reg_index;
27 unsigned char mask_offset;
28 unsigned char mode;
29};
30
31#define TNETV107X_MUX_CFG(reg, offset, mux_mode) \
32 { reg, offset, mux_mode }
33
34int mux_select_pin(short index);
35int mux_select_pins(const short *pins);
36
37enum tnetv107x_pin_mux_index {
38 TNETV107X_PIN_ASR_A00,
39 TNETV107X_PIN_GPIO32,
40 TNETV107X_PIN_ASR_A01,
41 TNETV107X_PIN_GPIO33,
42 TNETV107X_PIN_ASR_A02,
43 TNETV107X_PIN_GPIO34,
44 TNETV107X_PIN_ASR_A03,
45 TNETV107X_PIN_GPIO35,
46 TNETV107X_PIN_ASR_A04,
47 TNETV107X_PIN_GPIO36,
48 TNETV107X_PIN_ASR_A05,
49 TNETV107X_PIN_GPIO37,
50 TNETV107X_PIN_ASR_A06,
51 TNETV107X_PIN_GPIO38,
52 TNETV107X_PIN_ASR_A07,
53 TNETV107X_PIN_GPIO39,
54 TNETV107X_PIN_ASR_A08,
55 TNETV107X_PIN_GPIO40,
56 TNETV107X_PIN_ASR_A09,
57 TNETV107X_PIN_GPIO41,
58 TNETV107X_PIN_ASR_A10,
59 TNETV107X_PIN_GPIO42,
60 TNETV107X_PIN_ASR_A11,
61 TNETV107X_PIN_BOOT_STRP_0,
62 TNETV107X_PIN_ASR_A12,
63 TNETV107X_PIN_BOOT_STRP_1,
64 TNETV107X_PIN_ASR_A13,
65 TNETV107X_PIN_GPIO43,
66 TNETV107X_PIN_ASR_A14,
67 TNETV107X_PIN_GPIO44,
68 TNETV107X_PIN_ASR_A15,
69 TNETV107X_PIN_GPIO45,
70 TNETV107X_PIN_ASR_A16,
71 TNETV107X_PIN_GPIO46,
72 TNETV107X_PIN_ASR_A17,
73 TNETV107X_PIN_GPIO47,
74 TNETV107X_PIN_ASR_A18,
75 TNETV107X_PIN_GPIO48,
76 TNETV107X_PIN_SDIO1_DATA3_0,
77 TNETV107X_PIN_ASR_A19,
78 TNETV107X_PIN_GPIO49,
79 TNETV107X_PIN_SDIO1_DATA2_0,
80 TNETV107X_PIN_ASR_A20,
81 TNETV107X_PIN_GPIO50,
82 TNETV107X_PIN_SDIO1_DATA1_0,
83 TNETV107X_PIN_ASR_A21,
84 TNETV107X_PIN_GPIO51,
85 TNETV107X_PIN_SDIO1_DATA0_0,
86 TNETV107X_PIN_ASR_A22,
87 TNETV107X_PIN_GPIO52,
88 TNETV107X_PIN_SDIO1_CMD_0,
89 TNETV107X_PIN_ASR_A23,
90 TNETV107X_PIN_GPIO53,
91 TNETV107X_PIN_SDIO1_CLK_0,
92 TNETV107X_PIN_ASR_BA_1,
93 TNETV107X_PIN_GPIO54,
94 TNETV107X_PIN_SYS_PLL_CLK,
95 TNETV107X_PIN_ASR_CS0,
96 TNETV107X_PIN_ASR_CS1,
97 TNETV107X_PIN_ASR_CS2,
98 TNETV107X_PIN_TDM_PLL_CLK,
99 TNETV107X_PIN_ASR_CS3,
100 TNETV107X_PIN_ETH_PHY_CLK,
101 TNETV107X_PIN_ASR_D00,
102 TNETV107X_PIN_GPIO55,
103 TNETV107X_PIN_ASR_D01,
104 TNETV107X_PIN_GPIO56,
105 TNETV107X_PIN_ASR_D02,
106 TNETV107X_PIN_GPIO57,
107 TNETV107X_PIN_ASR_D03,
108 TNETV107X_PIN_GPIO58,
109 TNETV107X_PIN_ASR_D04,
110 TNETV107X_PIN_GPIO59_0,
111 TNETV107X_PIN_ASR_D05,
112 TNETV107X_PIN_GPIO60_0,
113 TNETV107X_PIN_ASR_D06,
114 TNETV107X_PIN_GPIO61_0,
115 TNETV107X_PIN_ASR_D07,
116 TNETV107X_PIN_GPIO62_0,
117 TNETV107X_PIN_ASR_D08,
118 TNETV107X_PIN_GPIO63_0,
119 TNETV107X_PIN_ASR_D09,
120 TNETV107X_PIN_GPIO64_0,
121 TNETV107X_PIN_ASR_D10,
122 TNETV107X_PIN_SDIO1_DATA3_1,
123 TNETV107X_PIN_ASR_D11,
124 TNETV107X_PIN_SDIO1_DATA2_1,
125 TNETV107X_PIN_ASR_D12,
126 TNETV107X_PIN_SDIO1_DATA1_1,
127 TNETV107X_PIN_ASR_D13,
128 TNETV107X_PIN_SDIO1_DATA0_1,
129 TNETV107X_PIN_ASR_D14,
130 TNETV107X_PIN_SDIO1_CMD_1,
131 TNETV107X_PIN_ASR_D15,
132 TNETV107X_PIN_SDIO1_CLK_1,
133 TNETV107X_PIN_ASR_OE,
134 TNETV107X_PIN_BOOT_STRP_2,
135 TNETV107X_PIN_ASR_RNW,
136 TNETV107X_PIN_GPIO29_0,
137 TNETV107X_PIN_ASR_WAIT,
138 TNETV107X_PIN_GPIO30_0,
139 TNETV107X_PIN_ASR_WE,
140 TNETV107X_PIN_BOOT_STRP_3,
141 TNETV107X_PIN_ASR_WE_DQM0,
142 TNETV107X_PIN_GPIO31,
143 TNETV107X_PIN_LCD_PD17_0,
144 TNETV107X_PIN_ASR_WE_DQM1,
145 TNETV107X_PIN_ASR_BA0_0,
146 TNETV107X_PIN_VLYNQ_CLK,
147 TNETV107X_PIN_GPIO14,
148 TNETV107X_PIN_LCD_PD19_0,
149 TNETV107X_PIN_VLYNQ_RXD0,
150 TNETV107X_PIN_GPIO15,
151 TNETV107X_PIN_LCD_PD20_0,
152 TNETV107X_PIN_VLYNQ_RXD1,
153 TNETV107X_PIN_GPIO16,
154 TNETV107X_PIN_LCD_PD21_0,
155 TNETV107X_PIN_VLYNQ_TXD0,
156 TNETV107X_PIN_GPIO17,
157 TNETV107X_PIN_LCD_PD22_0,
158 TNETV107X_PIN_VLYNQ_TXD1,
159 TNETV107X_PIN_GPIO18,
160 TNETV107X_PIN_LCD_PD23_0,
161 TNETV107X_PIN_SDIO0_CLK,
162 TNETV107X_PIN_GPIO19,
163 TNETV107X_PIN_SDIO0_CMD,
164 TNETV107X_PIN_GPIO20,
165 TNETV107X_PIN_SDIO0_DATA0,
166 TNETV107X_PIN_GPIO21,
167 TNETV107X_PIN_SDIO0_DATA1,
168 TNETV107X_PIN_GPIO22,
169 TNETV107X_PIN_SDIO0_DATA2,
170 TNETV107X_PIN_GPIO23,
171 TNETV107X_PIN_SDIO0_DATA3,
172 TNETV107X_PIN_GPIO24,
173 TNETV107X_PIN_EMU0,
174 TNETV107X_PIN_EMU1,
175 TNETV107X_PIN_RTCK,
176 TNETV107X_PIN_TRST_N,
177 TNETV107X_PIN_TCK,
178 TNETV107X_PIN_TDI,
179 TNETV107X_PIN_TDO,
180 TNETV107X_PIN_TMS,
181 TNETV107X_PIN_TDM1_CLK,
182 TNETV107X_PIN_TDM1_RX,
183 TNETV107X_PIN_TDM1_TX,
184 TNETV107X_PIN_TDM1_FS,
185 TNETV107X_PIN_KEYPAD_R0,
186 TNETV107X_PIN_KEYPAD_R1,
187 TNETV107X_PIN_KEYPAD_R2,
188 TNETV107X_PIN_KEYPAD_R3,
189 TNETV107X_PIN_KEYPAD_R4,
190 TNETV107X_PIN_KEYPAD_R5,
191 TNETV107X_PIN_KEYPAD_R6,
192 TNETV107X_PIN_GPIO12,
193 TNETV107X_PIN_KEYPAD_R7,
194 TNETV107X_PIN_GPIO10,
195 TNETV107X_PIN_KEYPAD_C0,
196 TNETV107X_PIN_KEYPAD_C1,
197 TNETV107X_PIN_KEYPAD_C2,
198 TNETV107X_PIN_KEYPAD_C3,
199 TNETV107X_PIN_KEYPAD_C4,
200 TNETV107X_PIN_KEYPAD_C5,
201 TNETV107X_PIN_KEYPAD_C6,
202 TNETV107X_PIN_GPIO13,
203 TNETV107X_PIN_TEST_CLK_IN,
204 TNETV107X_PIN_KEYPAD_C7,
205 TNETV107X_PIN_GPIO11,
206 TNETV107X_PIN_SSP0_0,
207 TNETV107X_PIN_SCC_DCLK,
208 TNETV107X_PIN_LCD_PD20_1,
209 TNETV107X_PIN_SSP0_1,
210 TNETV107X_PIN_SCC_CS_N,
211 TNETV107X_PIN_LCD_PD21_1,
212 TNETV107X_PIN_SSP0_2,
213 TNETV107X_PIN_SCC_D,
214 TNETV107X_PIN_LCD_PD22_1,
215 TNETV107X_PIN_SSP0_3,
216 TNETV107X_PIN_SCC_RESETN,
217 TNETV107X_PIN_LCD_PD23_1,
218 TNETV107X_PIN_SSP1_0,
219 TNETV107X_PIN_GPIO25,
220 TNETV107X_PIN_UART2_CTS,
221 TNETV107X_PIN_SSP1_1,
222 TNETV107X_PIN_GPIO26,
223 TNETV107X_PIN_UART2_RD,
224 TNETV107X_PIN_SSP1_2,
225 TNETV107X_PIN_GPIO27,
226 TNETV107X_PIN_UART2_RTS,
227 TNETV107X_PIN_SSP1_3,
228 TNETV107X_PIN_GPIO28,
229 TNETV107X_PIN_UART2_TD,
230 TNETV107X_PIN_UART0_CTS,
231 TNETV107X_PIN_UART0_RD,
232 TNETV107X_PIN_UART0_RTS,
233 TNETV107X_PIN_UART0_TD,
234 TNETV107X_PIN_UART1_RD,
235 TNETV107X_PIN_UART1_TD,
236 TNETV107X_PIN_LCD_AC_NCS,
237 TNETV107X_PIN_LCD_HSYNC_RNW,
238 TNETV107X_PIN_LCD_VSYNC_A0,
239 TNETV107X_PIN_LCD_MCLK,
240 TNETV107X_PIN_LCD_PD16_0,
241 TNETV107X_PIN_LCD_PCLK_E,
242 TNETV107X_PIN_LCD_PD00,
243 TNETV107X_PIN_LCD_PD01,
244 TNETV107X_PIN_LCD_PD02,
245 TNETV107X_PIN_LCD_PD03,
246 TNETV107X_PIN_LCD_PD04,
247 TNETV107X_PIN_LCD_PD05,
248 TNETV107X_PIN_LCD_PD06,
249 TNETV107X_PIN_LCD_PD07,
250 TNETV107X_PIN_LCD_PD08,
251 TNETV107X_PIN_GPIO59_1,
252 TNETV107X_PIN_LCD_PD09,
253 TNETV107X_PIN_GPIO60_1,
254 TNETV107X_PIN_LCD_PD10,
255 TNETV107X_PIN_ASR_BA0_1,
256 TNETV107X_PIN_GPIO61_1,
257 TNETV107X_PIN_LCD_PD11,
258 TNETV107X_PIN_GPIO62_1,
259 TNETV107X_PIN_LCD_PD12,
260 TNETV107X_PIN_GPIO63_1,
261 TNETV107X_PIN_LCD_PD13,
262 TNETV107X_PIN_GPIO64_1,
263 TNETV107X_PIN_LCD_PD14,
264 TNETV107X_PIN_GPIO29_1,
265 TNETV107X_PIN_LCD_PD15,
266 TNETV107X_PIN_GPIO30_1,
267 TNETV107X_PIN_EINT0,
268 TNETV107X_PIN_GPIO08,
269 TNETV107X_PIN_EINT1,
270 TNETV107X_PIN_GPIO09,
271 TNETV107X_PIN_GPIO00,
272 TNETV107X_PIN_LCD_PD20_2,
273 TNETV107X_PIN_TDM_CLK_IN_2,
274 TNETV107X_PIN_GPIO01,
275 TNETV107X_PIN_LCD_PD21_2,
276 TNETV107X_PIN_24M_CLK_OUT_1,
277 TNETV107X_PIN_GPIO02,
278 TNETV107X_PIN_LCD_PD22_2,
279 TNETV107X_PIN_GPIO03,
280 TNETV107X_PIN_LCD_PD23_2,
281 TNETV107X_PIN_GPIO04,
282 TNETV107X_PIN_LCD_PD16_1,
283 TNETV107X_PIN_USB0_RXERR,
284 TNETV107X_PIN_GPIO05,
285 TNETV107X_PIN_LCD_PD17_1,
286 TNETV107X_PIN_TDM_CLK_IN_1,
287 TNETV107X_PIN_GPIO06,
288 TNETV107X_PIN_LCD_PD18,
289 TNETV107X_PIN_24M_CLK_OUT_2,
290 TNETV107X_PIN_GPIO07,
291 TNETV107X_PIN_LCD_PD19_1,
292 TNETV107X_PIN_USB1_RXERR,
293 TNETV107X_PIN_ETH_PLL_CLK,
294 TNETV107X_PIN_MDIO,
295 TNETV107X_PIN_MDC,
296 TNETV107X_PIN_AIC_MUTE_STAT_N,
297 TNETV107X_PIN_TDM0_CLK,
298 TNETV107X_PIN_AIC_HNS_EN_N,
299 TNETV107X_PIN_TDM0_FS,
300 TNETV107X_PIN_AIC_HDS_EN_STAT_N,
301 TNETV107X_PIN_TDM0_TX,
302 TNETV107X_PIN_AIC_HNF_EN_STAT_N,
303 TNETV107X_PIN_TDM0_RX,
304};
305
306#endif