OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ColdFire_MCF52221_CodeWarrior/] [headers/] [MCF52221_USB_OTG.h] - Blame information for rev 578

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 jeremybenn
/* Coldfire C Header File
2
 * Copyright Freescale Semiconductor Inc
3
 * All rights reserved.
4
 *
5
 * 2008/05/23 Revision: 0.95
6
 *
7
 * (c) Copyright UNIS, a.s. 1997-2008
8
 * UNIS, a.s.
9
 * Jundrovska 33
10
 * 624 00 Brno
11
 * Czech Republic
12
 * http      : www.processorexpert.com
13
 * mail      : info@processorexpert.com
14
 */
15
 
16
#ifndef __MCF52221_USB_OTG_H__
17
#define __MCF52221_USB_OTG_H__
18
 
19
 
20
/*********************************************************************
21
*
22
* Universal Serial Bus - OTG Controller (USB_OTG)
23
*
24
*********************************************************************/
25
 
26
/* Register read/write macros */
27
#define MCF_USB_OTG_PER_ID                   (*(vuint8 *)(0x401C0000))
28
#define MCF_USB_OTG_ID_COMP                  (*(vuint8 *)(0x401C0004))
29
#define MCF_USB_OTG_REV                      (*(vuint8 *)(0x401C0008))
30
#define MCF_USB_OTG_ADD_INFO                 (*(vuint8 *)(0x401C000C))
31
#define MCF_USB_OTG_OTG_INT_STAT             (*(vuint8 *)(0x401C0010))
32
#define MCF_USB_OTG_OTG_INT_EN               (*(vuint8 *)(0x401C0014))
33
#define MCF_USB_OTG_OTG_STAT                 (*(vuint8 *)(0x401C0018))
34
#define MCF_USB_OTG_OTG_CTRL                 (*(vuint8 *)(0x401C001C))
35
#define MCF_USB_OTG_INT_STAT                 (*(vuint8 *)(0x401C0080))
36
#define MCF_USB_OTG_INT_ENB                  (*(vuint8 *)(0x401C0084))
37
#define MCF_USB_OTG_ERR_STAT                 (*(vuint8 *)(0x401C0088))
38
#define MCF_USB_OTG_ERR_ENB                  (*(vuint8 *)(0x401C008C))
39
#define MCF_USB_OTG_STAT                     (*(vuint8 *)(0x401C0090))
40
#define MCF_USB_OTG_CTL                      (*(vuint8 *)(0x401C0094))
41
#define MCF_USB_OTG_ADDR                     (*(vuint8 *)(0x401C0098))
42
#define MCF_USB_OTG_BDT_PAGE_01              (*(vuint8 *)(0x401C009C))
43
#define MCF_USB_OTG_FRM_NUML                 (*(vuint8 *)(0x401C00A0))
44
#define MCF_USB_OTG_FRM_NUMH                 (*(vuint8 *)(0x401C00A4))
45
#define MCF_USB_OTG_TOKEN                    (*(vuint8 *)(0x401C00A8))
46
#define MCF_USB_OTG_SOF_THLD                 (*(vuint8 *)(0x401C00AC))
47
#define MCF_USB_OTG_BDT_PAGE_02              (*(vuint8 *)(0x401C00B0))
48
#define MCF_USB_OTG_BDT_PAGE_03              (*(vuint8 *)(0x401C00B4))
49
#define MCF_USB_OTG_ENDPT0                   (*(vuint8 *)(0x401C00C0))
50
#define MCF_USB_OTG_ENDPT1                   (*(vuint8 *)(0x401C00C4))
51
#define MCF_USB_OTG_ENDPT2                   (*(vuint8 *)(0x401C00C8))
52
#define MCF_USB_OTG_ENDPT3                   (*(vuint8 *)(0x401C00CC))
53
#define MCF_USB_OTG_ENDPT4                   (*(vuint8 *)(0x401C00D0))
54
#define MCF_USB_OTG_ENDPT5                   (*(vuint8 *)(0x401C00D4))
55
#define MCF_USB_OTG_ENDPT6                   (*(vuint8 *)(0x401C00D8))
56
#define MCF_USB_OTG_ENDPT7                   (*(vuint8 *)(0x401C00DC))
57
#define MCF_USB_OTG_ENDPT8                   (*(vuint8 *)(0x401C00E0))
58
#define MCF_USB_OTG_ENDPT9                   (*(vuint8 *)(0x401C00E4))
59
#define MCF_USB_OTG_ENDPT10                  (*(vuint8 *)(0x401C00E8))
60
#define MCF_USB_OTG_ENDPT11                  (*(vuint8 *)(0x401C00EC))
61
#define MCF_USB_OTG_ENDPT12                  (*(vuint8 *)(0x401C00F0))
62
#define MCF_USB_OTG_ENDPT13                  (*(vuint8 *)(0x401C00F4))
63
#define MCF_USB_OTG_ENDPT14                  (*(vuint8 *)(0x401C00F8))
64
#define MCF_USB_OTG_ENDPT15                  (*(vuint8 *)(0x401C00FC))
65
#define MCF_USB_OTG_USB_CTRL                 (*(vuint8 *)(0x401C0100))
66
#define MCF_USB_OTG_USB_OTG_OBSERVE          (*(vuint8 *)(0x401C0104))
67
#define MCF_USB_OTG_USB_OTG_CONTROL          (*(vuint8 *)(0x401C0108))
68
#define MCF_USB_OTG_ENDPT(x)                 (*(vuint8 *)(0x401C00C0 + ((x)*0x4)))
69
 
70
/* Other macros */
71
#define MCF_USB_OTG_FRM_NUM                  (MCF_USB_OTG_INT_STAT=MCF_USB_OTG_INT_STAT_SOF_TOK ,MCF_USB_OTG_FRM_NUML | (((vuint16)MCF_USB_OTG_FRM_NUMH)<<8))
72
 
73
 
74
/* Bit definitions and macros for MCF_USB_OTG_PER_ID */
75
#define MCF_USB_OTG_PER_ID_ID(x)             (((x)&0x3F)<<0)
76
 
77
/* Bit definitions and macros for MCF_USB_OTG_ID_COMP */
78
#define MCF_USB_OTG_ID_COMP_NID(x)           (((x)&0x3F)<<0)
79
 
80
/* Bit definitions and macros for MCF_USB_OTG_REV */
81
#define MCF_USB_OTG_REV_REV(x)               (((x)&0xFF)<<0)
82
 
83
/* Bit definitions and macros for MCF_USB_OTG_ADD_INFO */
84
#define MCF_USB_OTG_ADD_INFO_IEHOST          (0x1)
85
#define MCF_USB_OTG_ADD_INFO_IRQ_NUM(x)      (((x)&0x1F)<<0x3)
86
 
87
/* Bit definitions and macros for MCF_USB_OTG_OTG_INT_STAT */
88
#define MCF_USB_OTG_OTG_INT_STAT_A_VBUS_CHG  (0x1)
89
#define MCF_USB_OTG_OTG_INT_STAT_B_SESS_CHG  (0x4)
90
#define MCF_USB_OTG_OTG_INT_STAT_SESS_VLD_CHG (0x8)
91
#define MCF_USB_OTG_OTG_INT_STAT_LINE_STATE_CHG (0x20)
92
#define MCF_USB_OTG_OTG_INT_STAT_1_MSEC      (0x40)
93
#define MCF_USB_OTG_OTG_INT_STAT_ID_CHG      (0x80)
94
 
95
/* Bit definitions and macros for MCF_USB_OTG_OTG_INT_EN */
96
#define MCF_USB_OTG_OTG_INT_EN_A_VBUS_EN     (0x1)
97
#define MCF_USB_OTG_OTG_INT_EN_B_SESS_EN     (0x4)
98
#define MCF_USB_OTG_OTG_INT_EN_SESS_VLD_EN   (0x8)
99
#define MCF_USB_OTG_OTG_INT_EN_LINE_STATE_EN (0x20)
100
#define MCF_USB_OTG_OTG_INT_EN_1_MSEC_EN     (0x40)
101
#define MCF_USB_OTG_OTG_INT_EN_ID_EN         (0x80)
102
 
103
/* Bit definitions and macros for MCF_USB_OTG_OTG_STAT */
104
#define MCF_USB_OTG_OTG_STAT_A_VBUS_VLD      (0x1)
105
#define MCF_USB_OTG_OTG_STAT_B_SESS_END      (0x4)
106
#define MCF_USB_OTG_OTG_STAT_SESS_VLD        (0x8)
107
#define MCF_USB_OTG_OTG_STAT_LINE_STATE_STABLE (0x20)
108
#define MCF_USB_OTG_OTG_STAT_1_MSEC_EN       (0x40)
109
#define MCF_USB_OTG_OTG_STAT_ID              (0x80)
110
 
111
/* Bit definitions and macros for MCF_USB_OTG_OTG_CTRL */
112
#define MCF_USB_OTG_OTG_CTRL_VBUS_DSCHG      (0x1)
113
#define MCF_USB_OTG_OTG_CTRL_VBUS_CHG        (0x2)
114
#define MCF_USB_OTG_OTG_CTRL_OTG_EN          (0x4)
115
#define MCF_USB_OTG_OTG_CTRL_VBUS_ON         (0x8)
116
#define MCF_USB_OTG_OTG_CTRL_DM_LOW          (0x10)
117
#define MCF_USB_OTG_OTG_CTRL_DP_LOW          (0x20)
118
#define MCF_USB_OTG_OTG_CTRL_DP_HIGH         (0x80)
119
 
120
/* Bit definitions and macros for MCF_USB_OTG_INT_STAT */
121
#define MCF_USB_OTG_INT_STAT_USB_RST         (0x1)
122
#define MCF_USB_OTG_INT_STAT_ERROR           (0x2)
123
#define MCF_USB_OTG_INT_STAT_SOF_TOK         (0x4)
124
#define MCF_USB_OTG_INT_STAT_TOK_DNE         (0x8)
125
#define MCF_USB_OTG_INT_STAT_SLEEP           (0x10)
126
#define MCF_USB_OTG_INT_STAT_RESUME          (0x20)
127
#define MCF_USB_OTG_INT_STAT_ATTACH          (0x40)
128
#define MCF_USB_OTG_INT_STAT_STALL           (0x80)
129
 
130
/* Bit definitions and macros for MCF_USB_OTG_INT_ENB */
131
#define MCF_USB_OTG_INT_ENB_USB_RST_EN       (0x1)
132
#define MCF_USB_OTG_INT_ENB_ERROR_EN         (0x2)
133
#define MCF_USB_OTG_INT_ENB_SOF_TOK_EN       (0x4)
134
#define MCF_USB_OTG_INT_ENB_TOK_DNE_EN       (0x8)
135
#define MCF_USB_OTG_INT_ENB_SLEEP_EN         (0x10)
136
#define MCF_USB_OTG_INT_ENB_RESUME_EN        (0x20)
137
#define MCF_USB_OTG_INT_ENB_ATTACH_EN        (0x40)
138
#define MCF_USB_OTG_INT_ENB_STALL_EN         (0x80)
139
 
140
/* Bit definitions and macros for MCF_USB_OTG_ERR_STAT */
141
#define MCF_USB_OTG_ERR_STAT_PID_ERR         (0x1)
142
#define MCF_USB_OTG_ERR_STAT_CRC5_EOF        (0x2)
143
#define MCF_USB_OTG_ERR_STAT_CRC16           (0x4)
144
#define MCF_USB_OTG_ERR_STAT_DFN8            (0x8)
145
#define MCF_USB_OTG_ERR_STAT_BTO_ERR         (0x10)
146
#define MCF_USB_OTG_ERR_STAT_DMA_ERR         (0x20)
147
#define MCF_USB_OTG_ERR_STAT_BTS_ERR         (0x80)
148
 
149
/* Bit definitions and macros for MCF_USB_OTG_ERR_ENB */
150
#define MCF_USB_OTG_ERR_ENB_PID_ERR_EN       (0x1)
151
#define MCF_USB_OTG_ERR_ENB_CRC5_EOF_EN      (0x2)
152
#define MCF_USB_OTG_ERR_ENB_CRC16_EN         (0x4)
153
#define MCF_USB_OTG_ERR_ENB_DFN8_EN          (0x8)
154
#define MCF_USB_OTG_ERR_ENB_BTO_ERR_EN       (0x10)
155
#define MCF_USB_OTG_ERR_ENB_DMA_ERR_EN       (0x20)
156
#define MCF_USB_OTG_ERR_ENB_BTS_ERR_EN       (0x80)
157
 
158
/* Bit definitions and macros for MCF_USB_OTG_STAT */
159
#define MCF_USB_OTG_STAT_ODD                 (0x4)
160
#define MCF_USB_OTG_STAT_TX                  (0x8)
161
#define MCF_USB_OTG_STAT_ENDP(x)             (((x)&0xF)<<0x4)
162
 
163
/* Bit definitions and macros for MCF_USB_OTG_CTL */
164
#define MCF_USB_OTG_CTL_USB_EN_SOF_EN        (0x1)
165
#define MCF_USB_OTG_CTL_ODD_RST              (0x2)
166
#define MCF_USB_OTG_CTL_RESUME               (0x4)
167
#define MCF_USB_OTG_CTL_HOST_MODE_EN         (0x8)
168
#define MCF_USB_OTG_CTL_RESET                (0x10)
169
#define MCF_USB_OTG_CTL_TXSUSPEND_TOKENBUSY  (0x20)
170
#define MCF_USB_OTG_CTL_SE0                  (0x40)
171
#define MCF_USB_OTG_CTL_JSTATE               (0x80)
172
 
173
/* Bit definitions and macros for MCF_USB_OTG_ADDR */
174
#define MCF_USB_OTG_ADDR_ADDR(x)             (((x)&0x7F)<<0)
175
#define MCF_USB_OTG_ADDR_LS_EN               (0x80)
176
 
177
/* Bit definitions and macros for MCF_USB_OTG_BDT_PAGE_01 */
178
#define MCF_USB_OTG_BDT_PAGE_01_BDT_BA9      (0x2)
179
#define MCF_USB_OTG_BDT_PAGE_01_BDT_BA10     (0x4)
180
#define MCF_USB_OTG_BDT_PAGE_01_BDT_BA11     (0x8)
181
#define MCF_USB_OTG_BDT_PAGE_01_BDT_BA12     (0x10)
182
#define MCF_USB_OTG_BDT_PAGE_01_BDT_BA13     (0x20)
183
#define MCF_USB_OTG_BDT_PAGE_01_BDT_BA14     (0x40)
184
#define MCF_USB_OTG_BDT_PAGE_01_BDT_BA15     (0x80)
185
 
186
/* Bit definitions and macros for MCF_USB_OTG_FRM_NUML */
187
#define MCF_USB_OTG_FRM_NUML_FRM0            (0x1)
188
#define MCF_USB_OTG_FRM_NUML_FRM1            (0x2)
189
#define MCF_USB_OTG_FRM_NUML_FRM2            (0x4)
190
#define MCF_USB_OTG_FRM_NUML_FRM3            (0x8)
191
#define MCF_USB_OTG_FRM_NUML_FRM4            (0x10)
192
#define MCF_USB_OTG_FRM_NUML_FRM5            (0x20)
193
#define MCF_USB_OTG_FRM_NUML_FRM6            (0x40)
194
#define MCF_USB_OTG_FRM_NUML_FRM7            (0x80)
195
 
196
/* Bit definitions and macros for MCF_USB_OTG_FRM_NUMH */
197
#define MCF_USB_OTG_FRM_NUMH_FRM8            (0x1)
198
#define MCF_USB_OTG_FRM_NUMH_FRM9            (0x2)
199
#define MCF_USB_OTG_FRM_NUMH_FRM10           (0x4)
200
 
201
/* Bit definitions and macros for MCF_USB_OTG_TOKEN */
202
#define MCF_USB_OTG_TOKEN_TOKEN_ENDPT(x)     (((x)&0xF)<<0)
203
#define MCF_USB_OTG_TOKEN_TOKEN_PID(x)       (((x)&0xF)<<0x4)
204
#define MCF_USB_OTG_TOKEN_TOKEN_PID_OUT      (0x10)
205
#define MCF_USB_OTG_TOKEN_TOKEN_PID_IN       (0x90)
206
#define MCF_USB_OTG_TOKEN_TOKEN_PID_SETUP    (0xD0)
207
 
208
/* Bit definitions and macros for MCF_USB_OTG_SOF_THLD */
209
#define MCF_USB_OTG_SOF_THLD_CNT0            (0x1)
210
#define MCF_USB_OTG_SOF_THLD_CNT1            (0x2)
211
#define MCF_USB_OTG_SOF_THLD_CNT2            (0x4)
212
#define MCF_USB_OTG_SOF_THLD_CNT3            (0x8)
213
#define MCF_USB_OTG_SOF_THLD_CNT4            (0x10)
214
#define MCF_USB_OTG_SOF_THLD_CNT5            (0x20)
215
#define MCF_USB_OTG_SOF_THLD_CNT6            (0x40)
216
#define MCF_USB_OTG_SOF_THLD_CNT7            (0x80)
217
 
218
/* Bit definitions and macros for MCF_USB_OTG_BDT_PAGE_02 */
219
#define MCF_USB_OTG_BDT_PAGE_02_BDT_BA16     (0x1)
220
#define MCF_USB_OTG_BDT_PAGE_02_BDT_BA17     (0x2)
221
#define MCF_USB_OTG_BDT_PAGE_02_BDT_BA18     (0x4)
222
#define MCF_USB_OTG_BDT_PAGE_02_BDT_BA19     (0x8)
223
#define MCF_USB_OTG_BDT_PAGE_02_BDT_BA20     (0x10)
224
#define MCF_USB_OTG_BDT_PAGE_02_BDT_BA21     (0x20)
225
#define MCF_USB_OTG_BDT_PAGE_02_BDT_BA22     (0x40)
226
#define MCF_USB_OTG_BDT_PAGE_02_BDT_BA23     (0x80)
227
 
228
/* Bit definitions and macros for MCF_USB_OTG_BDT_PAGE_03 */
229
#define MCF_USB_OTG_BDT_PAGE_03_BDT_BA24     (0x1)
230
#define MCF_USB_OTG_BDT_PAGE_03_BDT_BA25     (0x2)
231
#define MCF_USB_OTG_BDT_PAGE_03_BDT_BA26     (0x4)
232
#define MCF_USB_OTG_BDT_PAGE_03_BDT_BA27     (0x8)
233
#define MCF_USB_OTG_BDT_PAGE_03_BDT_BA28     (0x10)
234
#define MCF_USB_OTG_BDT_PAGE_03_BDT_BA29     (0x20)
235
#define MCF_USB_OTG_BDT_PAGE_03_BDT_BA30     (0x40)
236
#define MCF_USB_OTG_BDT_PAGE_03_BDT_BA31     (0x80)
237
 
238
/* Bit definitions and macros for MCF_USB_OTG_ENDPT */
239
#define MCF_USB_OTG_ENDPT_EP_HSHK            (0x1)
240
#define MCF_USB_OTG_ENDPT_EP_STALL           (0x2)
241
#define MCF_USB_OTG_ENDPT_EP_TX_EN           (0x4)
242
#define MCF_USB_OTG_ENDPT_EP_RX_EN           (0x8)
243
#define MCF_USB_OTG_ENDPT_EP_CTL_DIS         (0x10)
244
#define MCF_USB_OTG_ENDPT_RETRY_DIS          (0x40)
245
#define MCF_USB_OTG_ENDPT_HOST_WO_HUB        (0x80)
246
 
247
/* Bit definitions and macros for MCF_USB_OTG_USB_CTRL */
248
#define MCF_USB_OTG_USB_CTRL_CLK_SRC(x)      (((x)&0x3)<<0)
249
#define MCF_USB_OTG_USB_CTRL_CLK_SRC_ALTCLK  (0)
250
#define MCF_USB_OTG_USB_CTRL_CLK_SRC_OSCCLK  (0x1)
251
#define MCF_USB_OTG_USB_CTRL_CLK_SRC_SYSCLK  (0x3)
252
#define MCF_USB_OTG_USB_CTRL_PDE             (0x40)
253
#define MCF_USB_OTG_USB_CTRL_SUSP            (0x80)
254
 
255
/* Bit definitions and macros for MCF_USB_OTG_USB_OTG_OBSERVE */
256
#define MCF_USB_OTG_USB_OTG_OBSERVE_VBUSDIS  (0x2)
257
#define MCF_USB_OTG_USB_OTG_OBSERVE_VBUSCHG  (0x4)
258
#define MCF_USB_OTG_USB_OTG_OBSERVE_VBUSE    (0x8)
259
#define MCF_USB_OTG_USB_OTG_OBSERVE_DM_PD    (0x10)
260
#define MCF_USB_OTG_USB_OTG_OBSERVE_DP_PD    (0x40)
261
#define MCF_USB_OTG_USB_OTG_OBSERVE_DP_PU    (0x80)
262
 
263
/* Bit definitions and macros for MCF_USB_OTG_USB_OTG_CONTROL */
264
#define MCF_USB_OTG_USB_OTG_CONTROL_SESSEND  (0x1)
265
#define MCF_USB_OTG_USB_OTG_CONTROL_SESSVLD  (0x2)
266
#define MCF_USB_OTG_USB_OTG_CONTROL_VBUSVLD  (0x4)
267
#define MCF_USB_OTG_USB_OTG_CONTROL_ID       (0x8)
268
#define MCF_USB_OTG_USB_OTG_CONTROL_VBUSD    (0x10)
269
 
270
 
271
#endif /* __MCF52221_USB_OTG_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.