1 /*
2  * MCF5272 Internal Memory Map
3  *
4  * Copyright (c) 2003 Josef Baumgartner <josef.baumgartner@telex.de>
5  *
6  * See file CREDITS for list of people who contributed to this
7  * project.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 2 of
12  * the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22  * MA 02111-1307 USA
23  */
24 
25 #ifndef __IMMAP_5272__
26 #define __IMMAP_5272__
27 
28 #define MMAP_CFG	(CONFIG_SYS_MBAR + 0x00000000)
29 #define MMAP_INTC	(CONFIG_SYS_MBAR + 0x00000020)
30 #define MMAP_FBCS	(CONFIG_SYS_MBAR + 0x00000040)
31 #define MMAP_GPIO	(CONFIG_SYS_MBAR + 0x00000080)
32 #define MMAP_QSPI	(CONFIG_SYS_MBAR + 0x000000A0)
33 #define MMAP_PWM	(CONFIG_SYS_MBAR + 0x000000C0)
34 #define MMAP_DMA0	(CONFIG_SYS_MBAR + 0x000000E0)
35 #define MMAP_UART0	(CONFIG_SYS_MBAR + 0x00000100)
36 #define MMAP_UART1	(CONFIG_SYS_MBAR + 0x00000140)
37 #define MMAP_SDRAM	(CONFIG_SYS_MBAR + 0x00000180)
38 #define MMAP_TMR0	(CONFIG_SYS_MBAR + 0x00000200)
39 #define MMAP_TMR1	(CONFIG_SYS_MBAR + 0x00000220)
40 #define MMAP_TMR2	(CONFIG_SYS_MBAR + 0x00000240)
41 #define MMAP_TMR3	(CONFIG_SYS_MBAR + 0x00000260)
42 #define MMAP_WDOG	(CONFIG_SYS_MBAR + 0x00000280)
43 #define MMAP_PLIC	(CONFIG_SYS_MBAR + 0x00000300)
44 #define MMAP_FEC	(CONFIG_SYS_MBAR + 0x00000840)
45 #define MMAP_USB	(CONFIG_SYS_MBAR + 0x00001000)
46 
47 #include <asm/coldfire/pwm.h>
48 
49 /* System configuration registers */
50 typedef struct sys_ctrl {
51 	uint sc_mbar;
52 	ushort sc_scr;
53 	ushort sc_spr;
54 	uint sc_pmr;
55 	char res1[2];
56 	ushort sc_alpr;
57 	uint sc_dir;
58 	char res2[12];
59 } sysctrl_t;
60 
61 /* Interrupt module registers */
62 typedef struct int_ctrl {
63 	uint int_icr1;
64 	uint int_icr2;
65 	uint int_icr3;
66 	uint int_icr4;
67 	uint int_isr;
68 	uint int_pitr;
69 	uint int_piwr;
70 	uchar res1[3];
71 	uchar int_pivr;
72 } intctrl_t;
73 
74 /* Chip select module registers */
75 typedef struct cs_ctlr {
76 	uint cs_br0;
77 	uint cs_or0;
78 	uint cs_br1;
79 	uint cs_or1;
80 	uint cs_br2;
81 	uint cs_or2;
82 	uint cs_br3;
83 	uint cs_or3;
84 	uint cs_br4;
85 	uint cs_or4;
86 	uint cs_br5;
87 	uint cs_or5;
88 	uint cs_br6;
89 	uint cs_or6;
90 	uint cs_br7;
91 	uint cs_or7;
92 } csctrl_t;
93 
94 /* GPIO port registers */
95 typedef struct gpio_ctrl {
96 	uint gpio_pacnt;
97 	ushort gpio_paddr;
98 	ushort gpio_padat;
99 	uint gpio_pbcnt;
100 	ushort gpio_pbddr;
101 	ushort gpio_pbdat;
102 	uchar res1[4];
103 	ushort gpio_pcddr;
104 	ushort gpio_pcdat;
105 	uint gpio_pdcnt;
106 	uchar res2[4];
107 } gpio_t;
108 
109 /* DMA module registers */
110 typedef struct dma_ctrl {
111 	ulong dma_dmr;
112 	uchar res1[2];
113 	ushort dma_dir;
114 	ulong dma_dbcr;
115 	ulong dma_dsar;
116 	ulong dma_ddar;
117 	uchar res2[12];
118 } dma_t;
119 
120 /* SDRAM controller registers, offset: 0x180 */
121 typedef struct sdram_ctrl {
122 	uchar res1[2];
123 	ushort sdram_sdcr;
124 	uchar res2[2];
125 	ushort sdram_sdtr;
126 	uchar res3[120];
127 } sdramctrl_t;
128 
129 /* Watchdog registers */
130 typedef struct wdog_ctrl {
131 	ushort wdog_wrrr;
132 	ushort res1;
133 	ushort wdog_wirr;
134 	ushort res2;
135 	ushort wdog_wcr;
136 	ushort res3;
137 	ushort wdog_wer;
138 	uchar res4[114];
139 } wdog_t;
140 
141 /* PLIC module registers */
142 typedef struct plic_ctrl {
143 	ulong plic_p0b1rr;
144 	ulong plic_p1b1rr;
145 	ulong plic_p2b1rr;
146 	ulong plic_p3b1rr;
147 	ulong plic_p0b2rr;
148 	ulong plic_p1b2rr;
149 	ulong plic_p2b2rr;
150 	ulong plic_p3b2rr;
151 	uchar plic_p0drr;
152 	uchar plic_p1drr;
153 	uchar plic_p2drr;
154 	uchar plic_p3drr;
155 	uchar res1[4];
156 	ulong plic_p0b1tr;
157 	ulong plic_p1b1tr;
158 	ulong plic_p2b1tr;
159 	ulong plic_p3b1tr;
160 	ulong plic_p0b2tr;
161 	ulong plic_p1b2tr;
162 	ulong plic_p2b2tr;
163 	ulong plic_p3b2tr;
164 	uchar plic_p0dtr;
165 	uchar plic_p1dtr;
166 	uchar plic_p2dtr;
167 	uchar plic_p3dtr;
168 	uchar res2[4];
169 	ushort plic_p0cr;
170 	ushort plic_p1cr;
171 	ushort plic_p2cr;
172 	ushort plic_p3cr;
173 	ushort plic_p0icr;
174 	ushort plic_p1icr;
175 	ushort plic_p2icr;
176 	ushort plic_p3icr;
177 	ushort plic_p0gmr;
178 	ushort plic_p1gmr;
179 	ushort plic_p2gmr;
180 	ushort plic_p3gmr;
181 	ushort plic_p0gmt;
182 	ushort plic_p1gmt;
183 	ushort plic_p2gmt;
184 	ushort plic_p3gmt;
185 	uchar res3;
186 	uchar plic_pgmts;
187 	uchar plic_pgmta;
188 	uchar res4;
189 	uchar plic_p0gcir;
190 	uchar plic_p1gcir;
191 	uchar plic_p2gcir;
192 	uchar plic_p3gcir;
193 	uchar plic_p0gcit;
194 	uchar plic_p1gcit;
195 	uchar plic_p2gcit;
196 	uchar plic_p3gcit;
197 	uchar res5[3];
198 	uchar plic_pgcitsr;
199 	uchar res6[3];
200 	uchar plic_pdcsr;
201 	ushort plic_p0psr;
202 	ushort plic_p1psr;
203 	ushort plic_p2psr;
204 	ushort plic_p3psr;
205 	ushort plic_pasr;
206 	uchar res7;
207 	uchar plic_plcr;
208 	ushort res8;
209 	ushort plic_pdrqr;
210 	ushort plic_p0sdr;
211 	ushort plic_p1sdr;
212 	ushort plic_p2sdr;
213 	ushort plic_p3sdr;
214 	ushort res9;
215 	ushort plic_pcsr;
216 	uchar res10[1184];
217 } plic_t;
218 
219 /* USB module registers */
220 typedef struct usb {
221 	ushort res1;
222 	ushort usb_fnr;
223 	ushort res2;
224 	ushort usb_fnmr;
225 	ushort res3;
226 	ushort usb_rfmr;
227 	ushort res4;
228 	ushort usb_rfmmr;
229 	uchar res5[3];
230 	uchar usb_far;
231 	ulong usb_asr;
232 	ulong usb_drr1;
233 	ulong usb_drr2;
234 	ushort res6;
235 	ushort usb_specr;
236 	ushort res7;
237 	ushort usb_ep0sr;
238 	ulong usb_iep0cfg;
239 	ulong usb_oep0cfg;
240 	ulong usb_ep1cfg;
241 	ulong usb_ep2cfg;
242 	ulong usb_ep3cfg;
243 	ulong usb_ep4cfg;
244 	ulong usb_ep5cfg;
245 	ulong usb_ep6cfg;
246 	ulong usb_ep7cfg;
247 	ulong usb_ep0ctl;
248 	ushort res8;
249 	ushort usb_ep1ctl;
250 	ushort res9;
251 	ushort usb_ep2ctl;
252 	ushort res10;
253 	ushort usb_ep3ctl;
254 	ushort res11;
255 	ushort usb_ep4ctl;
256 	ushort res12;
257 	ushort usb_ep5ctl;
258 	ushort res13;
259 	ushort usb_ep6ctl;
260 	ushort res14;
261 	ushort usb_ep7ctl;
262 	ulong usb_ep0isr;
263 	ushort res15;
264 	ushort usb_ep1isr;
265 	ushort res16;
266 	ushort usb_ep2isr;
267 	ushort res17;
268 	ushort usb_ep3isr;
269 	ushort res18;
270 	ushort usb_ep4isr;
271 	ushort res19;
272 	ushort usb_ep5isr;
273 	ushort res20;
274 	ushort usb_ep6isr;
275 	ushort res21;
276 	ushort usb_ep7isr;
277 	ulong usb_ep0imr;
278 	ushort res22;
279 	ushort usb_ep1imr;
280 	ushort res23;
281 	ushort usb_ep2imr;
282 	ushort res24;
283 	ushort usb_ep3imr;
284 	ushort res25;
285 	ushort usb_ep4imr;
286 	ushort res26;
287 	ushort usb_ep5imr;
288 	ushort res27;
289 	ushort usb_ep6imr;
290 	ushort res28;
291 	ushort usb_ep7imr;
292 	ulong usb_ep0dr;
293 	ulong usb_ep1dr;
294 	ulong usb_ep2dr;
295 	ulong usb_ep3dr;
296 	ulong usb_ep4dr;
297 	ulong usb_ep5dr;
298 	ulong usb_ep6dr;
299 	ulong usb_ep7dr;
300 	ushort res29;
301 	ushort usb_ep0dpr;
302 	ushort res30;
303 	ushort usb_ep1dpr;
304 	ushort res31;
305 	ushort usb_ep2dpr;
306 	ushort res32;
307 	ushort usb_ep3dpr;
308 	ushort res33;
309 	ushort usb_ep4dpr;
310 	ushort res34;
311 	ushort usb_ep5dpr;
312 	ushort res35;
313 	ushort usb_ep6dpr;
314 	ushort res36;
315 	ushort usb_ep7dpr;
316 	uchar res37[788];
317 	uchar usb_cfgram[1024];
318 } usb_t;
319 
320 #endif				/* __IMMAP_5272__ */
321