immap_5301x.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. /*
  2. * MCF5301x Internal Memory Map
  3. *
  4. * Copyright (C) 2004-2008 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_5301X__
  26. #define __IMMAP_5301X__
  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_MPU (CONFIG_SYS_MBAR + 0x00014000)
  31. #define MMAP_FEC0 (CONFIG_SYS_MBAR + 0x00030000)
  32. #define MMAP_FEC1 (CONFIG_SYS_MBAR + 0x00034000)
  33. #define MMAP_SCM2 (CONFIG_SYS_MBAR + 0x00040000)
  34. #define MMAP_EDMA (CONFIG_SYS_MBAR + 0x00044000)
  35. #define MMAP_INTC0 (CONFIG_SYS_MBAR + 0x00048000)
  36. #define MMAP_INTC1 (CONFIG_SYS_MBAR + 0x0004C000)
  37. #define MMAP_INTCACK (CONFIG_SYS_MBAR + 0x00054000)
  38. #define MMAP_I2C (CONFIG_SYS_MBAR + 0x00058000)
  39. #define MMAP_DSPI (CONFIG_SYS_MBAR + 0x0005C000)
  40. #define MMAP_UART0 (CONFIG_SYS_MBAR + 0x00060000)
  41. #define MMAP_UART1 (CONFIG_SYS_MBAR + 0x00064000)
  42. #define MMAP_UART2 (CONFIG_SYS_MBAR + 0x00068000)
  43. #define MMAP_DTMR0 (CONFIG_SYS_MBAR + 0x00070000)
  44. #define MMAP_DTMR1 (CONFIG_SYS_MBAR + 0x00074000)
  45. #define MMAP_DTMR2 (CONFIG_SYS_MBAR + 0x00078000)
  46. #define MMAP_DTMR3 (CONFIG_SYS_MBAR + 0x0007C000)
  47. #define MMAP_PIT0 (CONFIG_SYS_MBAR + 0x00080000)
  48. #define MMAP_PIT1 (CONFIG_SYS_MBAR + 0x00084000)
  49. #define MMAP_PIT2 (CONFIG_SYS_MBAR + 0x00088000)
  50. #define MMAP_PIT3 (CONFIG_SYS_MBAR + 0x0008C000)
  51. #define MMAP_EPORT0 (CONFIG_SYS_MBAR + 0x00090000)
  52. #define MMAP_EPORT1 (CONFIG_SYS_MBAR + 0x00094000)
  53. #define MMAP_VOICOD (CONFIG_SYS_MBAR + 0x0009C000)
  54. #define MMAP_RCM (CONFIG_SYS_MBAR + 0x000A0000)
  55. #define MMAP_CCM (CONFIG_SYS_MBAR + 0x000A0004)
  56. #define MMAP_GPIO (CONFIG_SYS_MBAR + 0x000A4000)
  57. #define MMAP_RTC (CONFIG_SYS_MBAR + 0x000A8000)
  58. #define MMAP_SIM (CONFIG_SYS_MBAR + 0x000AC000)
  59. #define MMAP_USBOTG (CONFIG_SYS_MBAR + 0x000B0000)
  60. #define MMAP_USBH (CONFIG_SYS_MBAR + 0x000B4000)
  61. #define MMAP_SDRAM (CONFIG_SYS_MBAR + 0x000B8000)
  62. #define MMAP_SSI (CONFIG_SYS_MBAR + 0x000BC000)
  63. #define MMAP_PLL (CONFIG_SYS_MBAR + 0x000C0000)
  64. #define MMAP_RNG (CONFIG_SYS_MBAR + 0x000C4000)
  65. #define MMAP_IIM (CONFIG_SYS_MBAR + 0x000C8000)
  66. #define MMAP_ESDHC (CONFIG_SYS_MBAR + 0x000CC000)
  67. #include <asm/coldfire/crossbar.h>
  68. #include <asm/coldfire/dspi.h>
  69. #include <asm/coldfire/edma.h>
  70. #include <asm/coldfire/eport.h>
  71. #include <asm/coldfire/flexbus.h>
  72. #include <asm/coldfire/intctrl.h>
  73. #include <asm/coldfire/ssi.h>
  74. #include <asm/coldfire/rng.h>
  75. #include <asm/rtc.h>
  76. /* System Controller Module */
  77. typedef struct scm1 {
  78. u32 mpr; /* 0x00 Master Privilege */
  79. u32 rsvd1[7];
  80. u32 pacra; /* 0x20 Peripheral Access Ctrl A */
  81. u32 pacrb; /* 0x24 Peripheral Access Ctrl B */
  82. u32 pacrc; /* 0x28 Peripheral Access Ctrl C */
  83. u32 pacrd; /* 0x2C Peripheral Access Ctrl D */
  84. u32 rsvd2[4];
  85. u32 pacre; /* 0x40 Peripheral Access Ctrl E */
  86. u32 pacrf; /* 0x44 Peripheral Access Ctrl F */
  87. u32 pacrg; /* 0x48 Peripheral Access Ctrl G */
  88. } scm1_t;
  89. typedef struct scm2 {
  90. u8 rsvd1[19]; /* 0x00 - 0x12 */
  91. u8 wcr; /* 0x13 */
  92. u16 rsvd2; /* 0x14 - 0x15 */
  93. u16 cwcr; /* 0x16 */
  94. u8 rsvd3[3]; /* 0x18 - 0x1A */
  95. u8 cwsr; /* 0x1B */
  96. u8 rsvd4[3]; /* 0x1C - 0x1E */
  97. u8 scmisr; /* 0x1F */
  98. u32 rsvd5; /* 0x20 - 0x23 */
  99. u8 bcr; /* 0x24 */
  100. u8 rsvd6[74]; /* 0x25 - 0x6F */
  101. u32 cfadr; /* 0x70 */
  102. u8 rsvd7; /* 0x74 */
  103. u8 cfier; /* 0x75 */
  104. u8 cfloc; /* 0x76 */
  105. u8 cfatr; /* 0x77 */
  106. u32 rsvd8; /* 0x78 - 0x7B */
  107. u32 cfdtr; /* 0x7C */
  108. } scm2_t;
  109. /* PWM module */
  110. typedef struct pwm_ctrl {
  111. u8 en; /* 0x00 PWM Enable */
  112. u8 pol; /* 0x01 Polarity */
  113. u8 clk; /* 0x02 Clock Select */
  114. u8 prclk; /* 0x03 Prescale Clock Select */
  115. u8 cae; /* 0x04 Center Align Enable */
  116. u8 ctl; /* 0x05 Ctrl */
  117. u8 res1[2]; /* 0x06 - 0x07 */
  118. u8 scla; /* 0x08 Scale A */
  119. u8 sclb; /* 0x09 Scale B */
  120. u8 res2[2]; /* 0x0A - 0x0B */
  121. u8 cnt0; /* 0x0C Channel 0 Counter */
  122. u8 cnt1; /* 0x0D Channel 1 Counter */
  123. u8 cnt2; /* 0x0E Channel 2 Counter */
  124. u8 cnt3; /* 0x0F Channel 3 Counter */
  125. u8 cnt4; /* 0x10 Channel 4 Counter */
  126. u8 cnt5; /* 0x11 Channel 5 Counter */
  127. u8 cnt6; /* 0x12 Channel 6 Counter */
  128. u8 cnt7; /* 0x13 Channel 7 Counter */
  129. u8 per0; /* 0x14 Channel 0 Period */
  130. u8 per1; /* 0x15 Channel 1 Period */
  131. u8 per2; /* 0x16 Channel 2 Period */
  132. u8 per3; /* 0x17 Channel 3 Period */
  133. u8 per4; /* 0x18 Channel 4 Period */
  134. u8 per5; /* 0x19 Channel 5 Period */
  135. u8 per6; /* 0x1A Channel 6 Period */
  136. u8 per7; /* 0x1B Channel 7 Period */
  137. u8 dty0; /* 0x1C Channel 0 Duty */
  138. u8 dty1; /* 0x1D Channel 1 Duty */
  139. u8 dty2; /* 0x1E Channel 2 Duty */
  140. u8 dty3; /* 0x1F Channel 3 Duty */
  141. u8 dty4; /* 0x20 Channel 4 Duty */
  142. u8 dty5; /* 0x21 Channel 5 Duty */
  143. u8 dty6; /* 0x22 Channel 6 Duty */
  144. u8 dty7; /* 0x23 Channel 7 Duty */
  145. u8 sdn; /* 0x24 Shutdown */
  146. u8 res3[3]; /* 0x25 - 0x27 */
  147. } pwm_t;
  148. /* Chip configuration module */
  149. typedef struct rcm {
  150. u8 rcr;
  151. u8 rsr;
  152. } rcm_t;
  153. typedef struct ccm_ctrl {
  154. u16 ccr; /* 0x00 Chip Cfg */
  155. u16 res1; /* 0x02 */
  156. u16 rcon; /* 0x04 Reset Cfg */
  157. u16 cir; /* 0x06 Chip ID */
  158. u32 res2; /* 0x08 */
  159. u16 misccr; /* 0x0A Misc Ctrl */
  160. u16 cdr; /* 0x0C Clock divider */
  161. u16 uhcsr; /* 0x10 USB Host status */
  162. u16 uocsr; /* 0x12 USB On-the-Go Status */
  163. u16 res3; /* 0x14 */
  164. u16 codeccr; /* 0x16 Codec Control */
  165. u16 misccr2; /* 0x18 Misc2 Ctrl */
  166. } ccm_t;
  167. /* GPIO port */
  168. typedef struct gpio_ctrl {
  169. /* Port Output Data */
  170. u8 podr_fbctl; /* 0x00 */
  171. u8 podr_be; /* 0x01 */
  172. u8 podr_cs; /* 0x02 */
  173. u8 podr_dspi; /* 0x03 */
  174. u8 res01; /* 0x04 */
  175. u8 podr_fec0; /* 0x05 */
  176. u8 podr_feci2c; /* 0x06 */
  177. u8 res02[2]; /* 0x07 - 0x08 */
  178. u8 podr_simp1; /* 0x09 */
  179. u8 podr_simp0; /* 0x0A */
  180. u8 podr_timer; /* 0x0B */
  181. u8 podr_uart; /* 0x0C */
  182. u8 podr_debug; /* 0x0D */
  183. u8 res03; /* 0x0E */
  184. u8 podr_sdhc; /* 0x0F */
  185. u8 podr_ssi; /* 0x10 */
  186. u8 res04[3]; /* 0x11 - 0x13 */
  187. /* Port Data Direction */
  188. u8 pddr_fbctl; /* 0x14 */
  189. u8 pddr_be; /* 0x15 */
  190. u8 pddr_cs; /* 0x16 */
  191. u8 pddr_dspi; /* 0x17 */
  192. u8 res05; /* 0x18 */
  193. u8 pddr_fec0; /* 0x19 */
  194. u8 pddr_feci2c; /* 0x1A */
  195. u8 res06[2]; /* 0x1B - 0x1C */
  196. u8 pddr_simp1; /* 0x1D */
  197. u8 pddr_simp0; /* 0x1E */
  198. u8 pddr_timer; /* 0x1F */
  199. u8 pddr_uart; /* 0x20 */
  200. u8 pddr_debug; /* 0x21 */
  201. u8 res07; /* 0x22 */
  202. u8 pddr_sdhc; /* 0x23 */
  203. u8 pddr_ssi; /* 0x24 */
  204. u8 res08[3]; /* 0x25 - 0x27 */
  205. /* Port Data Direction */
  206. u8 ppdr_fbctl; /* 0x28 */
  207. u8 ppdr_be; /* 0x29 */
  208. u8 ppdr_cs; /* 0x2A */
  209. u8 ppdr_dspi; /* 0x2B */
  210. u8 res09; /* 0x2C */
  211. u8 ppdr_fec0; /* 0x2D */
  212. u8 ppdr_feci2c; /* 0x2E */
  213. u8 res10[2]; /* 0x2F - 0x30 */
  214. u8 ppdr_simp1; /* 0x31 */
  215. u8 ppdr_simp0; /* 0x32 */
  216. u8 ppdr_timer; /* 0x33 */
  217. u8 ppdr_uart; /* 0x34 */
  218. u8 ppdr_debug; /* 0x35 */
  219. u8 res11; /* 0x36 */
  220. u8 ppdr_sdhc; /* 0x37 */
  221. u8 ppdr_ssi; /* 0x38 */
  222. u8 res12[3]; /* 0x39 - 0x3B */
  223. /* Port Clear Output Data */
  224. u8 pclrr_fbctl; /* 0x3C */
  225. u8 pclrr_be; /* 0x3D */
  226. u8 pclrr_cs; /* 0x3E */
  227. u8 pclrr_dspi; /* 0x3F */
  228. u8 res13; /* 0x40 */
  229. u8 pclrr_fec0; /* 0x41 */
  230. u8 pclrr_feci2c; /* 0x42 */
  231. u8 res14[2]; /* 0x43 - 0x44 */
  232. u8 pclrr_simp1; /* 0x45 */
  233. u8 pclrr_simp0; /* 0x46 */
  234. u8 pclrr_timer; /* 0x47 */
  235. u8 pclrr_uart; /* 0x48 */
  236. u8 pclrr_debug; /* 0x49 */
  237. u8 res15; /* 0x4A */
  238. u8 pclrr_sdhc; /* 0x4B */
  239. u8 pclrr_ssi; /* 0x4C */
  240. u8 res16[3]; /* 0x4D - 0x4F */
  241. /* Pin Assignment */
  242. u8 par_fbctl; /* 0x50 */
  243. u8 par_be; /* 0x51 */
  244. u8 par_cs; /* 0x52 */
  245. u8 res17; /* 0x53 */
  246. u8 par_dspih; /* 0x54 */
  247. u8 par_dspil; /* 0x55 */
  248. u8 par_fec; /* 0x56 */
  249. u8 par_feci2c; /* 0x57 */
  250. u8 par_irq0h; /* 0x58 */
  251. u8 par_irq0l; /* 0x59 */
  252. u8 par_irq1h; /* 0x5A */
  253. u8 par_irq1l; /* 0x5B */
  254. u8 par_simp1h; /* 0x5C */
  255. u8 par_simp1l; /* 0x5D */
  256. u8 par_simp0; /* 0x5E */
  257. u8 par_timer; /* 0x5F */
  258. u8 par_uart; /* 0x60 */
  259. u8 res18; /* 0x61 */
  260. u8 par_debug; /* 0x62 */
  261. u8 par_sdhc; /* 0x63 */
  262. u8 par_ssih; /* 0x64 */
  263. u8 par_ssil; /* 0x65 */
  264. u8 res19[2]; /* 0x66 - 0x67 */
  265. /* Mode Select Control */
  266. /* Drive Strength Control */
  267. u8 mscr_mscr1; /* 0x68 */
  268. u8 mscr_mscr2; /* 0x69 */
  269. u8 mscr_mscr3; /* 0x6A */
  270. u8 mscr_mscr45; /* 0x6B */
  271. u8 srcr_dspi; /* 0x6C */
  272. u8 dscr_fec; /* 0x6D */
  273. u8 srcr_i2c; /* 0x6E */
  274. u8 srcr_irq; /* 0x6F */
  275. u8 srcr_sim; /* 0x70 */
  276. u8 srcr_timer; /* 0x71 */
  277. u8 srcr_uart; /* 0x72 */
  278. u8 res20; /* 0x73 */
  279. u8 srcr_sdhc; /* 0x74 */
  280. u8 srcr_ssi; /* 0x75 */
  281. u8 res21[2]; /* 0x76 - 0x77 */
  282. u8 pcr_pcrh; /* 0x78 */
  283. u8 pcr_pcrl; /* 0x79 */
  284. } gpio_t;
  285. /* SDRAM controller */
  286. typedef struct sdram_ctrl {
  287. u32 mode; /* 0x00 Mode/Extended Mode */
  288. u32 ctrl; /* 0x04 Ctrl */
  289. u32 cfg1; /* 0x08 Cfg 1 */
  290. u32 cfg2; /* 0x0C Cfg 2 */
  291. u32 res1[64]; /* 0x10 - 0x10F */
  292. u32 cs0; /* 0x110 Chip Select 0 Cfg */
  293. u32 cs1; /* 0x114 Chip Select 1 Cfg */
  294. } sdram_t;
  295. /* Clock Module */
  296. typedef struct pll_ctrl {
  297. u32 pcr; /* 0x00 Ctrl */
  298. u32 pdr; /* 0x04 Divider */
  299. u32 psr; /* 0x08 Status */
  300. } pll_t;
  301. typedef struct rtcex {
  302. u32 rsvd1[3];
  303. u32 gocu;
  304. u32 gocl;
  305. } rtcex_t;
  306. #endif /* __IMMAP_5301X__ */