immap_5235.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. /*
  2. * MCF5329 Internal Memory Map
  3. *
  4. * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
  5. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef __IMMAP_5235__
  26. #define __IMMAP_5235__
  27. #define MMAP_SCM (CFG_MBAR + 0x00000000)
  28. #define MMAP_SDRAM (CFG_MBAR + 0x00000040)
  29. #define MMAP_FBCS (CFG_MBAR + 0x00000080)
  30. #define MMAP_DMA0 (CFG_MBAR + 0x00000100)
  31. #define MMAP_DMA1 (CFG_MBAR + 0x00000110)
  32. #define MMAP_DMA2 (CFG_MBAR + 0x00000120)
  33. #define MMAP_DMA3 (CFG_MBAR + 0x00000130)
  34. #define MMAP_UART0 (CFG_MBAR + 0x00000200)
  35. #define MMAP_UART1 (CFG_MBAR + 0x00000240)
  36. #define MMAP_UART2 (CFG_MBAR + 0x00000280)
  37. #define MMAP_I2C (CFG_MBAR + 0x00000300)
  38. #define MMAP_QSPI (CFG_MBAR + 0x00000340)
  39. #define MMAP_DTMR0 (CFG_MBAR + 0x00000400)
  40. #define MMAP_DTMR1 (CFG_MBAR + 0x00000440)
  41. #define MMAP_DTMR2 (CFG_MBAR + 0x00000480)
  42. #define MMAP_DTMR3 (CFG_MBAR + 0x000004C0)
  43. #define MMAP_INTC0 (CFG_MBAR + 0x00000C00)
  44. #define MMAP_INTC1 (CFG_MBAR + 0x00000D00)
  45. #define MMAP_INTCACK (CFG_MBAR + 0x00000F00)
  46. #define MMAP_FEC (CFG_MBAR + 0x00001000)
  47. #define MMAP_FECFIFO (CFG_MBAR + 0x00001400)
  48. #define MMAP_GPIO (CFG_MBAR + 0x00100000)
  49. #define MMAP_CCM (CFG_MBAR + 0x00110000)
  50. #define MMAP_PLL (CFG_MBAR + 0x00120000)
  51. #define MMAP_EPORT (CFG_MBAR + 0x00130000)
  52. #define MMAP_WDOG (CFG_MBAR + 0x00140000)
  53. #define MMAP_PIT0 (CFG_MBAR + 0x00150000)
  54. #define MMAP_PIT1 (CFG_MBAR + 0x00160000)
  55. #define MMAP_PIT2 (CFG_MBAR + 0x00170000)
  56. #define MMAP_PIT3 (CFG_MBAR + 0x00180000)
  57. #define MMAP_MDHA (CFG_MBAR + 0x00190000)
  58. #define MMAP_RNG (CFG_MBAR + 0x001A0000)
  59. #define MMAP_SKHA (CFG_MBAR + 0x001B0000)
  60. #define MMAP_CAN1 (CFG_MBAR + 0x001C0000)
  61. #define MMAP_ETPU (CFG_MBAR + 0x001D0000)
  62. #define MMAP_CAN2 (CFG_MBAR + 0x001F0000)
  63. /* System Control Module register */
  64. typedef struct scm_ctrl {
  65. u32 ipsbar; /* 0x00 - MBAR */
  66. u32 res1; /* 0x04 */
  67. u32 rambar; /* 0x08 - RAMBAR */
  68. u32 res2; /* 0x0C */
  69. u8 crsr; /* 0x10 Core Reset Status Register */
  70. u8 cwcr; /* 0x11 Core Watchdog Control Register */
  71. u8 lpicr; /* 0x12 Low-Power Interrupt Control Register */
  72. u8 cwsr; /* 0x13 Core Watchdog Service Register */
  73. u32 dmareqc; /* 0x14 */
  74. u32 res3; /* 0x18 */
  75. u32 mpark; /* 0x1C */
  76. u8 mpr; /* 0x20 */
  77. u8 res4[3]; /* 0x21 - 0x23 */
  78. u8 pacr0; /* 0x24 */
  79. u8 pacr1; /* 0x25 */
  80. u8 pacr2; /* 0x26 */
  81. u8 pacr3; /* 0x27 */
  82. u8 pacr4; /* 0x28 */
  83. u32 res5; /* 0x29 */
  84. u8 pacr5; /* 0x2a */
  85. u8 pacr6; /* 0x2b */
  86. u8 pacr7; /* 0x2c */
  87. u32 res6; /* 0x2d */
  88. u8 pacr8; /* 0x2e */
  89. u32 res7; /* 0x2f */
  90. u8 gpacr; /* 0x30 */
  91. u8 res8[3]; /* 0x31 - 0x33 */
  92. } scm_t;
  93. /* SDRAM controller registers */
  94. typedef struct sdram_ctrl {
  95. u16 dcr; /* 0x00 Control register */
  96. u16 res1[3]; /* 0x02 - 0x07 */
  97. u32 dacr0; /* 0x08 address and control register 0 */
  98. u32 dmr0; /* 0x0C mask register block 0 */
  99. u32 dacr1; /* 0x10 address and control register 1 */
  100. u32 dmr1; /* 0x14 mask register block 1 */
  101. } sdram_t;
  102. /* Flexbus module Chip select registers */
  103. typedef struct fbcs_ctrl {
  104. u16 csar0; /* 0x00 Chip-Select Address Register 0 */
  105. u16 res0;
  106. u32 csmr0; /* 0x04 Chip-Select Mask Register 0 */
  107. u16 res1; /* 0x08 */
  108. u16 cscr0; /* 0x0A Chip-Select Control Register 0 */
  109. u16 csar1; /* 0x0C Chip-Select Address Register 1 */
  110. u16 res2;
  111. u32 csmr1; /* 0x10 Chip-Select Mask Register 1 */
  112. u16 res3; /* 0x14 */
  113. u16 cscr1; /* 0x16 Chip-Select Control Register 1 */
  114. u16 csar2; /* 0x18 Chip-Select Address Register 2 */
  115. u16 res4;
  116. u32 csmr2; /* 0x1C Chip-Select Mask Register 2 */
  117. u16 res5; /* 0x20 */
  118. u16 cscr2; /* 0x22 Chip-Select Control Register 2 */
  119. u16 csar3; /* 0x24 Chip-Select Address Register 3 */
  120. u16 res6;
  121. u32 csmr3; /* 0x28 Chip-Select Mask Register 3 */
  122. u16 res7; /* 0x2C */
  123. u16 cscr3; /* 0x2E Chip-Select Control Register 3 */
  124. u16 csar4; /* 0x30 Chip-Select Address Register 4 */
  125. u16 res8;
  126. u32 csmr4; /* 0x34 Chip-Select Mask Register 4 */
  127. u16 res9; /* 0x38 */
  128. u16 cscr4; /* 0x3A Chip-Select Control Register 4 */
  129. u16 csar5; /* 0x3C Chip-Select Address Register 5 */
  130. u16 res10;
  131. u32 csmr5; /* 0x40 Chip-Select Mask Register 5 */
  132. u16 res11; /* 0x44 */
  133. u16 cscr5; /* 0x46 Chip-Select Control Register 5 */
  134. u16 csar6; /* 0x48 Chip-Select Address Register 5 */
  135. u16 res12;
  136. u32 csmr6; /* 0x4C Chip-Select Mask Register 5 */
  137. u16 res13; /* 0x50 */
  138. u16 cscr6; /* 0x52 Chip-Select Control Register 5 */
  139. u16 csar7; /* 0x54 Chip-Select Address Register 5 */
  140. u16 res14;
  141. u32 csmr7; /* 0x58 Chip-Select Mask Register 5 */
  142. u16 res15; /* 0x5C */
  143. u16 cscr7; /* 0x5E Chip-Select Control Register 5 */
  144. } fbcs_t;
  145. /* QSPI module registers */
  146. typedef struct qspi_ctrl {
  147. u16 qmr; /* Mode register */
  148. u16 res1;
  149. u16 qdlyr; /* Delay register */
  150. u16 res2;
  151. u16 qwr; /* Wrap register */
  152. u16 res3;
  153. u16 qir; /* Interrupt register */
  154. u16 res4;
  155. u16 qar; /* Address register */
  156. u16 res5;
  157. u16 qdr; /* Data register */
  158. u16 res6;
  159. } qspi_t;
  160. /* Interrupt module registers */
  161. typedef struct int0_ctrl {
  162. /* Interrupt Controller 0 */
  163. u32 iprh0; /* 0x00 Pending Register High */
  164. u32 iprl0; /* 0x04 Pending Register Low */
  165. u32 imrh0; /* 0x08 Mask Register High */
  166. u32 imrl0; /* 0x0C Mask Register Low */
  167. u32 frch0; /* 0x10 Force Register High */
  168. u32 frcl0; /* 0x14 Force Register Low */
  169. u8 irlr; /* 0x18 */
  170. u8 iacklpr; /* 0x19 */
  171. u16 res1[19]; /* 0x1a - 0x3c */
  172. u8 icr0[64]; /* 0x40 - 0x7F Control registers */
  173. u32 res3[24]; /* 0x80 - 0xDF */
  174. u8 swiack0; /* 0xE0 Software Interrupt Acknowledge */
  175. u8 res4[3]; /* 0xE1 - 0xE3 */
  176. u8 Lniack0_1; /* 0xE4 Level n interrupt acknowledge resister */
  177. u8 res5[3]; /* 0xE5 - 0xE7 */
  178. u8 Lniack0_2; /* 0xE8 Level n interrupt acknowledge resister */
  179. u8 res6[3]; /* 0xE9 - 0xEB */
  180. u8 Lniack0_3; /* 0xEC Level n interrupt acknowledge resister */
  181. u8 res7[3]; /* 0xED - 0xEF */
  182. u8 Lniack0_4; /* 0xF0 Level n interrupt acknowledge resister */
  183. u8 res8[3]; /* 0xF1 - 0xF3 */
  184. u8 Lniack0_5; /* 0xF4 Level n interrupt acknowledge resister */
  185. u8 res9[3]; /* 0xF5 - 0xF7 */
  186. u8 Lniack0_6; /* 0xF8 Level n interrupt acknowledge resister */
  187. u8 resa[3]; /* 0xF9 - 0xFB */
  188. u8 Lniack0_7; /* 0xFC Level n interrupt acknowledge resister */
  189. u8 resb[3]; /* 0xFD - 0xFF */
  190. } int0_t;
  191. typedef struct int1_ctrl {
  192. /* Interrupt Controller 1 */
  193. u32 iprh1; /* 0x00 Pending Register High */
  194. u32 iprl1; /* 0x04 Pending Register Low */
  195. u32 imrh1; /* 0x08 Mask Register High */
  196. u32 imrl1; /* 0x0C Mask Register Low */
  197. u32 frch1; /* 0x10 Force Register High */
  198. u32 frcl1; /* 0x14 Force Register Low */
  199. u8 irlr; /* 0x18 */
  200. u8 iacklpr; /* 0x19 */
  201. u16 res1[19]; /* 0x1a - 0x3c */
  202. u8 icr1[64]; /* 0x40 - 0x7F */
  203. u32 res4[24]; /* 0x80 - 0xDF */
  204. u8 swiack1; /* 0xE0 Software Interrupt Acknowledge */
  205. u8 res5[3]; /* 0xE1 - 0xE3 */
  206. u8 Lniack1_1; /* 0xE4 Level n interrupt acknowledge resister */
  207. u8 res6[3]; /* 0xE5 - 0xE7 */
  208. u8 Lniack1_2; /* 0xE8 Level n interrupt acknowledge resister */
  209. u8 res7[3]; /* 0xE9 - 0xEB */
  210. u8 Lniack1_3; /* 0xEC Level n interrupt acknowledge resister */
  211. u8 res8[3]; /* 0xED - 0xEF */
  212. u8 Lniack1_4; /* 0xF0 Level n interrupt acknowledge resister */
  213. u8 res9[3]; /* 0xF1 - 0xF3 */
  214. u8 Lniack1_5; /* 0xF4 Level n interrupt acknowledge resister */
  215. u8 resa[3]; /* 0xF5 - 0xF7 */
  216. u8 Lniack1_6; /* 0xF8 Level n interrupt acknowledge resister */
  217. u8 resb[3]; /* 0xF9 - 0xFB */
  218. u8 Lniack1_7; /* 0xFC Level n interrupt acknowledge resister */
  219. u8 resc[3]; /* 0xFD - 0xFF */
  220. } int1_t;
  221. typedef struct intgack_ctrl1 {
  222. /* Global IACK Registers */
  223. u8 swiack; /* 0xE0 Global Software Interrupt Acknowledge */
  224. u8 Lniack[7]; /* 0xE1 - 0xE7 Global Level 0 Interrupt Acknowledge */
  225. } intgack_t;
  226. /* GPIO port registers */
  227. typedef struct gpio_ctrl {
  228. /* Port Output Data Registers */
  229. u8 podr_addr; /* 0x00 */
  230. u8 podr_datah; /* 0x01 */
  231. u8 podr_datal; /* 0x02 */
  232. u8 podr_busctl; /* 0x03 */
  233. u8 podr_bs; /* 0x04 */
  234. u8 podr_cs; /* 0x05 */
  235. u8 podr_sdram; /* 0x06 */
  236. u8 podr_feci2c; /* 0x07 */
  237. u8 podr_uarth; /* 0x08 */
  238. u8 podr_uartl; /* 0x09 */
  239. u8 podr_qspi; /* 0x0A */
  240. u8 podr_timer; /* 0x0B */
  241. u8 podr_etpu; /* 0x0C */
  242. u8 res1[3]; /* 0x0D - 0x0F */
  243. /* Port Data Direction Registers */
  244. u8 pddr_addr; /* 0x10 */
  245. u8 pddr_datah; /* 0x11 */
  246. u8 pddr_datal; /* 0x12 */
  247. u8 pddr_busctl; /* 0x13 */
  248. u8 pddr_bs; /* 0x14 */
  249. u8 pddr_cs; /* 0x15 */
  250. u8 pddr_sdram; /* 0x16 */
  251. u8 pddr_feci2c; /* 0x17 */
  252. u8 pddr_uarth; /* 0x18 */
  253. u8 pddr_uartl; /* 0x19 */
  254. u8 pddr_qspi; /* 0x1A */
  255. u8 pddr_timer; /* 0x1B */
  256. u8 pddr_etpu; /* 0x1C */
  257. u8 res2[3]; /* 0x1D - 0x1F */
  258. /* Port Data Direction Registers */
  259. u8 ppdsdr_addr; /* 0x20 */
  260. u8 ppdsdr_datah; /* 0x21 */
  261. u8 ppdsdr_datal; /* 0x22 */
  262. u8 ppdsdr_busctl; /* 0x23 */
  263. u8 ppdsdr_bs; /* 0x24 */
  264. u8 ppdsdr_cs; /* 0x25 */
  265. u8 ppdsdr_sdram; /* 0x26 */
  266. u8 ppdsdr_feci2c; /* 0x27 */
  267. u8 ppdsdr_uarth; /* 0x28 */
  268. u8 ppdsdr_uartl; /* 0x29 */
  269. u8 ppdsdr_qspi; /* 0x2A */
  270. u8 ppdsdr_timer; /* 0x2B */
  271. u8 ppdsdr_etpu; /* 0x2C */
  272. u8 res3[3]; /* 0x2D - 0x2F */
  273. /* Port Clear Output Data Registers */
  274. u8 pclrr_addr; /* 0x30 */
  275. u8 pclrr_datah; /* 0x31 */
  276. u8 pclrr_datal; /* 0x32 */
  277. u8 pclrr_busctl; /* 0x33 */
  278. u8 pclrr_bs; /* 0x34 */
  279. u8 pclrr_cs; /* 0x35 */
  280. u8 pclrr_sdram; /* 0x36 */
  281. u8 pclrr_feci2c; /* 0x37 */
  282. u8 pclrr_uarth; /* 0x38 */
  283. u8 pclrr_uartl; /* 0x39 */
  284. u8 pclrr_qspi; /* 0x3A */
  285. u8 pclrr_timer; /* 0x3B */
  286. u8 pclrr_etpu; /* 0x3C */
  287. u8 res4[3]; /* 0x3D - 0x3F */
  288. /* Pin Assignment Registers */
  289. u8 par_ad; /* 0x40 */
  290. u8 res5; /* 0x41 */
  291. u16 par_busctl; /* 0x42 */
  292. u8 par_bs; /* 0x44 */
  293. u8 par_cs; /* 0x45 */
  294. u8 par_sdram; /* 0x46 */
  295. u8 par_feci2c; /* 0x47 */
  296. u16 par_uart; /* 0x48 */
  297. u8 par_qspi; /* 0x4A */
  298. u8 res6; /* 0x4B */
  299. u16 par_timer; /* 0x4C */
  300. u8 par_etpu; /* 0x4E */
  301. u8 res7; /* 0x4F */
  302. /* Drive Strength Control Registers */
  303. u8 dscr_eim; /* 0x50 */
  304. u8 dscr_etpu; /* 0x51 */
  305. u8 dscr_feci2c; /* 0x52 */
  306. u8 dscr_uart; /* 0x53 */
  307. u8 dscr_qspi; /* 0x54 */
  308. u8 dscr_timer; /* 0x55 */
  309. u16 res8; /* 0x56 */
  310. } gpio_t;
  311. /*Chip configuration module registers */
  312. typedef struct ccm_ctrl {
  313. u8 rcr; /* 0x01 */
  314. u8 rsr; /* 0x02 */
  315. u16 res1; /* 0x03 */
  316. u16 ccr; /* 0x04 Chip configuration register */
  317. u16 lpcr; /* 0x06 Low-power Control register */
  318. u16 rcon; /* 0x08 Rreset configuration register */
  319. u16 cir; /* 0x0a Chip identification register */
  320. } ccm_t;
  321. /* Clock Module registers */
  322. typedef struct pll_ctrl {
  323. u32 syncr; /* 0x00 synthesizer control register */
  324. u32 synsr; /* 0x04 synthesizer status register */
  325. } pll_t;
  326. /* Watchdog registers */
  327. typedef struct wdog_ctrl {
  328. u16 cr; /* 0x00 Control register */
  329. u16 mr; /* 0x02 Modulus register */
  330. u16 cntr; /* 0x04 Count register */
  331. u16 sr; /* 0x06 Service register */
  332. } wdog_t;
  333. /* FlexCan module registers */
  334. typedef struct can_ctrl {
  335. u32 mcr; /* 0x00 Module Configuration register */
  336. u32 ctrl; /* 0x04 Control register */
  337. u32 timer; /* 0x08 Free Running Timer */
  338. u32 res1; /* 0x0C */
  339. u32 rxgmask; /* 0x10 Rx Global Mask */
  340. u32 rx14mask; /* 0x14 RxBuffer 14 Mask */
  341. u32 rx15mask; /* 0x18 RxBuffer 15 Mask */
  342. u32 errcnt; /* 0x1C Error Counter Register */
  343. u32 errstat; /* 0x20 Error and status Register */
  344. u32 res2; /* 0x24 */
  345. u32 imask; /* 0x28 Interrupt Mask Register */
  346. u32 res3; /* 0x2C */
  347. u32 iflag; /* 0x30 Interrupt Flag Register */
  348. u32 res4[19]; /* 0x34 - 0x7F */
  349. u32 MB0_15[2048]; /* 0x80 Message Buffer 0-15 */
  350. } can_t;
  351. #endif /* __IMMAP_5235__ */