immap_5227x.h 6.8 KB

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