RTEMS  5.1
component_usbhs.h
1 /* ---------------------------------------------------------------------------- */
2 /* Atmel Microcontroller Software Support */
3 /* SAM Software Package License */
4 /* ---------------------------------------------------------------------------- */
5 /* Copyright (c) 2015, Atmel Corporation */
6 /* */
7 /* All rights reserved. */
8 /* */
9 /* Redistribution and use in source and binary forms, with or without */
10 /* modification, are permitted provided that the following condition is met: */
11 /* */
12 /* - Redistributions of source code must retain the above copyright notice, */
13 /* this list of conditions and the disclaimer below. */
14 /* */
15 /* Atmel's name may not be used to endorse or promote products derived from */
16 /* this software without specific prior written permission. */
17 /* */
18 /* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
19 /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
20 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
21 /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
22 /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
23 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
24 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
25 /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
26 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
27 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28 /* ---------------------------------------------------------------------------- */
29 
30 #ifndef _SAME70_USBHS_COMPONENT_
31 #define _SAME70_USBHS_COMPONENT_
32 
33 /* ============================================================================= */
35 /* ============================================================================= */
38 
39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
40 
41 typedef struct {
46 } UsbhsDevdma;
48 typedef struct {
53 } UsbhsHstdma;
55 #define USBHSDEVDMA_NUMBER 7
56 #define USBHSHSTDMA_NUMBER 7
57 typedef struct {
58  __IO uint32_t USBHS_DEVCTRL;
59  __I uint32_t USBHS_DEVISR;
60  __O uint32_t USBHS_DEVICR;
61  __O uint32_t USBHS_DEVIFR;
62  __I uint32_t USBHS_DEVIMR;
63  __O uint32_t USBHS_DEVIDR;
64  __O uint32_t USBHS_DEVIER;
65  __IO uint32_t USBHS_DEVEPT;
66  __I uint32_t USBHS_DEVFNUM;
67  __I uint32_t Reserved1[55];
68  __IO uint32_t USBHS_DEVEPTCFG[10];
69  __I uint32_t Reserved2[2];
70  __I uint32_t USBHS_DEVEPTISR[10];
71  __I uint32_t Reserved3[2];
72  __O uint32_t USBHS_DEVEPTICR[10];
73  __I uint32_t Reserved4[2];
74  __O uint32_t USBHS_DEVEPTIFR[10];
75  __I uint32_t Reserved5[2];
76  __I uint32_t USBHS_DEVEPTIMR[10];
77  __I uint32_t Reserved6[2];
78  __O uint32_t USBHS_DEVEPTIER[10];
79  __I uint32_t Reserved7[2];
80  __O uint32_t USBHS_DEVEPTIDR[10];
81  __I uint32_t Reserved8[50];
83  __I uint32_t Reserved9[32];
84  __IO uint32_t USBHS_HSTCTRL;
85  __I uint32_t USBHS_HSTISR;
86  __O uint32_t USBHS_HSTICR;
87  __O uint32_t USBHS_HSTIFR;
88  __I uint32_t USBHS_HSTIMR;
89  __O uint32_t USBHS_HSTIDR;
90  __O uint32_t USBHS_HSTIER;
91  __IO uint32_t USBHS_HSTPIP;
92  __IO uint32_t USBHS_HSTFNUM;
93  __IO uint32_t USBHS_HSTADDR1;
94  __IO uint32_t USBHS_HSTADDR2;
95  __IO uint32_t USBHS_HSTADDR3;
96  __I uint32_t Reserved10[52];
97  __IO uint32_t USBHS_HSTPIPCFG[10];
98  __I uint32_t Reserved11[2];
99  __I uint32_t USBHS_HSTPIPISR[10];
100  __I uint32_t Reserved12[2];
101  __O uint32_t USBHS_HSTPIPICR[10];
102  __I uint32_t Reserved13[2];
103  __O uint32_t USBHS_HSTPIPIFR[10];
104  __I uint32_t Reserved14[2];
105  __I uint32_t USBHS_HSTPIPIMR[10];
106  __I uint32_t Reserved15[2];
107  __O uint32_t USBHS_HSTPIPIER[10];
108  __I uint32_t Reserved16[2];
109  __O uint32_t USBHS_HSTPIPIDR[10];
110  __I uint32_t Reserved17[2];
111  __IO uint32_t USBHS_HSTPIPINRQ[10];
112  __I uint32_t Reserved18[2];
113  __IO uint32_t USBHS_HSTPIPERR[10];
114  __I uint32_t Reserved19[26];
115  UsbhsHstdma USBHS_HSTDMA[USBHSHSTDMA_NUMBER];
116  __I uint32_t Reserved20[32];
117  __IO uint32_t USBHS_CTRL;
118  __I uint32_t USBHS_SR;
119  __O uint32_t USBHS_SCR;
120  __O uint32_t USBHS_SFR;
121 } Usbhs;
122 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
123 /* -------- USBHS_DEVCTRL : (USBHS Offset: 0x0000) Device General Control Register -------- */
124 #define USBHS_DEVCTRL_UADD_Pos 0
125 #define USBHS_DEVCTRL_UADD_Msk (0x7fu << USBHS_DEVCTRL_UADD_Pos)
126 #define USBHS_DEVCTRL_UADD(value) ((USBHS_DEVCTRL_UADD_Msk & ((value) << USBHS_DEVCTRL_UADD_Pos)))
127 #define USBHS_DEVCTRL_ADDEN (0x1u << 7)
128 #define USBHS_DEVCTRL_DETACH (0x1u << 8)
129 #define USBHS_DEVCTRL_RMWKUP (0x1u << 9)
130 #define USBHS_DEVCTRL_SPDCONF_Pos 10
131 #define USBHS_DEVCTRL_SPDCONF_Msk (0x3u << USBHS_DEVCTRL_SPDCONF_Pos)
132 #define USBHS_DEVCTRL_SPDCONF(value) ((USBHS_DEVCTRL_SPDCONF_Msk & ((value) << USBHS_DEVCTRL_SPDCONF_Pos)))
133 #define USBHS_DEVCTRL_SPDCONF_NORMAL (0x0u << 10)
134 #define USBHS_DEVCTRL_SPDCONF_LOW_POWER (0x1u << 10)
135 #define USBHS_DEVCTRL_SPDCONF_HIGH_SPEED (0x2u << 10)
136 #define USBHS_DEVCTRL_SPDCONF_FORCED_FS (0x3u << 10)
137 #define USBHS_DEVCTRL_LS (0x1u << 12)
138 #define USBHS_DEVCTRL_TSTJ (0x1u << 13)
139 #define USBHS_DEVCTRL_TSTK (0x1u << 14)
140 #define USBHS_DEVCTRL_TSTPCKT (0x1u << 15)
141 #define USBHS_DEVCTRL_OPMODE2 (0x1u << 16)
142 /* -------- USBHS_DEVISR : (USBHS Offset: 0x0004) Device Global Interrupt Status Register -------- */
143 #define USBHS_DEVISR_SUSP (0x1u << 0)
144 #define USBHS_DEVISR_MSOF (0x1u << 1)
145 #define USBHS_DEVISR_SOF (0x1u << 2)
146 #define USBHS_DEVISR_EORST (0x1u << 3)
147 #define USBHS_DEVISR_WAKEUP (0x1u << 4)
148 #define USBHS_DEVISR_EORSM (0x1u << 5)
149 #define USBHS_DEVISR_UPRSM (0x1u << 6)
150 #define USBHS_DEVISR_PEP_0 (0x1u << 12)
151 #define USBHS_DEVISR_PEP_1 (0x1u << 13)
152 #define USBHS_DEVISR_PEP_2 (0x1u << 14)
153 #define USBHS_DEVISR_PEP_3 (0x1u << 15)
154 #define USBHS_DEVISR_PEP_4 (0x1u << 16)
155 #define USBHS_DEVISR_PEP_5 (0x1u << 17)
156 #define USBHS_DEVISR_PEP_6 (0x1u << 18)
157 #define USBHS_DEVISR_PEP_7 (0x1u << 19)
158 #define USBHS_DEVISR_PEP_8 (0x1u << 20)
159 #define USBHS_DEVISR_PEP_9 (0x1u << 21)
160 #define USBHS_DEVISR_PEP_10 (0x1u << 22)
161 #define USBHS_DEVISR_PEP_11 (0x1u << 23)
162 #define USBHS_DEVISR_DMA_1 (0x1u << 25)
163 #define USBHS_DEVISR_DMA_2 (0x1u << 26)
164 #define USBHS_DEVISR_DMA_3 (0x1u << 27)
165 #define USBHS_DEVISR_DMA_4 (0x1u << 28)
166 #define USBHS_DEVISR_DMA_5 (0x1u << 29)
167 #define USBHS_DEVISR_DMA_6 (0x1u << 30)
168 #define USBHS_DEVISR_DMA_7 (0x1u << 31)
169 /* -------- USBHS_DEVICR : (USBHS Offset: 0x0008) Device Global Interrupt Clear Register -------- */
170 #define USBHS_DEVICR_SUSPC (0x1u << 0)
171 #define USBHS_DEVICR_MSOFC (0x1u << 1)
172 #define USBHS_DEVICR_SOFC (0x1u << 2)
173 #define USBHS_DEVICR_EORSTC (0x1u << 3)
174 #define USBHS_DEVICR_WAKEUPC (0x1u << 4)
175 #define USBHS_DEVICR_EORSMC (0x1u << 5)
176 #define USBHS_DEVICR_UPRSMC (0x1u << 6)
177 /* -------- USBHS_DEVIFR : (USBHS Offset: 0x000C) Device Global Interrupt Set Register -------- */
178 #define USBHS_DEVIFR_SUSPS (0x1u << 0)
179 #define USBHS_DEVIFR_MSOFS (0x1u << 1)
180 #define USBHS_DEVIFR_SOFS (0x1u << 2)
181 #define USBHS_DEVIFR_EORSTS (0x1u << 3)
182 #define USBHS_DEVIFR_WAKEUPS (0x1u << 4)
183 #define USBHS_DEVIFR_EORSMS (0x1u << 5)
184 #define USBHS_DEVIFR_UPRSMS (0x1u << 6)
185 #define USBHS_DEVIFR_DMA_1 (0x1u << 25)
186 #define USBHS_DEVIFR_DMA_2 (0x1u << 26)
187 #define USBHS_DEVIFR_DMA_3 (0x1u << 27)
188 #define USBHS_DEVIFR_DMA_4 (0x1u << 28)
189 #define USBHS_DEVIFR_DMA_5 (0x1u << 29)
190 #define USBHS_DEVIFR_DMA_6 (0x1u << 30)
191 #define USBHS_DEVIFR_DMA_7 (0x1u << 31)
192 /* -------- USBHS_DEVIMR : (USBHS Offset: 0x0010) Device Global Interrupt Mask Register -------- */
193 #define USBHS_DEVIMR_SUSPE (0x1u << 0)
194 #define USBHS_DEVIMR_MSOFE (0x1u << 1)
195 #define USBHS_DEVIMR_SOFE (0x1u << 2)
196 #define USBHS_DEVIMR_EORSTE (0x1u << 3)
197 #define USBHS_DEVIMR_WAKEUPE (0x1u << 4)
198 #define USBHS_DEVIMR_EORSME (0x1u << 5)
199 #define USBHS_DEVIMR_UPRSME (0x1u << 6)
200 #define USBHS_DEVIMR_PEP_0 (0x1u << 12)
201 #define USBHS_DEVIMR_PEP_1 (0x1u << 13)
202 #define USBHS_DEVIMR_PEP_2 (0x1u << 14)
203 #define USBHS_DEVIMR_PEP_3 (0x1u << 15)
204 #define USBHS_DEVIMR_PEP_4 (0x1u << 16)
205 #define USBHS_DEVIMR_PEP_5 (0x1u << 17)
206 #define USBHS_DEVIMR_PEP_6 (0x1u << 18)
207 #define USBHS_DEVIMR_PEP_7 (0x1u << 19)
208 #define USBHS_DEVIMR_PEP_8 (0x1u << 20)
209 #define USBHS_DEVIMR_PEP_9 (0x1u << 21)
210 #define USBHS_DEVIMR_PEP_10 (0x1u << 22)
211 #define USBHS_DEVIMR_PEP_11 (0x1u << 23)
212 #define USBHS_DEVIMR_DMA_1 (0x1u << 25)
213 #define USBHS_DEVIMR_DMA_2 (0x1u << 26)
214 #define USBHS_DEVIMR_DMA_3 (0x1u << 27)
215 #define USBHS_DEVIMR_DMA_4 (0x1u << 28)
216 #define USBHS_DEVIMR_DMA_5 (0x1u << 29)
217 #define USBHS_DEVIMR_DMA_6 (0x1u << 30)
218 #define USBHS_DEVIMR_DMA_7 (0x1u << 31)
219 /* -------- USBHS_DEVIDR : (USBHS Offset: 0x0014) Device Global Interrupt Disable Register -------- */
220 #define USBHS_DEVIDR_SUSPEC (0x1u << 0)
221 #define USBHS_DEVIDR_MSOFEC (0x1u << 1)
222 #define USBHS_DEVIDR_SOFEC (0x1u << 2)
223 #define USBHS_DEVIDR_EORSTEC (0x1u << 3)
224 #define USBHS_DEVIDR_WAKEUPEC (0x1u << 4)
225 #define USBHS_DEVIDR_EORSMEC (0x1u << 5)
226 #define USBHS_DEVIDR_UPRSMEC (0x1u << 6)
227 #define USBHS_DEVIDR_PEP_0 (0x1u << 12)
228 #define USBHS_DEVIDR_PEP_1 (0x1u << 13)
229 #define USBHS_DEVIDR_PEP_2 (0x1u << 14)
230 #define USBHS_DEVIDR_PEP_3 (0x1u << 15)
231 #define USBHS_DEVIDR_PEP_4 (0x1u << 16)
232 #define USBHS_DEVIDR_PEP_5 (0x1u << 17)
233 #define USBHS_DEVIDR_PEP_6 (0x1u << 18)
234 #define USBHS_DEVIDR_PEP_7 (0x1u << 19)
235 #define USBHS_DEVIDR_PEP_8 (0x1u << 20)
236 #define USBHS_DEVIDR_PEP_9 (0x1u << 21)
237 #define USBHS_DEVIDR_PEP_10 (0x1u << 22)
238 #define USBHS_DEVIDR_PEP_11 (0x1u << 23)
239 #define USBHS_DEVIDR_DMA_1 (0x1u << 25)
240 #define USBHS_DEVIDR_DMA_2 (0x1u << 26)
241 #define USBHS_DEVIDR_DMA_3 (0x1u << 27)
242 #define USBHS_DEVIDR_DMA_4 (0x1u << 28)
243 #define USBHS_DEVIDR_DMA_5 (0x1u << 29)
244 #define USBHS_DEVIDR_DMA_6 (0x1u << 30)
245 #define USBHS_DEVIDR_DMA_7 (0x1u << 31)
246 /* -------- USBHS_DEVIER : (USBHS Offset: 0x0018) Device Global Interrupt Enable Register -------- */
247 #define USBHS_DEVIER_SUSPES (0x1u << 0)
248 #define USBHS_DEVIER_MSOFES (0x1u << 1)
249 #define USBHS_DEVIER_SOFES (0x1u << 2)
250 #define USBHS_DEVIER_EORSTES (0x1u << 3)
251 #define USBHS_DEVIER_WAKEUPES (0x1u << 4)
252 #define USBHS_DEVIER_EORSMES (0x1u << 5)
253 #define USBHS_DEVIER_UPRSMES (0x1u << 6)
254 #define USBHS_DEVIER_PEP_0 (0x1u << 12)
255 #define USBHS_DEVIER_PEP_1 (0x1u << 13)
256 #define USBHS_DEVIER_PEP_2 (0x1u << 14)
257 #define USBHS_DEVIER_PEP_3 (0x1u << 15)
258 #define USBHS_DEVIER_PEP_4 (0x1u << 16)
259 #define USBHS_DEVIER_PEP_5 (0x1u << 17)
260 #define USBHS_DEVIER_PEP_6 (0x1u << 18)
261 #define USBHS_DEVIER_PEP_7 (0x1u << 19)
262 #define USBHS_DEVIER_PEP_8 (0x1u << 20)
263 #define USBHS_DEVIER_PEP_9 (0x1u << 21)
264 #define USBHS_DEVIER_PEP_10 (0x1u << 22)
265 #define USBHS_DEVIER_PEP_11 (0x1u << 23)
266 #define USBHS_DEVIER_DMA_1 (0x1u << 25)
267 #define USBHS_DEVIER_DMA_2 (0x1u << 26)
268 #define USBHS_DEVIER_DMA_3 (0x1u << 27)
269 #define USBHS_DEVIER_DMA_4 (0x1u << 28)
270 #define USBHS_DEVIER_DMA_5 (0x1u << 29)
271 #define USBHS_DEVIER_DMA_6 (0x1u << 30)
272 #define USBHS_DEVIER_DMA_7 (0x1u << 31)
273 /* -------- USBHS_DEVEPT : (USBHS Offset: 0x001C) Device Endpoint Register -------- */
274 #define USBHS_DEVEPT_EPEN0 (0x1u << 0)
275 #define USBHS_DEVEPT_EPEN1 (0x1u << 1)
276 #define USBHS_DEVEPT_EPEN2 (0x1u << 2)
277 #define USBHS_DEVEPT_EPEN3 (0x1u << 3)
278 #define USBHS_DEVEPT_EPEN4 (0x1u << 4)
279 #define USBHS_DEVEPT_EPEN5 (0x1u << 5)
280 #define USBHS_DEVEPT_EPEN6 (0x1u << 6)
281 #define USBHS_DEVEPT_EPEN7 (0x1u << 7)
282 #define USBHS_DEVEPT_EPEN8 (0x1u << 8)
283 #define USBHS_DEVEPT_EPRST0 (0x1u << 16)
284 #define USBHS_DEVEPT_EPRST1 (0x1u << 17)
285 #define USBHS_DEVEPT_EPRST2 (0x1u << 18)
286 #define USBHS_DEVEPT_EPRST3 (0x1u << 19)
287 #define USBHS_DEVEPT_EPRST4 (0x1u << 20)
288 #define USBHS_DEVEPT_EPRST5 (0x1u << 21)
289 #define USBHS_DEVEPT_EPRST6 (0x1u << 22)
290 #define USBHS_DEVEPT_EPRST7 (0x1u << 23)
291 #define USBHS_DEVEPT_EPRST8 (0x1u << 24)
292 /* -------- USBHS_DEVFNUM : (USBHS Offset: 0x0020) Device Frame Number Register -------- */
293 #define USBHS_DEVFNUM_MFNUM_Pos 0
294 #define USBHS_DEVFNUM_MFNUM_Msk (0x7u << USBHS_DEVFNUM_MFNUM_Pos)
295 #define USBHS_DEVFNUM_FNUM_Pos 3
296 #define USBHS_DEVFNUM_FNUM_Msk (0x7ffu << USBHS_DEVFNUM_FNUM_Pos)
297 #define USBHS_DEVFNUM_FNCERR (0x1u << 15)
298 /* -------- USBHS_DEVEPTCFG[10] : (USBHS Offset: 0x100) Device Endpoint Configuration Register (n = 0) -------- */
299 #define USBHS_DEVEPTCFG_ALLOC (0x1u << 1)
300 #define USBHS_DEVEPTCFG_EPBK_Pos 2
301 #define USBHS_DEVEPTCFG_EPBK_Msk (0x3u << USBHS_DEVEPTCFG_EPBK_Pos)
302 #define USBHS_DEVEPTCFG_EPBK(value) ((USBHS_DEVEPTCFG_EPBK_Msk & ((value) << USBHS_DEVEPTCFG_EPBK_Pos)))
303 #define USBHS_DEVEPTCFG_EPBK_1_BANK (0x0u << 2)
304 #define USBHS_DEVEPTCFG_EPBK_2_BANK (0x1u << 2)
305 #define USBHS_DEVEPTCFG_EPBK_3_BANK (0x2u << 2)
306 #define USBHS_DEVEPTCFG_EPSIZE_Pos 4
307 #define USBHS_DEVEPTCFG_EPSIZE_Msk (0x7u << USBHS_DEVEPTCFG_EPSIZE_Pos)
308 #define USBHS_DEVEPTCFG_EPSIZE(value) ((USBHS_DEVEPTCFG_EPSIZE_Msk & ((value) << USBHS_DEVEPTCFG_EPSIZE_Pos)))
309 #define USBHS_DEVEPTCFG_EPSIZE_8_BYTE (0x0u << 4)
310 #define USBHS_DEVEPTCFG_EPSIZE_16_BYTE (0x1u << 4)
311 #define USBHS_DEVEPTCFG_EPSIZE_32_BYTE (0x2u << 4)
312 #define USBHS_DEVEPTCFG_EPSIZE_64_BYTE (0x3u << 4)
313 #define USBHS_DEVEPTCFG_EPSIZE_128_BYTE (0x4u << 4)
314 #define USBHS_DEVEPTCFG_EPSIZE_256_BYTE (0x5u << 4)
315 #define USBHS_DEVEPTCFG_EPSIZE_512_BYTE (0x6u << 4)
316 #define USBHS_DEVEPTCFG_EPSIZE_1024_BYTE (0x7u << 4)
317 #define USBHS_DEVEPTCFG_EPDIR (0x1u << 8)
318 #define USBHS_DEVEPTCFG_EPDIR_OUT (0x0u << 8)
319 #define USBHS_DEVEPTCFG_EPDIR_IN (0x1u << 8)
320 #define USBHS_DEVEPTCFG_AUTOSW (0x1u << 9)
321 #define USBHS_DEVEPTCFG_EPTYPE_Pos 11
322 #define USBHS_DEVEPTCFG_EPTYPE_Msk (0x3u << USBHS_DEVEPTCFG_EPTYPE_Pos)
323 #define USBHS_DEVEPTCFG_EPTYPE(value) ((USBHS_DEVEPTCFG_EPTYPE_Msk & ((value) << USBHS_DEVEPTCFG_EPTYPE_Pos)))
324 #define USBHS_DEVEPTCFG_EPTYPE_CTRL (0x0u << 11)
325 #define USBHS_DEVEPTCFG_EPTYPE_ISO (0x1u << 11)
326 #define USBHS_DEVEPTCFG_EPTYPE_BLK (0x2u << 11)
327 #define USBHS_DEVEPTCFG_EPTYPE_INTRPT (0x3u << 11)
328 #define USBHS_DEVEPTCFG_NBTRANS_Pos 13
329 #define USBHS_DEVEPTCFG_NBTRANS_Msk (0x3u << USBHS_DEVEPTCFG_NBTRANS_Pos)
330 #define USBHS_DEVEPTCFG_NBTRANS(value) ((USBHS_DEVEPTCFG_NBTRANS_Msk & ((value) << USBHS_DEVEPTCFG_NBTRANS_Pos)))
331 #define USBHS_DEVEPTCFG_NBTRANS_0_TRANS (0x0u << 13)
332 #define USBHS_DEVEPTCFG_NBTRANS_1_TRANS (0x1u << 13)
333 #define USBHS_DEVEPTCFG_NBTRANS_2_TRANS (0x2u << 13)
334 #define USBHS_DEVEPTCFG_NBTRANS_3_TRANS (0x3u << 13)
335 /* -------- USBHS_DEVEPTISR[10] : (USBHS Offset: 0x130) Device Endpoint Status Register (n = 0) -------- */
336 #define USBHS_DEVEPTISR_TXINI (0x1u << 0)
337 #define USBHS_DEVEPTISR_RXOUTI (0x1u << 1)
338 #define USBHS_DEVEPTISR_RXSTPI (0x1u << 2)
339 #define USBHS_DEVEPTISR_NAKOUTI (0x1u << 3)
340 #define USBHS_DEVEPTISR_NAKINI (0x1u << 4)
341 #define USBHS_DEVEPTISR_OVERFI (0x1u << 5)
342 #define USBHS_DEVEPTISR_STALLEDI (0x1u << 6)
343 #define USBHS_DEVEPTISR_SHORTPACKET (0x1u << 7)
344 #define USBHS_DEVEPTISR_DTSEQ_Pos 8
345 #define USBHS_DEVEPTISR_DTSEQ_Msk (0x3u << USBHS_DEVEPTISR_DTSEQ_Pos)
346 #define USBHS_DEVEPTISR_DTSEQ_DATA0 (0x0u << 8)
347 #define USBHS_DEVEPTISR_DTSEQ_DATA1 (0x1u << 8)
348 #define USBHS_DEVEPTISR_DTSEQ_DATA2 (0x2u << 8)
349 #define USBHS_DEVEPTISR_DTSEQ_MDATA (0x3u << 8)
350 #define USBHS_DEVEPTISR_NBUSYBK_Pos 12
351 #define USBHS_DEVEPTISR_NBUSYBK_Msk (0x3u << USBHS_DEVEPTISR_NBUSYBK_Pos)
352 #define USBHS_DEVEPTISR_NBUSYBK_0_BUSY (0x0u << 12)
353 #define USBHS_DEVEPTISR_NBUSYBK_1_BUSY (0x1u << 12)
354 #define USBHS_DEVEPTISR_NBUSYBK_2_BUSY (0x2u << 12)
355 #define USBHS_DEVEPTISR_NBUSYBK_3_BUSY (0x3u << 12)
356 #define USBHS_DEVEPTISR_CURRBK_Pos 14
357 #define USBHS_DEVEPTISR_CURRBK_Msk (0x3u << USBHS_DEVEPTISR_CURRBK_Pos)
358 #define USBHS_DEVEPTISR_CURRBK_BANK0 (0x0u << 14)
359 #define USBHS_DEVEPTISR_CURRBK_BANK1 (0x1u << 14)
360 #define USBHS_DEVEPTISR_CURRBK_BANK2 (0x2u << 14)
361 #define USBHS_DEVEPTISR_RWALL (0x1u << 16)
362 #define USBHS_DEVEPTISR_CTRLDIR (0x1u << 17)
363 #define USBHS_DEVEPTISR_CFGOK (0x1u << 18)
364 #define USBHS_DEVEPTISR_BYCT_Pos 20
365 #define USBHS_DEVEPTISR_BYCT_Msk (0x7ffu << USBHS_DEVEPTISR_BYCT_Pos)
366 #define USBHS_DEVEPTISR_UNDERFI (0x1u << 2)
367 #define USBHS_DEVEPTISR_HBISOINERRI (0x1u << 3)
368 #define USBHS_DEVEPTISR_HBISOFLUSHI (0x1u << 4)
369 #define USBHS_DEVEPTISR_CRCERRI (0x1u << 6)
370 #define USBHS_DEVEPTISR_ERRORTRANS (0x1u << 10)
371 /* -------- USBHS_DEVEPTICR[10] : (USBHS Offset: 0x160) Device Endpoint Clear Register (n = 0) -------- */
372 #define USBHS_DEVEPTICR_TXINIC (0x1u << 0)
373 #define USBHS_DEVEPTICR_RXOUTIC (0x1u << 1)
374 #define USBHS_DEVEPTICR_RXSTPIC (0x1u << 2)
375 #define USBHS_DEVEPTICR_NAKOUTIC (0x1u << 3)
376 #define USBHS_DEVEPTICR_NAKINIC (0x1u << 4)
377 #define USBHS_DEVEPTICR_OVERFIC (0x1u << 5)
378 #define USBHS_DEVEPTICR_STALLEDIC (0x1u << 6)
379 #define USBHS_DEVEPTICR_SHORTPACKETC (0x1u << 7)
380 #define USBHS_DEVEPTICR_UNDERFIC (0x1u << 2)
381 #define USBHS_DEVEPTICR_HBISOINERRIC (0x1u << 3)
382 #define USBHS_DEVEPTICR_HBISOFLUSHIC (0x1u << 4)
383 #define USBHS_DEVEPTICR_CRCERRIC (0x1u << 6)
384 /* -------- USBHS_DEVEPTIFR[10] : (USBHS Offset: 0x190) Device Endpoint Set Register (n = 0) -------- */
385 #define USBHS_DEVEPTIFR_TXINIS (0x1u << 0)
386 #define USBHS_DEVEPTIFR_RXOUTIS (0x1u << 1)
387 #define USBHS_DEVEPTIFR_RXSTPIS (0x1u << 2)
388 #define USBHS_DEVEPTIFR_NAKOUTIS (0x1u << 3)
389 #define USBHS_DEVEPTIFR_NAKINIS (0x1u << 4)
390 #define USBHS_DEVEPTIFR_OVERFIS (0x1u << 5)
391 #define USBHS_DEVEPTIFR_STALLEDIS (0x1u << 6)
392 #define USBHS_DEVEPTIFR_SHORTPACKETS (0x1u << 7)
393 #define USBHS_DEVEPTIFR_NBUSYBKS (0x1u << 12)
394 #define USBHS_DEVEPTIFR_UNDERFIS (0x1u << 2)
395 #define USBHS_DEVEPTIFR_HBISOINERRIS (0x1u << 3)
396 #define USBHS_DEVEPTIFR_HBISOFLUSHIS (0x1u << 4)
397 #define USBHS_DEVEPTIFR_CRCERRIS (0x1u << 6)
398 /* -------- USBHS_DEVEPTIMR[10] : (USBHS Offset: 0x1C0) Device Endpoint Mask Register (n = 0) -------- */
399 #define USBHS_DEVEPTIMR_TXINE (0x1u << 0)
400 #define USBHS_DEVEPTIMR_RXOUTE (0x1u << 1)
401 #define USBHS_DEVEPTIMR_RXSTPE (0x1u << 2)
402 #define USBHS_DEVEPTIMR_NAKOUTE (0x1u << 3)
403 #define USBHS_DEVEPTIMR_NAKINE (0x1u << 4)
404 #define USBHS_DEVEPTIMR_OVERFE (0x1u << 5)
405 #define USBHS_DEVEPTIMR_STALLEDE (0x1u << 6)
406 #define USBHS_DEVEPTIMR_SHORTPACKETE (0x1u << 7)
407 #define USBHS_DEVEPTIMR_NBUSYBKE (0x1u << 12)
408 #define USBHS_DEVEPTIMR_KILLBK (0x1u << 13)
409 #define USBHS_DEVEPTIMR_FIFOCON (0x1u << 14)
410 #define USBHS_DEVEPTIMR_EPDISHDMA (0x1u << 16)
411 #define USBHS_DEVEPTIMR_NYETDIS (0x1u << 17)
412 #define USBHS_DEVEPTIMR_RSTDT (0x1u << 18)
413 #define USBHS_DEVEPTIMR_STALLRQ (0x1u << 19)
414 #define USBHS_DEVEPTIMR_UNDERFE (0x1u << 2)
415 #define USBHS_DEVEPTIMR_HBISOINERRE (0x1u << 3)
416 #define USBHS_DEVEPTIMR_HBISOFLUSHE (0x1u << 4)
417 #define USBHS_DEVEPTIMR_CRCERRE (0x1u << 6)
418 #define USBHS_DEVEPTIMR_MDATAE (0x1u << 8)
419 #define USBHS_DEVEPTIMR_DATAXE (0x1u << 9)
420 #define USBHS_DEVEPTIMR_ERRORTRANSE (0x1u << 10)
421 /* -------- USBHS_DEVEPTIER[10] : (USBHS Offset: 0x1F0) Device Endpoint Enable Register (n = 0) -------- */
422 #define USBHS_DEVEPTIER_TXINES (0x1u << 0)
423 #define USBHS_DEVEPTIER_RXOUTES (0x1u << 1)
424 #define USBHS_DEVEPTIER_RXSTPES (0x1u << 2)
425 #define USBHS_DEVEPTIER_NAKOUTES (0x1u << 3)
426 #define USBHS_DEVEPTIER_NAKINES (0x1u << 4)
427 #define USBHS_DEVEPTIER_OVERFES (0x1u << 5)
428 #define USBHS_DEVEPTIER_STALLEDES (0x1u << 6)
429 #define USBHS_DEVEPTIER_SHORTPACKETES (0x1u << 7)
430 #define USBHS_DEVEPTIER_NBUSYBKES (0x1u << 12)
431 #define USBHS_DEVEPTIER_KILLBKS (0x1u << 13)
432 #define USBHS_DEVEPTIER_FIFOCONS (0x1u << 14)
433 #define USBHS_DEVEPTIER_EPDISHDMAS (0x1u << 16)
434 #define USBHS_DEVEPTIER_NYETDISS (0x1u << 17)
435 #define USBHS_DEVEPTIER_RSTDTS (0x1u << 18)
436 #define USBHS_DEVEPTIER_STALLRQS (0x1u << 19)
437 #define USBHS_DEVEPTIER_UNDERFES (0x1u << 2)
438 #define USBHS_DEVEPTIER_HBISOINERRES (0x1u << 3)
439 #define USBHS_DEVEPTIER_HBISOFLUSHES (0x1u << 4)
440 #define USBHS_DEVEPTIER_CRCERRES (0x1u << 6)
441 #define USBHS_DEVEPTIER_MDATAES (0x1u << 8)
442 #define USBHS_DEVEPTIER_DATAXES (0x1u << 9)
443 #define USBHS_DEVEPTIER_ERRORTRANSES (0x1u << 10)
444 /* -------- USBHS_DEVEPTIDR[10] : (USBHS Offset: 0x220) Device Endpoint Disable Register (n = 0) -------- */
445 #define USBHS_DEVEPTIDR_TXINEC (0x1u << 0)
446 #define USBHS_DEVEPTIDR_RXOUTEC (0x1u << 1)
447 #define USBHS_DEVEPTIDR_RXSTPEC (0x1u << 2)
448 #define USBHS_DEVEPTIDR_NAKOUTEC (0x1u << 3)
449 #define USBHS_DEVEPTIDR_NAKINEC (0x1u << 4)
450 #define USBHS_DEVEPTIDR_OVERFEC (0x1u << 5)
451 #define USBHS_DEVEPTIDR_STALLEDEC (0x1u << 6)
452 #define USBHS_DEVEPTIDR_SHORTPACKETEC (0x1u << 7)
453 #define USBHS_DEVEPTIDR_NBUSYBKEC (0x1u << 12)
454 #define USBHS_DEVEPTIDR_FIFOCONC (0x1u << 14)
455 #define USBHS_DEVEPTIDR_EPDISHDMAC (0x1u << 16)
456 #define USBHS_DEVEPTIDR_NYETDISC (0x1u << 17)
457 #define USBHS_DEVEPTIDR_STALLRQC (0x1u << 19)
458 #define USBHS_DEVEPTIDR_UNDERFEC (0x1u << 2)
459 #define USBHS_DEVEPTIDR_HBISOINERREC (0x1u << 3)
460 #define USBHS_DEVEPTIDR_HBISOFLUSHEC (0x1u << 4)
461 #define USBHS_DEVEPTIDR_CRCERREC (0x1u << 6)
462 #define USBHS_DEVEPTIDR_MDATEC (0x1u << 8)
463 #define USBHS_DEVEPTIDR_DATAXEC (0x1u << 9)
464 #define USBHS_DEVEPTIDR_ERRORTRANSEC (0x1u << 10)
465 /* -------- USBHS_DEVDMANXTDSC : (USBHS Offset: N/A) Device DMA Channel Next Descriptor Address Register -------- */
466 #define USBHS_DEVDMANXTDSC_NXT_DSC_ADD_Pos 0
467 #define USBHS_DEVDMANXTDSC_NXT_DSC_ADD_Msk (0xffffffffu << USBHS_DEVDMANXTDSC_NXT_DSC_ADD_Pos)
468 #define USBHS_DEVDMANXTDSC_NXT_DSC_ADD(value) ((USBHS_DEVDMANXTDSC_NXT_DSC_ADD_Msk & ((value) << USBHS_DEVDMANXTDSC_NXT_DSC_ADD_Pos)))
469 /* -------- USBHS_DEVDMAADDRESS : (USBHS Offset: N/A) Device DMA Channel Address Register -------- */
470 #define USBHS_DEVDMAADDRESS_BUFF_ADD_Pos 0
471 #define USBHS_DEVDMAADDRESS_BUFF_ADD_Msk (0xffffffffu << USBHS_DEVDMAADDRESS_BUFF_ADD_Pos)
472 #define USBHS_DEVDMAADDRESS_BUFF_ADD(value) ((USBHS_DEVDMAADDRESS_BUFF_ADD_Msk & ((value) << USBHS_DEVDMAADDRESS_BUFF_ADD_Pos)))
473 /* -------- USBHS_DEVDMACONTROL : (USBHS Offset: N/A) Device DMA Channel Control Register -------- */
474 #define USBHS_DEVDMACONTROL_CHANN_ENB (0x1u << 0)
475 #define USBHS_DEVDMACONTROL_LDNXT_DSC (0x1u << 1)
476 #define USBHS_DEVDMACONTROL_END_TR_EN (0x1u << 2)
477 #define USBHS_DEVDMACONTROL_END_B_EN (0x1u << 3)
478 #define USBHS_DEVDMACONTROL_END_TR_IT (0x1u << 4)
479 #define USBHS_DEVDMACONTROL_END_BUFFIT (0x1u << 5)
480 #define USBHS_DEVDMACONTROL_DESC_LD_IT (0x1u << 6)
481 #define USBHS_DEVDMACONTROL_BURST_LCK (0x1u << 7)
482 #define USBHS_DEVDMACONTROL_BUFF_LENGTH_Pos 16
483 #define USBHS_DEVDMACONTROL_BUFF_LENGTH_Msk (0xffffu << USBHS_DEVDMACONTROL_BUFF_LENGTH_Pos)
484 #define USBHS_DEVDMACONTROL_BUFF_LENGTH(value) ((USBHS_DEVDMACONTROL_BUFF_LENGTH_Msk & ((value) << USBHS_DEVDMACONTROL_BUFF_LENGTH_Pos)))
485 /* -------- USBHS_DEVDMASTATUS : (USBHS Offset: N/A) Device DMA Channel Status Register -------- */
486 #define USBHS_DEVDMASTATUS_CHANN_ENB (0x1u << 0)
487 #define USBHS_DEVDMASTATUS_CHANN_ACT (0x1u << 1)
488 #define USBHS_DEVDMASTATUS_END_TR_ST (0x1u << 4)
489 #define USBHS_DEVDMASTATUS_END_BF_ST (0x1u << 5)
490 #define USBHS_DEVDMASTATUS_DESC_LDST (0x1u << 6)
491 #define USBHS_DEVDMASTATUS_BUFF_COUNT_Pos 16
492 #define USBHS_DEVDMASTATUS_BUFF_COUNT_Msk (0xffffu << USBHS_DEVDMASTATUS_BUFF_COUNT_Pos)
493 #define USBHS_DEVDMASTATUS_BUFF_COUNT(value) ((USBHS_DEVDMASTATUS_BUFF_COUNT_Msk & ((value) << USBHS_DEVDMASTATUS_BUFF_COUNT_Pos)))
494 /* -------- USBHS_HSTCTRL : (USBHS Offset: 0x0400) Host General Control Register -------- */
495 #define USBHS_HSTCTRL_SOFE (0x1u << 8)
496 #define USBHS_HSTCTRL_RESET (0x1u << 9)
497 #define USBHS_HSTCTRL_RESUME (0x1u << 10)
498 #define USBHS_HSTCTRL_SPDCONF_Pos 12
499 #define USBHS_HSTCTRL_SPDCONF_Msk (0x3u << USBHS_HSTCTRL_SPDCONF_Pos)
500 #define USBHS_HSTCTRL_SPDCONF(value) ((USBHS_HSTCTRL_SPDCONF_Msk & ((value) << USBHS_HSTCTRL_SPDCONF_Pos)))
501 #define USBHS_HSTCTRL_SPDCONF_NORMAL (0x0u << 12)
502 #define USBHS_HSTCTRL_SPDCONF_LOW_POWER (0x1u << 12)
503 #define USBHS_HSTCTRL_SPDCONF_HIGH_SPEED (0x2u << 12)
504 #define USBHS_HSTCTRL_SPDCONF_FORCED_FS (0x3u << 12)
505 /* -------- USBHS_HSTISR : (USBHS Offset: 0x0404) Host Global Interrupt Status Register -------- */
506 #define USBHS_HSTISR_DCONNI (0x1u << 0)
507 #define USBHS_HSTISR_DDISCI (0x1u << 1)
508 #define USBHS_HSTISR_RSTI (0x1u << 2)
509 #define USBHS_HSTISR_RSMEDI (0x1u << 3)
510 #define USBHS_HSTISR_RXRSMI (0x1u << 4)
511 #define USBHS_HSTISR_HSOFI (0x1u << 5)
512 #define USBHS_HSTISR_HWUPI (0x1u << 6)
513 #define USBHS_HSTISR_PEP_0 (0x1u << 8)
514 #define USBHS_HSTISR_PEP_1 (0x1u << 9)
515 #define USBHS_HSTISR_PEP_2 (0x1u << 10)
516 #define USBHS_HSTISR_PEP_3 (0x1u << 11)
517 #define USBHS_HSTISR_PEP_4 (0x1u << 12)
518 #define USBHS_HSTISR_PEP_5 (0x1u << 13)
519 #define USBHS_HSTISR_PEP_6 (0x1u << 14)
520 #define USBHS_HSTISR_PEP_7 (0x1u << 15)
521 #define USBHS_HSTISR_PEP_8 (0x1u << 16)
522 #define USBHS_HSTISR_PEP_9 (0x1u << 17)
523 #define USBHS_HSTISR_PEP_10 (0x1u << 18)
524 #define USBHS_HSTISR_PEP_11 (0x1u << 19)
525 #define USBHS_HSTISR_DMA_1 (0x1u << 25)
526 #define USBHS_HSTISR_DMA_2 (0x1u << 26)
527 #define USBHS_HSTISR_DMA_3 (0x1u << 27)
528 #define USBHS_HSTISR_DMA_4 (0x1u << 28)
529 #define USBHS_HSTISR_DMA_5 (0x1u << 29)
530 #define USBHS_HSTISR_DMA_6 (0x1u << 30)
531 #define USBHS_HSTISR_DMA_7 (0x1u << 31)
532 /* -------- USBHS_HSTICR : (USBHS Offset: 0x0408) Host Global Interrupt Clear Register -------- */
533 #define USBHS_HSTICR_DCONNIC (0x1u << 0)
534 #define USBHS_HSTICR_DDISCIC (0x1u << 1)
535 #define USBHS_HSTICR_RSTIC (0x1u << 2)
536 #define USBHS_HSTICR_RSMEDIC (0x1u << 3)
537 #define USBHS_HSTICR_RXRSMIC (0x1u << 4)
538 #define USBHS_HSTICR_HSOFIC (0x1u << 5)
539 #define USBHS_HSTICR_HWUPIC (0x1u << 6)
540 /* -------- USBHS_HSTIFR : (USBHS Offset: 0x040C) Host Global Interrupt Set Register -------- */
541 #define USBHS_HSTIFR_DCONNIS (0x1u << 0)
542 #define USBHS_HSTIFR_DDISCIS (0x1u << 1)
543 #define USBHS_HSTIFR_RSTIS (0x1u << 2)
544 #define USBHS_HSTIFR_RSMEDIS (0x1u << 3)
545 #define USBHS_HSTIFR_RXRSMIS (0x1u << 4)
546 #define USBHS_HSTIFR_HSOFIS (0x1u << 5)
547 #define USBHS_HSTIFR_HWUPIS (0x1u << 6)
548 #define USBHS_HSTIFR_DMA_1 (0x1u << 25)
549 #define USBHS_HSTIFR_DMA_2 (0x1u << 26)
550 #define USBHS_HSTIFR_DMA_3 (0x1u << 27)
551 #define USBHS_HSTIFR_DMA_4 (0x1u << 28)
552 #define USBHS_HSTIFR_DMA_5 (0x1u << 29)
553 #define USBHS_HSTIFR_DMA_6 (0x1u << 30)
554 #define USBHS_HSTIFR_DMA_7 (0x1u << 31)
555 /* -------- USBHS_HSTIMR : (USBHS Offset: 0x0410) Host Global Interrupt Mask Register -------- */
556 #define USBHS_HSTIMR_DCONNIE (0x1u << 0)
557 #define USBHS_HSTIMR_DDISCIE (0x1u << 1)
558 #define USBHS_HSTIMR_RSTIE (0x1u << 2)
559 #define USBHS_HSTIMR_RSMEDIE (0x1u << 3)
560 #define USBHS_HSTIMR_RXRSMIE (0x1u << 4)
561 #define USBHS_HSTIMR_HSOFIE (0x1u << 5)
562 #define USBHS_HSTIMR_HWUPIE (0x1u << 6)
563 #define USBHS_HSTIMR_PEP_0 (0x1u << 8)
564 #define USBHS_HSTIMR_PEP_1 (0x1u << 9)
565 #define USBHS_HSTIMR_PEP_2 (0x1u << 10)
566 #define USBHS_HSTIMR_PEP_3 (0x1u << 11)
567 #define USBHS_HSTIMR_PEP_4 (0x1u << 12)
568 #define USBHS_HSTIMR_PEP_5 (0x1u << 13)
569 #define USBHS_HSTIMR_PEP_6 (0x1u << 14)
570 #define USBHS_HSTIMR_PEP_7 (0x1u << 15)
571 #define USBHS_HSTIMR_PEP_8 (0x1u << 16)
572 #define USBHS_HSTIMR_PEP_9 (0x1u << 17)
573 #define USBHS_HSTIMR_PEP_10 (0x1u << 18)
574 #define USBHS_HSTIMR_PEP_11 (0x1u << 19)
575 #define USBHS_HSTIMR_DMA_1 (0x1u << 25)
576 #define USBHS_HSTIMR_DMA_2 (0x1u << 26)
577 #define USBHS_HSTIMR_DMA_3 (0x1u << 27)
578 #define USBHS_HSTIMR_DMA_4 (0x1u << 28)
579 #define USBHS_HSTIMR_DMA_5 (0x1u << 29)
580 #define USBHS_HSTIMR_DMA_6 (0x1u << 30)
581 #define USBHS_HSTIMR_DMA_7 (0x1u << 31)
582 /* -------- USBHS_HSTIDR : (USBHS Offset: 0x0414) Host Global Interrupt Disable Register -------- */
583 #define USBHS_HSTIDR_DCONNIEC (0x1u << 0)
584 #define USBHS_HSTIDR_DDISCIEC (0x1u << 1)
585 #define USBHS_HSTIDR_RSTIEC (0x1u << 2)
586 #define USBHS_HSTIDR_RSMEDIEC (0x1u << 3)
587 #define USBHS_HSTIDR_RXRSMIEC (0x1u << 4)
588 #define USBHS_HSTIDR_HSOFIEC (0x1u << 5)
589 #define USBHS_HSTIDR_HWUPIEC (0x1u << 6)
590 #define USBHS_HSTIDR_PEP_0 (0x1u << 8)
591 #define USBHS_HSTIDR_PEP_1 (0x1u << 9)
592 #define USBHS_HSTIDR_PEP_2 (0x1u << 10)
593 #define USBHS_HSTIDR_PEP_3 (0x1u << 11)
594 #define USBHS_HSTIDR_PEP_4 (0x1u << 12)
595 #define USBHS_HSTIDR_PEP_5 (0x1u << 13)
596 #define USBHS_HSTIDR_PEP_6 (0x1u << 14)
597 #define USBHS_HSTIDR_PEP_7 (0x1u << 15)
598 #define USBHS_HSTIDR_PEP_8 (0x1u << 16)
599 #define USBHS_HSTIDR_PEP_9 (0x1u << 17)
600 #define USBHS_HSTIDR_PEP_10 (0x1u << 18)
601 #define USBHS_HSTIDR_PEP_11 (0x1u << 19)
602 #define USBHS_HSTIDR_DMA_1 (0x1u << 25)
603 #define USBHS_HSTIDR_DMA_2 (0x1u << 26)
604 #define USBHS_HSTIDR_DMA_3 (0x1u << 27)
605 #define USBHS_HSTIDR_DMA_4 (0x1u << 28)
606 #define USBHS_HSTIDR_DMA_5 (0x1u << 29)
607 #define USBHS_HSTIDR_DMA_6 (0x1u << 30)
608 #define USBHS_HSTIDR_DMA_7 (0x1u << 31)
609 /* -------- USBHS_HSTIER : (USBHS Offset: 0x0418) Host Global Interrupt Enable Register -------- */
610 #define USBHS_HSTIER_DCONNIES (0x1u << 0)
611 #define USBHS_HSTIER_DDISCIES (0x1u << 1)
612 #define USBHS_HSTIER_RSTIES (0x1u << 2)
613 #define USBHS_HSTIER_RSMEDIES (0x1u << 3)
614 #define USBHS_HSTIER_RXRSMIES (0x1u << 4)
615 #define USBHS_HSTIER_HSOFIES (0x1u << 5)
616 #define USBHS_HSTIER_HWUPIES (0x1u << 6)
617 #define USBHS_HSTIER_PEP_0 (0x1u << 8)
618 #define USBHS_HSTIER_PEP_1 (0x1u << 9)
619 #define USBHS_HSTIER_PEP_2 (0x1u << 10)
620 #define USBHS_HSTIER_PEP_3 (0x1u << 11)
621 #define USBHS_HSTIER_PEP_4 (0x1u << 12)
622 #define USBHS_HSTIER_PEP_5 (0x1u << 13)
623 #define USBHS_HSTIER_PEP_6 (0x1u << 14)
624 #define USBHS_HSTIER_PEP_7 (0x1u << 15)
625 #define USBHS_HSTIER_PEP_8 (0x1u << 16)
626 #define USBHS_HSTIER_PEP_9 (0x1u << 17)
627 #define USBHS_HSTIER_PEP_10 (0x1u << 18)
628 #define USBHS_HSTIER_PEP_11 (0x1u << 19)
629 #define USBHS_HSTIER_DMA_1 (0x1u << 25)
630 #define USBHS_HSTIER_DMA_2 (0x1u << 26)
631 #define USBHS_HSTIER_DMA_3 (0x1u << 27)
632 #define USBHS_HSTIER_DMA_4 (0x1u << 28)
633 #define USBHS_HSTIER_DMA_5 (0x1u << 29)
634 #define USBHS_HSTIER_DMA_6 (0x1u << 30)
635 #define USBHS_HSTIER_DMA_7 (0x1u << 31)
636 /* -------- USBHS_HSTPIP : (USBHS Offset: 0x0041C) Host Pipe Register -------- */
637 #define USBHS_HSTPIP_PEN0 (0x1u << 0)
638 #define USBHS_HSTPIP_PEN1 (0x1u << 1)
639 #define USBHS_HSTPIP_PEN2 (0x1u << 2)
640 #define USBHS_HSTPIP_PEN3 (0x1u << 3)
641 #define USBHS_HSTPIP_PEN4 (0x1u << 4)
642 #define USBHS_HSTPIP_PEN5 (0x1u << 5)
643 #define USBHS_HSTPIP_PEN6 (0x1u << 6)
644 #define USBHS_HSTPIP_PEN7 (0x1u << 7)
645 #define USBHS_HSTPIP_PEN8 (0x1u << 8)
646 #define USBHS_HSTPIP_PRST0 (0x1u << 16)
647 #define USBHS_HSTPIP_PRST1 (0x1u << 17)
648 #define USBHS_HSTPIP_PRST2 (0x1u << 18)
649 #define USBHS_HSTPIP_PRST3 (0x1u << 19)
650 #define USBHS_HSTPIP_PRST4 (0x1u << 20)
651 #define USBHS_HSTPIP_PRST5 (0x1u << 21)
652 #define USBHS_HSTPIP_PRST6 (0x1u << 22)
653 #define USBHS_HSTPIP_PRST7 (0x1u << 23)
654 #define USBHS_HSTPIP_PRST8 (0x1u << 24)
655 /* -------- USBHS_HSTFNUM : (USBHS Offset: 0x0420) Host Frame Number Register -------- */
656 #define USBHS_HSTFNUM_MFNUM_Pos 0
657 #define USBHS_HSTFNUM_MFNUM_Msk (0x7u << USBHS_HSTFNUM_MFNUM_Pos)
658 #define USBHS_HSTFNUM_MFNUM(value) ((USBHS_HSTFNUM_MFNUM_Msk & ((value) << USBHS_HSTFNUM_MFNUM_Pos)))
659 #define USBHS_HSTFNUM_FNUM_Pos 3
660 #define USBHS_HSTFNUM_FNUM_Msk (0x7ffu << USBHS_HSTFNUM_FNUM_Pos)
661 #define USBHS_HSTFNUM_FNUM(value) ((USBHS_HSTFNUM_FNUM_Msk & ((value) << USBHS_HSTFNUM_FNUM_Pos)))
662 #define USBHS_HSTFNUM_FLENHIGH_Pos 16
663 #define USBHS_HSTFNUM_FLENHIGH_Msk (0xffu << USBHS_HSTFNUM_FLENHIGH_Pos)
664 #define USBHS_HSTFNUM_FLENHIGH(value) ((USBHS_HSTFNUM_FLENHIGH_Msk & ((value) << USBHS_HSTFNUM_FLENHIGH_Pos)))
665 /* -------- USBHS_HSTADDR1 : (USBHS Offset: 0x0424) Host Address 1 Register -------- */
666 #define USBHS_HSTADDR1_HSTADDRP0_Pos 0
667 #define USBHS_HSTADDR1_HSTADDRP0_Msk (0x7fu << USBHS_HSTADDR1_HSTADDRP0_Pos)
668 #define USBHS_HSTADDR1_HSTADDRP0(value) ((USBHS_HSTADDR1_HSTADDRP0_Msk & ((value) << USBHS_HSTADDR1_HSTADDRP0_Pos)))
669 #define USBHS_HSTADDR1_HSTADDRP1_Pos 8
670 #define USBHS_HSTADDR1_HSTADDRP1_Msk (0x7fu << USBHS_HSTADDR1_HSTADDRP1_Pos)
671 #define USBHS_HSTADDR1_HSTADDRP1(value) ((USBHS_HSTADDR1_HSTADDRP1_Msk & ((value) << USBHS_HSTADDR1_HSTADDRP1_Pos)))
672 #define USBHS_HSTADDR1_HSTADDRP2_Pos 16
673 #define USBHS_HSTADDR1_HSTADDRP2_Msk (0x7fu << USBHS_HSTADDR1_HSTADDRP2_Pos)
674 #define USBHS_HSTADDR1_HSTADDRP2(value) ((USBHS_HSTADDR1_HSTADDRP2_Msk & ((value) << USBHS_HSTADDR1_HSTADDRP2_Pos)))
675 #define USBHS_HSTADDR1_HSTADDRP3_Pos 24
676 #define USBHS_HSTADDR1_HSTADDRP3_Msk (0x7fu << USBHS_HSTADDR1_HSTADDRP3_Pos)
677 #define USBHS_HSTADDR1_HSTADDRP3(value) ((USBHS_HSTADDR1_HSTADDRP3_Msk & ((value) << USBHS_HSTADDR1_HSTADDRP3_Pos)))
678 /* -------- USBHS_HSTADDR2 : (USBHS Offset: 0x0428) Host Address 2 Register -------- */
679 #define USBHS_HSTADDR2_HSTADDRP4_Pos 0
680 #define USBHS_HSTADDR2_HSTADDRP4_Msk (0x7fu << USBHS_HSTADDR2_HSTADDRP4_Pos)
681 #define USBHS_HSTADDR2_HSTADDRP4(value) ((USBHS_HSTADDR2_HSTADDRP4_Msk & ((value) << USBHS_HSTADDR2_HSTADDRP4_Pos)))
682 #define USBHS_HSTADDR2_HSTADDRP5_Pos 8
683 #define USBHS_HSTADDR2_HSTADDRP5_Msk (0x7fu << USBHS_HSTADDR2_HSTADDRP5_Pos)
684 #define USBHS_HSTADDR2_HSTADDRP5(value) ((USBHS_HSTADDR2_HSTADDRP5_Msk & ((value) << USBHS_HSTADDR2_HSTADDRP5_Pos)))
685 #define USBHS_HSTADDR2_HSTADDRP6_Pos 16
686 #define USBHS_HSTADDR2_HSTADDRP6_Msk (0x7fu << USBHS_HSTADDR2_HSTADDRP6_Pos)
687 #define USBHS_HSTADDR2_HSTADDRP6(value) ((USBHS_HSTADDR2_HSTADDRP6_Msk & ((value) << USBHS_HSTADDR2_HSTADDRP6_Pos)))
688 #define USBHS_HSTADDR2_HSTADDRP7_Pos 24
689 #define USBHS_HSTADDR2_HSTADDRP7_Msk (0x7fu << USBHS_HSTADDR2_HSTADDRP7_Pos)
690 #define USBHS_HSTADDR2_HSTADDRP7(value) ((USBHS_HSTADDR2_HSTADDRP7_Msk & ((value) << USBHS_HSTADDR2_HSTADDRP7_Pos)))
691 /* -------- USBHS_HSTADDR3 : (USBHS Offset: 0x042C) Host Address 3 Register -------- */
692 #define USBHS_HSTADDR3_HSTADDRP8_Pos 0
693 #define USBHS_HSTADDR3_HSTADDRP8_Msk (0x7fu << USBHS_HSTADDR3_HSTADDRP8_Pos)
694 #define USBHS_HSTADDR3_HSTADDRP8(value) ((USBHS_HSTADDR3_HSTADDRP8_Msk & ((value) << USBHS_HSTADDR3_HSTADDRP8_Pos)))
695 #define USBHS_HSTADDR3_HSTADDRP9_Pos 8
696 #define USBHS_HSTADDR3_HSTADDRP9_Msk (0x7fu << USBHS_HSTADDR3_HSTADDRP9_Pos)
697 #define USBHS_HSTADDR3_HSTADDRP9(value) ((USBHS_HSTADDR3_HSTADDRP9_Msk & ((value) << USBHS_HSTADDR3_HSTADDRP9_Pos)))
698 /* -------- USBHS_HSTPIPCFG[10] : (USBHS Offset: 0x500) Host Pipe Configuration Register (n = 0) -------- */
699 #define USBHS_HSTPIPCFG_ALLOC (0x1u << 1)
700 #define USBHS_HSTPIPCFG_PBK_Pos 2
701 #define USBHS_HSTPIPCFG_PBK_Msk (0x3u << USBHS_HSTPIPCFG_PBK_Pos)
702 #define USBHS_HSTPIPCFG_PBK(value) ((USBHS_HSTPIPCFG_PBK_Msk & ((value) << USBHS_HSTPIPCFG_PBK_Pos)))
703 #define USBHS_HSTPIPCFG_PBK_1_BANK (0x0u << 2)
704 #define USBHS_HSTPIPCFG_PBK_2_BANK (0x1u << 2)
705 #define USBHS_HSTPIPCFG_PBK_3_BANK (0x2u << 2)
706 #define USBHS_HSTPIPCFG_PSIZE_Pos 4
707 #define USBHS_HSTPIPCFG_PSIZE_Msk (0x7u << USBHS_HSTPIPCFG_PSIZE_Pos)
708 #define USBHS_HSTPIPCFG_PSIZE(value) ((USBHS_HSTPIPCFG_PSIZE_Msk & ((value) << USBHS_HSTPIPCFG_PSIZE_Pos)))
709 #define USBHS_HSTPIPCFG_PSIZE_8_BYTE (0x0u << 4)
710 #define USBHS_HSTPIPCFG_PSIZE_16_BYTE (0x1u << 4)
711 #define USBHS_HSTPIPCFG_PSIZE_32_BYTE (0x2u << 4)
712 #define USBHS_HSTPIPCFG_PSIZE_64_BYTE (0x3u << 4)
713 #define USBHS_HSTPIPCFG_PSIZE_128_BYTE (0x4u << 4)
714 #define USBHS_HSTPIPCFG_PSIZE_256_BYTE (0x5u << 4)
715 #define USBHS_HSTPIPCFG_PSIZE_512_BYTE (0x6u << 4)
716 #define USBHS_HSTPIPCFG_PSIZE_1024_BYTE (0x7u << 4)
717 #define USBHS_HSTPIPCFG_PTOKEN_Pos 8
718 #define USBHS_HSTPIPCFG_PTOKEN_Msk (0x3u << USBHS_HSTPIPCFG_PTOKEN_Pos)
719 #define USBHS_HSTPIPCFG_PTOKEN(value) ((USBHS_HSTPIPCFG_PTOKEN_Msk & ((value) << USBHS_HSTPIPCFG_PTOKEN_Pos)))
720 #define USBHS_HSTPIPCFG_PTOKEN_SETUP (0x0u << 8)
721 #define USBHS_HSTPIPCFG_PTOKEN_IN (0x1u << 8)
722 #define USBHS_HSTPIPCFG_PTOKEN_OUT (0x2u << 8)
723 #define USBHS_HSTPIPCFG_AUTOSW (0x1u << 10)
724 #define USBHS_HSTPIPCFG_PTYPE_Pos 12
725 #define USBHS_HSTPIPCFG_PTYPE_Msk (0x3u << USBHS_HSTPIPCFG_PTYPE_Pos)
726 #define USBHS_HSTPIPCFG_PTYPE(value) ((USBHS_HSTPIPCFG_PTYPE_Msk & ((value) << USBHS_HSTPIPCFG_PTYPE_Pos)))
727 #define USBHS_HSTPIPCFG_PTYPE_CTRL (0x0u << 12)
728 #define USBHS_HSTPIPCFG_PTYPE_ISO (0x1u << 12)
729 #define USBHS_HSTPIPCFG_PTYPE_BLK (0x2u << 12)
730 #define USBHS_HSTPIPCFG_PTYPE_INTRPT (0x3u << 12)
731 #define USBHS_HSTPIPCFG_PEPNUM_Pos 16
732 #define USBHS_HSTPIPCFG_PEPNUM_Msk (0xfu << USBHS_HSTPIPCFG_PEPNUM_Pos)
733 #define USBHS_HSTPIPCFG_PEPNUM(value) ((USBHS_HSTPIPCFG_PEPNUM_Msk & ((value) << USBHS_HSTPIPCFG_PEPNUM_Pos)))
734 #define USBHS_HSTPIPCFG_INTFRQ_Pos 24
735 #define USBHS_HSTPIPCFG_INTFRQ_Msk (0xffu << USBHS_HSTPIPCFG_INTFRQ_Pos)
736 #define USBHS_HSTPIPCFG_INTFRQ(value) ((USBHS_HSTPIPCFG_INTFRQ_Msk & ((value) << USBHS_HSTPIPCFG_INTFRQ_Pos)))
737 #define USBHS_HSTPIPCFG_PINGEN (0x1u << 20)
738 #define USBHS_HSTPIPCFG_BINTERVAL_Pos 24
739 #define USBHS_HSTPIPCFG_BINTERVAL_Msk (0xffu << USBHS_HSTPIPCFG_BINTERVAL_Pos)
740 #define USBHS_HSTPIPCFG_BINTERVAL(value) ((USBHS_HSTPIPCFG_BINTERVAL_Msk & ((value) << USBHS_HSTPIPCFG_BINTERVAL_Pos)))
741 /* -------- USBHS_HSTPIPISR[10] : (USBHS Offset: 0x530) Host Pipe Status Register (n = 0) -------- */
742 #define USBHS_HSTPIPISR_RXINI (0x1u << 0)
743 #define USBHS_HSTPIPISR_TXOUTI (0x1u << 1)
744 #define USBHS_HSTPIPISR_TXSTPI (0x1u << 2)
745 #define USBHS_HSTPIPISR_PERRI (0x1u << 3)
746 #define USBHS_HSTPIPISR_NAKEDI (0x1u << 4)
747 #define USBHS_HSTPIPISR_OVERFI (0x1u << 5)
748 #define USBHS_HSTPIPISR_RXSTALLDI (0x1u << 6)
749 #define USBHS_HSTPIPISR_SHORTPACKETI (0x1u << 7)
750 #define USBHS_HSTPIPISR_DTSEQ_Pos 8
751 #define USBHS_HSTPIPISR_DTSEQ_Msk (0x3u << USBHS_HSTPIPISR_DTSEQ_Pos)
752 #define USBHS_HSTPIPISR_DTSEQ_DATA0 (0x0u << 8)
753 #define USBHS_HSTPIPISR_DTSEQ_DATA1 (0x1u << 8)
754 #define USBHS_HSTPIPISR_NBUSYBK_Pos 12
755 #define USBHS_HSTPIPISR_NBUSYBK_Msk (0x3u << USBHS_HSTPIPISR_NBUSYBK_Pos)
756 #define USBHS_HSTPIPISR_NBUSYBK_0_BUSY (0x0u << 12)
757 #define USBHS_HSTPIPISR_NBUSYBK_1_BUSY (0x1u << 12)
758 #define USBHS_HSTPIPISR_NBUSYBK_2_BUSY (0x2u << 12)
759 #define USBHS_HSTPIPISR_NBUSYBK_3_BUSY (0x3u << 12)
760 #define USBHS_HSTPIPISR_CURRBK_Pos 14
761 #define USBHS_HSTPIPISR_CURRBK_Msk (0x3u << USBHS_HSTPIPISR_CURRBK_Pos)
762 #define USBHS_HSTPIPISR_CURRBK_BANK0 (0x0u << 14)
763 #define USBHS_HSTPIPISR_CURRBK_BANK1 (0x1u << 14)
764 #define USBHS_HSTPIPISR_CURRBK_BANK2 (0x2u << 14)
765 #define USBHS_HSTPIPISR_RWALL (0x1u << 16)
766 #define USBHS_HSTPIPISR_CFGOK (0x1u << 18)
767 #define USBHS_HSTPIPISR_PBYCT_Pos 20
768 #define USBHS_HSTPIPISR_PBYCT_Msk (0x7ffu << USBHS_HSTPIPISR_PBYCT_Pos)
769 #define USBHS_HSTPIPISR_UNDERFI (0x1u << 2)
770 #define USBHS_HSTPIPISR_CRCERRI (0x1u << 6)
771 /* -------- USBHS_HSTPIPICR[10] : (USBHS Offset: 0x560) Host Pipe Clear Register (n = 0) -------- */
772 #define USBHS_HSTPIPICR_RXINIC (0x1u << 0)
773 #define USBHS_HSTPIPICR_TXOUTIC (0x1u << 1)
774 #define USBHS_HSTPIPICR_TXSTPIC (0x1u << 2)
775 #define USBHS_HSTPIPICR_NAKEDIC (0x1u << 4)
776 #define USBHS_HSTPIPICR_OVERFIC (0x1u << 5)
777 #define USBHS_HSTPIPICR_RXSTALLDIC (0x1u << 6)
778 #define USBHS_HSTPIPICR_SHORTPACKETIC (0x1u << 7)
779 #define USBHS_HSTPIPICR_UNDERFIC (0x1u << 2)
780 #define USBHS_HSTPIPICR_CRCERRIC (0x1u << 6)
781 /* -------- USBHS_HSTPIPIFR[10] : (USBHS Offset: 0x590) Host Pipe Set Register (n = 0) -------- */
782 #define USBHS_HSTPIPIFR_RXINIS (0x1u << 0)
783 #define USBHS_HSTPIPIFR_TXOUTIS (0x1u << 1)
784 #define USBHS_HSTPIPIFR_TXSTPIS (0x1u << 2)
785 #define USBHS_HSTPIPIFR_PERRIS (0x1u << 3)
786 #define USBHS_HSTPIPIFR_NAKEDIS (0x1u << 4)
787 #define USBHS_HSTPIPIFR_OVERFIS (0x1u << 5)
788 #define USBHS_HSTPIPIFR_RXSTALLDIS (0x1u << 6)
789 #define USBHS_HSTPIPIFR_SHORTPACKETIS (0x1u << 7)
790 #define USBHS_HSTPIPIFR_NBUSYBKS (0x1u << 12)
791 #define USBHS_HSTPIPIFR_UNDERFIS (0x1u << 2)
792 #define USBHS_HSTPIPIFR_CRCERRIS (0x1u << 6)
793 /* -------- USBHS_HSTPIPIMR[10] : (USBHS Offset: 0x5C0) Host Pipe Mask Register (n = 0) -------- */
794 #define USBHS_HSTPIPIMR_RXINE (0x1u << 0)
795 #define USBHS_HSTPIPIMR_TXOUTE (0x1u << 1)
796 #define USBHS_HSTPIPIMR_TXSTPE (0x1u << 2)
797 #define USBHS_HSTPIPIMR_PERRE (0x1u << 3)
798 #define USBHS_HSTPIPIMR_NAKEDE (0x1u << 4)
799 #define USBHS_HSTPIPIMR_OVERFIE (0x1u << 5)
800 #define USBHS_HSTPIPIMR_RXSTALLDE (0x1u << 6)
801 #define USBHS_HSTPIPIMR_SHORTPACKETIE (0x1u << 7)
802 #define USBHS_HSTPIPIMR_NBUSYBKE (0x1u << 12)
803 #define USBHS_HSTPIPIMR_FIFOCON (0x1u << 14)
804 #define USBHS_HSTPIPIMR_PDISHDMA (0x1u << 16)
805 #define USBHS_HSTPIPIMR_PFREEZE (0x1u << 17)
806 #define USBHS_HSTPIPIMR_RSTDT (0x1u << 18)
807 #define USBHS_HSTPIPIMR_UNDERFIE (0x1u << 2)
808 #define USBHS_HSTPIPIMR_CRCERRE (0x1u << 6)
809 /* -------- USBHS_HSTPIPIER[10] : (USBHS Offset: 0x5F0) Host Pipe Enable Register (n = 0) -------- */
810 #define USBHS_HSTPIPIER_RXINES (0x1u << 0)
811 #define USBHS_HSTPIPIER_TXOUTES (0x1u << 1)
812 #define USBHS_HSTPIPIER_TXSTPES (0x1u << 2)
813 #define USBHS_HSTPIPIER_PERRES (0x1u << 3)
814 #define USBHS_HSTPIPIER_NAKEDES (0x1u << 4)
815 #define USBHS_HSTPIPIER_OVERFIES (0x1u << 5)
816 #define USBHS_HSTPIPIER_RXSTALLDES (0x1u << 6)
817 #define USBHS_HSTPIPIER_SHORTPACKETIES (0x1u << 7)
818 #define USBHS_HSTPIPIER_NBUSYBKES (0x1u << 12)
819 #define USBHS_HSTPIPIER_PDISHDMAS (0x1u << 16)
820 #define USBHS_HSTPIPIER_PFREEZES (0x1u << 17)
821 #define USBHS_HSTPIPIER_RSTDTS (0x1u << 18)
822 #define USBHS_HSTPIPIER_UNDERFIES (0x1u << 2)
823 #define USBHS_HSTPIPIER_CRCERRES (0x1u << 6)
824 /* -------- USBHS_HSTPIPIDR[10] : (USBHS Offset: 0x620) Host Pipe Disable Register (n = 0) -------- */
825 #define USBHS_HSTPIPIDR_RXINEC (0x1u << 0)
826 #define USBHS_HSTPIPIDR_TXOUTEC (0x1u << 1)
827 #define USBHS_HSTPIPIDR_TXSTPEC (0x1u << 2)
828 #define USBHS_HSTPIPIDR_PERREC (0x1u << 3)
829 #define USBHS_HSTPIPIDR_NAKEDEC (0x1u << 4)
830 #define USBHS_HSTPIPIDR_OVERFIEC (0x1u << 5)
831 #define USBHS_HSTPIPIDR_RXSTALLDEC (0x1u << 6)
832 #define USBHS_HSTPIPIDR_SHORTPACKETIEC (0x1u << 7)
833 #define USBHS_HSTPIPIDR_NBUSYBKEC (0x1u << 12)
834 #define USBHS_HSTPIPIDR_FIFOCONC (0x1u << 14)
835 #define USBHS_HSTPIPIDR_PDISHDMAC (0x1u << 16)
836 #define USBHS_HSTPIPIDR_PFREEZEC (0x1u << 17)
837 #define USBHS_HSTPIPIDR_UNDERFIEC (0x1u << 2)
838 #define USBHS_HSTPIPIDR_CRCERREC (0x1u << 6)
839 /* -------- USBHS_HSTPIPINRQ[10] : (USBHS Offset: 0x650) Host Pipe IN Request Register (n = 0) -------- */
840 #define USBHS_HSTPIPINRQ_INRQ_Pos 0
841 #define USBHS_HSTPIPINRQ_INRQ_Msk (0xffu << USBHS_HSTPIPINRQ_INRQ_Pos)
842 #define USBHS_HSTPIPINRQ_INRQ(value) ((USBHS_HSTPIPINRQ_INRQ_Msk & ((value) << USBHS_HSTPIPINRQ_INRQ_Pos)))
843 #define USBHS_HSTPIPINRQ_INMODE (0x1u << 8)
844 /* -------- USBHS_HSTPIPERR[10] : (USBHS Offset: 0x680) Host Pipe Error Register (n = 0) -------- */
845 #define USBHS_HSTPIPERR_DATATGL (0x1u << 0)
846 #define USBHS_HSTPIPERR_DATAPID (0x1u << 1)
847 #define USBHS_HSTPIPERR_PID (0x1u << 2)
848 #define USBHS_HSTPIPERR_TIMEOUT (0x1u << 3)
849 #define USBHS_HSTPIPERR_CRC16 (0x1u << 4)
850 #define USBHS_HSTPIPERR_COUNTER_Pos 5
851 #define USBHS_HSTPIPERR_COUNTER_Msk (0x3u << USBHS_HSTPIPERR_COUNTER_Pos)
852 #define USBHS_HSTPIPERR_COUNTER(value) ((USBHS_HSTPIPERR_COUNTER_Msk & ((value) << USBHS_HSTPIPERR_COUNTER_Pos)))
853 /* -------- USBHS_HSTDMANXTDSC : (USBHS Offset: N/A) Host DMA Channel Next Descriptor Address Register -------- */
854 #define USBHS_HSTDMANXTDSC_NXT_DSC_ADD_Pos 0
855 #define USBHS_HSTDMANXTDSC_NXT_DSC_ADD_Msk (0xffffffffu << USBHS_HSTDMANXTDSC_NXT_DSC_ADD_Pos)
856 #define USBHS_HSTDMANXTDSC_NXT_DSC_ADD(value) ((USBHS_HSTDMANXTDSC_NXT_DSC_ADD_Msk & ((value) << USBHS_HSTDMANXTDSC_NXT_DSC_ADD_Pos)))
857 /* -------- USBHS_HSTDMAADDRESS : (USBHS Offset: N/A) Host DMA Channel Address Register -------- */
858 #define USBHS_HSTDMAADDRESS_BUFF_ADD_Pos 0
859 #define USBHS_HSTDMAADDRESS_BUFF_ADD_Msk (0xffffffffu << USBHS_HSTDMAADDRESS_BUFF_ADD_Pos)
860 #define USBHS_HSTDMAADDRESS_BUFF_ADD(value) ((USBHS_HSTDMAADDRESS_BUFF_ADD_Msk & ((value) << USBHS_HSTDMAADDRESS_BUFF_ADD_Pos)))
861 /* -------- USBHS_HSTDMACONTROL : (USBHS Offset: N/A) Host DMA Channel Control Register -------- */
862 #define USBHS_HSTDMACONTROL_CHANN_ENB (0x1u << 0)
863 #define USBHS_HSTDMACONTROL_LDNXT_DSC (0x1u << 1)
864 #define USBHS_HSTDMACONTROL_END_TR_EN (0x1u << 2)
865 #define USBHS_HSTDMACONTROL_END_B_EN (0x1u << 3)
866 #define USBHS_HSTDMACONTROL_END_TR_IT (0x1u << 4)
867 #define USBHS_HSTDMACONTROL_END_BUFFIT (0x1u << 5)
868 #define USBHS_HSTDMACONTROL_DESC_LD_IT (0x1u << 6)
869 #define USBHS_HSTDMACONTROL_BURST_LCK (0x1u << 7)
870 #define USBHS_HSTDMACONTROL_BUFF_LENGTH_Pos 16
871 #define USBHS_HSTDMACONTROL_BUFF_LENGTH_Msk (0xffffu << USBHS_HSTDMACONTROL_BUFF_LENGTH_Pos)
872 #define USBHS_HSTDMACONTROL_BUFF_LENGTH(value) ((USBHS_HSTDMACONTROL_BUFF_LENGTH_Msk & ((value) << USBHS_HSTDMACONTROL_BUFF_LENGTH_Pos)))
873 /* -------- USBHS_HSTDMASTATUS : (USBHS Offset: N/A) Host DMA Channel Status Register -------- */
874 #define USBHS_HSTDMASTATUS_CHANN_ENB (0x1u << 0)
875 #define USBHS_HSTDMASTATUS_CHANN_ACT (0x1u << 1)
876 #define USBHS_HSTDMASTATUS_END_TR_ST (0x1u << 4)
877 #define USBHS_HSTDMASTATUS_END_BF_ST (0x1u << 5)
878 #define USBHS_HSTDMASTATUS_DESC_LDST (0x1u << 6)
879 #define USBHS_HSTDMASTATUS_BUFF_COUNT_Pos 16
880 #define USBHS_HSTDMASTATUS_BUFF_COUNT_Msk (0xffffu << USBHS_HSTDMASTATUS_BUFF_COUNT_Pos)
881 #define USBHS_HSTDMASTATUS_BUFF_COUNT(value) ((USBHS_HSTDMASTATUS_BUFF_COUNT_Msk & ((value) << USBHS_HSTDMASTATUS_BUFF_COUNT_Pos)))
882 /* -------- USBHS_CTRL : (USBHS Offset: 0x0800) General Control Register -------- */
883 #define USBHS_CTRL_RDERRE (0x1u << 4)
884 #define USBHS_CTRL_VBUSHWC (0x1u << 8)
885 #define USBHS_CTRL_FRZCLK (0x1u << 14)
886 #define USBHS_CTRL_USBE (0x1u << 15)
887 #define USBHS_CTRL_UIMOD (0x1u << 25)
888 #define USBHS_CTRL_UIMOD_HOST (0x0u << 25)
889 #define USBHS_CTRL_UIMOD_DEVICE (0x1u << 25)
890 /* -------- USBHS_SR : (USBHS Offset: 0x0804) General Status Register -------- */
891 #define USBHS_SR_RDERRI (0x1u << 4)
892 #define USBHS_SR_VBUSRQ (0x1u << 9)
893 #define USBHS_SR_SPEED_Pos 12
894 #define USBHS_SR_SPEED_Msk (0x3u << USBHS_SR_SPEED_Pos)
895 #define USBHS_SR_SPEED_FULL_SPEED (0x0u << 12)
896 #define USBHS_SR_SPEED_HIGH_SPEED (0x1u << 12)
897 #define USBHS_SR_SPEED_LOW_SPEED (0x2u << 12)
898 #define USBHS_SR_CLKUSABLE (0x1u << 14)
899 /* -------- USBHS_SCR : (USBHS Offset: 0x0808) General Status Clear Register -------- */
900 #define USBHS_SCR_RDERRIC (0x1u << 4)
901 #define USBHS_SCR_VBUSRQC (0x1u << 9)
902 /* -------- USBHS_SFR : (USBHS Offset: 0x080C) General Status Set Register -------- */
903 #define USBHS_SFR_RDERRIS (0x1u << 4)
904 #define USBHS_SFR_VBUSRQS (0x1u << 9)
907 
908 
909 #endif /* _SAME70_USBHS_COMPONENT_ */
__I uint32_t USBHS_DEVIMR
(Usbhs Offset: 0x0010) Device Global Interrupt Mask Register
Definition: component_usbhs.h:62
__O uint32_t USBHS_DEVIDR
(Usbhs Offset: 0x0014) Device Global Interrupt Disable Register
Definition: component_usbhs.h:63
__IO uint32_t USBHS_HSTPIP
(Usbhs Offset: 0x0041C) Host Pipe Register
Definition: component_usbhs.h:91
#define __IO
Definition: core_cm7.h:287
__IO uint32_t USBHS_HSTADDR2
(Usbhs Offset: 0x0428) Host Address 2 Register
Definition: component_usbhs.h:94
__IO uint32_t USBHS_HSTDMANXTDSC
(UsbhsHstdma Offset: 0x0) Host DMA Channel Next Descriptor Address Register
Definition: component_usbhs.h:49
#define __O
Definition: core_cm7.h:286
__O uint32_t USBHS_SCR
(Usbhs Offset: 0x0808) General Status Clear Register
Definition: component_usbhs.h:119
__O uint32_t USBHS_HSTIDR
(Usbhs Offset: 0x0414) Host Global Interrupt Disable Register
Definition: component_usbhs.h:89
__IO uint32_t USBHS_CTRL
(Usbhs Offset: 0x0800) General Control Register
Definition: component_usbhs.h:117
__IO uint32_t USBHS_DEVEPT
(Usbhs Offset: 0x001C) Device Endpoint Register
Definition: component_usbhs.h:65
__I uint32_t USBHS_DEVFNUM
(Usbhs Offset: 0x0020) Device Frame Number Register
Definition: component_usbhs.h:66
__IO uint32_t USBHS_HSTDMASTATUS
(UsbhsHstdma Offset: 0xC) Host DMA Channel Status Register
Definition: component_usbhs.h:52
__O uint32_t USBHS_HSTIER
(Usbhs Offset: 0x0418) Host Global Interrupt Enable Register
Definition: component_usbhs.h:90
__O uint32_t USBHS_HSTIFR
(Usbhs Offset: 0x040C) Host Global Interrupt Set Register
Definition: component_usbhs.h:87
__IO uint32_t USBHS_DEVDMASTATUS
(UsbhsDevdma Offset: 0xC) Device DMA Channel Status Register
Definition: component_usbhs.h:45
__IO uint32_t USBHS_DEVDMAADDRESS
(UsbhsDevdma Offset: 0x4) Device DMA Channel Address Register
Definition: component_usbhs.h:43
__O uint32_t USBHS_DEVIFR
(Usbhs Offset: 0x000C) Device Global Interrupt Set Register
Definition: component_usbhs.h:61
Definition: component_usbhs.h:57
__I uint32_t USBHS_HSTISR
(Usbhs Offset: 0x0404) Host Global Interrupt Status Register
Definition: component_usbhs.h:85
__I uint32_t USBHS_HSTIMR
(Usbhs Offset: 0x0410) Host Global Interrupt Mask Register
Definition: component_usbhs.h:88
__O uint32_t USBHS_DEVICR
(Usbhs Offset: 0x0008) Device Global Interrupt Clear Register
Definition: component_usbhs.h:60
__O uint32_t USBHS_SFR
(Usbhs Offset: 0x080C) General Status Set Register
Definition: component_usbhs.h:120
__IO uint32_t USBHS_HSTDMAADDRESS
(UsbhsHstdma Offset: 0x4) Host DMA Channel Address Register
Definition: component_usbhs.h:50
__IO uint32_t USBHS_HSTCTRL
(Usbhs Offset: 0x0400) Host General Control Register
Definition: component_usbhs.h:84
__IO uint32_t USBHS_HSTADDR1
(Usbhs Offset: 0x0424) Host Address 1 Register
Definition: component_usbhs.h:93
__IO uint32_t USBHS_DEVDMANXTDSC
(UsbhsDevdma Offset: 0x0) Device DMA Channel Next Descriptor Address Register
Definition: component_usbhs.h:42
__IO uint32_t USBHS_HSTADDR3
(Usbhs Offset: 0x042C) Host Address 3 Register
Definition: component_usbhs.h:95
UsbhsHstdma hardware registers.
Definition: component_usbhs.h:48
__O uint32_t USBHS_HSTICR
(Usbhs Offset: 0x0408) Host Global Interrupt Clear Register
Definition: component_usbhs.h:86
__O uint32_t USBHS_DEVIER
(Usbhs Offset: 0x0018) Device Global Interrupt Enable Register
Definition: component_usbhs.h:64
__IO uint32_t USBHS_HSTDMACONTROL
(UsbhsHstdma Offset: 0x8) Host DMA Channel Control Register
Definition: component_usbhs.h:51
__I uint32_t USBHS_DEVISR
(Usbhs Offset: 0x0004) Device Global Interrupt Status Register
Definition: component_usbhs.h:59
#define USBHSDEVDMA_NUMBER
Usbhs hardware registers.
Definition: component_usbhs.h:55
__IO uint32_t USBHS_DEVCTRL
(Usbhs Offset: 0x0000) Device General Control Register
Definition: component_usbhs.h:58
__IO uint32_t USBHS_HSTFNUM
(Usbhs Offset: 0x0420) Host Frame Number Register
Definition: component_usbhs.h:92
__I uint32_t USBHS_SR
(Usbhs Offset: 0x0804) General Status Register
Definition: component_usbhs.h:118
#define __I
Definition: core_cm7.h:284
__IO uint32_t USBHS_DEVDMACONTROL
(UsbhsDevdma Offset: 0x8) Device DMA Channel Control Register
Definition: component_usbhs.h:44
UsbhsDevdma hardware registers.
Definition: component_usbhs.h:41