immap_5227x.h 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. /*
  2. * MCF5227x 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_5227X__
  26. #define __IMMAP_5227X__
  27. /* Module Base Addresses */
  28. #define MMAP_SCM1 (CFG_MBAR + 0x00000000)
  29. #define MMAP_XBS (CFG_MBAR + 0x00004000)
  30. #define MMAP_FBCS (CFG_MBAR + 0x00008000)
  31. #define MMAP_CAN (CFG_MBAR + 0x00020000)
  32. #define MMAP_RTC (CFG_MBAR + 0x0003C000)
  33. #define MMAP_SCM2 (CFG_MBAR + 0x00040010)
  34. #define MMAP_SCM3 (CFG_MBAR + 0x00040070)
  35. #define MMAP_EDMA (CFG_MBAR + 0x00044000)
  36. #define MMAP_INTC0 (CFG_MBAR + 0x00048000)
  37. #define MMAP_INTC1 (CFG_MBAR + 0x0004C000)
  38. #define MMAP_IACK (CFG_MBAR + 0x00054000)
  39. #define MMAP_I2C (CFG_MBAR + 0x00058000)
  40. #define MMAP_DSPI (CFG_MBAR + 0x0005C000)
  41. #define MMAP_UART0 (CFG_MBAR + 0x00060000)
  42. #define MMAP_UART1 (CFG_MBAR + 0x00064000)
  43. #define MMAP_UART2 (CFG_MBAR + 0x00068000)
  44. #define MMAP_DTMR0 (CFG_MBAR + 0x00070000)
  45. #define MMAP_DTMR1 (CFG_MBAR + 0x00074000)
  46. #define MMAP_DTMR2 (CFG_MBAR + 0x00078000)
  47. #define MMAP_DTMR3 (CFG_MBAR + 0x0007C000)
  48. #define MMAP_PIT0 (CFG_MBAR + 0x00080000)
  49. #define MMAP_PIT1 (CFG_MBAR + 0x00084000)
  50. #define MMAP_PWM (CFG_MBAR + 0x00090000)
  51. #define MMAP_EPORT (CFG_MBAR + 0x00094000)
  52. #define MMAP_RCM (CFG_MBAR + 0x000A0000)
  53. #define MMAP_CCM (CFG_MBAR + 0x000A0004)
  54. #define MMAP_GPIO (CFG_MBAR + 0x000A4000)
  55. #define MMAP_ADC (CFG_MBAR + 0x000A8000)
  56. #define MMAP_LCD (CFG_MBAR + 0x000AC000)
  57. #define MMAP_LCD_BGLUT (CFG_MBAR + 0x000AC800)
  58. #define MMAP_LCD_GWLUT (CFG_MBAR + 0x000ACC00)
  59. #define MMAP_USBHW (CFG_MBAR + 0x000B0000)
  60. #define MMAP_USBCAPS (CFG_MBAR + 0x000B0100)
  61. #define MMAP_USBEHCI (CFG_MBAR + 0x000B0140)
  62. #define MMAP_USBOTG (CFG_MBAR + 0x000B01A0)
  63. #define MMAP_SDRAM (CFG_MBAR + 0x000B8000)
  64. #define MMAP_SSI (CFG_MBAR + 0x000BC000)
  65. #define MMAP_PLL (CFG_MBAR + 0x000C0000)
  66. #include <asm/coldfire/crossbar.h>
  67. #include <asm/coldfire/dspi.h>
  68. #include <asm/coldfire/edma.h>
  69. #include <asm/coldfire/flexbus.h>
  70. #include <asm/coldfire/lcd.h>
  71. #include <asm/coldfire/ssi.h>
  72. /* Interrupt Controller (INTC) */
  73. typedef struct int0_ctrl {
  74. u32 iprh0; /* 0x00 Pending Register High */
  75. u32 iprl0; /* 0x04 Pending Register Low */
  76. u32 imrh0; /* 0x08 Mask Register High */
  77. u32 imrl0; /* 0x0C Mask Register Low */
  78. u32 frch0; /* 0x10 Force Register High */
  79. u32 frcl0; /* 0x14 Force Register Low */
  80. u16 res1; /* 0x18 - 0x19 */
  81. u16 icfg0; /* 0x1A Configuration Register */
  82. u8 simr0; /* 0x1C Set Interrupt Mask */
  83. u8 cimr0; /* 0x1D Clear Interrupt Mask */
  84. u8 clmask0; /* 0x1E Current Level Mask */
  85. u8 slmask; /* 0x1F Saved Level Mask */
  86. u32 res2[8]; /* 0x20 - 0x3F */
  87. u8 icr0[64]; /* 0x40 - 0x7F Control registers */
  88. u32 res3[24]; /* 0x80 - 0xDF */
  89. u8 swiack0; /* 0xE0 Software Interrupt ack */
  90. u8 res4[3]; /* 0xE1 - 0xE3 */
  91. u8 Lniack0_1; /* 0xE4 Level n interrupt ack */
  92. u8 res5[3]; /* 0xE5 - 0xE7 */
  93. u8 Lniack0_2; /* 0xE8 Level n interrupt ack */
  94. u8 res6[3]; /* 0xE9 - 0xEB */
  95. u8 Lniack0_3; /* 0xEC Level n interrupt ack */
  96. u8 res7[3]; /* 0xED - 0xEF */
  97. u8 Lniack0_4; /* 0xF0 Level n interrupt ack */
  98. u8 res8[3]; /* 0xF1 - 0xF3 */
  99. u8 Lniack0_5; /* 0xF4 Level n interrupt ack */
  100. u8 res9[3]; /* 0xF5 - 0xF7 */
  101. u8 Lniack0_6; /* 0xF8 Level n interrupt ack */
  102. u8 resa[3]; /* 0xF9 - 0xFB */
  103. u8 Lniack0_7; /* 0xFC Level n interrupt ack */
  104. u8 resb[3]; /* 0xFD - 0xFF */
  105. } int0_t;
  106. typedef struct int1_ctrl {
  107. /* Interrupt Controller 1 */
  108. u32 iprh1; /* 0x00 Pending Register High */
  109. u32 iprl1; /* 0x04 Pending Register Low */
  110. u32 imrh1; /* 0x08 Mask Register High */
  111. u32 imrl1; /* 0x0C Mask Register Low */
  112. u32 frch1; /* 0x10 Force Register High */
  113. u32 frcl1; /* 0x14 Force Register Low */
  114. u16 res1; /* 0x18 */
  115. u16 icfg1; /* 0x1A Configuration Register */
  116. u8 simr1; /* 0x1C Set Interrupt Mask */
  117. u8 cimr1; /* 0x1D Clear Interrupt Mask */
  118. u16 res2; /* 0x1E - 0x1F */
  119. u32 res3[8]; /* 0x20 - 0x3F */
  120. u8 icr1[64]; /* 0x40 - 0x7F */
  121. u32 res4[24]; /* 0x80 - 0xDF */
  122. u8 swiack1; /* 0xE0 Software Interrupt ack */
  123. u8 res5[3]; /* 0xE1 - 0xE3 */
  124. u8 Lniack1_1; /* 0xE4 Level n interrupt ack */
  125. u8 res6[3]; /* 0xE5 - 0xE7 */
  126. u8 Lniack1_2; /* 0xE8 Level n interrupt ack */
  127. u8 res7[3]; /* 0xE9 - 0xEB */
  128. u8 Lniack1_3; /* 0xEC Level n interrupt ack */
  129. u8 res8[3]; /* 0xED - 0xEF */
  130. u8 Lniack1_4; /* 0xF0 Level n interrupt ack */
  131. u8 res9[3]; /* 0xF1 - 0xF3 */
  132. u8 Lniack1_5; /* 0xF4 Level n interrupt ack */
  133. u8 resa[3]; /* 0xF5 - 0xF7 */
  134. u8 Lniack1_6; /* 0xF8 Level n interrupt ack */
  135. u8 resb[3]; /* 0xF9 - 0xFB */
  136. u8 Lniack1_7; /* 0xFC Level n interrupt ack */
  137. u8 resc[3]; /* 0xFD - 0xFF */
  138. } int1_t;
  139. /* Global Interrupt Acknowledge (IACK) */
  140. typedef struct iack {
  141. u8 resv0[0xE0];
  142. u8 gswiack;
  143. u8 resv1[0x3];
  144. u8 gl1iack;
  145. u8 resv2[0x3];
  146. u8 gl2iack;
  147. u8 resv3[0x3];
  148. u8 gl3iack;
  149. u8 resv4[0x3];
  150. u8 gl4iack;
  151. u8 resv5[0x3];
  152. u8 gl5iack;
  153. u8 resv6[0x3];
  154. u8 gl6iack;
  155. u8 resv7[0x3];
  156. u8 gl7iack;
  157. } iack_t;
  158. /* Edge Port Module (EPORT) */
  159. typedef struct eport {
  160. u16 eppar;
  161. u8 epddr;
  162. u8 epier;
  163. u8 epdr;
  164. u8 eppdr;
  165. u8 epfr;
  166. } eport_t;
  167. /* Reset Controller Module (RCM) */
  168. typedef struct rcm {
  169. u8 rcr;
  170. u8 rsr;
  171. } rcm_t;
  172. /* Chip Configuration Module (CCM) */
  173. typedef struct ccm {
  174. u16 ccr; /* Chip Configuration (Rd-only) */
  175. u16 resv1;
  176. u16 rcon; /* Reset Configuration (Rd-only) */
  177. u16 cir; /* Chip Identification (Rd-only) */
  178. u32 resv2;
  179. u16 misccr; /* Miscellaneous Control */
  180. u16 cdr; /* Clock Divider */
  181. u16 uocsr; /* USB On-the-Go Controller Status */
  182. u16 resv4;
  183. u16 sbfsr; /* Serial Boot Status */
  184. u16 sbfcr; /* Serial Boot Control */
  185. } ccm_t;
  186. /* General Purpose I/O Module (GPIO) */
  187. typedef struct gpio {
  188. /* Port Output Data Registers */
  189. u8 podr_be; /* 0x00 */
  190. u8 podr_cs; /* 0x01 */
  191. u8 podr_fbctl; /* 0x02 */
  192. u8 podr_i2c; /* 0x03 */
  193. u8 rsvd1; /* 0x04 */
  194. u8 podr_uart; /* 0x05 */
  195. u8 podr_dspi; /* 0x06 */
  196. u8 podr_timer; /* 0x07 */
  197. u8 podr_lcdctl; /* 0x08 */
  198. u8 podr_lcddatah; /* 0x09 */
  199. u8 podr_lcddatam; /* 0x0A */
  200. u8 podr_lcddatal; /* 0x0B */
  201. /* Port Data Direction Registers */
  202. u8 pddr_be; /* 0x0C */
  203. u8 pddr_cs; /* 0x0D */
  204. u8 pddr_fbctl; /* 0x0E */
  205. u8 pddr_i2c; /* 0x0F */
  206. u8 rsvd2; /* 0x10 */
  207. u8 pddr_uart; /* 0x11 */
  208. u8 pddr_dspi; /* 0x12 */
  209. u8 pddr_timer; /* 0x13 */
  210. u8 pddr_lcdctl; /* 0x14 */
  211. u8 pddr_lcddatah; /* 0x15 */
  212. u8 pddr_lcddatam; /* 0x16 */
  213. u8 pddr_lcddatal; /* 0x17 */
  214. /* Port Pin Data/Set Data Registers */
  215. u8 ppdsdr_be; /* 0x18 */
  216. u8 ppdsdr_cs; /* 0x19 */
  217. u8 ppdsdr_fbctl; /* 0x1A */
  218. u8 ppdsdr_i2c; /* 0x1B */
  219. u8 rsvd3; /* 0x1C */
  220. u8 ppdsdr_uart; /* 0x1D */
  221. u8 ppdsdr_dspi; /* 0x1E */
  222. u8 ppdsdr_timer; /* 0x1F */
  223. u8 ppdsdr_lcdctl; /* 0x20 */
  224. u8 ppdsdr_lcddatah; /* 0x21 */
  225. u8 ppdsdr_lcddatam; /* 0x22 */
  226. u8 ppdsdr_lcddatal; /* 0x23 */
  227. /* Port Clear Output Data Registers */
  228. u8 pclrr_be; /* 0x24 */
  229. u8 pclrr_cs; /* 0x25 */
  230. u8 pclrr_fbctl; /* 0x26 */
  231. u8 pclrr_i2c; /* 0x27 */
  232. u8 rsvd4; /* 0x28 */
  233. u8 pclrr_uart; /* 0x29 */
  234. u8 pclrr_dspi; /* 0x2A */
  235. u8 pclrr_timer; /* 0x2B */
  236. u8 pclrr_lcdctl; /* 0x2C */
  237. u8 pclrr_lcddatah; /* 0x2D */
  238. u8 pclrr_lcddatam; /* 0x2E */
  239. u8 pclrr_lcddatal; /* 0x2F */
  240. /* Pin Assignment Registers */
  241. u8 par_be; /* 0x30 */
  242. u8 par_cs; /* 0x31 */
  243. u8 par_fbctl; /* 0x32 */
  244. u8 par_i2c; /* 0x33 */
  245. u16 par_uart; /* 0x34 */
  246. u8 par_dspi; /* 0x36 */
  247. u8 par_timer; /* 0x37 */
  248. u8 par_lcdctl; /* 0x38 */
  249. u8 par_irq; /* 0x39 */
  250. u16 rsvd6; /* 0x3A - 0x3B */
  251. u32 par_lcdh; /* 0x3C */
  252. u32 par_lcdl; /* 0x40 */
  253. /* Mode select control registers */
  254. u8 mscr_fb; /* 0x44 */
  255. u8 mscr_sdram; /* 0x45 */
  256. u16 rsvd7; /* 0x46 - 0x47 */
  257. u8 dscr_dspi; /* 0x48 */
  258. u8 dscr_timer; /* 0x49 */
  259. u8 dscr_i2c; /* 0x4A */
  260. u8 dscr_lcd; /* 0x4B */
  261. u8 dscr_debug; /* 0x4C */
  262. u8 dscr_clkrst; /* 0x4D */
  263. u8 dscr_irq; /* 0x4E */
  264. u8 dscr_uart; /* 0x4F */
  265. } gpio_t;
  266. /* SDRAM Controller (SDRAMC) */
  267. typedef struct sdramc {
  268. u32 sdmr; /* Mode/Extended Mode */
  269. u32 sdcr; /* Control */
  270. u32 sdcfg1; /* Configuration 1 */
  271. u32 sdcfg2; /* Chip Select */
  272. u8 resv0[0x100];
  273. u32 sdcs0; /* Mode/Extended Mode */
  274. u32 sdcs1; /* Mode/Extended Mode */
  275. } sdramc_t;
  276. /* Phase Locked Loop (PLL) */
  277. typedef struct pll {
  278. u32 pcr; /* PLL Control */
  279. u32 psr; /* PLL Status */
  280. } pll_t;
  281. /* System Control Module register */
  282. typedef struct scm1 {
  283. u32 mpr; /* 0x00 Master Privilege */
  284. u32 rsvd1[7];
  285. u32 pacra; /* 0x20 */
  286. u32 pacrb; /* 0x24 */
  287. u32 pacrc; /* 0x28 */
  288. u32 pacrd; /* 0x2C */
  289. u32 rsvd2[4];
  290. u32 pacre; /* 0x40 */
  291. u32 pacrf; /* 0x44 */
  292. u32 pacrg; /* 0x48 */
  293. u32 rsvd3;
  294. u32 pacri; /* 0x50 */
  295. } scm1_t;
  296. typedef struct scm2_ctrl {
  297. u8 res1[3]; /* 0x00 - 0x02 */
  298. u8 wcr; /* 0x03 wakeup control */
  299. u16 res2; /* 0x04 - 0x05 */
  300. u16 cwcr; /* 0x06 Core Watchdog Control */
  301. u8 res3[3]; /* 0x08 - 0x0A */
  302. u8 cwsr; /* 0x0B Core Watchdog Service */
  303. u8 res4[2]; /* 0x0C - 0x0D */
  304. u8 scmisr; /* 0x0F Interrupt Status */
  305. u32 res5; /* 0x20 */
  306. u32 bcr; /* 0x24 Burst Configuration */
  307. } scm2_t;
  308. typedef struct scm3_ctrl {
  309. u32 cfadr; /* 0x00 Core Fault Address */
  310. u8 res7; /* 0x04 */
  311. u8 cfier; /* 0x05 Core Fault Interrupt Enable */
  312. u8 cfloc; /* 0x06 Core Fault Location */
  313. u8 cfatr; /* 0x07 Core Fault Attributes */
  314. u32 cfdtr; /* 0x08 Core Fault Data */
  315. } scm3_t;
  316. typedef struct rtcex {
  317. u32 rsvd1[3];
  318. u32 gocu;
  319. u32 gocl;
  320. } rtcex_t;
  321. #endif /* __IMMAP_5227X__ */