immap_5329.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * MCF5329 Internal Memory Map
  4. *
  5. * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
  6. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  7. */
  8. #ifndef __IMMAP_5329__
  9. #define __IMMAP_5329__
  10. #define MMAP_SCM1 0xEC000000
  11. #define MMAP_MDHA 0xEC080000
  12. #define MMAP_SKHA 0xEC084000
  13. #define MMAP_RNG 0xEC088000
  14. #define MMAP_SCM2 0xFC000000
  15. #define MMAP_XBS 0xFC004000
  16. #define MMAP_FBCS 0xFC008000
  17. #define MMAP_CAN 0xFC020000
  18. #define MMAP_FEC 0xFC030000
  19. #define MMAP_SCM3 0xFC040000
  20. #define MMAP_EDMA 0xFC044000
  21. #define MMAP_TCD 0xFC045000
  22. #define MMAP_INTC0 0xFC048000
  23. #define MMAP_INTC1 0xFC04C000
  24. #define MMAP_INTCACK 0xFC054000
  25. #define MMAP_I2C 0xFC058000
  26. #define MMAP_QSPI 0xFC05C000
  27. #define MMAP_UART0 0xFC060000
  28. #define MMAP_UART1 0xFC064000
  29. #define MMAP_UART2 0xFC068000
  30. #define MMAP_DTMR0 0xFC070000
  31. #define MMAP_DTMR1 0xFC074000
  32. #define MMAP_DTMR2 0xFC078000
  33. #define MMAP_DTMR3 0xFC07C000
  34. #define MMAP_PIT0 0xFC080000
  35. #define MMAP_PIT1 0xFC084000
  36. #define MMAP_PIT2 0xFC088000
  37. #define MMAP_PIT3 0xFC08C000
  38. #define MMAP_PWM 0xFC090000
  39. #define MMAP_EPORT 0xFC094000
  40. #define MMAP_WDOG 0xFC098000
  41. #define MMAP_RCM 0xFC0A0000
  42. #define MMAP_CCM 0xFC0A0004
  43. #define MMAP_GPIO 0xFC0A4000
  44. #define MMAP_RTC 0xFC0A8000
  45. #define MMAP_LCDC 0xFC0AC000
  46. #define MMAP_USBOTG 0xFC0B0000
  47. #define MMAP_USBH 0xFC0B4000
  48. #define MMAP_SDRAM 0xFC0B8000
  49. #define MMAP_SSI 0xFC0BC000
  50. #define MMAP_PLL 0xFC0C0000
  51. #include <asm/coldfire/crossbar.h>
  52. #include <asm/coldfire/edma.h>
  53. #include <asm/coldfire/eport.h>
  54. #include <asm/coldfire/qspi.h>
  55. #include <asm/coldfire/flexbus.h>
  56. #include <asm/coldfire/flexcan.h>
  57. #include <asm/coldfire/intctrl.h>
  58. #include <asm/coldfire/lcd.h>
  59. #include <asm/coldfire/mdha.h>
  60. #include <asm/coldfire/pwm.h>
  61. #include <asm/coldfire/ssi.h>
  62. #include <asm/coldfire/skha.h>
  63. /* System control module registers */
  64. typedef struct scm1_ctrl {
  65. u32 mpr0; /* 0x00 Master Privilege Register 0 */
  66. u32 res1[15]; /* 0x04 - 0x3F */
  67. u32 pacrh; /* 0x40 Peripheral Access Control Register H */
  68. u32 res2[3]; /* 0x44 - 0x53 */
  69. u32 bmt0; /*0x54 Bus Monitor Timeout 0 */
  70. } scm1_t;
  71. /* System control module registers 2 */
  72. typedef struct scm2_ctrl {
  73. u32 mpr1; /* 0x00 Master Privilege Register */
  74. u32 res1[7]; /* 0x04 - 0x1F */
  75. u32 pacra; /* 0x20 Peripheral Access Control Register A */
  76. u32 pacrb; /* 0x24 Peripheral Access Control Register B */
  77. u32 pacrc; /* 0x28 Peripheral Access Control Register C */
  78. u32 pacrd; /* 0x2C Peripheral Access Control Register D */
  79. u32 res2[4]; /* 0x30 - 0x3F */
  80. u32 pacre; /* 0x40 Peripheral Access Control Register E */
  81. u32 pacrf; /* 0x44 Peripheral Access Control Register F */
  82. u32 pacrg; /* 0x48 Peripheral Access Control Register G */
  83. u32 res3[2]; /* 0x4C - 0x53 */
  84. u32 bmt1; /* 0x54 Bus Monitor Timeout 1 */
  85. } scm2_t;
  86. /* System Control Module register 3 */
  87. typedef struct scm3_ctrl {
  88. u8 res1[19]; /* 0x00 - 0x12 */
  89. u8 wcr; /* 0x13 wakeup control register */
  90. u16 res2; /* 0x14 - 0x15 */
  91. u16 cwcr; /* 0x16 Core Watchdog Control Register */
  92. u8 res3[3]; /* 0x18 - 0x1A */
  93. u8 cwsr; /* 0x1B Core Watchdog Service Register */
  94. u8 res4[2]; /* 0x1C - 0x1D */
  95. u8 scmisr; /* 0x1F Interrupt Status Register */
  96. u32 res5; /* 0x20 */
  97. u32 bcr; /* 0x24 Burst Configuration Register */
  98. u32 res6[18]; /* 0x28 - 0x6F */
  99. u32 cfadr; /* 0x70 Core Fault Address Register */
  100. u8 res7[4]; /* 0x71 - 0x74 */
  101. u8 cfier; /* 0x75 Core Fault Interrupt Enable Register */
  102. u8 cfloc; /* 0x76 Core Fault Location Register */
  103. u8 cfatr; /* 0x77 Core Fault Attributes Register */
  104. u32 res8; /* 0x78 */
  105. u32 cfdtr; /* 0x7C Core Fault Data Register */
  106. } scm3_t;
  107. typedef struct canex_ctrl {
  108. can_msg_t msg[16]; /* 0x00 Message Buffer 0-15 */
  109. } canex_t;
  110. /* Watchdog registers */
  111. typedef struct wdog_ctrl {
  112. u16 cr; /* 0x00 Control register */
  113. u16 mr; /* 0x02 Modulus register */
  114. u16 cntr; /* 0x04 Count register */
  115. u16 sr; /* 0x06 Service register */
  116. } wdog_t;
  117. /*Chip configuration module registers */
  118. typedef struct ccm_ctrl {
  119. u16 ccr; /* 0x00 Chip configuration register */
  120. u16 res2; /* 0x02 */
  121. u16 rcon; /* 0x04 Rreset configuration register */
  122. u16 cir; /* 0x06 Chip identification register */
  123. u32 res3; /* 0x08 */
  124. u16 misccr; /* 0x0A Miscellaneous control register */
  125. u16 cdr; /* 0x0C Clock divider register */
  126. u16 uhcsr; /* 0x10 USB Host controller status register */
  127. u16 uocsr; /* 0x12 USB On-the-Go Controller Status Reg */
  128. } ccm_t;
  129. typedef struct rcm {
  130. u8 rcr;
  131. u8 rsr;
  132. } rcm_t;
  133. /* GPIO port registers */
  134. typedef struct gpio_ctrl {
  135. /* Port Output Data Registers */
  136. #ifdef CONFIG_M5329
  137. u8 podr_fech; /* 0x00 */
  138. u8 podr_fecl; /* 0x01 */
  139. #else
  140. u16 res00; /* 0x00 - 0x01 */
  141. #endif
  142. u8 podr_ssi; /* 0x02 */
  143. u8 podr_busctl; /* 0x03 */
  144. u8 podr_be; /* 0x04 */
  145. u8 podr_cs; /* 0x05 */
  146. u8 podr_pwm; /* 0x06 */
  147. u8 podr_feci2c; /* 0x07 */
  148. u8 res08; /* 0x08 */
  149. u8 podr_uart; /* 0x09 */
  150. u8 podr_qspi; /* 0x0A */
  151. u8 podr_timer; /* 0x0B */
  152. #ifdef CONFIG_M5329
  153. u8 res0C; /* 0x0C */
  154. u8 podr_lcddatah; /* 0x0D */
  155. u8 podr_lcddatam; /* 0x0E */
  156. u8 podr_lcddatal; /* 0x0F */
  157. u8 podr_lcdctlh; /* 0x10 */
  158. u8 podr_lcdctll; /* 0x11 */
  159. #else
  160. u16 res0C; /* 0x0C - 0x0D */
  161. u8 podr_fech; /* 0x0E */
  162. u8 podr_fecl; /* 0x0F */
  163. u16 res10[3]; /* 0x10 - 0x15 */
  164. #endif
  165. /* Port Data Direction Registers */
  166. #ifdef CONFIG_M5329
  167. u16 res12; /* 0x12 - 0x13 */
  168. u8 pddr_fech; /* 0x14 */
  169. u8 pddr_fecl; /* 0x15 */
  170. #endif
  171. u8 pddr_ssi; /* 0x16 */
  172. u8 pddr_busctl; /* 0x17 */
  173. u8 pddr_be; /* 0x18 */
  174. u8 pddr_cs; /* 0x19 */
  175. u8 pddr_pwm; /* 0x1A */
  176. u8 pddr_feci2c; /* 0x1B */
  177. u8 res1C; /* 0x1C */
  178. u8 pddr_uart; /* 0x1D */
  179. u8 pddr_qspi; /* 0x1E */
  180. u8 pddr_timer; /* 0x1F */
  181. #ifdef CONFIG_M5329
  182. u8 res20; /* 0x20 */
  183. u8 pddr_lcddatah; /* 0x21 */
  184. u8 pddr_lcddatam; /* 0x22 */
  185. u8 pddr_lcddatal; /* 0x23 */
  186. u8 pddr_lcdctlh; /* 0x24 */
  187. u8 pddr_lcdctll; /* 0x25 */
  188. u16 res26; /* 0x26 - 0x27 */
  189. #else
  190. u16 res20; /* 0x20 - 0x21 */
  191. u8 pddr_fech; /* 0x22 */
  192. u8 pddr_fecl; /* 0x23 */
  193. u16 res24[3]; /* 0x24 - 0x29 */
  194. #endif
  195. /* Port Data Direction Registers */
  196. #ifdef CONFIG_M5329
  197. u8 ppd_fech; /* 0x28 */
  198. u8 ppd_fecl; /* 0x29 */
  199. #endif
  200. u8 ppd_ssi; /* 0x2A */
  201. u8 ppd_busctl; /* 0x2B */
  202. u8 ppd_be; /* 0x2C */
  203. u8 ppd_cs; /* 0x2D */
  204. u8 ppd_pwm; /* 0x2E */
  205. u8 ppd_feci2c; /* 0x2F */
  206. u8 res30; /* 0x30 */
  207. u8 ppd_uart; /* 0x31 */
  208. u8 ppd_qspi; /* 0x32 */
  209. u8 ppd_timer; /* 0x33 */
  210. #ifdef CONFIG_M5329
  211. u8 res34; /* 0x34 */
  212. u8 ppd_lcddatah; /* 0x35 */
  213. u8 ppd_lcddatam; /* 0x36 */
  214. u8 ppd_lcddatal; /* 0x37 */
  215. u8 ppd_lcdctlh; /* 0x38 */
  216. u8 ppd_lcdctll; /* 0x39 */
  217. u16 res3A; /* 0x3A - 0x3B */
  218. #else
  219. u16 res34; /* 0x34 - 0x35 */
  220. u8 ppd_fech; /* 0x36 */
  221. u8 ppd_fecl; /* 0x37 */
  222. u16 res38[3]; /* 0x38 - 0x3D */
  223. #endif
  224. /* Port Clear Output Data Registers */
  225. #ifdef CONFIG_M5329
  226. u8 res3C; /* 0x3C */
  227. u8 pclrr_fech; /* 0x3D */
  228. u8 pclrr_fecl; /* 0x3E */
  229. #else
  230. u8 pclrr_ssi; /* 0x3E */
  231. #endif
  232. u8 pclrr_busctl; /* 0x3F */
  233. u8 pclrr_be; /* 0x40 */
  234. u8 pclrr_cs; /* 0x41 */
  235. u8 pclrr_pwm; /* 0x42 */
  236. u8 pclrr_feci2c; /* 0x43 */
  237. u8 res44; /* 0x44 */
  238. u8 pclrr_uart; /* 0x45 */
  239. u8 pclrr_qspi; /* 0x46 */
  240. u8 pclrr_timer; /* 0x47 */
  241. #ifdef CONFIG_M5329
  242. u8 pclrr_lcddatah; /* 0x48 */
  243. u8 pclrr_lcddatam; /* 0x49 */
  244. u8 pclrr_lcddatal; /* 0x4A */
  245. u8 pclrr_ssi; /* 0x4B */
  246. u8 pclrr_lcdctlh; /* 0x4C */
  247. u8 pclrr_lcdctll; /* 0x4D */
  248. u16 res4E; /* 0x4E - 0x4F */
  249. #else
  250. u16 res48; /* 0x48 - 0x49 */
  251. u8 pclrr_fech; /* 0x4A */
  252. u8 pclrr_fecl; /* 0x4B */
  253. u8 res4C[5]; /* 0x4C - 0x50 */
  254. #endif
  255. /* Pin Assignment Registers */
  256. #ifdef CONFIG_M5329
  257. u8 par_fec; /* 0x50 */
  258. #endif
  259. u8 par_pwm; /* 0x51 */
  260. u8 par_busctl; /* 0x52 */
  261. u8 par_feci2c; /* 0x53 */
  262. u8 par_be; /* 0x54 */
  263. u8 par_cs; /* 0x55 */
  264. u16 par_ssi; /* 0x56 */
  265. u16 par_uart; /* 0x58 */
  266. u16 par_qspi; /* 0x5A */
  267. u8 par_timer; /* 0x5C */
  268. #ifdef CONFIG_M5329
  269. u8 par_lcddata; /* 0x5D */
  270. u16 par_lcdctl; /* 0x5E */
  271. #else
  272. u8 par_fec; /* 0x5D */
  273. u16 res5E; /* 0x5E - 0x5F */
  274. #endif
  275. u16 par_irq; /* 0x60 */
  276. u16 res62; /* 0x62 - 0x63 */
  277. /* Mode Select Control Registers */
  278. u8 mscr_flexbus; /* 0x64 */
  279. u8 mscr_sdram; /* 0x65 */
  280. u16 res66; /* 0x66 - 0x67 */
  281. /* Drive Strength Control Registers */
  282. u8 dscr_i2c; /* 0x68 */
  283. u8 dscr_pwm; /* 0x69 */
  284. u8 dscr_fec; /* 0x6A */
  285. u8 dscr_uart; /* 0x6B */
  286. u8 dscr_qspi; /* 0x6C */
  287. u8 dscr_timer; /* 0x6D */
  288. u8 dscr_ssi; /* 0x6E */
  289. #ifdef CONFIG_M5329
  290. u8 dscr_lcd; /* 0x6F */
  291. #else
  292. u8 res6F; /* 0x6F */
  293. #endif
  294. u8 dscr_debug; /* 0x70 */
  295. u8 dscr_clkrst; /* 0x71 */
  296. u8 dscr_irq; /* 0x72 */
  297. } gpio_t;
  298. /* USB OTG module registers */
  299. typedef struct usb_otg {
  300. u32 id; /* 0x000 Identification Register */
  301. u32 hwgeneral; /* 0x004 General HW Parameters */
  302. u32 hwhost; /* 0x008 Host HW Parameters */
  303. u32 hwdev; /* 0x00C Device HW parameters */
  304. u32 hwtxbuf; /* 0x010 TX Buffer HW Parameters */
  305. u32 hwrxbuf; /* 0x014 RX Buffer HW Parameters */
  306. u32 res1[58]; /* 0x18 - 0xFF */
  307. u8 caplength; /* 0x100 Capability Register Length */
  308. u8 res2; /* 0x101 */
  309. u16 hciver; /* 0x102 Host Interface Version Number */
  310. u32 hcsparams; /* 0x104 Host Structural Parameters */
  311. u32 hccparams; /* 0x108 Host Capability Parameters */
  312. u32 res3[5]; /* 0x10C - 0x11F */
  313. u16 dciver; /* 0x120 Device Interface Version Number */
  314. u16 res4; /* 0x122 */
  315. u32 dccparams; /* 0x124 Device Capability Parameters */
  316. u32 res5[6]; /* 0x128 - 0x13F */
  317. u32 cmd; /* 0x140 USB Command */
  318. u32 sts; /* 0x144 USB Status */
  319. u32 intr; /* 0x148 USB Interrupt Enable */
  320. u32 frindex; /* 0x14C USB Frame Index */
  321. u32 res6; /* 0x150 */
  322. u32 prd_dev; /* 0x154 Periodic Frame List Base or Device Address */
  323. u32 aync_ep; /* 0x158 Current Asynchronous List or Address at Endpoint List Address */
  324. u32 ttctrl; /* 0x15C Host TT Asynchronous Buffer Control */
  325. u32 burstsize; /* 0x160 Master Interface Data Burst Size */
  326. u32 txfill; /* 0x164 Host Transmit FIFO Tuning Control */
  327. u32 res7[6]; /* 0x168 - 0x17F */
  328. u32 cfgflag; /* 0x180 Configure Flag Register */
  329. u32 portsc1; /* 0x184 Port Status/Control */
  330. u32 res8[7]; /* 0x188 - 0x1A3 */
  331. u32 otgsc; /* 0x1A4 On The Go Status and Control */
  332. u32 mode; /* 0x1A8 USB mode register */
  333. u32 eptsetstat; /* 0x1AC Endpoint Setup status */
  334. u32 eptprime; /* 0x1B0 Endpoint initialization */
  335. u32 eptflush; /* 0x1B4 Endpoint de-initialize */
  336. u32 eptstat; /* 0x1B8 Endpoint status */
  337. u32 eptcomplete; /* 0x1BC Endpoint Complete */
  338. u32 eptctrl0; /* 0x1C0 Endpoint control 0 */
  339. u32 eptctrl1; /* 0x1C4 Endpoint control 1 */
  340. u32 eptctrl2; /* 0x1C8 Endpoint control 2 */
  341. u32 eptctrl3; /* 0x1CC Endpoint control 3 */
  342. } usbotg_t;
  343. /* SDRAM controller registers */
  344. typedef struct sdram_ctrl {
  345. u32 mode; /* 0x00 Mode/Extended Mode register */
  346. u32 ctrl; /* 0x04 Control register */
  347. u32 cfg1; /* 0x08 Configuration register 1 */
  348. u32 cfg2; /* 0x0C Configuration register 2 */
  349. u32 res1[64]; /* 0x10 - 0x10F */
  350. u32 cs0; /* 0x110 Chip Select 0 Configuration */
  351. u32 cs1; /* 0x114 Chip Select 1 Configuration */
  352. } sdram_t;
  353. /* Clock Module registers */
  354. typedef struct pll_ctrl {
  355. u8 podr; /* 0x00 Output Divider Register */
  356. u8 res1[3];
  357. u8 pcr; /* 0x04 Control Register */
  358. u8 res2[3];
  359. u8 pmdr; /* 0x08 Modulation Divider Register */
  360. u8 res3[3];
  361. u8 pfdr; /* 0x0C Feedback Divider Register */
  362. u8 res4[3];
  363. } pll_t;
  364. #endif /* __IMMAP_5329__ */