immap_5329.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. /*
  2. * MCF5329 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_5329__
  26. #define __IMMAP_5329__
  27. #define MMAP_SCM1 0xEC000000
  28. #define MMAP_MDHA 0xEC080000
  29. #define MMAP_SKHA 0xEC084000
  30. #define MMAP_RNG 0xEC088000
  31. #define MMAP_SCM2 0xFC000000
  32. #define MMAP_XBS 0xFC004000
  33. #define MMAP_FBCS 0xFC008000
  34. #define MMAP_CAN 0xFC020000
  35. #define MMAP_FEC 0xFC030000
  36. #define MMAP_SCM3 0xFC040000
  37. #define MMAP_EDMA 0xFC044000
  38. #define MMAP_TCD 0xFC045000
  39. #define MMAP_INTC0 0xFC048000
  40. #define MMAP_INTC1 0xFC04C000
  41. #define MMAP_INTCACK 0xFC054000
  42. #define MMAP_I2C 0xFC058000
  43. #define MMAP_QSPI 0xFC05C000
  44. #define MMAP_UART0 0xFC060000
  45. #define MMAP_UART1 0xFC064000
  46. #define MMAP_UART2 0xFC068000
  47. #define MMAP_DTMR0 0xFC070000
  48. #define MMAP_DTMR1 0xFC074000
  49. #define MMAP_DTMR2 0xFC078000
  50. #define MMAP_DTMR3 0xFC07C000
  51. #define MMAP_PIT0 0xFC080000
  52. #define MMAP_PIT1 0xFC084000
  53. #define MMAP_PIT2 0xFC088000
  54. #define MMAP_PIT3 0xFC08C000
  55. #define MMAP_PWM 0xFC090000
  56. #define MMAP_EPORT 0xFC094000
  57. #define MMAP_WDOG 0xFC098000
  58. #define MMAP_RCM 0xFC0A0000
  59. #define MMAP_CCM 0xFC0A0004
  60. #define MMAP_GPIO 0xFC0A4000
  61. #define MMAP_RTC 0xFC0A8000
  62. #define MMAP_LCDC 0xFC0AC000
  63. #define MMAP_USBOTG 0xFC0B0000
  64. #define MMAP_USBH 0xFC0B4000
  65. #define MMAP_SDRAM 0xFC0B8000
  66. #define MMAP_SSI 0xFC0BC000
  67. #define MMAP_PLL 0xFC0C0000
  68. #include <asm/coldfire/crossbar.h>
  69. #include <asm/coldfire/edma.h>
  70. #include <asm/coldfire/flexbus.h>
  71. #include <asm/coldfire/lcd.h>
  72. #include <asm/coldfire/ssi.h>
  73. /* System control module registers */
  74. typedef struct scm1_ctrl {
  75. u32 mpr0; /* 0x00 Master Privilege Register 0 */
  76. u32 res1[15]; /* 0x04 - 0x3F */
  77. u32 pacrh; /* 0x40 Peripheral Access Control Register H */
  78. u32 res2[3]; /* 0x44 - 0x53 */
  79. u32 bmt0; /*0x54 Bus Monitor Timeout 0 */
  80. } scm1_t;
  81. /* Message Digest Hardware Accelerator */
  82. typedef struct mdha_ctrl {
  83. u32 mdmr; /* 0x00 MDHA Mode Register */
  84. u32 mdcr; /* 0x04 Control register */
  85. u32 mdcmr; /* 0x08 Command Register */
  86. u32 mdsr; /* 0x0C Status Register */
  87. u32 mdisr; /* 0x10 Interrupt Status Register */
  88. u32 mdimr; /* 0x14 Interrupt Mask Register */
  89. u32 mddsr; /* 0x1C Data Size Register */
  90. u32 mdin; /* 0x20 Input FIFO */
  91. u32 res1[3]; /* 0x24 - 0x2F */
  92. u32 mdao; /* 0x30 Message Digest AO Register */
  93. u32 mdbo; /* 0x34 Message Digest BO Register */
  94. u32 mdco; /* 0x38 Message Digest CO Register */
  95. u32 mddo; /* 0x3C Message Digest DO Register */
  96. u32 mdeo; /* 0x40 Message Digest EO Register */
  97. u32 mdmds; /* 0x44 Message Data Size Register */
  98. u32 res[10]; /* 0x48 - 0x6F */
  99. u32 mda1; /* 0x70 Message Digest A1 Register */
  100. u32 mdb1; /* 0x74 Message Digest B1 Register */
  101. u32 mdc1; /* 0x78 Message Digest C1 Register */
  102. u32 mdd1; /* 0x7C Message Digest D1 Register */
  103. u32 mde1; /* 0x80 Message Digest E1 Register */
  104. } mdha_t;
  105. /* Symmetric Key Hardware Accelerator */
  106. typedef struct skha_ctrl {
  107. u32 mr; /* 0x00 Mode Register */
  108. u32 cr; /* 0x04 Control Register */
  109. u32 cmr; /* 0x08 Command Register */
  110. u32 sr; /* 0x0C Status Register */
  111. u32 esr; /* 0x10 Error Status Register */
  112. u32 emr; /* 0x14 Error Status Mask Register) */
  113. u32 ksr; /* 0x18 Key Size Register */
  114. u32 dsr; /* 0x1C Data Size Register */
  115. u32 in; /* 0x20 Input FIFO */
  116. u32 out; /* 0x24 Output FIFO */
  117. u32 res1[2]; /* 0x28 - 0x2F */
  118. u32 kdr1; /* 0x30 Key Data Register 1 */
  119. u32 kdr2; /* 0x34 Key Data Register 2 */
  120. u32 kdr3; /* 0x38 Key Data Register 3 */
  121. u32 kdr4; /* 0x3C Key Data Register 4 */
  122. u32 kdr5; /* 0x40 Key Data Register 5 */
  123. u32 kdr6; /* 0x44 Key Data Register 6 */
  124. u32 res2[10]; /* 0x48 - 0x6F */
  125. u32 c1; /* 0x70 Context 1 */
  126. u32 c2; /* 0x74 Context 2 */
  127. u32 c3; /* 0x78 Context 3 */
  128. u32 c4; /* 0x7C Context 4 */
  129. u32 c5; /* 0x80 Context 5 */
  130. u32 c6; /* 0x84 Context 6 */
  131. u32 c7; /* 0x88 Context 7 */
  132. u32 c8; /* 0x8C Context 8 */
  133. u32 c9; /* 0x90 Context 9 */
  134. u32 c10; /* 0x94 Context 10 */
  135. u32 c11; /* 0x98 Context 11 */
  136. } skha_t;
  137. /* Random Number Generator */
  138. typedef struct rng_ctrl {
  139. u32 rngcr; /* 0x00 RNG Control Register */
  140. u32 rngsr; /* 0x04 RNG Status Register */
  141. u32 rnger; /* 0x08 RNG Entropy Register */
  142. u32 rngout; /* 0x0C RNG Output FIFO */
  143. } rng_t;
  144. /* System control module registers 2 */
  145. typedef struct scm2_ctrl {
  146. u32 mpr1; /* 0x00 Master Privilege Register */
  147. u32 res1[7]; /* 0x04 - 0x1F */
  148. u32 pacra; /* 0x20 Peripheral Access Control Register A */
  149. u32 pacrb; /* 0x24 Peripheral Access Control Register B */
  150. u32 pacrc; /* 0x28 Peripheral Access Control Register C */
  151. u32 pacrd; /* 0x2C Peripheral Access Control Register D */
  152. u32 res2[4]; /* 0x30 - 0x3F */
  153. u32 pacre; /* 0x40 Peripheral Access Control Register E */
  154. u32 pacrf; /* 0x44 Peripheral Access Control Register F */
  155. u32 pacrg; /* 0x48 Peripheral Access Control Register G */
  156. u32 res3[2]; /* 0x4C - 0x53 */
  157. u32 bmt1; /* 0x54 Bus Monitor Timeout 1 */
  158. } scm2_t;
  159. /* FlexCan module registers */
  160. typedef struct can_ctrl {
  161. u32 mcr; /* 0x00 Module Configuration register */
  162. u32 ctrl; /* 0x04 Control register */
  163. u32 timer; /* 0x08 Free Running Timer */
  164. u32 res1; /* 0x0C */
  165. u32 rxgmask; /* 0x10 Rx Global Mask */
  166. u32 rx14mask; /* 0x14 RxBuffer 14 Mask */
  167. u32 rx15mask; /* 0x18 RxBuffer 15 Mask */
  168. u32 errcnt; /* 0x1C Error Counter Register */
  169. u32 errstat; /* 0x20 Error and status Register */
  170. u32 res2; /* 0x24 */
  171. u32 imask; /* 0x28 Interrupt Mask Register */
  172. u32 res3; /* 0x2C */
  173. u32 iflag; /* 0x30 Interrupt Flag Register */
  174. u32 res4[19]; /* 0x34 - 0x7F */
  175. u32 MB0_15[2048]; /* 0x80 Message Buffer 0-15 */
  176. } can_t;
  177. /* System Control Module register 3 */
  178. typedef struct scm3_ctrl {
  179. u8 res1[19]; /* 0x00 - 0x12 */
  180. u8 wcr; /* 0x13 wakeup control register */
  181. u16 res2; /* 0x14 - 0x15 */
  182. u16 cwcr; /* 0x16 Core Watchdog Control Register */
  183. u8 res3[3]; /* 0x18 - 0x1A */
  184. u8 cwsr; /* 0x1B Core Watchdog Service Register */
  185. u8 res4[2]; /* 0x1C - 0x1D */
  186. u8 scmisr; /* 0x1F Interrupt Status Register */
  187. u32 res5; /* 0x20 */
  188. u32 bcr; /* 0x24 Burst Configuration Register */
  189. u32 res6[18]; /* 0x28 - 0x6F */
  190. u32 cfadr; /* 0x70 Core Fault Address Register */
  191. u8 res7[4]; /* 0x71 - 0x74 */
  192. u8 cfier; /* 0x75 Core Fault Interrupt Enable Register */
  193. u8 cfloc; /* 0x76 Core Fault Location Register */
  194. u8 cfatr; /* 0x77 Core Fault Attributes Register */
  195. u32 res8; /* 0x78 */
  196. u32 cfdtr; /* 0x7C Core Fault Data Register */
  197. } scm3_t;
  198. /* Interrupt module registers */
  199. typedef struct int0_ctrl {
  200. /* Interrupt Controller 0 */
  201. u32 iprh0; /* 0x00 Pending Register High */
  202. u32 iprl0; /* 0x04 Pending Register Low */
  203. u32 imrh0; /* 0x08 Mask Register High */
  204. u32 imrl0; /* 0x0C Mask Register Low */
  205. u32 frch0; /* 0x10 Force Register High */
  206. u32 frcl0; /* 0x14 Force Register Low */
  207. u16 res1; /* 0x18 - 0x19 */
  208. u16 icfg0; /* 0x1A Configuration Register */
  209. u8 simr0; /* 0x1C Set Interrupt Mask */
  210. u8 cimr0; /* 0x1D Clear Interrupt Mask */
  211. u8 clmask0; /* 0x1E Current Level Mask */
  212. u8 slmask; /* 0x1F Saved Level Mask */
  213. u32 res2[8]; /* 0x20 - 0x3F */
  214. u8 icr0[64]; /* 0x40 - 0x7F Control registers */
  215. u32 res3[24]; /* 0x80 - 0xDF */
  216. u8 swiack0; /* 0xE0 Software Interrupt Acknowledge */
  217. u8 res4[3]; /* 0xE1 - 0xE3 */
  218. u8 Lniack0_1; /* 0xE4 Level n interrupt acknowledge resister */
  219. u8 res5[3]; /* 0xE5 - 0xE7 */
  220. u8 Lniack0_2; /* 0xE8 Level n interrupt acknowledge resister */
  221. u8 res6[3]; /* 0xE9 - 0xEB */
  222. u8 Lniack0_3; /* 0xEC Level n interrupt acknowledge resister */
  223. u8 res7[3]; /* 0xED - 0xEF */
  224. u8 Lniack0_4; /* 0xF0 Level n interrupt acknowledge resister */
  225. u8 res8[3]; /* 0xF1 - 0xF3 */
  226. u8 Lniack0_5; /* 0xF4 Level n interrupt acknowledge resister */
  227. u8 res9[3]; /* 0xF5 - 0xF7 */
  228. u8 Lniack0_6; /* 0xF8 Level n interrupt acknowledge resister */
  229. u8 resa[3]; /* 0xF9 - 0xFB */
  230. u8 Lniack0_7; /* 0xFC Level n interrupt acknowledge resister */
  231. u8 resb[3]; /* 0xFD - 0xFF */
  232. } int0_t;
  233. typedef struct int1_ctrl {
  234. /* Interrupt Controller 1 */
  235. u32 iprh1; /* 0x00 Pending Register High */
  236. u32 iprl1; /* 0x04 Pending Register Low */
  237. u32 imrh1; /* 0x08 Mask Register High */
  238. u32 imrl1; /* 0x0C Mask Register Low */
  239. u32 frch1; /* 0x10 Force Register High */
  240. u32 frcl1; /* 0x14 Force Register Low */
  241. u16 res1; /* 0x18 */
  242. u16 icfg1; /* 0x1A Configuration Register */
  243. u8 simr1; /* 0x1C Set Interrupt Mask */
  244. u8 cimr1; /* 0x1D Clear Interrupt Mask */
  245. u16 res2; /* 0x1E - 0x1F */
  246. u32 res3[8]; /* 0x20 - 0x3F */
  247. u8 icr1[64]; /* 0x40 - 0x7F */
  248. u32 res4[24]; /* 0x80 - 0xDF */
  249. u8 swiack1; /* 0xE0 Software Interrupt Acknowledge */
  250. u8 res5[3]; /* 0xE1 - 0xE3 */
  251. u8 Lniack1_1; /* 0xE4 Level n interrupt acknowledge resister */
  252. u8 res6[3]; /* 0xE5 - 0xE7 */
  253. u8 Lniack1_2; /* 0xE8 Level n interrupt acknowledge resister */
  254. u8 res7[3]; /* 0xE9 - 0xEB */
  255. u8 Lniack1_3; /* 0xEC Level n interrupt acknowledge resister */
  256. u8 res8[3]; /* 0xED - 0xEF */
  257. u8 Lniack1_4; /* 0xF0 Level n interrupt acknowledge resister */
  258. u8 res9[3]; /* 0xF1 - 0xF3 */
  259. u8 Lniack1_5; /* 0xF4 Level n interrupt acknowledge resister */
  260. u8 resa[3]; /* 0xF5 - 0xF7 */
  261. u8 Lniack1_6; /* 0xF8 Level n interrupt acknowledge resister */
  262. u8 resb[3]; /* 0xF9 - 0xFB */
  263. u8 Lniack1_7; /* 0xFC Level n interrupt acknowledge resister */
  264. u8 resc[3]; /* 0xFD - 0xFF */
  265. } int1_t;
  266. typedef struct intgack_ctrl1 {
  267. /* Global IACK Registers */
  268. u8 swiack; /* 0xE0 Global Software Interrupt Acknowledge */
  269. u8 Lniack[7]; /* 0xE1 - 0xE7 Global Level 0 Interrupt Acknowledge */
  270. } intgack_t;
  271. /* QSPI module registers */
  272. typedef struct qspi_ctrl {
  273. u16 qmr; /* Mode register */
  274. u16 res1;
  275. u16 qdlyr; /* Delay register */
  276. u16 res2;
  277. u16 qwr; /* Wrap register */
  278. u16 res3;
  279. u16 qir; /* Interrupt register */
  280. u16 res4;
  281. u16 qar; /* Address register */
  282. u16 res5;
  283. u16 qdr; /* Data register */
  284. u16 res6;
  285. } qspi_t;
  286. /* PWM module registers */
  287. typedef struct pwm_ctrl {
  288. u8 en; /* 0x00 PWM Enable Register */
  289. u8 pol; /* 0x01 Polarity Register */
  290. u8 clk; /* 0x02 Clock Select Register */
  291. u8 prclk; /* 0x03 Prescale Clock Select Register */
  292. u8 cae; /* 0x04 Center Align Enable Register */
  293. u8 ctl; /* 0x05 Control Register */
  294. u8 res1[2]; /* 0x06 - 0x07 */
  295. u8 scla; /* 0x08 Scale A register */
  296. u8 sclb; /* 0x09 Scale B register */
  297. u8 res2[2]; /* 0x0A - 0x0B */
  298. u8 cnt0; /* 0x0C Channel 0 Counter register */
  299. u8 cnt1; /* 0x0D Channel 1 Counter register */
  300. u8 cnt2; /* 0x0E Channel 2 Counter register */
  301. u8 cnt3; /* 0x0F Channel 3 Counter register */
  302. u8 cnt4; /* 0x10 Channel 4 Counter register */
  303. u8 cnt5; /* 0x11 Channel 5 Counter register */
  304. u8 cnt6; /* 0x12 Channel 6 Counter register */
  305. u8 cnt7; /* 0x13 Channel 7 Counter register */
  306. u8 per0; /* 0x14 Channel 0 Period register */
  307. u8 per1; /* 0x15 Channel 1 Period register */
  308. u8 per2; /* 0x16 Channel 2 Period register */
  309. u8 per3; /* 0x17 Channel 3 Period register */
  310. u8 per4; /* 0x18 Channel 4 Period register */
  311. u8 per5; /* 0x19 Channel 5 Period register */
  312. u8 per6; /* 0x1A Channel 6 Period register */
  313. u8 per7; /* 0x1B Channel 7 Period register */
  314. u8 dty0; /* 0x1C Channel 0 Duty register */
  315. u8 dty1; /* 0x1D Channel 1 Duty register */
  316. u8 dty2; /* 0x1E Channel 2 Duty register */
  317. u8 dty3; /* 0x1F Channel 3 Duty register */
  318. u8 dty4; /* 0x20 Channel 4 Duty register */
  319. u8 dty5; /* 0x21 Channel 5 Duty register */
  320. u8 dty6; /* 0x22 Channel 6 Duty register */
  321. u8 dty7; /* 0x23 Channel 7 Duty register */
  322. u8 sdn; /* 0x24 Shutdown register */
  323. u8 res3[3]; /* 0x25 - 0x27 */
  324. } pwm_t;
  325. /* Edge Port module registers */
  326. typedef struct eport_ctrl {
  327. u16 par; /* 0x00 Pin Assignment Register */
  328. u8 ddar; /* 0x02 Data Direction Register */
  329. u8 ier; /* 0x03 Interrupt Enable Register */
  330. u8 dr; /* 0x04 Data Register */
  331. u8 pdr; /* 0x05 Pin Data Register */
  332. u8 fr; /* 0x06 Flag_Register */
  333. u8 res1;
  334. } eport_t;
  335. /* Watchdog registers */
  336. typedef struct wdog_ctrl {
  337. u16 cr; /* 0x00 Control register */
  338. u16 mr; /* 0x02 Modulus register */
  339. u16 cntr; /* 0x04 Count register */
  340. u16 sr; /* 0x06 Service register */
  341. } wdog_t;
  342. /*Chip configuration module registers */
  343. typedef struct ccm_ctrl {
  344. u16 ccr; /* 0x00 Chip configuration register */
  345. u16 res2; /* 0x02 */
  346. u16 rcon; /* 0x04 Rreset configuration register */
  347. u16 cir; /* 0x06 Chip identification register */
  348. u32 res3; /* 0x08 */
  349. u16 misccr; /* 0x0A Miscellaneous control register */
  350. u16 cdr; /* 0x0C Clock divider register */
  351. u16 uhcsr; /* 0x10 USB Host controller status register */
  352. u16 uocsr; /* 0x12 USB On-the-Go Controller Status Reg */
  353. } ccm_t;
  354. typedef struct rcm {
  355. u8 rcr;
  356. u8 rsr;
  357. } rcm_t;
  358. /* GPIO port registers */
  359. typedef struct gpio_ctrl {
  360. /* Port Output Data Registers */
  361. #ifdef CONFIG_M5329
  362. u8 podr_fech; /* 0x00 */
  363. u8 podr_fecl; /* 0x01 */
  364. #else
  365. u16 res00; /* 0x00 - 0x01 */
  366. #endif
  367. u8 podr_ssi; /* 0x02 */
  368. u8 podr_busctl; /* 0x03 */
  369. u8 podr_be; /* 0x04 */
  370. u8 podr_cs; /* 0x05 */
  371. u8 podr_pwm; /* 0x06 */
  372. u8 podr_feci2c; /* 0x07 */
  373. u8 res08; /* 0x08 */
  374. u8 podr_uart; /* 0x09 */
  375. u8 podr_qspi; /* 0x0A */
  376. u8 podr_timer; /* 0x0B */
  377. #ifdef CONFIG_M5329
  378. u8 res0C; /* 0x0C */
  379. u8 podr_lcddatah; /* 0x0D */
  380. u8 podr_lcddatam; /* 0x0E */
  381. u8 podr_lcddatal; /* 0x0F */
  382. u8 podr_lcdctlh; /* 0x10 */
  383. u8 podr_lcdctll; /* 0x11 */
  384. #else
  385. u16 res0C; /* 0x0C - 0x0D */
  386. u8 podr_fech; /* 0x0E */
  387. u8 podr_fecl; /* 0x0F */
  388. u16 res10[3]; /* 0x10 - 0x15 */
  389. #endif
  390. /* Port Data Direction Registers */
  391. #ifdef CONFIG_M5329
  392. u16 res12; /* 0x12 - 0x13 */
  393. u8 pddr_fech; /* 0x14 */
  394. u8 pddr_fecl; /* 0x15 */
  395. #endif
  396. u8 pddr_ssi; /* 0x16 */
  397. u8 pddr_busctl; /* 0x17 */
  398. u8 pddr_be; /* 0x18 */
  399. u8 pddr_cs; /* 0x19 */
  400. u8 pddr_pwm; /* 0x1A */
  401. u8 pddr_feci2c; /* 0x1B */
  402. u8 res1C; /* 0x1C */
  403. u8 pddr_uart; /* 0x1D */
  404. u8 pddr_qspi; /* 0x1E */
  405. u8 pddr_timer; /* 0x1F */
  406. #ifdef CONFIG_M5329
  407. u8 res20; /* 0x20 */
  408. u8 pddr_lcddatah; /* 0x21 */
  409. u8 pddr_lcddatam; /* 0x22 */
  410. u8 pddr_lcddatal; /* 0x23 */
  411. u8 pddr_lcdctlh; /* 0x24 */
  412. u8 pddr_lcdctll; /* 0x25 */
  413. u16 res26; /* 0x26 - 0x27 */
  414. #else
  415. u16 res20; /* 0x20 - 0x21 */
  416. u8 pddr_fech; /* 0x22 */
  417. u8 pddr_fecl; /* 0x23 */
  418. u16 res24[3]; /* 0x24 - 0x29 */
  419. #endif
  420. /* Port Data Direction Registers */
  421. #ifdef CONFIG_M5329
  422. u8 ppd_fech; /* 0x28 */
  423. u8 ppd_fecl; /* 0x29 */
  424. #endif
  425. u8 ppd_ssi; /* 0x2A */
  426. u8 ppd_busctl; /* 0x2B */
  427. u8 ppd_be; /* 0x2C */
  428. u8 ppd_cs; /* 0x2D */
  429. u8 ppd_pwm; /* 0x2E */
  430. u8 ppd_feci2c; /* 0x2F */
  431. u8 res30; /* 0x30 */
  432. u8 ppd_uart; /* 0x31 */
  433. u8 ppd_qspi; /* 0x32 */
  434. u8 ppd_timer; /* 0x33 */
  435. #ifdef CONFIG_M5329
  436. u8 res34; /* 0x34 */
  437. u8 ppd_lcddatah; /* 0x35 */
  438. u8 ppd_lcddatam; /* 0x36 */
  439. u8 ppd_lcddatal; /* 0x37 */
  440. u8 ppd_lcdctlh; /* 0x38 */
  441. u8 ppd_lcdctll; /* 0x39 */
  442. u16 res3A; /* 0x3A - 0x3B */
  443. #else
  444. u16 res34; /* 0x34 - 0x35 */
  445. u8 ppd_fech; /* 0x36 */
  446. u8 ppd_fecl; /* 0x37 */
  447. u16 res38[3]; /* 0x38 - 0x3D */
  448. #endif
  449. /* Port Clear Output Data Registers */
  450. #ifdef CONFIG_M5329
  451. u8 res3C; /* 0x3C */
  452. u8 pclrr_fech; /* 0x3D */
  453. u8 pclrr_fecl; /* 0x3E */
  454. #else
  455. u8 pclrr_ssi; /* 0x3E */
  456. #endif
  457. u8 pclrr_busctl; /* 0x3F */
  458. u8 pclrr_be; /* 0x40 */
  459. u8 pclrr_cs; /* 0x41 */
  460. u8 pclrr_pwm; /* 0x42 */
  461. u8 pclrr_feci2c; /* 0x43 */
  462. u8 res44; /* 0x44 */
  463. u8 pclrr_uart; /* 0x45 */
  464. u8 pclrr_qspi; /* 0x46 */
  465. u8 pclrr_timer; /* 0x47 */
  466. #ifdef CONFIG_M5329
  467. u8 pclrr_lcddatah; /* 0x48 */
  468. u8 pclrr_lcddatam; /* 0x49 */
  469. u8 pclrr_lcddatal; /* 0x4A */
  470. u8 pclrr_ssi; /* 0x4B */
  471. u8 pclrr_lcdctlh; /* 0x4C */
  472. u8 pclrr_lcdctll; /* 0x4D */
  473. u16 res4E; /* 0x4E - 0x4F */
  474. #else
  475. u16 res48; /* 0x48 - 0x49 */
  476. u8 pclrr_fech; /* 0x4A */
  477. u8 pclrr_fecl; /* 0x4B */
  478. u8 res4C[5]; /* 0x4C - 0x50 */
  479. #endif
  480. /* Pin Assignment Registers */
  481. #ifdef CONFIG_M5329
  482. u8 par_fec; /* 0x50 */
  483. #endif
  484. u8 par_pwm; /* 0x51 */
  485. u8 par_busctl; /* 0x52 */
  486. u8 par_feci2c; /* 0x53 */
  487. u8 par_be; /* 0x54 */
  488. u8 par_cs; /* 0x55 */
  489. u16 par_ssi; /* 0x56 */
  490. u16 par_uart; /* 0x58 */
  491. u16 par_qspi; /* 0x5A */
  492. u8 par_timer; /* 0x5C */
  493. #ifdef CONFIG_M5329
  494. u8 par_lcddata; /* 0x5D */
  495. u16 par_lcdctl; /* 0x5E */
  496. #else
  497. u8 par_fec; /* 0x5D */
  498. u16 res5E; /* 0x5E - 0x5F */
  499. #endif
  500. u16 par_irq; /* 0x60 */
  501. u16 res62; /* 0x62 - 0x63 */
  502. /* Mode Select Control Registers */
  503. u8 mscr_flexbus; /* 0x64 */
  504. u8 mscr_sdram; /* 0x65 */
  505. u16 res66; /* 0x66 - 0x67 */
  506. /* Drive Strength Control Registers */
  507. u8 dscr_i2c; /* 0x68 */
  508. u8 dscr_pwm; /* 0x69 */
  509. u8 dscr_fec; /* 0x6A */
  510. u8 dscr_uart; /* 0x6B */
  511. u8 dscr_qspi; /* 0x6C */
  512. u8 dscr_timer; /* 0x6D */
  513. u8 dscr_ssi; /* 0x6E */
  514. #ifdef CONFIG_M5329
  515. u8 dscr_lcd; /* 0x6F */
  516. #else
  517. u8 res6F; /* 0x6F */
  518. #endif
  519. u8 dscr_debug; /* 0x70 */
  520. u8 dscr_clkrst; /* 0x71 */
  521. u8 dscr_irq; /* 0x72 */
  522. } gpio_t;
  523. /* USB OTG module registers */
  524. typedef struct usb_otg {
  525. u32 id; /* 0x000 Identification Register */
  526. u32 hwgeneral; /* 0x004 General HW Parameters */
  527. u32 hwhost; /* 0x008 Host HW Parameters */
  528. u32 hwdev; /* 0x00C Device HW parameters */
  529. u32 hwtxbuf; /* 0x010 TX Buffer HW Parameters */
  530. u32 hwrxbuf; /* 0x014 RX Buffer HW Parameters */
  531. u32 res1[58]; /* 0x18 - 0xFF */
  532. u8 caplength; /* 0x100 Capability Register Length */
  533. u8 res2; /* 0x101 */
  534. u16 hciver; /* 0x102 Host Interface Version Number */
  535. u32 hcsparams; /* 0x104 Host Structural Parameters */
  536. u32 hccparams; /* 0x108 Host Capability Parameters */
  537. u32 res3[5]; /* 0x10C - 0x11F */
  538. u16 dciver; /* 0x120 Device Interface Version Number */
  539. u16 res4; /* 0x122 */
  540. u32 dccparams; /* 0x124 Device Capability Parameters */
  541. u32 res5[6]; /* 0x128 - 0x13F */
  542. u32 cmd; /* 0x140 USB Command */
  543. u32 sts; /* 0x144 USB Status */
  544. u32 intr; /* 0x148 USB Interrupt Enable */
  545. u32 frindex; /* 0x14C USB Frame Index */
  546. u32 res6; /* 0x150 */
  547. u32 prd_dev; /* 0x154 Periodic Frame List Base or Device Address */
  548. u32 aync_ep; /* 0x158 Current Asynchronous List or Address at Endpoint List Address */
  549. u32 ttctrl; /* 0x15C Host TT Asynchronous Buffer Control */
  550. u32 burstsize; /* 0x160 Master Interface Data Burst Size */
  551. u32 txfill; /* 0x164 Host Transmit FIFO Tuning Control */
  552. u32 res7[6]; /* 0x168 - 0x17F */
  553. u32 cfgflag; /* 0x180 Configure Flag Register */
  554. u32 portsc1; /* 0x184 Port Status/Control */
  555. u32 res8[7]; /* 0x188 - 0x1A3 */
  556. u32 otgsc; /* 0x1A4 On The Go Status and Control */
  557. u32 mode; /* 0x1A8 USB mode register */
  558. u32 eptsetstat; /* 0x1AC Endpoint Setup status */
  559. u32 eptprime; /* 0x1B0 Endpoint initialization */
  560. u32 eptflush; /* 0x1B4 Endpoint de-initialize */
  561. u32 eptstat; /* 0x1B8 Endpoint status */
  562. u32 eptcomplete; /* 0x1BC Endpoint Complete */
  563. u32 eptctrl0; /* 0x1C0 Endpoint control 0 */
  564. u32 eptctrl1; /* 0x1C4 Endpoint control 1 */
  565. u32 eptctrl2; /* 0x1C8 Endpoint control 2 */
  566. u32 eptctrl3; /* 0x1CC Endpoint control 3 */
  567. } usbotg_t;
  568. /* USB Host module registers */
  569. typedef struct usb_host {
  570. u32 id; /* 0x000 Identification Register */
  571. u32 hwgeneral; /* 0x004 General HW Parameters */
  572. u32 hwhost; /* 0x008 Host HW Parameters */
  573. u32 res1; /* 0x0C */
  574. u32 hwtxbuf; /* 0x010 TX Buffer HW Parameters */
  575. u32 hwrxbuf; /* 0x014 RX Buffer HW Parameters */
  576. u32 res2[58]; /* 0x18 - 0xFF */
  577. /* Host Controller Capability Register */
  578. u8 caplength; /* 0x100 Capability Register Length */
  579. u8 res3; /* 0x101 */
  580. u16 hciver; /* 0x102 Host Interface Version Number */
  581. u32 hcsparams; /* 0x104 Host Structural Parameters */
  582. u32 hccparams; /* 0x108 Host Capability Parameters */
  583. u32 res4[13]; /* 0x10C - 0x13F */
  584. /* Host Controller Operational Register */
  585. u32 cmd; /* 0x140 USB Command */
  586. u32 sts; /* 0x144 USB Status */
  587. u32 intr; /* 0x148 USB Interrupt Enable */
  588. u32 frindex; /* 0x14C USB Frame Index */
  589. u32 res5; /* 0x150 (ctrl segment register in EHCI spec) */
  590. u32 prdlst; /* 0x154 Periodic Frame List Base Address */
  591. u32 aynclst; /* 0x158 Current Asynchronous List Address */
  592. u32 ttctrl; /* 0x15C Host TT Asynchronous Buffer Control (non-ehci) */
  593. u32 burstsize; /* 0x160 Master Interface Data Burst Size (non-ehci) */
  594. u32 txfill; /* 0x164 Host Transmit FIFO Tuning Control (non-ehci) */
  595. u32 res6[6]; /* 0x168 - 0x17F */
  596. u32 cfgflag; /* 0x180 Configure Flag Register */
  597. u32 portsc1; /* 0x184 Port Status/Control */
  598. u32 res7[8]; /* 0x188 - 0x1A7 */
  599. /* non-ehci registers */
  600. u32 mode; /* 0x1A8 USB mode register */
  601. u32 eptsetstat; /* 0x1AC Endpoint Setup status */
  602. u32 eptprime; /* 0x1B0 Endpoint initialization */
  603. u32 eptflush; /* 0x1B4 Endpoint de-initialize */
  604. u32 eptstat; /* 0x1B8 Endpoint status */
  605. u32 eptcomplete; /* 0x1BC Endpoint Complete */
  606. u32 eptctrl0; /* 0x1C0 Endpoint control 0 */
  607. u32 eptctrl1; /* 0x1C4 Endpoint control 1 */
  608. u32 eptctrl2; /* 0x1C8 Endpoint control 2 */
  609. u32 eptctrl3; /* 0x1CC Endpoint control 3 */
  610. } usbhost_t;
  611. /* SDRAM controller registers */
  612. typedef struct sdram_ctrl {
  613. u32 mode; /* 0x00 Mode/Extended Mode register */
  614. u32 ctrl; /* 0x04 Control register */
  615. u32 cfg1; /* 0x08 Configuration register 1 */
  616. u32 cfg2; /* 0x0C Configuration register 2 */
  617. u32 res1[64]; /* 0x10 - 0x10F */
  618. u32 cs0; /* 0x110 Chip Select 0 Configuration */
  619. u32 cs1; /* 0x114 Chip Select 1 Configuration */
  620. } sdram_t;
  621. /* Clock Module registers */
  622. typedef struct pll_ctrl {
  623. u8 podr; /* 0x00 Output Divider Register */
  624. u8 res1[3];
  625. u8 pcr; /* 0x04 Control Register */
  626. u8 res2[3];
  627. u8 pmdr; /* 0x08 Modulation Divider Register */
  628. u8 res3[3];
  629. u8 pfdr; /* 0x0C Feedback Divider Register */
  630. u8 res4[3];
  631. } pll_t;
  632. #endif /* __IMMAP_5329__ */