~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/u-boot/arch/m68k/include/asm/m5329.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * mcf5329.h -- Definitions for Freescale Coldfire 5329
 
3
 *
 
4
 * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
 
5
 * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
 
6
 *
 
7
 * SPDX-License-Identifier:     GPL-2.0+
 
8
 */
 
9
 
 
10
#ifndef mcf5329_h
 
11
#define mcf5329_h
 
12
/****************************************************************************/
 
13
 
 
14
/*********************************************************************
 
15
* System Control Module (SCM)
 
16
*********************************************************************/
 
17
/* Bit definitions and macros for SCM_MPR */
 
18
#define SCM_MPR_MPROT0(x)               (((x)&0x0F)<<28)
 
19
#define SCM_MPR_MPROT1(x)               (((x)&0x0F)<<24)
 
20
#define SCM_MPR_MPROT2(x)               (((x)&0x0F)<<20)
 
21
#define SCM_MPR_MPROT4(x)               (((x)&0x0F)<<12)
 
22
#define SCM_MPR_MPROT5(x)               (((x)&0x0F)<<8)
 
23
#define SCM_MPR_MPROT6(x)               (((x)&0x0F)<<4)
 
24
#define MPROT_MTR                       4
 
25
#define MPROT_MTW                       2
 
26
#define MPROT_MPL                       1
 
27
 
 
28
/* Bit definitions and macros for SCM_BMT */
 
29
#define BMT_BME                         (0x08)
 
30
#define BMT_8                           (0x07)
 
31
#define BMT_16                          (0x06)
 
32
#define BMT_32                          (0x05)
 
33
#define BMT_64                          (0x04)
 
34
#define BMT_128                         (0x03)
 
35
#define BMT_256                         (0x02)
 
36
#define BMT_512                         (0x01)
 
37
#define BMT_1024                        (0x00)
 
38
 
 
39
/* Bit definitions and macros for SCM_PACRA */
 
40
#define SCM_PACRA_PACR0(x)              (((x)&0x0F)<<28)
 
41
#define SCM_PACRA_PACR1(x)              (((x)&0x0F)<<24)
 
42
#define SCM_PACRA_PACR2(x)              (((x)&0x0F)<<20)
 
43
#define PACR_SP 4
 
44
#define PACR_WP 2
 
45
#define PACR_TP 1
 
46
 
 
47
/* Bit definitions and macros for SCM_PACRB */
 
48
#define SCM_PACRB_PACR8(x)              (((x)&0x0F)<<28)
 
49
#define SCM_PACRB_PACR12(x)             (((x)&0x0F)<<12)
 
50
 
 
51
/* Bit definitions and macros for SCM_PACRC */
 
52
#define SCM_PACRC_PACR16(x)             (((x)&0x0F)<<28)
 
53
#define SCM_PACRC_PACR17(x)             (((x)&0x0F)<<24)
 
54
#define SCM_PACRC_PACR18(x)             (((x)&0x0F)<<20)
 
55
#define SCM_PACRC_PACR19(x)             (((x)&0x0F)<<16)
 
56
#define SCM_PACRC_PACR21(x)             (((x)&0x0F)<<8)
 
57
#define SCM_PACRC_PACR22(x)             (((x)&0x0F)<<4)
 
58
#define SCM_PACRC_PACR23(x)             (((x)&0x0F)<<0)
 
59
 
 
60
/* Bit definitions and macros for SCM_PACRD */
 
61
#define SCM_PACRD_PACR24(x)             (((x)&0x0F)<<28)
 
62
#define SCM_PACRD_PACR25(x)             (((x)&0x0F)<<24)
 
63
#define SCM_PACRD_PACR26(x)             (((x)&0x0F)<<20)
 
64
#define SCM_PACRD_PACR28(x)             (((x)&0x0F)<<12)
 
65
#define SCM_PACRD_PACR29(x)             (((x)&0x0F)<<8)
 
66
#define SCM_PACRD_PACR30(x)             (((x)&0x0F)<<4)
 
67
#define SCM_PACRD_PACR31(x)             (((x)&0x0F)<<0)
 
68
 
 
69
/* Bit definitions and macros for SCM_PACRE */
 
70
#define SCM_PACRE_PACR32(x)             (((x)&0x0F)<<28)
 
71
#define SCM_PACRE_PACR33(x)             (((x)&0x0F)<<24)
 
72
#define SCM_PACRE_PACR34(x)             (((x)&0x0F)<<20)
 
73
#define SCM_PACRE_PACR35(x)             (((x)&0x0F)<<16)
 
74
#define SCM_PACRE_PACR36(x)             (((x)&0x0F)<<12)
 
75
#define SCM_PACRE_PACR37(x)             (((x)&0x0F)<<8)
 
76
#define SCM_PACRE_PACR38(x)             (((x)&0x0F)<<4)
 
77
 
 
78
/* Bit definitions and macros for SCM_PACRF */
 
79
#define SCM_PACRF_PACR40(x)             (((x)&0x0F)<<28)
 
80
#define SCM_PACRF_PACR41(x)             (((x)&0x0F)<<24)
 
81
#define SCM_PACRF_PACR42(x)             (((x)&0x0F)<<20)
 
82
#define SCM_PACRF_PACR43(x)             (((x)&0x0F)<<16)
 
83
#define SCM_PACRF_PACR44(x)             (((x)&0x0F)<<12)
 
84
#define SCM_PACRF_PACR45(x)             (((x)&0x0F)<<8)
 
85
#define SCM_PACRF_PACR46(x)             (((x)&0x0F)<<4)
 
86
#define SCM_PACRF_PACR47(x)             (((x)&0x0F)<<0)
 
87
 
 
88
/* Bit definitions and macros for SCM_PACRG */
 
89
#define SCM_PACRG_PACR48(x)             (((x)&0x0F)<<28)
 
90
 
 
91
/* Bit definitions and macros for SCM_PACRH */
 
92
#define SCM_PACRH_PACR56(x)             (((x)&0x0F)<<28)
 
93
#define SCM_PACRH_PACR57(x)             (((x)&0x0F)<<24)
 
94
#define SCM_PACRH_PACR58(x)             (((x)&0x0F)<<20)
 
95
 
 
96
/* PACRn Assignments */
 
97
#define PACR0(x)                        SCM_PACRA_PACR0(x)
 
98
#define PACR1(x)                        SCM_PACRA_PACR1(x)
 
99
#define PACR2(x)                        SCM_PACRA_PACR2(x)
 
100
#define PACR8(x)                        SCM_PACRB_PACR8(x)
 
101
#define PACR12(x)                       SCM_PACRB_PACR12(x)
 
102
#define PACR16(x)                       SCM_PACRC_PACR16(x)
 
103
#define PACR17(x)                       SCM_PACRC_PACR17(x)
 
104
#define PACR18(x)                       SCM_PACRC_PACR18(x)
 
105
#define PACR19(x)                       SCM_PACRC_PACR19(x)
 
106
#define PACR21(x)                       SCM_PACRC_PACR21(x)
 
107
#define PACR22(x)                       SCM_PACRC_PACR22(x)
 
108
#define PACR23(x)                       SCM_PACRC_PACR23(x)
 
109
#define PACR24(x)                       SCM_PACRD_PACR24(x)
 
110
#define PACR25(x)                       SCM_PACRD_PACR25(x)
 
111
#define PACR26(x)                       SCM_PACRD_PACR26(x)
 
112
#define PACR28(x)                       SCM_PACRD_PACR28(x)
 
113
#define PACR29(x)                       SCM_PACRD_PACR29(x)
 
114
#define PACR30(x)                       SCM_PACRD_PACR30(x)
 
115
#define PACR31(x)                       SCM_PACRD_PACR31(x)
 
116
#define PACR32(x)                       SCM_PACRE_PACR32(x)
 
117
#define PACR33(x)                       SCM_PACRE_PACR33(x)
 
118
#define PACR34(x)                       SCM_PACRE_PACR34(x)
 
119
#define PACR35(x)                       SCM_PACRE_PACR35(x)
 
120
#define PACR36(x)                       SCM_PACRE_PACR36(x)
 
121
#define PACR37(x)                       SCM_PACRE_PACR37(x)
 
122
#define PACR38(x)                       SCM_PACRE_PACR38(x)
 
123
#define PACR40(x)                       SCM_PACRF_PACR40(x)
 
124
#define PACR41(x)                       SCM_PACRF_PACR41(x)
 
125
#define PACR42(x)                       SCM_PACRF_PACR42(x)
 
126
#define PACR43(x)                       SCM_PACRF_PACR43(x)
 
127
#define PACR44(x)                       SCM_PACRF_PACR44(x)
 
128
#define PACR45(x)                       SCM_PACRF_PACR45(x)
 
129
#define PACR46(x)                       SCM_PACRF_PACR46(x)
 
130
#define PACR47(x)                       SCM_PACRF_PACR47(x)
 
131
#define PACR48(x)                       SCM_PACRG_PACR48(x)
 
132
#define PACR56(x)                       SCM_PACRH_PACR56(x)
 
133
#define PACR57(x)                       SCM_PACRH_PACR57(x)
 
134
#define PACR58(x)                       SCM_PACRH_PACR58(x)
 
135
 
 
136
/* Bit definitions and macros for SCM_CWCR */
 
137
#define CWCR_RO                         (0x8000)
 
138
#define CWCR_CWR_WH                     (0x0100)
 
139
#define CWCR_CWE                        (0x0080)
 
140
#define CWRI_WINDOW                     (0x0060)
 
141
#define CWRI_RESET                      (0x0040)
 
142
#define CWRI_INT_RESET                  (0x0020)
 
143
#define CWRI_INT                        (0x0000)
 
144
#define CWCR_CWT(x)                     (((x)&0x001F))
 
145
 
 
146
/* Bit definitions and macros for SCM_ISR */
 
147
#define SCMISR_CFEI                     (0x02)
 
148
#define SCMISR_CWIC                     (0x01)
 
149
 
 
150
/* Bit definitions and macros for SCM_BCR */
 
151
#define BCR_GBR                         (0x00000200)
 
152
#define BCR_GBW                         (0x00000100)
 
153
#define BCR_S7                          (0x00000080)
 
154
#define BCR_S6                          (0x00000040)
 
155
#define BCR_S4                          (0x00000010)
 
156
#define BCR_S1                          (0x00000002)
 
157
 
 
158
/* Bit definitions and macros for SCM_CFIER */
 
159
#define CFIER_ECFEI                     (0x01)
 
160
 
 
161
/* Bit definitions and macros for SCM_CFLOC */
 
162
#define CFLOC_LOC                       (0x80)
 
163
 
 
164
/* Bit definitions and macros for SCM_CFATR */
 
165
#define CFATR_WRITE                     (0x80)
 
166
#define CFATR_SZ32                      (0x20)
 
167
#define CFATR_SZ16                      (0x10)
 
168
#define CFATR_SZ08                      (0x00)
 
169
#define CFATR_CACHE                     (0x08)
 
170
#define CFATR_MODE                      (0x02)
 
171
#define CFATR_TYPE                      (0x01)
 
172
 
 
173
/*********************************************************************
 
174
* Reset Controller Module (RCM)
 
175
*********************************************************************/
 
176
 
 
177
/* Bit definitions and macros for RCR */
 
178
#define RCM_RCR_FRCRSTOUT               (0x40)
 
179
#define RCM_RCR_SOFTRST                 (0x80)
 
180
 
 
181
/* Bit definitions and macros for RSR */
 
182
#define RCM_RSR_LOL                     (0x01)
 
183
#define RCM_RSR_WDR_CORE                (0x02)
 
184
#define RCM_RSR_EXT                     (0x04)
 
185
#define RCM_RSR_POR                     (0x08)
 
186
#define RCM_RSR_SOFT                    (0x20)
 
187
 
 
188
/*********************************************************************
 
189
* Interrupt Controller (INTC)
 
190
*********************************************************************/
 
191
#define INTC0_EPORT                     INTC_IPRL_INT1
 
192
 
 
193
#define INT0_LO_RSVD0                   (0)
 
194
#define INT0_LO_EPORT1                  (1)
 
195
#define INT0_LO_EPORT2                  (2)
 
196
#define INT0_LO_EPORT3                  (3)
 
197
#define INT0_LO_EPORT4                  (4)
 
198
#define INT0_LO_EPORT5                  (5)
 
199
#define INT0_LO_EPORT6                  (6)
 
200
#define INT0_LO_EPORT7                  (7)
 
201
#define INT0_LO_EDMA_00                 (8)
 
202
#define INT0_LO_EDMA_01                 (9)
 
203
#define INT0_LO_EDMA_02                 (10)
 
204
#define INT0_LO_EDMA_03                 (11)
 
205
#define INT0_LO_EDMA_04                 (12)
 
206
#define INT0_LO_EDMA_05                 (13)
 
207
#define INT0_LO_EDMA_06                 (14)
 
208
#define INT0_LO_EDMA_07                 (15)
 
209
#define INT0_LO_EDMA_08                 (16)
 
210
#define INT0_LO_EDMA_09                 (17)
 
211
#define INT0_LO_EDMA_10                 (18)
 
212
#define INT0_LO_EDMA_11                 (19)
 
213
#define INT0_LO_EDMA_12                 (20)
 
214
#define INT0_LO_EDMA_13                 (21)
 
215
#define INT0_LO_EDMA_14                 (22)
 
216
#define INT0_LO_EDMA_15                 (23)
 
217
#define INT0_LO_EDMA_ERR                (24)
 
218
#define INT0_LO_SCM                     (25)
 
219
#define INT0_LO_UART0                   (26)
 
220
#define INT0_LO_UART1                   (27)
 
221
#define INT0_LO_UART2                   (28)
 
222
#define INT0_LO_RSVD1                   (29)
 
223
#define INT0_LO_I2C                     (30)
 
224
#define INT0_LO_QSPI                    (31)
 
225
#define INT0_HI_DTMR0                   (32)
 
226
#define INT0_HI_DTMR1                   (33)
 
227
#define INT0_HI_DTMR2                   (34)
 
228
#define INT0_HI_DTMR3                   (35)
 
229
#define INT0_HI_FEC_TXF                 (36)
 
230
#define INT0_HI_FEC_TXB                 (37)
 
231
#define INT0_HI_FEC_UN                  (38)
 
232
#define INT0_HI_FEC_RL                  (39)
 
233
#define INT0_HI_FEC_RXF                 (40)
 
234
#define INT0_HI_FEC_RXB                 (41)
 
235
#define INT0_HI_FEC_MII                 (42)
 
236
#define INT0_HI_FEC_LC                  (43)
 
237
#define INT0_HI_FEC_HBERR               (44)
 
238
#define INT0_HI_FEC_GRA                 (45)
 
239
#define INT0_HI_FEC_EBERR               (46)
 
240
#define INT0_HI_FEC_BABT                (47)
 
241
#define INT0_HI_FEC_BABR                (48)
 
242
/* 49 - 61 Reserved */
 
243
#define INT0_HI_SCM                     (62)
 
244
 
 
245
/*********************************************************************
 
246
* Watchdog Timer Modules (WTM)
 
247
*********************************************************************/
 
248
/* Bit definitions and macros for WTM_WCR */
 
249
#define WTM_WCR_WAIT                    (0x0008)
 
250
#define WTM_WCR_DOZE                    (0x0004)
 
251
#define WTM_WCR_HALTED                  (0x0002)
 
252
#define WTM_WCR_EN                      (0x0001)
 
253
 
 
254
/*********************************************************************
 
255
* Chip Configuration Module (CCM)
 
256
*********************************************************************/
 
257
/* Bit definitions and macros for CCM_CCR */
 
258
#define CCM_CCR_CSC(x)                  (((x)&0x0003)<<8|0x0001)
 
259
#define CCM_CCR_LIMP                    (0x0041)
 
260
#define CCM_CCR_LOAD                    (0x0021)
 
261
#define CCM_CCR_BOOTPS(x)               (((x)&0x0003)<<3|0x0001)
 
262
#define CCM_CCR_OSC_MODE                (0x0005)
 
263
#define CCM_CCR_PLL_MODE                (0x0003)
 
264
#define CCM_CCR_RESERVED                (0x0001)
 
265
 
 
266
/* Bit definitions and macros for CCM_RCON */
 
267
#define CCM_RCON_CSC(x)                 (((x)&0x0003)<<8|0x0001)
 
268
#define CCM_RCON_LIMP                   (0x0041)
 
269
#define CCM_RCON_LOAD                   (0x0021)
 
270
#define CCM_RCON_BOOTPS(x)              (((x)&0x0003)<<3|0x0001)
 
271
#define CCM_RCON_OSC_MODE               (0x0005)
 
272
#define CCM_RCON_PLL_MODE               (0x0003)
 
273
#define CCM_RCON_RESERVED               (0x0001)
 
274
 
 
275
/* Bit definitions and macros for CCM_CIR */
 
276
#define CCM_CIR_PIN(x)                  (((x)&0x03FF)<<6)
 
277
#define CCM_CIR_PRN(x)                  ((x)&0x003F)
 
278
 
 
279
/* Bit definitions and macros for CCM_MISCCR */
 
280
#define CCM_MISCCR_PLL_LOCK             (0x2000)
 
281
#define CCM_MISCCR_LIMP                 (0x1000)
 
282
#define CCM_MISCCR_LCD_CHEN             (0x0100)
 
283
#define CCM_MISCCR_SSI_PUE              (0x0080)
 
284
#define CCM_MISCCR_SSI_PUS              (0x0040)
 
285
#define CCM_MISCCR_TIM_DMA              (0x0020)
 
286
#define CCM_MISCCR_SSI_SRC              (0x0010)
 
287
#define CCM_MISCCR_USBDIV               (0x0002)
 
288
#define CCM_MISCCR_USBSRC               (0x0001)
 
289
 
 
290
/* Bit definitions and macros for CCM_CDR */
 
291
#define CCM_CDR_LPDIV(x)                (((x)&0x000F)<<8)
 
292
#define CCM_CDR_SSIDIV(x)               ((x)&0x000F)
 
293
 
 
294
/* Bit definitions and macros for CCM_UHCSR */
 
295
#define CCM_UHCSR_PORTIND(x)            (((x)&0x0003)<<14)
 
296
#define CCM_UHCSR_WKUP                  (0x0004)
 
297
#define CCM_UHCSR_UHMIE                 (0x0002)
 
298
#define CCM_UHCSR_XPDE                  (0x0001)
 
299
 
 
300
/* Bit definitions and macros for CCM_UOCSR */
 
301
#define CCM_UOCSR_PORTIND(x)            (((x)&0x0003)<<14)
 
302
#define CCM_UOCSR_DPPD                  (0x2000)
 
303
#define CCM_UOCSR_DMPD                  (0x1000)
 
304
#define CCM_UOCSR_DRV_VBUS              (0x0800)
 
305
#define CCM_UOCSR_CRG_VBUS              (0x0400)
 
306
#define CCM_UOCSR_DCR_VBUS              (0x0200)
 
307
#define CCM_UOCSR_DPPU                  (0x0100)
 
308
#define CCM_UOCSR_AVLD                  (0x0080)
 
309
#define CCM_UOCSR_BVLD                  (0x0040)
 
310
#define CCM_UOCSR_VVLD                  (0x0020)
 
311
#define CCM_UOCSR_SEND                  (0x0010)
 
312
#define CCM_UOCSR_PWRFLT                (0x0008)
 
313
#define CCM_UOCSR_WKUP                  (0x0004)
 
314
#define CCM_UOCSR_UOMIE                 (0x0002)
 
315
#define CCM_UOCSR_XPDE                  (0x0001)
 
316
 
 
317
/* not done yet */
 
318
/*********************************************************************
 
319
* General Purpose I/O (GPIO)
 
320
*********************************************************************/
 
321
/* Bit definitions and macros for GPIO_PODR_FECH_L */
 
322
#define GPIO_PODR_FECH_L7               (0x80)
 
323
#define GPIO_PODR_FECH_L6               (0x40)
 
324
#define GPIO_PODR_FECH_L5               (0x20)
 
325
#define GPIO_PODR_FECH_L4               (0x10)
 
326
#define GPIO_PODR_FECH_L3               (0x08)
 
327
#define GPIO_PODR_FECH_L2               (0x04)
 
328
#define GPIO_PODR_FECH_L1               (0x02)
 
329
#define GPIO_PODR_FECH_L0               (0x01)
 
330
 
 
331
/* Bit definitions and macros for GPIO_PODR_SSI */
 
332
#define GPIO_PODR_SSI_4                 (0x10)
 
333
#define GPIO_PODR_SSI_3                 (0x08)
 
334
#define GPIO_PODR_SSI_2                 (0x04)
 
335
#define GPIO_PODR_SSI_1                 (0x02)
 
336
#define GPIO_PODR_SSI_0                 (0x01)
 
337
 
 
338
/* Bit definitions and macros for GPIO_PODR_BUSCTL */
 
339
#define GPIO_PODR_BUSCTL_3              (0x08)
 
340
#define GPIO_PODR_BUSCTL_2              (0x04)
 
341
#define GPIO_PODR_BUSCTL_1              (0x02)
 
342
#define GPIO_PODR_BUSCTL_0              (0x01)
 
343
 
 
344
/* Bit definitions and macros for GPIO_PODR_BE */
 
345
#define GPIO_PODR_BE_3                  (0x08)
 
346
#define GPIO_PODR_BE_2                  (0x04)
 
347
#define GPIO_PODR_BE_1                  (0x02)
 
348
#define GPIO_PODR_BE_0                  (0x01)
 
349
 
 
350
/* Bit definitions and macros for GPIO_PODR_CS */
 
351
#define GPIO_PODR_CS_5                  (0x20)
 
352
#define GPIO_PODR_CS_4                  (0x10)
 
353
#define GPIO_PODR_CS_3                  (0x08)
 
354
#define GPIO_PODR_CS_2                  (0x04)
 
355
#define GPIO_PODR_CS_1                  (0x02)
 
356
 
 
357
/* Bit definitions and macros for GPIO_PODR_PWM */
 
358
#define GPIO_PODR_PWM_5                 (0x20)
 
359
#define GPIO_PODR_PWM_4                 (0x10)
 
360
#define GPIO_PODR_PWM_3                 (0x08)
 
361
#define GPIO_PODR_PWM_2                 (0x04)
 
362
 
 
363
/* Bit definitions and macros for GPIO_PODR_FECI2C */
 
364
#define GPIO_PODR_FECI2C_3              (0x08)
 
365
#define GPIO_PODR_FECI2C_2              (0x04)
 
366
#define GPIO_PODR_FECI2C_1              (0x02)
 
367
#define GPIO_PODR_FECI2C_0              (0x01)
 
368
 
 
369
/* Bit definitions and macros for GPIO_PODR_UART */
 
370
#define GPIO_PODR_UART_7                (0x80)
 
371
#define GPIO_PODR_UART_6                (0x40)
 
372
#define GPIO_PODR_UART_5                (0x20)
 
373
#define GPIO_PODR_UART_4                (0x10)
 
374
#define GPIO_PODR_UART_3                (0x08)
 
375
#define GPIO_PODR_UART_2                (0x04)
 
376
#define GPIO_PODR_UART_1                (0x02)
 
377
#define GPIO_PODR_UART_0                (0x01)
 
378
 
 
379
/* Bit definitions and macros for GPIO_PODR_QSPI */
 
380
#define GPIO_PODR_QSPI_5                (0x20)
 
381
#define GPIO_PODR_QSPI_4                (0x10)
 
382
#define GPIO_PODR_QSPI_3                (0x08)
 
383
#define GPIO_PODR_QSPI_2                (0x04)
 
384
#define GPIO_PODR_QSPI_1                (0x02)
 
385
#define GPIO_PODR_QSPI_0                (0x01)
 
386
 
 
387
/* Bit definitions and macros for GPIO_PODR_TIMER */
 
388
#define GPIO_PODR_TIMER_3               (0x08)
 
389
#define GPIO_PODR_TIMER_2               (0x04)
 
390
#define GPIO_PODR_TIMER_1               (0x02)
 
391
#define GPIO_PODR_TIMER_0               (0x01)
 
392
 
 
393
/* Bit definitions and macros for GPIO_PODR_LCDDATAH */
 
394
#define GPIO_PODR_LCDDATAH_1            (0x02)
 
395
#define GPIO_PODR_LCDDATAH_0            (0x01)
 
396
 
 
397
/* Bit definitions and macros for GPIO_PODR_LCDDATAM */
 
398
#define GPIO_PODR_LCDDATAM_7            (0x80)
 
399
#define GPIO_PODR_LCDDATAM_6            (0x40)
 
400
#define GPIO_PODR_LCDDATAM_5            (0x20)
 
401
#define GPIO_PODR_LCDDATAM_4            (0x10)
 
402
#define GPIO_PODR_LCDDATAM_3            (0x08)
 
403
#define GPIO_PODR_LCDDATAM_2            (0x04)
 
404
#define GPIO_PODR_LCDDATAM_1            (0x02)
 
405
#define GPIO_PODR_LCDDATAM_0            (0x01)
 
406
 
 
407
/* Bit definitions and macros for GPIO_PODR_LCDDATAL */
 
408
#define GPIO_PODR_LCDDATAL_7            (0x80)
 
409
#define GPIO_PODR_LCDDATAL_6            (0x40)
 
410
#define GPIO_PODR_LCDDATAL_5            (0x20)
 
411
#define GPIO_PODR_LCDDATAL_4            (0x10)
 
412
#define GPIO_PODR_LCDDATAL_3            (0x08)
 
413
#define GPIO_PODR_LCDDATAL_2            (0x04)
 
414
#define GPIO_PODR_LCDDATAL_1            (0x02)
 
415
#define GPIO_PODR_LCDDATAL_0            (0x01)
 
416
 
 
417
/* Bit definitions and macros for GPIO_PODR_LCDCTLH */
 
418
#define GPIO_PODR_LCDCTLH_0             (0x01)
 
419
 
 
420
/* Bit definitions and macros for GPIO_PODR_LCDCTLL */
 
421
#define GPIO_PODR_LCDCTLL_7             (0x80)
 
422
#define GPIO_PODR_LCDCTLL_6             (0x40)
 
423
#define GPIO_PODR_LCDCTLL_5             (0x20)
 
424
#define GPIO_PODR_LCDCTLL_4             (0x10)
 
425
#define GPIO_PODR_LCDCTLL_3             (0x08)
 
426
#define GPIO_PODR_LCDCTLL_2             (0x04)
 
427
#define GPIO_PODR_LCDCTLL_1             (0x02)
 
428
#define GPIO_PODR_LCDCTLL_0             (0x01)
 
429
 
 
430
/* Bit definitions and macros for GPIO_PDDR_FECH */
 
431
#define GPIO_PDDR_FECH_L7               (0x80)
 
432
#define GPIO_PDDR_FECH_L6               (0x40)
 
433
#define GPIO_PDDR_FECH_L5               (0x20)
 
434
#define GPIO_PDDR_FECH_L4               (0x10)
 
435
#define GPIO_PDDR_FECH_L3               (0x08)
 
436
#define GPIO_PDDR_FECH_L2               (0x04)
 
437
#define GPIO_PDDR_FECH_L1               (0x02)
 
438
#define GPIO_PDDR_FECH_L0               (0x01)
 
439
 
 
440
/* Bit definitions and macros for GPIO_PDDR_SSI */
 
441
#define GPIO_PDDR_SSI_4                 (0x10)
 
442
#define GPIO_PDDR_SSI_3                 (0x08)
 
443
#define GPIO_PDDR_SSI_2                 (0x04)
 
444
#define GPIO_PDDR_SSI_1                 (0x02)
 
445
#define GPIO_PDDR_SSI_0                 (0x01)
 
446
 
 
447
/* Bit definitions and macros for GPIO_PDDR_BUSCTL */
 
448
#define GPIO_PDDR_BUSCTL_3              (0x08)
 
449
#define GPIO_PDDR_BUSCTL_2              (0x04)
 
450
#define GPIO_PDDR_BUSCTL_1              (0x02)
 
451
#define GPIO_PDDR_BUSCTL_0              (0x01)
 
452
 
 
453
/* Bit definitions and macros for GPIO_PDDR_BE */
 
454
#define GPIO_PDDR_BE_3                  (0x08)
 
455
#define GPIO_PDDR_BE_2                  (0x04)
 
456
#define GPIO_PDDR_BE_1                  (0x02)
 
457
#define GPIO_PDDR_BE_0                  (0x01)
 
458
 
 
459
/* Bit definitions and macros for GPIO_PDDR_CS */
 
460
#define GPIO_PDDR_CS_1                  (0x02)
 
461
#define GPIO_PDDR_CS_2                  (0x04)
 
462
#define GPIO_PDDR_CS_3                  (0x08)
 
463
#define GPIO_PDDR_CS_4                  (0x10)
 
464
#define GPIO_PDDR_CS_5                  (0x20)
 
465
 
 
466
/* Bit definitions and macros for GPIO_PDDR_PWM */
 
467
#define GPIO_PDDR_PWM_2                 (0x04)
 
468
#define GPIO_PDDR_PWM_3                 (0x08)
 
469
#define GPIO_PDDR_PWM_4                 (0x10)
 
470
#define GPIO_PDDR_PWM_5                 (0x20)
 
471
 
 
472
/* Bit definitions and macros for GPIO_PDDR_FECI2C */
 
473
#define GPIO_PDDR_FECI2C_0              (0x01)
 
474
#define GPIO_PDDR_FECI2C_1              (0x02)
 
475
#define GPIO_PDDR_FECI2C_2              (0x04)
 
476
#define GPIO_PDDR_FECI2C_3              (0x08)
 
477
 
 
478
/* Bit definitions and macros for GPIO_PDDR_UART */
 
479
#define GPIO_PDDR_UART_0                (0x01)
 
480
#define GPIO_PDDR_UART_1                (0x02)
 
481
#define GPIO_PDDR_UART_2                (0x04)
 
482
#define GPIO_PDDR_UART_3                (0x08)
 
483
#define GPIO_PDDR_UART_4                (0x10)
 
484
#define GPIO_PDDR_UART_5                (0x20)
 
485
#define GPIO_PDDR_UART_6                (0x40)
 
486
#define GPIO_PDDR_UART_7                (0x80)
 
487
 
 
488
/* Bit definitions and macros for GPIO_PDDR_QSPI */
 
489
#define GPIO_PDDR_QSPI_0                (0x01)
 
490
#define GPIO_PDDR_QSPI_1                (0x02)
 
491
#define GPIO_PDDR_QSPI_2                (0x04)
 
492
#define GPIO_PDDR_QSPI_3                (0x08)
 
493
#define GPIO_PDDR_QSPI_4                (0x10)
 
494
#define GPIO_PDDR_QSPI_5                (0x20)
 
495
 
 
496
/* Bit definitions and macros for GPIO_PDDR_TIMER */
 
497
#define GPIO_PDDR_TIMER_0               (0x01)
 
498
#define GPIO_PDDR_TIMER_1               (0x02)
 
499
#define GPIO_PDDR_TIMER_2               (0x04)
 
500
#define GPIO_PDDR_TIMER_3               (0x08)
 
501
 
 
502
/* Bit definitions and macros for GPIO_PDDR_LCDDATAH */
 
503
#define GPIO_PDDR_LCDDATAH_0            (0x01)
 
504
#define GPIO_PDDR_LCDDATAH_1            (0x02)
 
505
 
 
506
/* Bit definitions and macros for GPIO_PDDR_LCDDATAM */
 
507
#define GPIO_PDDR_LCDDATAM_0            (0x01)
 
508
#define GPIO_PDDR_LCDDATAM_1            (0x02)
 
509
#define GPIO_PDDR_LCDDATAM_2            (0x04)
 
510
#define GPIO_PDDR_LCDDATAM_3            (0x08)
 
511
#define GPIO_PDDR_LCDDATAM_4            (0x10)
 
512
#define GPIO_PDDR_LCDDATAM_5            (0x20)
 
513
#define GPIO_PDDR_LCDDATAM_6            (0x40)
 
514
#define GPIO_PDDR_LCDDATAM_7            (0x80)
 
515
 
 
516
/* Bit definitions and macros for GPIO_PDDR_LCDDATAL */
 
517
#define GPIO_PDDR_LCDDATAL_0            (0x01)
 
518
#define GPIO_PDDR_LCDDATAL_1            (0x02)
 
519
#define GPIO_PDDR_LCDDATAL_2            (0x04)
 
520
#define GPIO_PDDR_LCDDATAL_3            (0x08)
 
521
#define GPIO_PDDR_LCDDATAL_4            (0x10)
 
522
#define GPIO_PDDR_LCDDATAL_5            (0x20)
 
523
#define GPIO_PDDR_LCDDATAL_6            (0x40)
 
524
#define GPIO_PDDR_LCDDATAL_7            (0x80)
 
525
 
 
526
/* Bit definitions and macros for GPIO_PDDR_LCDCTLH */
 
527
#define GPIO_PDDR_LCDCTLH_0             (0x01)
 
528
 
 
529
/* Bit definitions and macros for GPIO_PDDR_LCDCTLL */
 
530
#define GPIO_PDDR_LCDCTLL_0             (0x01)
 
531
#define GPIO_PDDR_LCDCTLL_1             (0x02)
 
532
#define GPIO_PDDR_LCDCTLL_2             (0x04)
 
533
#define GPIO_PDDR_LCDCTLL_3             (0x08)
 
534
#define GPIO_PDDR_LCDCTLL_4             (0x10)
 
535
#define GPIO_PDDR_LCDCTLL_5             (0x20)
 
536
#define GPIO_PDDR_LCDCTLL_6             (0x40)
 
537
#define GPIO_PDDR_LCDCTLL_7             (0x80)
 
538
 
 
539
/* Bit definitions and macros for GPIO_PPDSDR_FECH */
 
540
#define GPIO_PPDSDR_FECH_L0             (0x01)
 
541
#define GPIO_PPDSDR_FECH_L1             (0x02)
 
542
#define GPIO_PPDSDR_FECH_L2             (0x04)
 
543
#define GPIO_PPDSDR_FECH_L3             (0x08)
 
544
#define GPIO_PPDSDR_FECH_L4             (0x10)
 
545
#define GPIO_PPDSDR_FECH_L5             (0x20)
 
546
#define GPIO_PPDSDR_FECH_L6             (0x40)
 
547
#define GPIO_PPDSDR_FECH_L7             (0x80)
 
548
 
 
549
/* Bit definitions and macros for GPIO_PPDSDR_SSI */
 
550
#define GPIO_PPDSDR_SSI_0               (0x01)
 
551
#define GPIO_PPDSDR_SSI_1               (0x02)
 
552
#define GPIO_PPDSDR_SSI_2               (0x04)
 
553
#define GPIO_PPDSDR_SSI_3               (0x08)
 
554
#define GPIO_PPDSDR_SSI_4               (0x10)
 
555
 
 
556
/* Bit definitions and macros for GPIO_PPDSDR_BUSCTL */
 
557
#define GPIO_PPDSDR_BUSCTL_0            (0x01)
 
558
#define GPIO_PPDSDR_BUSCTL_1            (0x02)
 
559
#define GPIO_PPDSDR_BUSCTL_2            (0x04)
 
560
#define GPIO_PPDSDR_BUSCTL_3            (0x08)
 
561
 
 
562
/* Bit definitions and macros for GPIO_PPDSDR_BE */
 
563
#define GPIO_PPDSDR_BE_0                (0x01)
 
564
#define GPIO_PPDSDR_BE_1                (0x02)
 
565
#define GPIO_PPDSDR_BE_2                (0x04)
 
566
#define GPIO_PPDSDR_BE_3                (0x08)
 
567
 
 
568
/* Bit definitions and macros for GPIO_PPDSDR_CS */
 
569
#define GPIO_PPDSDR_CS_1                (0x02)
 
570
#define GPIO_PPDSDR_CS_2                (0x04)
 
571
#define GPIO_PPDSDR_CS_3                (0x08)
 
572
#define GPIO_PPDSDR_CS_4                (0x10)
 
573
#define GPIO_PPDSDR_CS_5                (0x20)
 
574
 
 
575
/* Bit definitions and macros for GPIO_PPDSDR_PWM */
 
576
#define GPIO_PPDSDR_PWM_2               (0x04)
 
577
#define GPIO_PPDSDR_PWM_3               (0x08)
 
578
#define GPIO_PPDSDR_PWM_4               (0x10)
 
579
#define GPIO_PPDSDR_PWM_5               (0x20)
 
580
 
 
581
/* Bit definitions and macros for GPIO_PPDSDR_FECI2C */
 
582
#define GPIO_PPDSDR_FECI2C_0            (0x01)
 
583
#define GPIO_PPDSDR_FECI2C_1            (0x02)
 
584
#define GPIO_PPDSDR_FECI2C_2            (0x04)
 
585
#define GPIO_PPDSDR_FECI2C_3            (0x08)
 
586
 
 
587
/* Bit definitions and macros for GPIO_PPDSDR_UART */
 
588
#define GPIO_PPDSDR_UART_0              (0x01)
 
589
#define GPIO_PPDSDR_UART_1              (0x02)
 
590
#define GPIO_PPDSDR_UART_2              (0x04)
 
591
#define GPIO_PPDSDR_UART_3              (0x08)
 
592
#define GPIO_PPDSDR_UART_4              (0x10)
 
593
#define GPIO_PPDSDR_UART_5              (0x20)
 
594
#define GPIO_PPDSDR_UART_6              (0x40)
 
595
#define GPIO_PPDSDR_UART_7              (0x80)
 
596
 
 
597
/* Bit definitions and macros for GPIO_PPDSDR_QSPI */
 
598
#define GPIO_PPDSDR_QSPI_0              (0x01)
 
599
#define GPIO_PPDSDR_QSPI_1              (0x02)
 
600
#define GPIO_PPDSDR_QSPI_2              (0x04)
 
601
#define GPIO_PPDSDR_QSPI_3              (0x08)
 
602
#define GPIO_PPDSDR_QSPI_4              (0x10)
 
603
#define GPIO_PPDSDR_QSPI_5              (0x20)
 
604
 
 
605
/* Bit definitions and macros for GPIO_PPDSDR_TIMER */
 
606
#define GPIO_PPDSDR_TIMER_0             (0x01)
 
607
#define GPIO_PPDSDR_TIMER_1             (0x02)
 
608
#define GPIO_PPDSDR_TIMER_2             (0x04)
 
609
#define GPIO_PPDSDR_TIMER_3             (0x08)
 
610
 
 
611
/* Bit definitions and macros for GPIO_PPDSDR_LCDDATAH */
 
612
#define GPIO_PPDSDR_LCDDATAH_0          (0x01)
 
613
#define GPIO_PPDSDR_LCDDATAH_1          (0x02)
 
614
 
 
615
/* Bit definitions and macros for GPIO_PPDSDR_LCDDATAM */
 
616
#define GPIO_PPDSDR_LCDDATAM_0          (0x01)
 
617
#define GPIO_PPDSDR_LCDDATAM_1          (0x02)
 
618
#define GPIO_PPDSDR_LCDDATAM_2          (0x04)
 
619
#define GPIO_PPDSDR_LCDDATAM_3          (0x08)
 
620
#define GPIO_PPDSDR_LCDDATAM_4          (0x10)
 
621
#define GPIO_PPDSDR_LCDDATAM_5          (0x20)
 
622
#define GPIO_PPDSDR_LCDDATAM_6          (0x40)
 
623
#define GPIO_PPDSDR_LCDDATAM_7          (0x80)
 
624
 
 
625
/* Bit definitions and macros for GPIO_PPDSDR_LCDDATAL */
 
626
#define GPIO_PPDSDR_LCDDATAL_0          (0x01)
 
627
#define GPIO_PPDSDR_LCDDATAL_1          (0x02)
 
628
#define GPIO_PPDSDR_LCDDATAL_2          (0x04)
 
629
#define GPIO_PPDSDR_LCDDATAL_3          (0x08)
 
630
#define GPIO_PPDSDR_LCDDATAL_4          (0x10)
 
631
#define GPIO_PPDSDR_LCDDATAL_5          (0x20)
 
632
#define GPIO_PPDSDR_LCDDATAL_6          (0x40)
 
633
#define GPIO_PPDSDR_LCDDATAL_7          (0x80)
 
634
 
 
635
/* Bit definitions and macros for GPIO_PPDSDR_LCDCTLH */
 
636
#define GPIO_PPDSDR_LCDCTLH_0           (0x01)
 
637
 
 
638
/* Bit definitions and macros for GPIO_PPDSDR_LCDCTLL */
 
639
#define GPIO_PPDSDR_LCDCTLL_0           (0x01)
 
640
#define GPIO_PPDSDR_LCDCTLL_1           (0x02)
 
641
#define GPIO_PPDSDR_LCDCTLL_2           (0x04)
 
642
#define GPIO_PPDSDR_LCDCTLL_3           (0x08)
 
643
#define GPIO_PPDSDR_LCDCTLL_4           (0x10)
 
644
#define GPIO_PPDSDR_LCDCTLL_5           (0x20)
 
645
#define GPIO_PPDSDR_LCDCTLL_6           (0x40)
 
646
#define GPIO_PPDSDR_LCDCTLL_7           (0x80)
 
647
 
 
648
/* Bit definitions and macros for GPIO_PCLRR_FECH */
 
649
#define GPIO_PCLRR_FECH_L0              (0x01)
 
650
#define GPIO_PCLRR_FECH_L1              (0x02)
 
651
#define GPIO_PCLRR_FECH_L2              (0x04)
 
652
#define GPIO_PCLRR_FECH_L3              (0x08)
 
653
#define GPIO_PCLRR_FECH_L4              (0x10)
 
654
#define GPIO_PCLRR_FECH_L5              (0x20)
 
655
#define GPIO_PCLRR_FECH_L6              (0x40)
 
656
#define GPIO_PCLRR_FECH_L7              (0x80)
 
657
 
 
658
/* Bit definitions and macros for GPIO_PCLRR_SSI */
 
659
#define GPIO_PCLRR_SSI_0                (0x01)
 
660
#define GPIO_PCLRR_SSI_1                (0x02)
 
661
#define GPIO_PCLRR_SSI_2                (0x04)
 
662
#define GPIO_PCLRR_SSI_3                (0x08)
 
663
#define GPIO_PCLRR_SSI_4                (0x10)
 
664
 
 
665
/* Bit definitions and macros for GPIO_PCLRR_BUSCTL */
 
666
#define GPIO_PCLRR_BUSCTL_L0            (0x01)
 
667
#define GPIO_PCLRR_BUSCTL_L1            (0x02)
 
668
#define GPIO_PCLRR_BUSCTL_L2            (0x04)
 
669
#define GPIO_PCLRR_BUSCTL_L3            (0x08)
 
670
 
 
671
/* Bit definitions and macros for GPIO_PCLRR_BE */
 
672
#define GPIO_PCLRR_BE_0                 (0x01)
 
673
#define GPIO_PCLRR_BE_1                 (0x02)
 
674
#define GPIO_PCLRR_BE_2                 (0x04)
 
675
#define GPIO_PCLRR_BE_3                 (0x08)
 
676
 
 
677
/* Bit definitions and macros for GPIO_PCLRR_CS */
 
678
#define GPIO_PCLRR_CS_1                 (0x02)
 
679
#define GPIO_PCLRR_CS_2                 (0x04)
 
680
#define GPIO_PCLRR_CS_3                 (0x08)
 
681
#define GPIO_PCLRR_CS_4                 (0x10)
 
682
#define GPIO_PCLRR_CS_5                 (0x20)
 
683
 
 
684
/* Bit definitions and macros for GPIO_PCLRR_PWM */
 
685
#define GPIO_PCLRR_PWM_2                (0x04)
 
686
#define GPIO_PCLRR_PWM_3                (0x08)
 
687
#define GPIO_PCLRR_PWM_4                (0x10)
 
688
#define GPIO_PCLRR_PWM_5                (0x20)
 
689
 
 
690
/* Bit definitions and macros for GPIO_PCLRR_FECI2C */
 
691
#define GPIO_PCLRR_FECI2C_0             (0x01)
 
692
#define GPIO_PCLRR_FECI2C_1             (0x02)
 
693
#define GPIO_PCLRR_FECI2C_2             (0x04)
 
694
#define GPIO_PCLRR_FECI2C_3             (0x08)
 
695
 
 
696
/* Bit definitions and macros for GPIO_PCLRR_UART */
 
697
#define GPIO_PCLRR_UART0                (0x01)
 
698
#define GPIO_PCLRR_UART1                (0x02)
 
699
#define GPIO_PCLRR_UART2                (0x04)
 
700
#define GPIO_PCLRR_UART3                (0x08)
 
701
#define GPIO_PCLRR_UART4                (0x10)
 
702
#define GPIO_PCLRR_UART5                (0x20)
 
703
#define GPIO_PCLRR_UART6                (0x40)
 
704
#define GPIO_PCLRR_UART7                (0x80)
 
705
 
 
706
/* Bit definitions and macros for GPIO_PCLRR_QSPI */
 
707
#define GPIO_PCLRR_QSPI0                (0x01)
 
708
#define GPIO_PCLRR_QSPI1                (0x02)
 
709
#define GPIO_PCLRR_QSPI2                (0x04)
 
710
#define GPIO_PCLRR_QSPI3                (0x08)
 
711
#define GPIO_PCLRR_QSPI4                (0x10)
 
712
#define GPIO_PCLRR_QSPI5                (0x20)
 
713
 
 
714
/* Bit definitions and macros for GPIO_PCLRR_TIMER */
 
715
#define GPIO_PCLRR_TIMER0               (0x01)
 
716
#define GPIO_PCLRR_TIMER1               (0x02)
 
717
#define GPIO_PCLRR_TIMER2               (0x04)
 
718
#define GPIO_PCLRR_TIMER3               (0x08)
 
719
 
 
720
/* Bit definitions and macros for GPIO_PCLRR_LCDDATAH */
 
721
#define GPIO_PCLRR_LCDDATAH0            (0x01)
 
722
#define GPIO_PCLRR_LCDDATAH1            (0x02)
 
723
 
 
724
/* Bit definitions and macros for GPIO_PCLRR_LCDDATAM */
 
725
#define GPIO_PCLRR_LCDDATAM0            (0x01)
 
726
#define GPIO_PCLRR_LCDDATAM1            (0x02)
 
727
#define GPIO_PCLRR_LCDDATAM2            (0x04)
 
728
#define GPIO_PCLRR_LCDDATAM3            (0x08)
 
729
#define GPIO_PCLRR_LCDDATAM4            (0x10)
 
730
#define GPIO_PCLRR_LCDDATAM5            (0x20)
 
731
#define GPIO_PCLRR_LCDDATAM6            (0x40)
 
732
#define GPIO_PCLRR_LCDDATAM7            (0x80)
 
733
 
 
734
/* Bit definitions and macros for GPIO_PCLRR_LCDDATAL */
 
735
#define GPIO_PCLRR_LCDDATAL0            (0x01)
 
736
#define GPIO_PCLRR_LCDDATAL1            (0x02)
 
737
#define GPIO_PCLRR_LCDDATAL2            (0x04)
 
738
#define GPIO_PCLRR_LCDDATAL3            (0x08)
 
739
#define GPIO_PCLRR_LCDDATAL4            (0x10)
 
740
#define GPIO_PCLRR_LCDDATAL5            (0x20)
 
741
#define GPIO_PCLRR_LCDDATAL6            (0x40)
 
742
#define GPIO_PCLRR_LCDDATAL7            (0x80)
 
743
 
 
744
/* Bit definitions and macros for GPIO_PCLRR_LCDCTLH */
 
745
#define GPIO_PCLRR_LCDCTLH_PCLRR_LCDCTLH0               (0x01)
 
746
 
 
747
/* Bit definitions and macros for GPIO_PCLRR_LCDCTLL */
 
748
#define GPIO_PCLRR_LCDCTLL0             (0x01)
 
749
#define GPIO_PCLRR_LCDCTLL1             (0x02)
 
750
#define GPIO_PCLRR_LCDCTLL2             (0x04)
 
751
#define GPIO_PCLRR_LCDCTLL3             (0x08)
 
752
#define GPIO_PCLRR_LCDCTLL4             (0x10)
 
753
#define GPIO_PCLRR_LCDCTLL5             (0x20)
 
754
#define GPIO_PCLRR_LCDCTLL6             (0x40)
 
755
#define GPIO_PCLRR_LCDCTLL7             (0x80)
 
756
 
 
757
/* Bit definitions and macros for GPIO_PAR_FEC */
 
758
#ifdef CONFIG_M5329
 
759
#define GPIO_PAR_FEC_MII(x)             (((x)&0x03)<<0)
 
760
#define GPIO_PAR_FEC_7W(x)              (((x)&0x03)<<2)
 
761
#define GPIO_PAR_FEC_7W_GPIO            (0x00)
 
762
#define GPIO_PAR_FEC_7W_URTS1           (0x04)
 
763
#define GPIO_PAR_FEC_7W_FEC             (0x0C)
 
764
#define GPIO_PAR_FEC_MII_GPIO           (0x00)
 
765
#define GPIO_PAR_FEC_MII_UART           (0x01)
 
766
#define GPIO_PAR_FEC_MII_FEC            (0x03)
 
767
#else
 
768
#define GPIO_PAR_FEC_7W_FEC             (0x08)
 
769
#define GPIO_PAR_FEC_MII_FEC            (0x02)
 
770
#endif
 
771
 
 
772
/* Bit definitions and macros for GPIO_PAR_PWM */
 
773
#define GPIO_PAR_PWM1(x)                (((x)&0x03)<<0)
 
774
#define GPIO_PAR_PWM3(x)                (((x)&0x03)<<2)
 
775
#define GPIO_PAR_PWM5                   (0x10)
 
776
#define GPIO_PAR_PWM7                   (0x20)
 
777
 
 
778
/* Bit definitions and macros for GPIO_PAR_BUSCTL */
 
779
#define GPIO_PAR_BUSCTL_TS(x)           (((x)&0x03)<<3)
 
780
#define GPIO_PAR_BUSCTL_RWB             (0x20)
 
781
#define GPIO_PAR_BUSCTL_TA              (0x40)
 
782
#define GPIO_PAR_BUSCTL_OE              (0x80)
 
783
#define GPIO_PAR_BUSCTL_OE_GPIO         (0x00)
 
784
#define GPIO_PAR_BUSCTL_OE_OE           (0x80)
 
785
#define GPIO_PAR_BUSCTL_TA_GPIO         (0x00)
 
786
#define GPIO_PAR_BUSCTL_TA_TA           (0x40)
 
787
#define GPIO_PAR_BUSCTL_RWB_GPIO        (0x00)
 
788
#define GPIO_PAR_BUSCTL_RWB_RWB         (0x20)
 
789
#define GPIO_PAR_BUSCTL_TS_GPIO         (0x00)
 
790
#define GPIO_PAR_BUSCTL_TS_DACK0        (0x10)
 
791
#define GPIO_PAR_BUSCTL_TS_TS           (0x18)
 
792
 
 
793
/* Bit definitions and macros for GPIO_PAR_FECI2C */
 
794
#define GPIO_PAR_FECI2C_SDA(x)          (((x)&0x03)<<0)
 
795
#define GPIO_PAR_FECI2C_SCL(x)          (((x)&0x03)<<2)
 
796
#define GPIO_PAR_FECI2C_MDIO(x)         (((x)&0x03)<<4)
 
797
#define GPIO_PAR_FECI2C_MDC(x)          (((x)&0x03)<<6)
 
798
#define GPIO_PAR_FECI2C_MDC_GPIO        (0x00)
 
799
#define GPIO_PAR_FECI2C_MDC_UTXD2       (0x40)
 
800
#define GPIO_PAR_FECI2C_MDC_SCL         (0x80)
 
801
#define GPIO_PAR_FECI2C_MDC_EMDC        (0xC0)
 
802
#define GPIO_PAR_FECI2C_MDIO_GPIO       (0x00)
 
803
#define GPIO_PAR_FECI2C_MDIO_URXD2      (0x10)
 
804
#define GPIO_PAR_FECI2C_MDIO_SDA        (0x20)
 
805
#define GPIO_PAR_FECI2C_MDIO_EMDIO      (0x30)
 
806
#define GPIO_PAR_FECI2C_SCL_GPIO        (0x00)
 
807
#define GPIO_PAR_FECI2C_SCL_UTXD2       (0x04)
 
808
#define GPIO_PAR_FECI2C_SCL_SCL         (0x0C)
 
809
#define GPIO_PAR_FECI2C_SDA_GPIO        (0x00)
 
810
#define GPIO_PAR_FECI2C_SDA_URXD2       (0x02)
 
811
#define GPIO_PAR_FECI2C_SDA_SDA         (0x03)
 
812
 
 
813
/* Bit definitions and macros for GPIO_PAR_BE */
 
814
#define GPIO_PAR_BE0                    (0x01)
 
815
#define GPIO_PAR_BE1                    (0x02)
 
816
#define GPIO_PAR_BE2                    (0x04)
 
817
#define GPIO_PAR_BE3                    (0x08)
 
818
 
 
819
/* Bit definitions and macros for GPIO_PAR_CS */
 
820
#define GPIO_PAR_CS1                    (0x02)
 
821
#define GPIO_PAR_CS2                    (0x04)
 
822
#define GPIO_PAR_CS3                    (0x08)
 
823
#define GPIO_PAR_CS4                    (0x10)
 
824
#define GPIO_PAR_CS5                    (0x20)
 
825
#define GPIO_PAR_CS1_GPIO               (0x00)
 
826
#define GPIO_PAR_CS1_SDCS1              (0x01)
 
827
#define GPIO_PAR_CS1_CS1                (0x03)
 
828
 
 
829
/* Bit definitions and macros for GPIO_PAR_SSI */
 
830
#define GPIO_PAR_SSI_MCLK               (0x0080)
 
831
#define GPIO_PAR_SSI_TXD(x)             (((x)&0x0003)<<8)
 
832
#define GPIO_PAR_SSI_RXD(x)             (((x)&0x0003)<<10)
 
833
#define GPIO_PAR_SSI_FS(x)              (((x)&0x0003)<<12)
 
834
#define GPIO_PAR_SSI_BCLK(x)            (((x)&0x0003)<<14)
 
835
 
 
836
/* Bit definitions and macros for GPIO_PAR_UART */
 
837
#define GPIO_PAR_UART_TXD0              (0x0001)
 
838
#define GPIO_PAR_UART_RXD0              (0x0002)
 
839
#define GPIO_PAR_UART_RTS0              (0x0004)
 
840
#define GPIO_PAR_UART_CTS0              (0x0008)
 
841
#define GPIO_PAR_UART_TXD1(x)           (((x)&0x0003)<<4)
 
842
#define GPIO_PAR_UART_RXD1(x)           (((x)&0x0003)<<6)
 
843
#define GPIO_PAR_UART_RTS1(x)           (((x)&0x0003)<<8)
 
844
#define GPIO_PAR_UART_CTS1(x)           (((x)&0x0003)<<10)
 
845
#define GPIO_PAR_UART_CTS1_GPIO         (0x0000)
 
846
#define GPIO_PAR_UART_CTS1_SSI_BCLK     (0x0800)
 
847
#define GPIO_PAR_UART_CTS1_ULPI_D7      (0x0400)
 
848
#define GPIO_PAR_UART_CTS1_UCTS1        (0x0C00)
 
849
#define GPIO_PAR_UART_RTS1_GPIO         (0x0000)
 
850
#define GPIO_PAR_UART_RTS1_SSI_FS       (0x0200)
 
851
#define GPIO_PAR_UART_RTS1_ULPI_D6      (0x0100)
 
852
#define GPIO_PAR_UART_RTS1_URTS1        (0x0300)
 
853
#define GPIO_PAR_UART_RXD1_GPIO         (0x0000)
 
854
#define GPIO_PAR_UART_RXD1_SSI_RXD      (0x0080)
 
855
#define GPIO_PAR_UART_RXD1_ULPI_D5      (0x0040)
 
856
#define GPIO_PAR_UART_RXD1_URXD1        (0x00C0)
 
857
#define GPIO_PAR_UART_TXD1_GPIO         (0x0000)
 
858
#define GPIO_PAR_UART_TXD1_SSI_TXD      (0x0020)
 
859
#define GPIO_PAR_UART_TXD1_ULPI_D4      (0x0010)
 
860
#define GPIO_PAR_UART_TXD1_UTXD1        (0x0030)
 
861
 
 
862
/* Bit definitions and macros for GPIO_PAR_QSPI */
 
863
#define GPIO_PAR_QSPI_SCK(x)            (((x)&0x0003)<<4)
 
864
#define GPIO_PAR_QSPI_DOUT(x)           (((x)&0x0003)<<6)
 
865
#define GPIO_PAR_QSPI_DIN(x)            (((x)&0x0003)<<8)
 
866
#define GPIO_PAR_QSPI_PCS0(x)           (((x)&0x0003)<<10)
 
867
#define GPIO_PAR_QSPI_PCS1(x)           (((x)&0x0003)<<12)
 
868
#define GPIO_PAR_QSPI_PCS2(x)           (((x)&0x0003)<<14)
 
869
 
 
870
/* Bit definitions and macros for GPIO_PAR_TIMER */
 
871
#define GPIO_PAR_TIN0(x)                (((x)&0x03)<<0)
 
872
#define GPIO_PAR_TIN1(x)                (((x)&0x03)<<2)
 
873
#define GPIO_PAR_TIN2(x)                (((x)&0x03)<<4)
 
874
#define GPIO_PAR_TIN3(x)                (((x)&0x03)<<6)
 
875
#define GPIO_PAR_TIN3_GPIO              (0x00)
 
876
#define GPIO_PAR_TIN3_TOUT3             (0x80)
 
877
#define GPIO_PAR_TIN3_URXD2             (0x40)
 
878
#define GPIO_PAR_TIN3_TIN3              (0xC0)
 
879
#define GPIO_PAR_TIN2_GPIO              (0x00)
 
880
#define GPIO_PAR_TIN2_TOUT2             (0x20)
 
881
#define GPIO_PAR_TIN2_UTXD2             (0x10)
 
882
#define GPIO_PAR_TIN2_TIN2              (0x30)
 
883
#define GPIO_PAR_TIN1_GPIO              (0x00)
 
884
#define GPIO_PAR_TIN1_TOUT1             (0x08)
 
885
#define GPIO_PAR_TIN1_DACK1             (0x04)
 
886
#define GPIO_PAR_TIN1_TIN1              (0x0C)
 
887
#define GPIO_PAR_TIN0_GPIO              (0x00)
 
888
#define GPIO_PAR_TIN0_TOUT0             (0x02)
 
889
#define GPIO_PAR_TIN0_DREQ0             (0x01)
 
890
#define GPIO_PAR_TIN0_TIN0              (0x03)
 
891
 
 
892
/* Bit definitions and macros for GPIO_PAR_LCDDATA */
 
893
#define GPIO_PAR_LCDDATA_LD7_0(x)       ((x)&0x03)
 
894
#define GPIO_PAR_LCDDATA_LD15_8(x)      (((x)&0x03)<<2)
 
895
#define GPIO_PAR_LCDDATA_LD16(x)        (((x)&0x03)<<4)
 
896
#define GPIO_PAR_LCDDATA_LD17(x)        (((x)&0x03)<<6)
 
897
 
 
898
/* Bit definitions and macros for GPIO_PAR_LCDCTL */
 
899
#define GPIO_PAR_LCDCTL_CLS             (0x0001)
 
900
#define GPIO_PAR_LCDCTL_PS              (0x0002)
 
901
#define GPIO_PAR_LCDCTL_REV             (0x0004)
 
902
#define GPIO_PAR_LCDCTL_SPL_SPR         (0x0008)
 
903
#define GPIO_PAR_LCDCTL_CONTRAST        (0x0010)
 
904
#define GPIO_PAR_LCDCTL_LSCLK           (0x0020)
 
905
#define GPIO_PAR_LCDCTL_LP_HSYNC        (0x0040)
 
906
#define GPIO_PAR_LCDCTL_FLM_VSYNC       (0x0080)
 
907
#define GPIO_PAR_LCDCTL_ACD_OE          (0x0100)
 
908
 
 
909
/* Bit definitions and macros for GPIO_PAR_IRQ */
 
910
#define GPIO_PAR_IRQ1(x)                (((x)&0x0003)<<4)
 
911
#define GPIO_PAR_IRQ2(x)                (((x)&0x0003)<<6)
 
912
#define GPIO_PAR_IRQ4(x)                (((x)&0x0003)<<8)
 
913
#define GPIO_PAR_IRQ5(x)                (((x)&0x0003)<<10)
 
914
#define GPIO_PAR_IRQ6(x)                (((x)&0x0003)<<12)
 
915
 
 
916
/* Bit definitions and macros for GPIO_MSCR_FLEXBUS */
 
917
#define GPIO_MSCR_FLEXBUS_ADDRCTL(x)    ((x)&0x03)
 
918
#define GPIO_MSCR_FLEXBUS_DLOWER(x)     (((x)&0x03)<<2)
 
919
#define GPIO_MSCR_FLEXBUS_DUPPER(x)     (((x)&0x03)<<4)
 
920
 
 
921
/* Bit definitions and macros for GPIO_MSCR_SDRAM */
 
922
#define GPIO_MSCR_SDRAM_SDRAM(x)        ((x)&0x03)
 
923
#define GPIO_MSCR_SDRAM_SDCLK(x)        (((x)&0x03)<<2)
 
924
#define GPIO_MSCR_SDRAM_SDCLKB(x)       (((x)&0x03)<<4)
 
925
 
 
926
/* Bit definitions and macros for GPIO_DSCR_I2C */
 
927
#define GPIO_DSCR_I2C_DSE(x)            ((x)&0x03)
 
928
 
 
929
/* Bit definitions and macros for GPIO_DSCR_PWM */
 
930
#define GPIO_DSCR_PWM_DSE(x)            ((x)&0x03)
 
931
 
 
932
/* Bit definitions and macros for GPIO_DSCR_FEC */
 
933
#define GPIO_DSCR_FEC_DSE(x)            ((x)&0x03)
 
934
 
 
935
/* Bit definitions and macros for GPIO_DSCR_UART */
 
936
#define GPIO_DSCR_UART0_DSE(x)          ((x)&0x03)
 
937
#define GPIO_DSCR_UART1_DSE(x)          (((x)&0x03)<<2)
 
938
 
 
939
/* Bit definitions and macros for GPIO_DSCR_QSPI */
 
940
#define GPIO_DSCR_QSPI_DSE(x)           ((x)&0x03)
 
941
 
 
942
/* Bit definitions and macros for GPIO_DSCR_TIMER */
 
943
#define GPIO_DSCR_TIMER_DSE(x)          ((x)&0x03)
 
944
 
 
945
/* Bit definitions and macros for GPIO_DSCR_SSI */
 
946
#define GPIO_DSCR_SSI_DSE(x)            ((x)&0x03)
 
947
 
 
948
/* Bit definitions and macros for GPIO_DSCR_LCD */
 
949
#define GPIO_DSCR_LCD_DSE(x)            ((x)&0x03)
 
950
 
 
951
/* Bit definitions and macros for GPIO_DSCR_DEBUG */
 
952
#define GPIO_DSCR_DEBUG_DSE(x)          ((x)&0x03)
 
953
 
 
954
/* Bit definitions and macros for GPIO_DSCR_CLKRST */
 
955
#define GPIO_DSCR_CLKRST_DSE(x)         ((x)&0x03)
 
956
 
 
957
/* Bit definitions and macros for GPIO_DSCR_IRQ */
 
958
#define GPIO_DSCR_IRQ_DSE(x)            ((x)&0x03)
 
959
 
 
960
/*********************************************************************
 
961
* SDRAM Controller (SDRAMC)
 
962
*********************************************************************/
 
963
/* Bit definitions and macros for SDRAMC_SDMR */
 
964
#define SDRAMC_SDMR_BNKAD_LEMR          (0x40000000)
 
965
#define SDRAMC_SDMR_BNKAD_LMR           (0x00000000)
 
966
#define SDRAMC_SDMR_AD(x)               (((x)&0x00000FFF)<<18)
 
967
#define SDRAMC_SDMR_CMD                 (0x00010000)
 
968
 
 
969
/* Bit definitions and macros for SDRAMC_SDCR */
 
970
#define SDRAMC_SDCR_MODE_EN             (0x80000000)
 
971
#define SDRAMC_SDCR_CKE                 (0x40000000)
 
972
#define SDRAMC_SDCR_DDR                 (0x20000000)
 
973
#define SDRAMC_SDCR_REF                 (0x10000000)
 
974
#define SDRAMC_SDCR_MUX(x)              (((x)&0x00000003)<<24)
 
975
#define SDRAMC_SDCR_OE_RULE             (0x00400000)
 
976
#define SDRAMC_SDCR_RCNT(x)             (((x)&0x0000003F)<<16)
 
977
#define SDRAMC_SDCR_PS_32               (0x00000000)
 
978
#define SDRAMC_SDCR_PS_16               (0x00002000)
 
979
#define SDRAMC_SDCR_DQS_OE(x)           (((x)&0x0000000F)<<8)
 
980
#define SDRAMC_SDCR_IREF                (0x00000004)
 
981
#define SDRAMC_SDCR_IPALL               (0x00000002)
 
982
 
 
983
/* Bit definitions and macros for SDRAMC_SDCFG1 */
 
984
#define SDRAMC_SDCFG1_SRD2RW(x)         (((x)&0x0000000F)<<28)
 
985
#define SDRAMC_SDCFG1_SWT2RD(x)         (((x)&0x00000007)<<24)
 
986
#define SDRAMC_SDCFG1_RDLAT(x)          (((x)&0x0000000F)<<20)
 
987
#define SDRAMC_SDCFG1_ACT2RW(x)         (((x)&0x00000007)<<16)
 
988
#define SDRAMC_SDCFG1_PRE2ACT(x)        (((x)&0x00000007)<<12)
 
989
#define SDRAMC_SDCFG1_REF2ACT(x)        (((x)&0x0000000F)<<8)
 
990
#define SDRAMC_SDCFG1_WTLAT(x)          (((x)&0x00000007)<<4)
 
991
 
 
992
/* Bit definitions and macros for SDRAMC_SDCFG2 */
 
993
#define SDRAMC_SDCFG2_BRD2PRE(x)        (((x)&0x0000000F)<<28)
 
994
#define SDRAMC_SDCFG2_BWT2RW(x)         (((x)&0x0000000F)<<24)
 
995
#define SDRAMC_SDCFG2_BRD2WT(x)         (((x)&0x0000000F)<<20)
 
996
#define SDRAMC_SDCFG2_BL(x)             (((x)&0x0000000F)<<16)
 
997
 
 
998
/* Bit definitions and macros for SDRAMC_SDDS */
 
999
#define SDRAMC_SDDS_SB_E(x)             (((x)&0x00000003)<<8)
 
1000
#define SDRAMC_SDDS_SB_C(x)             (((x)&0x00000003)<<6)
 
1001
#define SDRAMC_SDDS_SB_A(x)             (((x)&0x00000003)<<4)
 
1002
#define SDRAMC_SDDS_SB_S(x)             (((x)&0x00000003)<<2)
 
1003
#define SDRAMC_SDDS_SB_D(x)             ((x)&0x00000003)
 
1004
 
 
1005
/* Bit definitions and macros for SDRAMC_SDCS */
 
1006
#define SDRAMC_SDCS_BASE(x)             (((x)&0x00000FFF)<<20)
 
1007
#define SDRAMC_SDCS_CSSZ(x)             ((x)&0x0000001F)
 
1008
#define SDRAMC_SDCS_CSSZ_4GBYTE         (0x0000001F)
 
1009
#define SDRAMC_SDCS_CSSZ_2GBYTE         (0x0000001E)
 
1010
#define SDRAMC_SDCS_CSSZ_1GBYTE         (0x0000001D)
 
1011
#define SDRAMC_SDCS_CSSZ_512MBYTE       (0x0000001C)
 
1012
#define SDRAMC_SDCS_CSSZ_256MBYTE       (0x0000001B)
 
1013
#define SDRAMC_SDCS_CSSZ_128MBYTE       (0x0000001A)
 
1014
#define SDRAMC_SDCS_CSSZ_64MBYTE        (0x00000019)
 
1015
#define SDRAMC_SDCS_CSSZ_32MBYTE        (0x00000018)
 
1016
#define SDRAMC_SDCS_CSSZ_16MBYTE        (0x00000017)
 
1017
#define SDRAMC_SDCS_CSSZ_8MBYTE         (0x00000016)
 
1018
#define SDRAMC_SDCS_CSSZ_4MBYTE         (0x00000015)
 
1019
#define SDRAMC_SDCS_CSSZ_2MBYTE         (0x00000014)
 
1020
#define SDRAMC_SDCS_CSSZ_1MBYTE         (0x00000013)
 
1021
#define SDRAMC_SDCS_CSSZ_DIABLE         (0x00000000)
 
1022
 
 
1023
/*********************************************************************
 
1024
* Phase Locked Loop (PLL)
 
1025
*********************************************************************/
 
1026
/* Bit definitions and macros for PLL_PODR */
 
1027
#define PLL_PODR_CPUDIV(x)              (((x)&0x0F)<<4)
 
1028
#define PLL_PODR_BUSDIV(x)              ((x)&0x0F)
 
1029
 
 
1030
/* Bit definitions and macros for PLL_PLLCR */
 
1031
#define PLL_PLLCR_DITHEN                (0x80)
 
1032
#define PLL_PLLCR_DITHDEV(x)            ((x)&0x07)
 
1033
 
 
1034
#endif                          /* mcf5329_h */