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