1 /* Coldfire C Header File
2 * Copyright Freescale Semiconductor Inc
5 * 2008/05/23 Revision: 0.95
7 * (c) Copyright UNIS, a.s. 1997-2008
12 * http : www.processorexpert.com
13 * mail : info@processorexpert.com
16 #ifndef __MCF52221_GPIO_H__
17 #define __MCF52221_GPIO_H__
20 /*********************************************************************
22 * General Purpose I/O (GPIO)
24 *********************************************************************/
26 /* Register read/write macros */
27 #define MCF_GPIO_PORTNQ (*(vuint8 *)(0x40100008))
28 #define MCF_GPIO_DDRNQ (*(vuint8 *)(0x40100020))
29 #define MCF_GPIO_SETNQ (*(vuint8 *)(0x40100038))
30 #define MCF_GPIO_CLRNQ (*(vuint8 *)(0x40100050))
31 #define MCF_GPIO_PNQPAR (*(vuint16*)(0x40100068))
33 #define MCF_GPIO_PORTAN (*(vuint8 *)(0x4010000A))
34 #define MCF_GPIO_DDRAN (*(vuint8 *)(0x40100022))
35 #define MCF_GPIO_SETAN (*(vuint8 *)(0x4010003A))
36 #define MCF_GPIO_CLRAN (*(vuint8 *)(0x40100052))
37 #define MCF_GPIO_PANPAR (*(vuint8 *)(0x4010006A))
39 #define MCF_GPIO_PORTAS (*(vuint8 *)(0x4010000B))
40 #define MCF_GPIO_DDRAS (*(vuint8 *)(0x40100023))
41 #define MCF_GPIO_SETAS (*(vuint8 *)(0x4010003B))
42 #define MCF_GPIO_CLRAS (*(vuint8 *)(0x40100053))
43 #define MCF_GPIO_PASPAR (*(vuint8 *)(0x4010006B))
45 #define MCF_GPIO_PORTQS (*(vuint8 *)(0x4010000C))
46 #define MCF_GPIO_DDRQS (*(vuint8 *)(0x40100024))
47 #define MCF_GPIO_SETQS (*(vuint8 *)(0x4010003C))
48 #define MCF_GPIO_CLRQS (*(vuint8 *)(0x40100054))
49 #define MCF_GPIO_PQSPAR (*(vuint16*)(0x4010006C))
51 #define MCF_GPIO_PORTTA (*(vuint8 *)(0x4010000E))
52 #define MCF_GPIO_DDRTA (*(vuint8 *)(0x40100026))
53 #define MCF_GPIO_SETTA (*(vuint8 *)(0x4010003E))
54 #define MCF_GPIO_CLRTA (*(vuint8 *)(0x40100056))
55 #define MCF_GPIO_PTAPAR (*(vuint8 *)(0x4010006E))
57 #define MCF_GPIO_PORTTC (*(vuint8 *)(0x4010000F))
58 #define MCF_GPIO_DDRTC (*(vuint8 *)(0x40100027))
59 #define MCF_GPIO_SETTC (*(vuint8 *)(0x4010003F))
60 #define MCF_GPIO_CLRTC (*(vuint8 *)(0x40100057))
61 #define MCF_GPIO_PTCPAR (*(vuint8 *)(0x4010006F))
63 #define MCF_GPIO_PORTUA (*(vuint8 *)(0x40100011))
64 #define MCF_GPIO_DDRUA (*(vuint8 *)(0x40100029))
65 #define MCF_GPIO_SETUA (*(vuint8 *)(0x40100041))
66 #define MCF_GPIO_CLRUA (*(vuint8 *)(0x40100059))
67 #define MCF_GPIO_PUAPAR (*(vuint8 *)(0x40100071))
69 #define MCF_GPIO_PORTUB (*(vuint8 *)(0x40100012))
70 #define MCF_GPIO_DDRUB (*(vuint8 *)(0x4010002A))
71 #define MCF_GPIO_SETUB (*(vuint8 *)(0x40100042))
72 #define MCF_GPIO_CLRUB (*(vuint8 *)(0x4010005A))
73 #define MCF_GPIO_PUBPAR (*(vuint8 *)(0x40100072))
77 /* Bit definitions and macros for MCF_GPIO_PORTNQ */
78 #define MCF_GPIO_PORTNQ_PORTNQ1 (0x2)
79 #define MCF_GPIO_PORTNQ_PORTNQ2 (0x4)
80 #define MCF_GPIO_PORTNQ_PORTNQ3 (0x8)
81 #define MCF_GPIO_PORTNQ_PORTNQ4 (0x10)
82 #define MCF_GPIO_PORTNQ_PORTNQ5 (0x20)
83 #define MCF_GPIO_PORTNQ_PORTNQ6 (0x40)
84 #define MCF_GPIO_PORTNQ_PORTNQ7 (0x80)
86 /* Bit definitions and macros for MCF_GPIO_DDRNQ */
87 #define MCF_GPIO_DDRNQ_DDRNQ1 (0x2)
88 #define MCF_GPIO_DDRNQ_DDRNQ2 (0x4)
89 #define MCF_GPIO_DDRNQ_DDRNQ3 (0x8)
90 #define MCF_GPIO_DDRNQ_DDRNQ4 (0x10)
91 #define MCF_GPIO_DDRNQ_DDRNQ5 (0x20)
92 #define MCF_GPIO_DDRNQ_DDRNQ6 (0x40)
93 #define MCF_GPIO_DDRNQ_DDRNQ7 (0x80)
95 /* Bit definitions and macros for MCF_GPIO_SETNQ */
96 #define MCF_GPIO_SETNQ_SETNQ1 (0x2)
97 #define MCF_GPIO_SETNQ_SETNQ2 (0x4)
98 #define MCF_GPIO_SETNQ_SETNQ3 (0x8)
99 #define MCF_GPIO_SETNQ_SETNQ4 (0x10)
100 #define MCF_GPIO_SETNQ_SETNQ5 (0x20)
101 #define MCF_GPIO_SETNQ_SETNQ6 (0x40)
102 #define MCF_GPIO_SETNQ_SETNQ7 (0x80)
104 /* Bit definitions and macros for MCF_GPIO_CLRNQ */
105 #define MCF_GPIO_CLRNQ_CLRNQ1 (0x2)
106 #define MCF_GPIO_CLRNQ_CLRNQ2 (0x4)
107 #define MCF_GPIO_CLRNQ_CLRNQ3 (0x8)
108 #define MCF_GPIO_CLRNQ_CLRNQ4 (0x10)
109 #define MCF_GPIO_CLRNQ_CLRNQ5 (0x20)
110 #define MCF_GPIO_CLRNQ_CLRNQ6 (0x40)
111 #define MCF_GPIO_CLRNQ_CLRNQ7 (0x80)
113 /* Bit definitions and macros for MCF_GPIO_PNQPAR */
114 #define MCF_GPIO_PNQPAR_PNQPAR1(x) (((x)&0x3)<<0x2)
115 #define MCF_GPIO_PNQPAR_IRQ1_GPIO (0)
116 #define MCF_GPIO_PNQPAR_IRQ1_IRQ1 (0x4)
117 #define MCF_GPIO_PNQPAR_IRQ1_SYNCA (0x8)
118 #define MCF_GPIO_PNQPAR_IRQ1_USB_ALT_CLK (0xC)
119 #define MCF_GPIO_PNQPAR_PNQPAR2(x) (((x)&0x3)<<0x4)
120 #define MCF_GPIO_PNQPAR_IRQ2_GPIO (0)
121 #define MCF_GPIO_PNQPAR_IRQ2_IRQ2 (0x10)
122 #define MCF_GPIO_PNQPAR_PNQPAR3(x) (((x)&0x3)<<0x6)
123 #define MCF_GPIO_PNQPAR_IRQ3_GPIO (0)
124 #define MCF_GPIO_PNQPAR_IRQ3_IRQ3 (0x40)
125 #define MCF_GPIO_PNQPAR_PNQPAR4(x) (((x)&0x3)<<0x8)
126 #define MCF_GPIO_PNQPAR_IRQ4_GPIO (0)
127 #define MCF_GPIO_PNQPAR_IRQ4_IRQ4 (0x100)
128 #define MCF_GPIO_PNQPAR_PNQPAR5(x) (((x)&0x3)<<0xA)
129 #define MCF_GPIO_PNQPAR_IRQ5_GPIO (0)
130 #define MCF_GPIO_PNQPAR_IRQ5_IRQ5 (0x400)
131 #define MCF_GPIO_PNQPAR_PNQPAR6(x) (((x)&0x3)<<0xC)
132 #define MCF_GPIO_PNQPAR_IRQ6_GPIO (0)
133 #define MCF_GPIO_PNQPAR_IRQ6_IRQ6 (0x1000)
134 #define MCF_GPIO_PNQPAR_PNQPAR7(x) (((x)&0x3)<<0xE)
135 #define MCF_GPIO_PNQPAR_IRQ7_GPIO (0)
136 #define MCF_GPIO_PNQPAR_IRQ7_IRQ7 (0x4000)
138 /* Bit definitions and macros for MCF_GPIO_PORTAN */
139 #define MCF_GPIO_PORTAN_PORTAN0 (0x1)
140 #define MCF_GPIO_PORTAN_PORTAN1 (0x2)
141 #define MCF_GPIO_PORTAN_PORTAN2 (0x4)
142 #define MCF_GPIO_PORTAN_PORTAN3 (0x8)
143 #define MCF_GPIO_PORTAN_PORTAN4 (0x10)
144 #define MCF_GPIO_PORTAN_PORTAN5 (0x20)
145 #define MCF_GPIO_PORTAN_PORTAN6 (0x40)
146 #define MCF_GPIO_PORTAN_PORTAN7 (0x80)
148 /* Bit definitions and macros for MCF_GPIO_DDRAN */
149 #define MCF_GPIO_DDRAN_DDRAN0 (0x1)
150 #define MCF_GPIO_DDRAN_DDRAN1 (0x2)
151 #define MCF_GPIO_DDRAN_DDRAN2 (0x4)
152 #define MCF_GPIO_DDRAN_DDRAN3 (0x8)
153 #define MCF_GPIO_DDRAN_DDRAN4 (0x10)
154 #define MCF_GPIO_DDRAN_DDRAN5 (0x20)
155 #define MCF_GPIO_DDRAN_DDRAN6 (0x40)
156 #define MCF_GPIO_DDRAN_DDRAN7 (0x80)
158 /* Bit definitions and macros for MCF_GPIO_SETAN */
159 #define MCF_GPIO_SETAN_SETAN0 (0x1)
160 #define MCF_GPIO_SETAN_SETAN1 (0x2)
161 #define MCF_GPIO_SETAN_SETAN2 (0x4)
162 #define MCF_GPIO_SETAN_SETAN3 (0x8)
163 #define MCF_GPIO_SETAN_SETAN4 (0x10)
164 #define MCF_GPIO_SETAN_SETAN5 (0x20)
165 #define MCF_GPIO_SETAN_SETAN6 (0x40)
166 #define MCF_GPIO_SETAN_SETAN7 (0x80)
168 /* Bit definitions and macros for MCF_GPIO_CLRAN */
169 #define MCF_GPIO_CLRAN_CLRAN0 (0x1)
170 #define MCF_GPIO_CLRAN_CLRAN1 (0x2)
171 #define MCF_GPIO_CLRAN_CLRAN2 (0x4)
172 #define MCF_GPIO_CLRAN_CLRAN3 (0x8)
173 #define MCF_GPIO_CLRAN_CLRAN4 (0x10)
174 #define MCF_GPIO_CLRAN_CLRAN5 (0x20)
175 #define MCF_GPIO_CLRAN_CLRAN6 (0x40)
176 #define MCF_GPIO_CLRAN_CLRAN7 (0x80)
178 /* Bit definitions and macros for MCF_GPIO_PANPAR */
179 #define MCF_GPIO_PANPAR_PANPAR0 (0x1)
180 #define MCF_GPIO_PANPAR_AN0_GPIO (0)
181 #define MCF_GPIO_PANPAR_AN0_AN0 (0x1)
182 #define MCF_GPIO_PANPAR_PANPAR1 (0x2)
183 #define MCF_GPIO_PANPAR_AN1_GPIO (0)
184 #define MCF_GPIO_PANPAR_AN1_AN1 (0x2)
185 #define MCF_GPIO_PANPAR_PANPAR2 (0x4)
186 #define MCF_GPIO_PANPAR_AN2_GPIO (0)
187 #define MCF_GPIO_PANPAR_AN2_AN2 (0x4)
188 #define MCF_GPIO_PANPAR_PANPAR3 (0x8)
189 #define MCF_GPIO_PANPAR_AN3_GPIO (0)
190 #define MCF_GPIO_PANPAR_AN3_AN3 (0x8)
191 #define MCF_GPIO_PANPAR_PANPAR4 (0x10)
192 #define MCF_GPIO_PANPAR_AN4_GPIO (0)
193 #define MCF_GPIO_PANPAR_AN4_AN4 (0x10)
194 #define MCF_GPIO_PANPAR_PANPAR5 (0x20)
195 #define MCF_GPIO_PANPAR_AN5_GPIO (0)
196 #define MCF_GPIO_PANPAR_AN5_AN5 (0x20)
197 #define MCF_GPIO_PANPAR_PANPAR6 (0x40)
198 #define MCF_GPIO_PANPAR_AN6_GPIO (0)
199 #define MCF_GPIO_PANPAR_AN6_AN6 (0x40)
200 #define MCF_GPIO_PANPAR_PANPAR7 (0x80)
201 #define MCF_GPIO_PANPAR_AN7_GPIO (0)
202 #define MCF_GPIO_PANPAR_AN7_AN7 (0x80)
204 /* Bit definitions and macros for MCF_GPIO_PORTAS */
205 #define MCF_GPIO_PORTAS_PORTAS0 (0x1)
206 #define MCF_GPIO_PORTAS_PORTAS1 (0x2)
208 /* Bit definitions and macros for MCF_GPIO_DDRAS */
209 #define MCF_GPIO_DDRAS_DDRAS0 (0x1)
210 #define MCF_GPIO_DDRAS_DDRAS1 (0x2)
212 /* Bit definitions and macros for MCF_GPIO_SETAS */
213 #define MCF_GPIO_SETAS_SETAS0 (0x1)
214 #define MCF_GPIO_SETAS_SETAS1 (0x2)
216 /* Bit definitions and macros for MCF_GPIO_CLRAS */
217 #define MCF_GPIO_CLRAS_CLRAS0 (0x1)
218 #define MCF_GPIO_CLRAS_CLRAS1 (0x2)
220 /* Bit definitions and macros for MCF_GPIO_PASPAR */
221 #define MCF_GPIO_PASPAR_PASPAR0(x) (((x)&0x3)<<0)
222 #define MCF_GPIO_PASPAR_SCL_GPIO (0)
223 #define MCF_GPIO_PASPAR_SCL_SCL (0x1)
224 #define MCF_GPIO_PASPAR_SCL_USB_DMI (0x2)
225 #define MCF_GPIO_PASPAR_SCL_UTXD2 (0x3)
226 #define MCF_GPIO_PASPAR_PASPAR1(x) (((x)&0x3)<<0x2)
227 #define MCF_GPIO_PASPAR_SDA_GPIO (0)
228 #define MCF_GPIO_PASPAR_SDA_SDA (0x4)
229 #define MCF_GPIO_PASPAR_SDA_USB_DPI (0x8)
230 #define MCF_GPIO_PASPAR_SDA_URXD2 (0xC)
232 /* Bit definitions and macros for MCF_GPIO_PORTQS */
233 #define MCF_GPIO_PORTQS_PORTQS0 (0x1)
234 #define MCF_GPIO_PORTQS_PORTQS1 (0x2)
235 #define MCF_GPIO_PORTQS_PORTQS2 (0x4)
236 #define MCF_GPIO_PORTQS_PORTQS3 (0x8)
237 #define MCF_GPIO_PORTQS_PORTQS4 (0x10)
238 #define MCF_GPIO_PORTQS_PORTQS5 (0x20)
239 #define MCF_GPIO_PORTQS_PORTQS6 (0x40)
241 /* Bit definitions and macros for MCF_GPIO_DDRQS */
242 #define MCF_GPIO_DDRQS_DDRQS0 (0x1)
243 #define MCF_GPIO_DDRQS_DDRQS1 (0x2)
244 #define MCF_GPIO_DDRQS_DDRQS2 (0x4)
245 #define MCF_GPIO_DDRQS_DDRQS3 (0x8)
246 #define MCF_GPIO_DDRQS_DDRQS4 (0x10)
247 #define MCF_GPIO_DDRQS_DDRQS5 (0x20)
248 #define MCF_GPIO_DDRQS_DDRQS6 (0x40)
250 /* Bit definitions and macros for MCF_GPIO_SETQS */
251 #define MCF_GPIO_SETQS_SETQS0 (0x1)
252 #define MCF_GPIO_SETQS_SETQS1 (0x2)
253 #define MCF_GPIO_SETQS_SETQS2 (0x4)
254 #define MCF_GPIO_SETQS_SETQS3 (0x8)
255 #define MCF_GPIO_SETQS_SETQS4 (0x10)
256 #define MCF_GPIO_SETQS_SETQS5 (0x20)
257 #define MCF_GPIO_SETQS_SETQS6 (0x40)
259 /* Bit definitions and macros for MCF_GPIO_CLRQS */
260 #define MCF_GPIO_CLRQS_CLRQS0 (0x1)
261 #define MCF_GPIO_CLRQS_CLRQS1 (0x2)
262 #define MCF_GPIO_CLRQS_CLRQS2 (0x4)
263 #define MCF_GPIO_CLRQS_CLRQS3 (0x8)
264 #define MCF_GPIO_CLRQS_CLRQS4 (0x10)
265 #define MCF_GPIO_CLRQS_CLRQS5 (0x20)
266 #define MCF_GPIO_CLRQS_CLRQS6 (0x40)
268 /* Bit definitions and macros for MCF_GPIO_PQSPAR */
269 #define MCF_GPIO_PQSPAR_PQSPAR0(x) (((x)&0x3)<<0)
270 #define MCF_GPIO_PQSPAR_QSPI_DOUT_GPIO (0)
271 #define MCF_GPIO_PQSPAR_QSPI_DOUT_DOUT (0x1)
272 #define MCF_GPIO_PQSPAR_QSPI_DOUT_UTXD1 (0x3)
273 #define MCF_GPIO_PQSPAR_PQSPAR1(x) (((x)&0x3)<<0x2)
274 #define MCF_GPIO_PQSPAR_QSPI_DIN_GPIO (0)
275 #define MCF_GPIO_PQSPAR_QSPI_DIN_DIN (0x4)
276 #define MCF_GPIO_PQSPAR_QSPI_DIN_URXD1 (0xC)
277 #define MCF_GPIO_PQSPAR_PQSPAR2(x) (((x)&0x3)<<0x4)
278 #define MCF_GPIO_PQSPAR_QSPI_CLK_GPIO (0)
279 #define MCF_GPIO_PQSPAR_QSPI_CLK_CLK (0x10)
280 #define MCF_GPIO_PQSPAR_QSPI_CLK_SCL (0x20)
281 #define MCF_GPIO_PQSPAR_QSPI_CLK_URTS1 (0x30)
282 #define MCF_GPIO_PQSPAR_PQSPAR3(x) (((x)&0x3)<<0x6)
283 #define MCF_GPIO_PQSPAR_QSPI_CS0_GPIO (0)
284 #define MCF_GPIO_PQSPAR_QSPI_CS0_CS0 (0x40)
285 #define MCF_GPIO_PQSPAR_QSPI_CS0_UCTS1 (0xC0)
286 #define MCF_GPIO_PQSPAR_PQSPAR4(x) (((x)&0x3)<<0x8)
287 #define MCF_GPIO_PQSPAR_QSPI_CS1_GPIO (0)
288 #define MCF_GPIO_PQSPAR_QSPI_CS1_CS1 (0x100)
289 #define MCF_GPIO_PQSPAR_QSPI_CS1_USB_PULLUP (0x300)
290 #define MCF_GPIO_PQSPAR_PQSPAR5(x) (((x)&0x3)<<0xA)
291 #define MCF_GPIO_PQSPAR_QSPI_CS2_GPIO (0)
292 #define MCF_GPIO_PQSPAR_QSPI_CS2_CS2 (0x400)
293 #define MCF_GPIO_PQSPAR_QSPI_CS2_USB_DM_PD (0xC00)
294 #define MCF_GPIO_PQSPAR_PQSPAR6(x) (((x)&0x3)<<0xC)
295 #define MCF_GPIO_PQSPAR_QSPI_CS3_GPIO (0)
296 #define MCF_GPIO_PQSPAR_QSPI_CS3_CS3 (0x1000)
297 #define MCF_GPIO_PQSPAR_QSPI_CS3_SYNCA (0x2000)
298 #define MCF_GPIO_PQSPAR_QSPI_CS3_USB_DP_PD (0x3000)
300 /* Bit definitions and macros for MCF_GPIO_PORTTA */
301 #define MCF_GPIO_PORTTA_PORTTA0 (0x1)
302 #define MCF_GPIO_PORTTA_PORTTA1 (0x2)
303 #define MCF_GPIO_PORTTA_PORTTA2 (0x4)
304 #define MCF_GPIO_PORTTA_PORTTA3 (0x8)
306 /* Bit definitions and macros for MCF_GPIO_DDRTA */
307 #define MCF_GPIO_DDRTA_DDRTA0 (0x1)
308 #define MCF_GPIO_DDRTA_DDRTA1 (0x2)
309 #define MCF_GPIO_DDRTA_DDRTA2 (0x4)
310 #define MCF_GPIO_DDRTA_DDRTA3 (0x8)
312 /* Bit definitions and macros for MCF_GPIO_SETTA */
313 #define MCF_GPIO_SETTA_SETTA0 (0x1)
314 #define MCF_GPIO_SETTA_SETTA1 (0x2)
315 #define MCF_GPIO_SETTA_SETTA2 (0x4)
316 #define MCF_GPIO_SETTA_SETTA3 (0x8)
318 /* Bit definitions and macros for MCF_GPIO_CLRTA */
319 #define MCF_GPIO_CLRTA_CLRTA0 (0x1)
320 #define MCF_GPIO_CLRTA_CLRTA1 (0x2)
321 #define MCF_GPIO_CLRTA_CLRTA2 (0x4)
322 #define MCF_GPIO_CLRTA_CLRTA3 (0x8)
324 /* Bit definitions and macros for MCF_GPIO_PTAPAR */
325 #define MCF_GPIO_PTAPAR_PTAPAR0(x) (((x)&0x3)<<0)
326 #define MCF_GPIO_PTAPAR_GPT0_GPIO (0)
327 #define MCF_GPIO_PTAPAR_GPT0_GPT0 (0x1)
328 #define MCF_GPIO_PTAPAR_GPT0_PWM1 (0x3)
329 #define MCF_GPIO_PTAPAR_PTAPAR1(x) (((x)&0x3)<<0x2)
330 #define MCF_GPIO_PTAPAR_GPT1_GPIO (0)
331 #define MCF_GPIO_PTAPAR_GPT1_GPT1 (0x4)
332 #define MCF_GPIO_PTAPAR_GPT1_PWM3 (0xC)
333 #define MCF_GPIO_PTAPAR_PTAPAR2(x) (((x)&0x3)<<0x4)
334 #define MCF_GPIO_PTAPAR_GPT2_GPIO (0)
335 #define MCF_GPIO_PTAPAR_GPT2_GPT2 (0x10)
336 #define MCF_GPIO_PTAPAR_GPT2_PWM5 (0x30)
337 #define MCF_GPIO_PTAPAR_PTAPAR3(x) (((x)&0x3)<<0x6)
338 #define MCF_GPIO_PTAPAR_GPT3_GPIO (0)
339 #define MCF_GPIO_PTAPAR_GPT3_GPT3 (0x40)
340 #define MCF_GPIO_PTAPAR_GPT3_PWM7 (0xC0)
342 /* Bit definitions and macros for MCF_GPIO_PORTTC */
343 #define MCF_GPIO_PORTTC_PORTTC0 (0x1)
344 #define MCF_GPIO_PORTTC_PORTTC1 (0x2)
345 #define MCF_GPIO_PORTTC_PORTTC2 (0x4)
346 #define MCF_GPIO_PORTTC_PORTTC3 (0x8)
348 /* Bit definitions and macros for MCF_GPIO_DDRTC */
349 #define MCF_GPIO_DDRTC_DDRTC0 (0x1)
350 #define MCF_GPIO_DDRTC_DDRTC1 (0x2)
351 #define MCF_GPIO_DDRTC_DDRTC2 (0x4)
352 #define MCF_GPIO_DDRTC_DDRTC3 (0x8)
354 /* Bit definitions and macros for MCF_GPIO_SETTC */
355 #define MCF_GPIO_SETTC_SETTC0 (0x1)
356 #define MCF_GPIO_SETTC_SETTC1 (0x2)
357 #define MCF_GPIO_SETTC_SETTC2 (0x4)
358 #define MCF_GPIO_SETTC_SETTC3 (0x8)
360 /* Bit definitions and macros for MCF_GPIO_CLRTC */
361 #define MCF_GPIO_CLRTC_CLRTC0 (0x1)
362 #define MCF_GPIO_CLRTC_CLRTC1 (0x2)
363 #define MCF_GPIO_CLRTC_CLRTC2 (0x4)
364 #define MCF_GPIO_CLRTC_CLRTC3 (0x8)
366 /* Bit definitions and macros for MCF_GPIO_PTCPAR */
367 #define MCF_GPIO_PTCPAR_PTCPAR0(x) (((x)&0x3)<<0)
368 #define MCF_GPIO_PTCPAR_DTIN0_GPIO (0)
369 #define MCF_GPIO_PTCPAR_DTIN0_DTIN0 (0x1)
370 #define MCF_GPIO_PTCPAR_DTIN0_DTOUT0 (0x2)
371 #define MCF_GPIO_PTCPAR_DTIN0_PWM0 (0x3)
372 #define MCF_GPIO_PTCPAR_PTCPAR1(x) (((x)&0x3)<<0x2)
373 #define MCF_GPIO_PTCPAR_DTIN1_GPIO (0)
374 #define MCF_GPIO_PTCPAR_DTIN1_DTIN1 (0x4)
375 #define MCF_GPIO_PTCPAR_DTIN1_DTOUT1 (0x8)
376 #define MCF_GPIO_PTCPAR_DTIN1_PWM2 (0xC)
377 #define MCF_GPIO_PTCPAR_PTCPAR2(x) (((x)&0x3)<<0x4)
378 #define MCF_GPIO_PTCPAR_DTIN2_GPIO (0)
379 #define MCF_GPIO_PTCPAR_DTIN2_DTIN2 (0x10)
380 #define MCF_GPIO_PTCPAR_DTIN2_DTOUT2 (0x20)
381 #define MCF_GPIO_PTCPAR_DTIN2_PWM4 (0x30)
382 #define MCF_GPIO_PTCPAR_PTCPAR3(x) (((x)&0x3)<<0x6)
383 #define MCF_GPIO_PTCPAR_DTIN3_GPIO (0)
384 #define MCF_GPIO_PTCPAR_DTIN3_DTIN3 (0x40)
385 #define MCF_GPIO_PTCPAR_DTIN3_DTOUT3 (0x80)
386 #define MCF_GPIO_PTCPAR_DTIN3_PWM6 (0xC0)
388 /* Bit definitions and macros for MCF_GPIO_PORTUA */
389 #define MCF_GPIO_PORTUA_PORTUA0 (0x1)
390 #define MCF_GPIO_PORTUA_PORTUA1 (0x2)
391 #define MCF_GPIO_PORTUA_PORTUA2 (0x4)
392 #define MCF_GPIO_PORTUA_PORTUA3 (0x8)
394 /* Bit definitions and macros for MCF_GPIO_DDRUA */
395 #define MCF_GPIO_DDRUA_DDRUA0 (0x1)
396 #define MCF_GPIO_DDRUA_DDRUA1 (0x2)
397 #define MCF_GPIO_DDRUA_DDRUA2 (0x4)
398 #define MCF_GPIO_DDRUA_DDRUA3 (0x8)
400 /* Bit definitions and macros for MCF_GPIO_SETUA */
401 #define MCF_GPIO_SETUA_SETUA0 (0x1)
402 #define MCF_GPIO_SETUA_SETUA1 (0x2)
403 #define MCF_GPIO_SETUA_SETUA2 (0x4)
404 #define MCF_GPIO_SETUA_SETUA3 (0x8)
406 /* Bit definitions and macros for MCF_GPIO_CLRUA */
407 #define MCF_GPIO_CLRUA_CLRUA0 (0x1)
408 #define MCF_GPIO_CLRUA_CLRUA1 (0x2)
409 #define MCF_GPIO_CLRUA_CLRUA2 (0x4)
410 #define MCF_GPIO_CLRUA_CLRUA3 (0x8)
412 /* Bit definitions and macros for MCF_GPIO_PUAPAR */
413 #define MCF_GPIO_PUAPAR_PUAPAR0(x) (((x)&0x3)<<0)
414 #define MCF_GPIO_PUAPAR_UTXD0_GPIO (0)
415 #define MCF_GPIO_PUAPAR_UTXD0_UTXD0 (0x1)
416 #define MCF_GPIO_PUAPAR_UTXD0_USB_SUSPEND (0x3)
417 #define MCF_GPIO_PUAPAR_PUAPAR1(x) (((x)&0x3)<<0x2)
418 #define MCF_GPIO_PUAPAR_URXD0_GPIO (0)
419 #define MCF_GPIO_PUAPAR_URXD0_URXD0 (0x4)
420 #define MCF_GPIO_PUAPAR_URXD0_USB_RCV (0xC)
421 #define MCF_GPIO_PUAPAR_PUAPAR2(x) (((x)&0x3)<<0x4)
422 #define MCF_GPIO_PUAPAR_URTS0_GPIO (0)
423 #define MCF_GPIO_PUAPAR_URTS0_URTS0 (0x10)
424 #define MCF_GPIO_PUAPAR_URTS0_USB_VBUSD (0x30)
425 #define MCF_GPIO_PUAPAR_PUAPAR3(x) (((x)&0x3)<<0x6)
426 #define MCF_GPIO_PUAPAR_UCTS0_GPIO (0)
427 #define MCF_GPIO_PUAPAR_UCTS0_UCTS0 (0x40)
428 #define MCF_GPIO_PUAPAR_UCTS0_USB_VBUSE (0xC0)
430 /* Bit definitions and macros for MCF_GPIO_PORTUB */
431 #define MCF_GPIO_PORTUB_PORTUB0 (0x1)
432 #define MCF_GPIO_PORTUB_PORTUB1 (0x2)
433 #define MCF_GPIO_PORTUB_PORTUB2 (0x4)
434 #define MCF_GPIO_PORTUB_PORTUB3 (0x8)
436 /* Bit definitions and macros for MCF_GPIO_DDRUB */
437 #define MCF_GPIO_DDRUB_DDRUB0 (0x1)
438 #define MCF_GPIO_DDRUB_DDRUB1 (0x2)
439 #define MCF_GPIO_DDRUB_DDRUB2 (0x4)
440 #define MCF_GPIO_DDRUB_DDRUB3 (0x8)
442 /* Bit definitions and macros for MCF_GPIO_SETUB */
443 #define MCF_GPIO_SETUB_SETUB0 (0x1)
444 #define MCF_GPIO_SETUB_SETUB1 (0x2)
445 #define MCF_GPIO_SETUB_SETUB2 (0x4)
446 #define MCF_GPIO_SETUB_SETUB3 (0x8)
448 /* Bit definitions and macros for MCF_GPIO_CLRUB */
449 #define MCF_GPIO_CLRUB_CLRUB0 (0x1)
450 #define MCF_GPIO_CLRUB_CLRUB1 (0x2)
451 #define MCF_GPIO_CLRUB_CLRUB2 (0x4)
452 #define MCF_GPIO_CLRUB_CLRUB3 (0x8)
454 /* Bit definitions and macros for MCF_GPIO_PUBPAR */
455 #define MCF_GPIO_PUBPAR_PUBPAR0(x) (((x)&0x3)<<0)
456 #define MCF_GPIO_PUBPAR_UTXD1_GPIO (0)
457 #define MCF_GPIO_PUBPAR_UTXD1_UTXD1 (0x1)
458 #define MCF_GPIO_PUBPAR_UTXD1_USB_SPEED (0x3)
459 #define MCF_GPIO_PUBPAR_PUBPAR1(x) (((x)&0x3)<<0x2)
460 #define MCF_GPIO_PUBPAR_URXD1_GPIO (0)
461 #define MCF_GPIO_PUBPAR_URXD1_URXD1 (0x4)
462 #define MCF_GPIO_PUBPAR_URXD1_USB_OE (0xC)
463 #define MCF_GPIO_PUBPAR_PUBPAR2(x) (((x)&0x3)<<0x4)
464 #define MCF_GPIO_PUBPAR_URTS1_GPIO (0)
465 #define MCF_GPIO_PUBPAR_URTS1_URTS1 (0x10)
466 #define MCF_GPIO_PUBPAR_URTS1_SYNCB (0x20)
467 #define MCF_GPIO_PUBPAR_URTS1_UTXD2 (0x30)
468 #define MCF_GPIO_PUBPAR_PUBPAR3(x) (((x)&0x3)<<0x6)
469 #define MCF_GPIO_PUBPAR_UCTS1_GPIO (0)
470 #define MCF_GPIO_PUBPAR_UCTS1_UCTS1 (0x40)
471 #define MCF_GPIO_PUBPAR_UCTS1_SYNCA (0x80)
472 #define MCF_GPIO_PUBPAR_UCTS1_URXD2 (0xC0)
475 #endif /* __MCF52221_GPIO_H__ */