immap_5227x.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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 (CONFIG_SYS_MBAR + 0x00000000)
  29. #define MMAP_XBS (CONFIG_SYS_MBAR + 0x00004000)
  30. #define MMAP_FBCS (CONFIG_SYS_MBAR + 0x00008000)
  31. #define MMAP_CAN (CONFIG_SYS_MBAR + 0x00020000)
  32. #define MMAP_RTC (CONFIG_SYS_MBAR + 0x0003C000)
  33. #define MMAP_SCM2 (CONFIG_SYS_MBAR + 0x00040010)
  34. #define MMAP_SCM3 (CONFIG_SYS_MBAR + 0x00040070)
  35. #define MMAP_EDMA (CONFIG_SYS_MBAR + 0x00044000)
  36. #define MMAP_INTC0 (CONFIG_SYS_MBAR + 0x00048000)
  37. #define MMAP_INTC1 (CONFIG_SYS_MBAR + 0x0004C000)
  38. #define MMAP_IACK (CONFIG_SYS_MBAR + 0x00054000)
  39. #define MMAP_I2C (CONFIG_SYS_MBAR + 0x00058000)
  40. #define MMAP_DSPI (CONFIG_SYS_MBAR + 0x0005C000)
  41. #define MMAP_UART0 (CONFIG_SYS_MBAR + 0x00060000)
  42. #define MMAP_UART1 (CONFIG_SYS_MBAR + 0x00064000)
  43. #define MMAP_UART2 (CONFIG_SYS_MBAR + 0x00068000)
  44. #define MMAP_DTMR0 (CONFIG_SYS_MBAR + 0x00070000)
  45. #define MMAP_DTMR1 (CONFIG_SYS_MBAR + 0x00074000)
  46. #define MMAP_DTMR2 (CONFIG_SYS_MBAR + 0x00078000)
  47. #define MMAP_DTMR3 (CONFIG_SYS_MBAR + 0x0007C000)
  48. #define MMAP_PIT0 (CONFIG_SYS_MBAR + 0x00080000)
  49. #define MMAP_PIT1 (CONFIG_SYS_MBAR + 0x00084000)
  50. #define MMAP_PWM (CONFIG_SYS_MBAR + 0x00090000)
  51. #define MMAP_EPORT (CONFIG_SYS_MBAR + 0x00094000)
  52. #define MMAP_RCM (CONFIG_SYS_MBAR + 0x000A0000)
  53. #define MMAP_CCM (CONFIG_SYS_MBAR + 0x000A0004)
  54. #define MMAP_GPIO (CONFIG_SYS_MBAR + 0x000A4000)
  55. #define MMAP_ADC (CONFIG_SYS_MBAR + 0x000A8000)
  56. #define MMAP_LCD (CONFIG_SYS_MBAR + 0x000AC000)
  57. #define MMAP_LCD_BGLUT (CONFIG_SYS_MBAR + 0x000AC800)
  58. #define MMAP_LCD_GWLUT (CONFIG_SYS_MBAR + 0x000ACC00)
  59. #define MMAP_USBHW (CONFIG_SYS_MBAR + 0x000B0000)
  60. #define MMAP_USBCAPS (CONFIG_SYS_MBAR + 0x000B0100)
  61. #define MMAP_USBEHCI (CONFIG_SYS_MBAR + 0x000B0140)
  62. #define MMAP_USBOTG (CONFIG_SYS_MBAR + 0x000B01A0)
  63. #define MMAP_SDRAM (CONFIG_SYS_MBAR + 0x000B8000)
  64. #define MMAP_SSI (CONFIG_SYS_MBAR + 0x000BC000)
  65. #define MMAP_PLL (CONFIG_SYS_MBAR + 0x000C0000)
  66. #include <asm/coldfire/crossbar.h>
  67. #include <asm/coldfire/dspi.h>
  68. #include <asm/coldfire/edma.h>
  69. #include <asm/coldfire/eport.h>
  70. #include <asm/coldfire/flexbus.h>
  71. #include <asm/coldfire/flexcan.h>
  72. #include <asm/coldfire/intctrl.h>
  73. #include <asm/coldfire/lcd.h>
  74. #include <asm/coldfire/pwm.h>
  75. #include <asm/coldfire/ssi.h>
  76. /* Reset Controller Module (RCM) */
  77. typedef struct rcm {
  78. u8 rcr;
  79. u8 rsr;
  80. } rcm_t;
  81. /* Chip Configuration Module (CCM) */
  82. typedef struct ccm {
  83. u16 ccr; /* Chip Configuration (Rd-only) */
  84. u16 resv1;
  85. u16 rcon; /* Reset Configuration (Rd-only) */
  86. u16 cir; /* Chip Identification (Rd-only) */
  87. u32 resv2;
  88. u16 misccr; /* Miscellaneous Control */
  89. u16 cdr; /* Clock Divider */
  90. u16 uocsr; /* USB On-the-Go Controller Status */
  91. u16 resv4;
  92. u16 sbfsr; /* Serial Boot Status */
  93. u16 sbfcr; /* Serial Boot Control */
  94. } ccm_t;
  95. typedef struct canex_ctrl {
  96. can_msg_t msg[16]; /* 0x00 Message Buffer 0-15 */
  97. u32 res0[0x700]; /* 0x100 */
  98. can_msg_t rxim[16]; /* 0x800 Rx Individual Mask 0-15 */
  99. } canex_t;
  100. /* General Purpose I/O Module (GPIO) */
  101. typedef struct gpio {
  102. /* Port Output Data Registers */
  103. u8 podr_be; /* 0x00 */
  104. u8 podr_cs; /* 0x01 */
  105. u8 podr_fbctl; /* 0x02 */
  106. u8 podr_i2c; /* 0x03 */
  107. u8 rsvd1; /* 0x04 */
  108. u8 podr_uart; /* 0x05 */
  109. u8 podr_dspi; /* 0x06 */
  110. u8 podr_timer; /* 0x07 */
  111. u8 podr_lcdctl; /* 0x08 */
  112. u8 podr_lcddatah; /* 0x09 */
  113. u8 podr_lcddatam; /* 0x0A */
  114. u8 podr_lcddatal; /* 0x0B */
  115. /* Port Data Direction Registers */
  116. u8 pddr_be; /* 0x0C */
  117. u8 pddr_cs; /* 0x0D */
  118. u8 pddr_fbctl; /* 0x0E */
  119. u8 pddr_i2c; /* 0x0F */
  120. u8 rsvd2; /* 0x10 */
  121. u8 pddr_uart; /* 0x11 */
  122. u8 pddr_dspi; /* 0x12 */
  123. u8 pddr_timer; /* 0x13 */
  124. u8 pddr_lcdctl; /* 0x14 */
  125. u8 pddr_lcddatah; /* 0x15 */
  126. u8 pddr_lcddatam; /* 0x16 */
  127. u8 pddr_lcddatal; /* 0x17 */
  128. /* Port Pin Data/Set Data Registers */
  129. u8 ppdsdr_be; /* 0x18 */
  130. u8 ppdsdr_cs; /* 0x19 */
  131. u8 ppdsdr_fbctl; /* 0x1A */
  132. u8 ppdsdr_i2c; /* 0x1B */
  133. u8 rsvd3; /* 0x1C */
  134. u8 ppdsdr_uart; /* 0x1D */
  135. u8 ppdsdr_dspi; /* 0x1E */
  136. u8 ppdsdr_timer; /* 0x1F */
  137. u8 ppdsdr_lcdctl; /* 0x20 */
  138. u8 ppdsdr_lcddatah; /* 0x21 */
  139. u8 ppdsdr_lcddatam; /* 0x22 */
  140. u8 ppdsdr_lcddatal; /* 0x23 */
  141. /* Port Clear Output Data Registers */
  142. u8 pclrr_be; /* 0x24 */
  143. u8 pclrr_cs; /* 0x25 */
  144. u8 pclrr_fbctl; /* 0x26 */
  145. u8 pclrr_i2c; /* 0x27 */
  146. u8 rsvd4; /* 0x28 */
  147. u8 pclrr_uart; /* 0x29 */
  148. u8 pclrr_dspi; /* 0x2A */
  149. u8 pclrr_timer; /* 0x2B */
  150. u8 pclrr_lcdctl; /* 0x2C */
  151. u8 pclrr_lcddatah; /* 0x2D */
  152. u8 pclrr_lcddatam; /* 0x2E */
  153. u8 pclrr_lcddatal; /* 0x2F */
  154. /* Pin Assignment Registers */
  155. u8 par_be; /* 0x30 */
  156. u8 par_cs; /* 0x31 */
  157. u8 par_fbctl; /* 0x32 */
  158. u8 par_i2c; /* 0x33 */
  159. u16 par_uart; /* 0x34 */
  160. u8 par_dspi; /* 0x36 */
  161. u8 par_timer; /* 0x37 */
  162. u8 par_lcdctl; /* 0x38 */
  163. u8 par_irq; /* 0x39 */
  164. u16 rsvd6; /* 0x3A - 0x3B */
  165. u32 par_lcdh; /* 0x3C */
  166. u32 par_lcdl; /* 0x40 */
  167. /* Mode select control registers */
  168. u8 mscr_fb; /* 0x44 */
  169. u8 mscr_sdram; /* 0x45 */
  170. u16 rsvd7; /* 0x46 - 0x47 */
  171. u8 dscr_dspi; /* 0x48 */
  172. u8 dscr_timer; /* 0x49 */
  173. u8 dscr_i2c; /* 0x4A */
  174. u8 dscr_lcd; /* 0x4B */
  175. u8 dscr_debug; /* 0x4C */
  176. u8 dscr_clkrst; /* 0x4D */
  177. u8 dscr_irq; /* 0x4E */
  178. u8 dscr_uart; /* 0x4F */
  179. } gpio_t;
  180. /* SDRAM Controller (SDRAMC) */
  181. typedef struct sdramc {
  182. u32 sdmr; /* Mode/Extended Mode */
  183. u32 sdcr; /* Control */
  184. u32 sdcfg1; /* Configuration 1 */
  185. u32 sdcfg2; /* Chip Select */
  186. u8 resv0[0x100];
  187. u32 sdcs0; /* Mode/Extended Mode */
  188. u32 sdcs1; /* Mode/Extended Mode */
  189. } sdramc_t;
  190. /* Phase Locked Loop (PLL) */
  191. typedef struct pll {
  192. u32 pcr; /* PLL Control */
  193. u32 psr; /* PLL Status */
  194. } pll_t;
  195. /* System Control Module register */
  196. typedef struct scm1 {
  197. u32 mpr; /* 0x00 Master Privilege */
  198. u32 rsvd1[7];
  199. u32 pacra; /* 0x20 */
  200. u32 pacrb; /* 0x24 */
  201. u32 pacrc; /* 0x28 */
  202. u32 pacrd; /* 0x2C */
  203. u32 rsvd2[4];
  204. u32 pacre; /* 0x40 */
  205. u32 pacrf; /* 0x44 */
  206. u32 pacrg; /* 0x48 */
  207. u32 rsvd3;
  208. u32 pacri; /* 0x50 */
  209. } scm1_t;
  210. typedef struct scm2_ctrl {
  211. u8 res1[3]; /* 0x00 - 0x02 */
  212. u8 wcr; /* 0x03 wakeup control */
  213. u16 res2; /* 0x04 - 0x05 */
  214. u16 cwcr; /* 0x06 Core Watchdog Control */
  215. u8 res3[3]; /* 0x08 - 0x0A */
  216. u8 cwsr; /* 0x0B Core Watchdog Service */
  217. u8 res4[2]; /* 0x0C - 0x0D */
  218. u8 scmisr; /* 0x0F Interrupt Status */
  219. u32 res5; /* 0x20 */
  220. u32 bcr; /* 0x24 Burst Configuration */
  221. } scm2_t;
  222. typedef struct scm3_ctrl {
  223. u32 cfadr; /* 0x00 Core Fault Address */
  224. u8 res7; /* 0x04 */
  225. u8 cfier; /* 0x05 Core Fault Interrupt Enable */
  226. u8 cfloc; /* 0x06 Core Fault Location */
  227. u8 cfatr; /* 0x07 Core Fault Attributes */
  228. u32 cfdtr; /* 0x08 Core Fault Data */
  229. } scm3_t;
  230. typedef struct rtcex {
  231. u32 rsvd1[3];
  232. u32 gocu;
  233. u32 gocl;
  234. } rtcex_t;
  235. #endif /* __IMMAP_5227X__ */