immap_520x.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /*
  2. * MCF520x Internal Memory Map
  3. *
  4. * Copyright (C) 2004-2009 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_520X__
  26. #define __IMMAP_520X__
  27. #define MMAP_SCM1 (CONFIG_SYS_MBAR + 0x00000000)
  28. #define MMAP_XBS (CONFIG_SYS_MBAR + 0x00004000)
  29. #define MMAP_FBCS (CONFIG_SYS_MBAR + 0x00008000)
  30. #define MMAP_FEC0 (CONFIG_SYS_MBAR + 0x00030000)
  31. #define MMAP_SCM2 (CONFIG_SYS_MBAR + 0x00040000)
  32. #define MMAP_EDMA (CONFIG_SYS_MBAR + 0x00044000)
  33. #define MMAP_INTC0 (CONFIG_SYS_MBAR + 0x00048000)
  34. #define MMAP_INTCACK (CONFIG_SYS_MBAR + 0x00054000)
  35. #define MMAP_I2C (CONFIG_SYS_MBAR + 0x00058000)
  36. #define MMAP_QSPI (CONFIG_SYS_MBAR + 0x0005C000)
  37. #define MMAP_UART0 (CONFIG_SYS_MBAR + 0x00060000)
  38. #define MMAP_UART1 (CONFIG_SYS_MBAR + 0x00064000)
  39. #define MMAP_UART2 (CONFIG_SYS_MBAR + 0x00068000)
  40. #define MMAP_DTMR0 (CONFIG_SYS_MBAR + 0x00070000)
  41. #define MMAP_DTMR1 (CONFIG_SYS_MBAR + 0x00074000)
  42. #define MMAP_DTMR2 (CONFIG_SYS_MBAR + 0x00078000)
  43. #define MMAP_DTMR3 (CONFIG_SYS_MBAR + 0x0007C000)
  44. #define MMAP_PIT0 (CONFIG_SYS_MBAR + 0x00080000)
  45. #define MMAP_PIT1 (CONFIG_SYS_MBAR + 0x00084000)
  46. #define MMAP_EPORT0 (CONFIG_SYS_MBAR + 0x00088000)
  47. #define MMAP_WDOG (CONFIG_SYS_MBAR + 0x0008C000)
  48. #define MMAP_PLL (CONFIG_SYS_MBAR + 0x00090000)
  49. #define MMAP_RCM (CONFIG_SYS_MBAR + 0x000A0000)
  50. #define MMAP_CCM (CONFIG_SYS_MBAR + 0x000A0004)
  51. #define MMAP_GPIO (CONFIG_SYS_MBAR + 0x000A4000)
  52. #define MMAP_SDRAM (CONFIG_SYS_MBAR + 0x000A8000)
  53. #include <asm/coldfire/crossbar.h>
  54. #include <asm/coldfire/edma.h>
  55. #include <asm/coldfire/eport.h>
  56. #include <asm/coldfire/flexbus.h>
  57. #include <asm/coldfire/intctrl.h>
  58. #include <asm/coldfire/qspi.h>
  59. /* System Controller Module */
  60. typedef struct scm1 {
  61. u32 mpr; /* 0x00 Master Privilege */
  62. u32 rsvd1[7];
  63. u32 pacra; /* 0x20 Peripheral Access Ctrl A */
  64. u32 pacrb; /* 0x24 Peripheral Access Ctrl B */
  65. u32 pacrc; /* 0x28 Peripheral Access Ctrl C */
  66. u32 pacrd; /* 0x2C Peripheral Access Ctrl D */
  67. u32 rsvd2[4];
  68. u32 pacre; /* 0x40 Peripheral Access Ctrl E */
  69. u32 pacrf; /* 0x44 Peripheral Access Ctrl F */
  70. u32 rsvd3[3];
  71. u32 bmt; /* 0x50 bus monitor */
  72. } scm1_t;
  73. typedef struct scm2 {
  74. u8 rsvd1[19]; /* 0x00 - 0x12 */
  75. u8 wcr; /* 0x13 */
  76. u16 rsvd2; /* 0x14 - 0x15 */
  77. u16 cwcr; /* 0x16 */
  78. u8 rsvd3[3]; /* 0x18 - 0x1A */
  79. u8 cwsr; /* 0x1B */
  80. u8 rsvd4[3]; /* 0x1C - 0x1E */
  81. u8 scmisr; /* 0x1F */
  82. u8 rsvd5[79]; /* 0x20 - 0x6F */
  83. u32 cfadr; /* 0x70 */
  84. u8 rsvd7; /* 0x74 */
  85. u8 cfier; /* 0x75 */
  86. u8 cfloc; /* 0x76 */
  87. u8 cfatr; /* 0x77 */
  88. u32 rsvd8; /* 0x78 - 0x7B */
  89. u32 cfdtr; /* 0x7C */
  90. } scm2_t;
  91. /* Chip configuration module */
  92. typedef struct rcm {
  93. u8 rcr;
  94. u8 rsr;
  95. } rcm_t;
  96. typedef struct ccm_ctrl {
  97. u16 ccr; /* 0x00 Chip Cfg */
  98. u16 res1; /* 0x02 */
  99. u16 rcon; /* 0x04 Reset Cfg */
  100. u16 cir; /* 0x06 Chip ID */
  101. } ccm_t;
  102. /* GPIO port */
  103. typedef struct gpio_ctrl {
  104. /* Port Output Data */
  105. u8 podr_busctl; /* 0x00 */
  106. u8 podr_be; /* 0x01 */
  107. u8 podr_cs; /* 0x02 */
  108. u8 podr_feci2c; /* 0x03 */
  109. u8 podr_qspi; /* 0x04 */
  110. u8 podr_timer; /* 0x05 */
  111. u8 podr_uart; /* 0x06 */
  112. u8 podr_fech; /* 0x07 */
  113. u8 podr_fecl; /* 0x08 */
  114. u8 res01[3]; /* 0x9 - 0x0B */
  115. /* Port Data Direction */
  116. u8 pddr_busctl; /* 0x0C */
  117. u8 pddr_be; /* 0x0D */
  118. u8 pddr_cs; /* 0x0E */
  119. u8 pddr_feci2c; /* 0x0F */
  120. u8 pddr_qspi; /* 0x10*/
  121. u8 pddr_timer; /* 0x11 */
  122. u8 pddr_uart; /* 0x12 */
  123. u8 pddr_fech; /* 0x13 */
  124. u8 pddr_fecl; /* 0x14 */
  125. u8 res02[5]; /* 0x15 - 0x19 */
  126. /* Port Data Direction */
  127. u8 ppdr_cs; /* 0x1A */
  128. u8 ppdr_feci2c; /* 0x1B */
  129. u8 ppdr_qspi; /* 0x1C */
  130. u8 ppdr_timer; /* 0x1D */
  131. u8 ppdr_uart; /* 0x1E */
  132. u8 ppdr_fech; /* 0x1F */
  133. u8 ppdr_fecl; /* 0x20 */
  134. u8 res03[3]; /* 0x21 - 0x23 */
  135. /* Port Clear Output Data */
  136. u8 pclrr_busctl; /* 0x24 */
  137. u8 pclrr_be; /* 0x25 */
  138. u8 pclrr_cs; /* 0x26 */
  139. u8 pclrr_feci2c; /* 0x27 */
  140. u8 pclrr_qspi; /* 0x28 */
  141. u8 pclrr_timer; /* 0x29 */
  142. u8 pclrr_uart; /* 0x2A */
  143. u8 pclrr_fech; /* 0x2B */
  144. u8 pclrr_fecl; /* 0x2C */
  145. u8 res04[3]; /* 0x2D - 0x2F */
  146. /* Pin Assignment */
  147. u8 par_busctl; /* 0x30 */
  148. u8 par_be; /* 0x31 */
  149. u8 par_cs; /* 0x32 */
  150. u8 par_feci2c; /* 0x33 */
  151. u8 par_qspi; /* 0x34 */
  152. u8 par_timer; /* 0x35 */
  153. u16 par_uart; /* 0x36 */
  154. u8 par_fec; /* 0x38 */
  155. u8 par_irq; /* 0x39 */
  156. /* Mode Select Control */
  157. /* Drive Strength Control */
  158. u8 mscr_fb; /* 0x3A */
  159. u8 mscr_sdram; /* 0x3B */
  160. u8 dscr_i2c; /* 0x3C */
  161. u8 dscr_misc; /* 0x3D */
  162. u8 dscr_fec; /* 0x3E */
  163. u8 dscr_uart; /* 0x3F */
  164. u8 dscr_qspi; /* 0x40 */
  165. } gpio_t;
  166. /* SDRAM controller */
  167. typedef struct sdram_ctrl {
  168. u32 mode; /* 0x00 Mode/Extended Mode */
  169. u32 ctrl; /* 0x04 Ctrl */
  170. u32 cfg1; /* 0x08 Cfg 1 */
  171. u32 cfg2; /* 0x0C Cfg 2 */
  172. u32 res1[64]; /* 0x10 - 0x10F */
  173. u32 cs0; /* 0x110 Chip Select 0 Cfg */
  174. u32 cs1; /* 0x114 Chip Select 1 Cfg */
  175. } sdram_t;
  176. /* Clock Module */
  177. typedef struct pll_ctrl {
  178. u8 odr; /* 0x00 Output divider */
  179. u8 rsvd1;
  180. u8 cr; /* 0x02 Control */
  181. u8 rsvd2;
  182. u8 mdr; /* 0x04 Modulation Divider */
  183. u8 rsvd3;
  184. u8 fdr; /* 0x06 Feedback Divider */
  185. u8 rsvd4;
  186. } pll_t;
  187. /* Watchdog registers */
  188. typedef struct wdog_ctrl {
  189. u16 cr; /* 0x00 Control */
  190. u16 mr; /* 0x02 Modulus */
  191. u16 cntr; /* 0x04 Count */
  192. u16 sr; /* 0x06 Service */
  193. } wdog_t;
  194. #endif /* __IMMAP_520X__ */