immap_5329.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  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. /* System control module registers */
  69. typedef struct scm1_ctrl {
  70. u32 mpr0; /* 0x00 Master Privilege Register 0 */
  71. u32 res1[15]; /* 0x04 - 0x3F */
  72. u32 pacrh; /* 0x40 Peripheral Access Control Register H */
  73. u32 res2[3]; /* 0x44 - 0x53 */
  74. u32 bmt0; /*0x54 Bus Monitor Timeout 0 */
  75. } scm1_t;
  76. /* Message Digest Hardware Accelerator */
  77. typedef struct mdha_ctrl {
  78. u32 mdmr; /* 0x00 MDHA Mode Register */
  79. u32 mdcr; /* 0x04 Control register */
  80. u32 mdcmr; /* 0x08 Command Register */
  81. u32 mdsr; /* 0x0C Status Register */
  82. u32 mdisr; /* 0x10 Interrupt Status Register */
  83. u32 mdimr; /* 0x14 Interrupt Mask Register */
  84. u32 mddsr; /* 0x1C Data Size Register */
  85. u32 mdin; /* 0x20 Input FIFO */
  86. u32 res1[3]; /* 0x24 - 0x2F */
  87. u32 mdao; /* 0x30 Message Digest AO Register */
  88. u32 mdbo; /* 0x34 Message Digest BO Register */
  89. u32 mdco; /* 0x38 Message Digest CO Register */
  90. u32 mddo; /* 0x3C Message Digest DO Register */
  91. u32 mdeo; /* 0x40 Message Digest EO Register */
  92. u32 mdmds; /* 0x44 Message Data Size Register */
  93. u32 res[10]; /* 0x48 - 0x6F */
  94. u32 mda1; /* 0x70 Message Digest A1 Register */
  95. u32 mdb1; /* 0x74 Message Digest B1 Register */
  96. u32 mdc1; /* 0x78 Message Digest C1 Register */
  97. u32 mdd1; /* 0x7C Message Digest D1 Register */
  98. u32 mde1; /* 0x80 Message Digest E1 Register */
  99. } mdha_t;
  100. /* Symmetric Key Hardware Accelerator */
  101. typedef struct skha_ctrl {
  102. u32 mr; /* 0x00 Mode Register */
  103. u32 cr; /* 0x04 Control Register */
  104. u32 cmr; /* 0x08 Command Register */
  105. u32 sr; /* 0x0C Status Register */
  106. u32 esr; /* 0x10 Error Status Register */
  107. u32 emr; /* 0x14 Error Status Mask Register) */
  108. u32 ksr; /* 0x18 Key Size Register */
  109. u32 dsr; /* 0x1C Data Size Register */
  110. u32 in; /* 0x20 Input FIFO */
  111. u32 out; /* 0x24 Output FIFO */
  112. u32 res1[2]; /* 0x28 - 0x2F */
  113. u32 kdr1; /* 0x30 Key Data Register 1 */
  114. u32 kdr2; /* 0x34 Key Data Register 2 */
  115. u32 kdr3; /* 0x38 Key Data Register 3 */
  116. u32 kdr4; /* 0x3C Key Data Register 4 */
  117. u32 kdr5; /* 0x40 Key Data Register 5 */
  118. u32 kdr6; /* 0x44 Key Data Register 6 */
  119. u32 res2[10]; /* 0x48 - 0x6F */
  120. u32 c1; /* 0x70 Context 1 */
  121. u32 c2; /* 0x74 Context 2 */
  122. u32 c3; /* 0x78 Context 3 */
  123. u32 c4; /* 0x7C Context 4 */
  124. u32 c5; /* 0x80 Context 5 */
  125. u32 c6; /* 0x84 Context 6 */
  126. u32 c7; /* 0x88 Context 7 */
  127. u32 c8; /* 0x8C Context 8 */
  128. u32 c9; /* 0x90 Context 9 */
  129. u32 c10; /* 0x94 Context 10 */
  130. u32 c11; /* 0x98 Context 11 */
  131. } skha_t;
  132. /* Random Number Generator */
  133. typedef struct rng_ctrl {
  134. u32 rngcr; /* 0x00 RNG Control Register */
  135. u32 rngsr; /* 0x04 RNG Status Register */
  136. u32 rnger; /* 0x08 RNG Entropy Register */
  137. u32 rngout; /* 0x0C RNG Output FIFO */
  138. } rng_t;
  139. /* System control module registers 2 */
  140. typedef struct scm2_ctrl {
  141. u32 mpr1; /* 0x00 Master Privilege Register */
  142. u32 res1[7]; /* 0x04 - 0x1F */
  143. u32 pacra; /* 0x20 Peripheral Access Control Register A */
  144. u32 pacrb; /* 0x24 Peripheral Access Control Register B */
  145. u32 pacrc; /* 0x28 Peripheral Access Control Register C */
  146. u32 pacrd; /* 0x2C Peripheral Access Control Register D */
  147. u32 res2[4]; /* 0x30 - 0x3F */
  148. u32 pacre; /* 0x40 Peripheral Access Control Register E */
  149. u32 pacrf; /* 0x44 Peripheral Access Control Register F */
  150. u32 pacrg; /* 0x48 Peripheral Access Control Register G */
  151. u32 res3[2]; /* 0x4C - 0x53 */
  152. u32 bmt1; /* 0x54 Bus Monitor Timeout 1 */
  153. } scm2_t;
  154. /* Cross-Bar Switch Module */
  155. typedef struct xbs_ctrl {
  156. u32 prs1; /* 0x100 Priority Register Slave 1 */
  157. u32 res1[3]; /* 0x104 - 0F */
  158. u32 crs1; /* 0x110 Control Register Slave 1 */
  159. u32 res2[187]; /* 0x114 - 0x3FF */
  160. u32 prs4; /* 0x400 Priority Register Slave 4 */
  161. u32 res3[3]; /* 0x404 - 0F */
  162. u32 crs4; /* 0x410 Control Register Slave 4 */
  163. u32 res4[123]; /* 0x414 - 0x5FF */
  164. u32 prs6; /* 0x600 Priority Register Slave 6 */
  165. u32 res5[3]; /* 0x604 - 0F */
  166. u32 crs6; /* 0x610 Control Register Slave 6 */
  167. u32 res6[59]; /* 0x614 - 0x6FF */
  168. u32 prs7; /* 0x700 Priority Register Slave 7 */
  169. u32 res7[3]; /* 0x704 - 0F */
  170. u32 crs7; /* 0x710 Control Register Slave 7 */
  171. } xbs_t;
  172. /* Flexbus module Chip select registers */
  173. typedef struct fbcs_ctrl {
  174. u16 csar0; /* 0x00 Chip-Select Address Register 0 */
  175. u16 res0;
  176. u32 csmr0; /* 0x04 Chip-Select Mask Register 0 */
  177. u32 cscr0; /* 0x08 Chip-Select Control Register 0 */
  178. u16 csar1; /* 0x0C Chip-Select Address Register 1 */
  179. u16 res1;
  180. u32 csmr1; /* 0x10 Chip-Select Mask Register 1 */
  181. u32 cscr1; /* 0x14 Chip-Select Control Register 1 */
  182. u16 csar2; /* 0x18 Chip-Select Address Register 2 */
  183. u16 res2;
  184. u32 csmr2; /* 0x1C Chip-Select Mask Register 2 */
  185. u32 cscr2; /* 0x20 Chip-Select Control Register 2 */
  186. u16 csar3; /* 0x24 Chip-Select Address Register 3 */
  187. u16 res3;
  188. u32 csmr3; /* 0x28 Chip-Select Mask Register 3 */
  189. u32 cscr3; /* 0x2C Chip-Select Control Register 3 */
  190. u16 csar4; /* 0x30 Chip-Select Address Register 4 */
  191. u16 res4;
  192. u32 csmr4; /* 0x34 Chip-Select Mask Register 4 */
  193. u32 cscr4; /* 0x38 Chip-Select Control Register 4 */
  194. u16 csar5; /* 0x3C Chip-Select Address Register 5 */
  195. u16 res5;
  196. u32 csmr5; /* 0x40 Chip-Select Mask Register 5 */
  197. u32 cscr5; /* 0x44 Chip-Select Control Register 5 */
  198. } fbcs_t;
  199. /* FlexCan module registers */
  200. typedef struct can_ctrl {
  201. u32 mcr; /* 0x00 Module Configuration register */
  202. u32 ctrl; /* 0x04 Control register */
  203. u32 timer; /* 0x08 Free Running Timer */
  204. u32 res1; /* 0x0C */
  205. u32 rxgmask; /* 0x10 Rx Global Mask */
  206. u32 rx14mask; /* 0x14 RxBuffer 14 Mask */
  207. u32 rx15mask; /* 0x18 RxBuffer 15 Mask */
  208. u32 errcnt; /* 0x1C Error Counter Register */
  209. u32 errstat; /* 0x20 Error and status Register */
  210. u32 res2; /* 0x24 */
  211. u32 imask; /* 0x28 Interrupt Mask Register */
  212. u32 res3; /* 0x2C */
  213. u32 iflag; /* 0x30 Interrupt Flag Register */
  214. u32 res4[19]; /* 0x34 - 0x7F */
  215. u32 MB0_15[2048]; /* 0x80 Message Buffer 0-15 */
  216. } can_t;
  217. /* System Control Module register 3 */
  218. typedef struct scm3_ctrl {
  219. u8 res1[19]; /* 0x00 - 0x12 */
  220. u8 wcr; /* 0x13 wakeup control register */
  221. u16 res2; /* 0x14 - 0x15 */
  222. u16 cwcr; /* 0x16 Core Watchdog Control Register */
  223. u8 res3[3]; /* 0x18 - 0x1A */
  224. u8 cwsr; /* 0x1B Core Watchdog Service Register */
  225. u8 res4[2]; /* 0x1C - 0x1D */
  226. u8 scmisr; /* 0x1F Interrupt Status Register */
  227. u32 res5; /* 0x20 */
  228. u32 bcr; /* 0x24 Burst Configuration Register */
  229. u32 res6[18]; /* 0x28 - 0x6F */
  230. u32 cfadr; /* 0x70 Core Fault Address Register */
  231. u8 res7[4]; /* 0x71 - 0x74 */
  232. u8 cfier; /* 0x75 Core Fault Interrupt Enable Register */
  233. u8 cfloc; /* 0x76 Core Fault Location Register */
  234. u8 cfatr; /* 0x77 Core Fault Attributes Register */
  235. u32 res8; /* 0x78 */
  236. u32 cfdtr; /* 0x7C Core Fault Data Register */
  237. } scm3_t;
  238. /* eDMA module registers */
  239. typedef struct edma_ctrl {
  240. u32 cr; /* 0x00 Control Register */
  241. u32 es; /* 0x04 Error Status Register */
  242. u16 res1[3]; /* 0x08 - 0x0D */
  243. u16 erq; /* 0x0E Enable Request Register */
  244. u16 res2[3]; /* 0x10 - 0x15 */
  245. u16 eei; /* 0x16 Enable Error Interrupt Request */
  246. u8 serq; /* 0x18 Set Enable Request */
  247. u8 cerq; /* 0x19 Clear Enable Request */
  248. u8 seei; /* 0x1A Set Enable Error Interrupt Request */
  249. u8 ceei; /* 0x1B Clear Enable Error Interrupt Request */
  250. u8 cint; /* 0x1C Clear Interrupt Enable Register */
  251. u8 cerr; /* 0x1D Clear Error Register */
  252. u8 ssrt; /* 0x1E Set START Bit Register */
  253. u8 cdne; /* 0x1F Clear DONE Status Bit Register */
  254. u16 res3[3]; /* 0x20 - 0x25 */
  255. u16 intr; /* 0x26 Interrupt Request Register */
  256. u16 res4[3]; /* 0x28 - 0x2D */
  257. u16 err; /* 0x2E Error Register */
  258. u32 res5[52]; /* 0x30 - 0xFF */
  259. u8 dchpri0; /* 0x100 Channel 0 Priority Register */
  260. u8 dchpri1; /* 0x101 Channel 1 Priority Register */
  261. u8 dchpri2; /* 0x102 Channel 2 Priority Register */
  262. u8 dchpri3; /* 0x103 Channel 3 Priority Register */
  263. u8 dchpri4; /* 0x104 Channel 4 Priority Register */
  264. u8 dchpri5; /* 0x105 Channel 5 Priority Register */
  265. u8 dchpri6; /* 0x106 Channel 6 Priority Register */
  266. u8 dchpri7; /* 0x107 Channel 7 Priority Register */
  267. u8 dchpri8; /* 0x108 Channel 8 Priority Register */
  268. u8 dchpri9; /* 0x109 Channel 9 Priority Register */
  269. u8 dchpri10; /* 0x110 Channel 10 Priority Register */
  270. u8 dchpri11; /* 0x111 Channel 11 Priority Register */
  271. u8 dchpri12; /* 0x112 Channel 12 Priority Register */
  272. u8 dchpri13; /* 0x113 Channel 13 Priority Register */
  273. u8 dchpri14; /* 0x114 Channel 14 Priority Register */
  274. u8 dchpri15; /* 0x115 Channel 15 Priority Register */
  275. } edma_t;
  276. /* TCD - eDMA*/
  277. typedef struct tcd_ctrl {
  278. u32 saddr; /* 0x00 Source Address */
  279. u16 attr; /* 0x04 Transfer Attributes */
  280. u16 soff; /* 0x06 Signed Source Address Offset */
  281. u32 nbytes; /* 0x08 Minor Byte Count */
  282. u32 slast; /* 0x0C Last Source Address Adjustment */
  283. u32 daddr; /* 0x10 Destination address */
  284. u16 citer; /* 0x14 Current Minor Loop Link, Major Loop Count */
  285. u16 doff; /* 0x16 Signed Destination Address Offset */
  286. u32 dlast_sga; /* 0x18 Last Destination Address Adjustment/Scatter Gather Address */
  287. u16 biter; /* 0x1C Beginning Minor Loop Link, Major Loop Count */
  288. u16 csr; /* 0x1E Control and Status */
  289. } tcd_st;
  290. typedef struct tcd_multiple {
  291. tcd_st tcd[16];
  292. } tcd_t;
  293. /* Interrupt module registers */
  294. typedef struct int0_ctrl {
  295. /* Interrupt Controller 0 */
  296. u32 iprh0; /* 0x00 Pending Register High */
  297. u32 iprl0; /* 0x04 Pending Register Low */
  298. u32 imrh0; /* 0x08 Mask Register High */
  299. u32 imrl0; /* 0x0C Mask Register Low */
  300. u32 frch0; /* 0x10 Force Register High */
  301. u32 frcl0; /* 0x14 Force Register Low */
  302. u16 res1; /* 0x18 - 0x19 */
  303. u16 icfg0; /* 0x1A Configuration Register */
  304. u8 simr0; /* 0x1C Set Interrupt Mask */
  305. u8 cimr0; /* 0x1D Clear Interrupt Mask */
  306. u8 clmask0; /* 0x1E Current Level Mask */
  307. u8 slmask; /* 0x1F Saved Level Mask */
  308. u32 res2[8]; /* 0x20 - 0x3F */
  309. u8 icr0[64]; /* 0x40 - 0x7F Control registers */
  310. u32 res3[24]; /* 0x80 - 0xDF */
  311. u8 swiack0; /* 0xE0 Software Interrupt Acknowledge */
  312. u8 res4[3]; /* 0xE1 - 0xE3 */
  313. u8 Lniack0_1; /* 0xE4 Level n interrupt acknowledge resister */
  314. u8 res5[3]; /* 0xE5 - 0xE7 */
  315. u8 Lniack0_2; /* 0xE8 Level n interrupt acknowledge resister */
  316. u8 res6[3]; /* 0xE9 - 0xEB */
  317. u8 Lniack0_3; /* 0xEC Level n interrupt acknowledge resister */
  318. u8 res7[3]; /* 0xED - 0xEF */
  319. u8 Lniack0_4; /* 0xF0 Level n interrupt acknowledge resister */
  320. u8 res8[3]; /* 0xF1 - 0xF3 */
  321. u8 Lniack0_5; /* 0xF4 Level n interrupt acknowledge resister */
  322. u8 res9[3]; /* 0xF5 - 0xF7 */
  323. u8 Lniack0_6; /* 0xF8 Level n interrupt acknowledge resister */
  324. u8 resa[3]; /* 0xF9 - 0xFB */
  325. u8 Lniack0_7; /* 0xFC Level n interrupt acknowledge resister */
  326. u8 resb[3]; /* 0xFD - 0xFF */
  327. } int0_t;
  328. typedef struct int1_ctrl {
  329. /* Interrupt Controller 1 */
  330. u32 iprh1; /* 0x00 Pending Register High */
  331. u32 iprl1; /* 0x04 Pending Register Low */
  332. u32 imrh1; /* 0x08 Mask Register High */
  333. u32 imrl1; /* 0x0C Mask Register Low */
  334. u32 frch1; /* 0x10 Force Register High */
  335. u32 frcl1; /* 0x14 Force Register Low */
  336. u16 res1; /* 0x18 */
  337. u16 icfg1; /* 0x1A Configuration Register */
  338. u8 simr1; /* 0x1C Set Interrupt Mask */
  339. u8 cimr1; /* 0x1D Clear Interrupt Mask */
  340. u16 res2; /* 0x1E - 0x1F */
  341. u32 res3[8]; /* 0x20 - 0x3F */
  342. u8 icr1[64]; /* 0x40 - 0x7F */
  343. u32 res4[24]; /* 0x80 - 0xDF */
  344. u8 swiack1; /* 0xE0 Software Interrupt Acknowledge */
  345. u8 res5[3]; /* 0xE1 - 0xE3 */
  346. u8 Lniack1_1; /* 0xE4 Level n interrupt acknowledge resister */
  347. u8 res6[3]; /* 0xE5 - 0xE7 */
  348. u8 Lniack1_2; /* 0xE8 Level n interrupt acknowledge resister */
  349. u8 res7[3]; /* 0xE9 - 0xEB */
  350. u8 Lniack1_3; /* 0xEC Level n interrupt acknowledge resister */
  351. u8 res8[3]; /* 0xED - 0xEF */
  352. u8 Lniack1_4; /* 0xF0 Level n interrupt acknowledge resister */
  353. u8 res9[3]; /* 0xF1 - 0xF3 */
  354. u8 Lniack1_5; /* 0xF4 Level n interrupt acknowledge resister */
  355. u8 resa[3]; /* 0xF5 - 0xF7 */
  356. u8 Lniack1_6; /* 0xF8 Level n interrupt acknowledge resister */
  357. u8 resb[3]; /* 0xF9 - 0xFB */
  358. u8 Lniack1_7; /* 0xFC Level n interrupt acknowledge resister */
  359. u8 resc[3]; /* 0xFD - 0xFF */
  360. } int1_t;
  361. typedef struct intgack_ctrl1 {
  362. /* Global IACK Registers */
  363. u8 swiack; /* 0xE0 Global Software Interrupt Acknowledge */
  364. u8 Lniack[7]; /* 0xE1 - 0xE7 Global Level 0 Interrupt Acknowledge */
  365. } intgack_t;
  366. /*I2C module registers */
  367. typedef struct i2c_ctrl {
  368. u8 adr; /* 0x00 address register */
  369. u8 res1[3]; /* 0x01 - 0x03 */
  370. u8 fdr; /* 0x04 frequency divider register */
  371. u8 res2[3]; /* 0x05 - 0x07 */
  372. u8 cr; /* 0x08 control register */
  373. u8 res3[3]; /* 0x09 - 0x0B */
  374. u8 sr; /* 0x0C status register */
  375. u8 res4[3]; /* 0x0D - 0x0F */
  376. u8 dr; /* 0x10 data register */
  377. u8 res5[3]; /* 0x11 - 0x13 */
  378. } i2c_t;
  379. /* QSPI module registers */
  380. typedef struct qspi_ctrl {
  381. u16 qmr; /* Mode register */
  382. u16 res1;
  383. u16 qdlyr; /* Delay register */
  384. u16 res2;
  385. u16 qwr; /* Wrap register */
  386. u16 res3;
  387. u16 qir; /* Interrupt register */
  388. u16 res4;
  389. u16 qar; /* Address register */
  390. u16 res5;
  391. u16 qdr; /* Data register */
  392. u16 res6;
  393. } qspi_t;
  394. /* PWM module registers */
  395. typedef struct pwm_ctrl {
  396. u8 en; /* 0x00 PWM Enable Register */
  397. u8 pol; /* 0x01 Polarity Register */
  398. u8 clk; /* 0x02 Clock Select Register */
  399. u8 prclk; /* 0x03 Prescale Clock Select Register */
  400. u8 cae; /* 0x04 Center Align Enable Register */
  401. u8 ctl; /* 0x05 Control Register */
  402. u8 res1[2]; /* 0x06 - 0x07 */
  403. u8 scla; /* 0x08 Scale A register */
  404. u8 sclb; /* 0x09 Scale B register */
  405. u8 res2[2]; /* 0x0A - 0x0B */
  406. u8 cnt0; /* 0x0C Channel 0 Counter register */
  407. u8 cnt1; /* 0x0D Channel 1 Counter register */
  408. u8 cnt2; /* 0x0E Channel 2 Counter register */
  409. u8 cnt3; /* 0x0F Channel 3 Counter register */
  410. u8 cnt4; /* 0x10 Channel 4 Counter register */
  411. u8 cnt5; /* 0x11 Channel 5 Counter register */
  412. u8 cnt6; /* 0x12 Channel 6 Counter register */
  413. u8 cnt7; /* 0x13 Channel 7 Counter register */
  414. u8 per0; /* 0x14 Channel 0 Period register */
  415. u8 per1; /* 0x15 Channel 1 Period register */
  416. u8 per2; /* 0x16 Channel 2 Period register */
  417. u8 per3; /* 0x17 Channel 3 Period register */
  418. u8 per4; /* 0x18 Channel 4 Period register */
  419. u8 per5; /* 0x19 Channel 5 Period register */
  420. u8 per6; /* 0x1A Channel 6 Period register */
  421. u8 per7; /* 0x1B Channel 7 Period register */
  422. u8 dty0; /* 0x1C Channel 0 Duty register */
  423. u8 dty1; /* 0x1D Channel 1 Duty register */
  424. u8 dty2; /* 0x1E Channel 2 Duty register */
  425. u8 dty3; /* 0x1F Channel 3 Duty register */
  426. u8 dty4; /* 0x20 Channel 4 Duty register */
  427. u8 dty5; /* 0x21 Channel 5 Duty register */
  428. u8 dty6; /* 0x22 Channel 6 Duty register */
  429. u8 dty7; /* 0x23 Channel 7 Duty register */
  430. u8 sdn; /* 0x24 Shutdown register */
  431. u8 res3[3]; /* 0x25 - 0x27 */
  432. } pwm_t;
  433. /* Edge Port module registers */
  434. typedef struct eport_ctrl {
  435. u16 par; /* 0x00 Pin Assignment Register */
  436. u8 ddar; /* 0x02 Data Direction Register */
  437. u8 ier; /* 0x03 Interrupt Enable Register */
  438. u8 dr; /* 0x04 Data Register */
  439. u8 pdr; /* 0x05 Pin Data Register */
  440. u8 fr; /* 0x06 Flag_Register */
  441. u8 res1;
  442. } eport_t;
  443. /* Watchdog registers */
  444. typedef struct wdog_ctrl {
  445. u16 cr; /* 0x00 Control register */
  446. u16 mr; /* 0x02 Modulus register */
  447. u16 cntr; /* 0x04 Count register */
  448. u16 sr; /* 0x06 Service register */
  449. } wdog_t;
  450. /*Chip configuration module registers */
  451. typedef struct ccm_ctrl {
  452. u16 ccr; /* 0x00 Chip configuration register */
  453. u16 res2; /* 0x02 */
  454. u16 rcon; /* 0x04 Rreset configuration register */
  455. u16 cir; /* 0x06 Chip identification register */
  456. u32 res3; /* 0x08 */
  457. u16 misccr; /* 0x0A Miscellaneous control register */
  458. u16 cdr; /* 0x0C Clock divider register */
  459. u16 uhcsr; /* 0x10 USB Host controller status register */
  460. u16 uocsr; /* 0x12 USB On-the-Go Controller Status Reg */
  461. } ccm_t;
  462. typedef struct rcm {
  463. u8 rcr;
  464. u8 rsr;
  465. } rcm_t;
  466. /* GPIO port registers */
  467. typedef struct gpio_ctrl {
  468. /* Port Output Data Registers */
  469. u8 podr_fech; /* 0x00 */
  470. u8 podr_fecl; /* 0x01 */
  471. u8 podr_ssi; /* 0x02 */
  472. u8 podr_busctl; /* 0x03 */
  473. u8 podr_be; /* 0x04 */
  474. u8 podr_cs; /* 0x05 */
  475. u8 podr_pwm; /* 0x06 */
  476. u8 podr_feci2c; /* 0x07 */
  477. u8 res1; /* 0x08 */
  478. u8 podr_uart; /* 0x09 */
  479. u8 podr_qspi; /* 0x0A */
  480. u8 podr_timer; /* 0x0B */
  481. u8 res2; /* 0x0C */
  482. u8 podr_lcddatah; /* 0x0D */
  483. u8 podr_lcddatam; /* 0x0E */
  484. u8 podr_lcddatal; /* 0x0F */
  485. u8 podr_lcdctlh; /* 0x10 */
  486. u8 podr_lcdctll; /* 0x11 */
  487. /* Port Data Direction Registers */
  488. u16 res3; /* 0x12 - 0x13 */
  489. u8 pddr_fech; /* 0x14 */
  490. u8 pddr_fecl; /* 0x15 */
  491. u8 pddr_ssi; /* 0x16 */
  492. u8 pddr_busctl; /* 0x17 */
  493. u8 pddr_be; /* 0x18 */
  494. u8 pddr_cs; /* 0x19 */
  495. u8 pddr_pwm; /* 0x1A */
  496. u8 pddr_feci2c; /* 0x1B */
  497. u8 res4; /* 0x1C */
  498. u8 pddr_uart; /* 0x1D */
  499. u8 pddr_qspi; /* 0x1E */
  500. u8 pddr_timer; /* 0x1F */
  501. u8 res5; /* 0x20 */
  502. u8 pddr_lcddatah; /* 0x21 */
  503. u8 pddr_lcddatam; /* 0x22 */
  504. u8 pddr_lcddatal; /* 0x23 */
  505. u8 pddr_lcdctlh; /* 0x24 */
  506. u8 pddr_lcdctll; /* 0x25 */
  507. u16 res6; /* 0x26 - 0x27 */
  508. /* Port Data Direction Registers */
  509. u8 ppd_fech; /* 0x28 */
  510. u8 ppd_fecl; /* 0x29 */
  511. u8 ppd_ssi; /* 0x2A */
  512. u8 ppd_busctl; /* 0x2B */
  513. u8 ppd_be; /* 0x2C */
  514. u8 ppd_cs; /* 0x2D */
  515. u8 ppd_pwm; /* 0x2E */
  516. u8 ppd_feci2c; /* 0x2F */
  517. u8 res7; /* 0x30 */
  518. u8 ppd_uart; /* 0x31 */
  519. u8 ppd_qspi; /* 0x32 */
  520. u8 ppd_timer; /* 0x33 */
  521. u8 res8; /* 0x34 */
  522. u8 ppd_lcddatah; /* 0x35 */
  523. u8 ppd_lcddatam; /* 0x36 */
  524. u8 ppd_lcddatal; /* 0x37 */
  525. u8 ppd_lcdctlh; /* 0x38 */
  526. u8 ppd_lcdctll; /* 0x39 */
  527. u16 res9; /* 0x3A - 0x3B */
  528. /* Port Clear Output Data Registers */
  529. u8 pclrr_fech; /* 0x3C */
  530. u8 pclrr_fecl; /* 0x3D */
  531. u8 pclrr_ssi; /* 0x3E */
  532. u8 pclrr_busctl; /* 0x3F */
  533. u8 pclrr_be; /* 0x40 */
  534. u8 pclrr_cs; /* 0x41 */
  535. u8 pclrr_pwm; /* 0x42 */
  536. u8 pclrr_feci2c; /* 0x43 */
  537. u8 res10; /* 0x44 */
  538. u8 pclrr_uart; /* 0x45 */
  539. u8 pclrr_qspi; /* 0x46 */
  540. u8 pclrr_timer; /* 0x47 */
  541. u8 res11; /* 0x48 */
  542. u8 pclrr_lcddatah; /* 0x49 */
  543. u8 pclrr_lcddatam; /* 0x4A */
  544. u8 pclrr_lcddatal; /* 0x4B */
  545. u8 pclrr_lcdctlh; /* 0x4C */
  546. u8 pclrr_lcdctll; /* 0x4D */
  547. u16 res12; /* 0x4E - 0x4F */
  548. /* Pin Assignment Registers */
  549. u8 par_fec; /* 0x50 */
  550. u8 par_pwm; /* 0x51 */
  551. u8 par_busctl; /* 0x52 */
  552. u8 par_feci2c; /* 0x53 */
  553. u8 par_be; /* 0x54 */
  554. u8 par_cs; /* 0x55 */
  555. u16 par_ssi; /* 0x56 */
  556. u16 par_uart; /* 0x58 */
  557. u16 par_qspi; /* 0x5A */
  558. u8 par_timer; /* 0x5C */
  559. u8 par_lcddata; /* 0x5D */
  560. u16 par_lcdctl; /* 0x5E */
  561. u16 par_irq; /* 0x60 */
  562. u16 res16; /* 0x62 - 0x63 */
  563. /* Mode Select Control Registers */
  564. u8 mscr_flexbus; /* 0x64 */
  565. u8 mscr_sdram; /* 0x65 */
  566. u16 res17; /* 0x66 - 0x67 */
  567. /* Drive Strength Control Registers */
  568. u8 dscr_i2c; /* 0x68 */
  569. u8 dscr_pwm; /* 0x69 */
  570. u8 dscr_fec; /* 0x6A */
  571. u8 dscr_uart; /* 0x6B */
  572. u8 dscr_qspi; /* 0x6C */
  573. u8 dscr_timer; /* 0x6D */
  574. u8 dscr_ssi; /* 0x6E */
  575. u8 dscr_lcd; /* 0x6F */
  576. u8 dscr_debug; /* 0x70 */
  577. u8 dscr_clkrst; /* 0x71 */
  578. u8 dscr_irq; /* 0x72 */
  579. } gpio_t;
  580. /* LCD module registers */
  581. typedef struct lcd_ctrl {
  582. u32 ssar; /* 0x00 Screen Start Address Register */
  583. u32 sr; /* 0x04 LCD Size Register */
  584. u32 vpw; /* 0x08 Virtual Page Width Register */
  585. u32 cpr; /* 0x0C Cursor Position Register */
  586. u32 cwhb; /* 0x10 Cursor Width Height and Blink Register */
  587. u32 ccmr; /* 0x14 Color Cursor Mapping Register */
  588. u32 pcr; /* 0x18 Panel Configuration Register */
  589. u32 hcr; /* 0x1C Horizontal Configuration Register */
  590. u32 vcr; /* 0x20 Vertical Configuration Register */
  591. u32 por; /* 0x24 Panning Offset Register */
  592. u32 scr; /* 0x28 Sharp Configuration Register */
  593. u32 pccr; /* 0x2C PWM Contrast Control Register */
  594. u32 dcr; /* 0x30 DMA Control Register */
  595. u32 rmcr; /* 0x34 Refresh Mode Control Register */
  596. u32 icr; /* 0x38 Refresh Mode Control Register */
  597. u32 ier; /* 0x3C Interrupt Enable Register */
  598. u32 isr; /* 0x40 Interrupt Status Register */
  599. u32 res[4];
  600. u32 gwsar; /* 0x50 Graphic Window Start Address Register */
  601. u32 gwsr; /* 0x54 Graphic Window Size Register */
  602. u32 gwvpw; /* 0x58 Graphic Window Virtual Page Width Register */
  603. u32 gwpor; /* 0x5C Graphic Window Panning Offset Register */
  604. u32 gwpr; /* 0x60 Graphic Window Position Register */
  605. u32 gwcr; /* 0x64 Graphic Window Control Register */
  606. u32 gwdcr; /* 0x68 Graphic Window DMA Control Register */
  607. } lcd_t;
  608. typedef struct lcdbg_ctrl {
  609. u32 bglut[255];
  610. } lcdbg_t;
  611. typedef struct lcdgw_ctrl {
  612. u32 gwlut[255];
  613. } lcdgw_t;
  614. /* USB OTG module registers */
  615. typedef struct usb_otg {
  616. u32 id; /* 0x000 Identification Register */
  617. u32 hwgeneral; /* 0x004 General HW Parameters */
  618. u32 hwhost; /* 0x008 Host HW Parameters */
  619. u32 hwdev; /* 0x00C Device HW parameters */
  620. u32 hwtxbuf; /* 0x010 TX Buffer HW Parameters */
  621. u32 hwrxbuf; /* 0x014 RX Buffer HW Parameters */
  622. u32 res1[58]; /* 0x18 - 0xFF */
  623. u8 caplength; /* 0x100 Capability Register Length */
  624. u8 res2; /* 0x101 */
  625. u16 hciver; /* 0x102 Host Interface Version Number */
  626. u32 hcsparams; /* 0x104 Host Structural Parameters */
  627. u32 hccparams; /* 0x108 Host Capability Parameters */
  628. u32 res3[5]; /* 0x10C - 0x11F */
  629. u16 dciver; /* 0x120 Device Interface Version Number */
  630. u16 res4; /* 0x122 */
  631. u32 dccparams; /* 0x124 Device Capability Parameters */
  632. u32 res5[6]; /* 0x128 - 0x13F */
  633. u32 cmd; /* 0x140 USB Command */
  634. u32 sts; /* 0x144 USB Status */
  635. u32 intr; /* 0x148 USB Interrupt Enable */
  636. u32 frindex; /* 0x14C USB Frame Index */
  637. u32 res6; /* 0x150 */
  638. u32 prd_dev; /* 0x154 Periodic Frame List Base or Device Address */
  639. u32 aync_ep; /* 0x158 Current Asynchronous List or Address at Endpoint List Address */
  640. u32 ttctrl; /* 0x15C Host TT Asynchronous Buffer Control */
  641. u32 burstsize; /* 0x160 Master Interface Data Burst Size */
  642. u32 txfill; /* 0x164 Host Transmit FIFO Tuning Control */
  643. u32 res7[6]; /* 0x168 - 0x17F */
  644. u32 cfgflag; /* 0x180 Configure Flag Register */
  645. u32 portsc1; /* 0x184 Port Status/Control */
  646. u32 res8[7]; /* 0x188 - 0x1A3 */
  647. u32 otgsc; /* 0x1A4 On The Go Status and Control */
  648. u32 mode; /* 0x1A8 USB mode register */
  649. u32 eptsetstat; /* 0x1AC Endpoint Setup status */
  650. u32 eptprime; /* 0x1B0 Endpoint initialization */
  651. u32 eptflush; /* 0x1B4 Endpoint de-initialize */
  652. u32 eptstat; /* 0x1B8 Endpoint status */
  653. u32 eptcomplete; /* 0x1BC Endpoint Complete */
  654. u32 eptctrl0; /* 0x1C0 Endpoint control 0 */
  655. u32 eptctrl1; /* 0x1C4 Endpoint control 1 */
  656. u32 eptctrl2; /* 0x1C8 Endpoint control 2 */
  657. u32 eptctrl3; /* 0x1CC Endpoint control 3 */
  658. } usbotg_t;
  659. /* USB Host module registers */
  660. typedef struct usb_host {
  661. u32 id; /* 0x000 Identification Register */
  662. u32 hwgeneral; /* 0x004 General HW Parameters */
  663. u32 hwhost; /* 0x008 Host HW Parameters */
  664. u32 res1; /* 0x0C */
  665. u32 hwtxbuf; /* 0x010 TX Buffer HW Parameters */
  666. u32 hwrxbuf; /* 0x014 RX Buffer HW Parameters */
  667. u32 res2[58]; /* 0x18 - 0xFF */
  668. /* Host Controller Capability Register */
  669. u8 caplength; /* 0x100 Capability Register Length */
  670. u8 res3; /* 0x101 */
  671. u16 hciver; /* 0x102 Host Interface Version Number */
  672. u32 hcsparams; /* 0x104 Host Structural Parameters */
  673. u32 hccparams; /* 0x108 Host Capability Parameters */
  674. u32 res4[13]; /* 0x10C - 0x13F */
  675. /* Host Controller Operational Register */
  676. u32 cmd; /* 0x140 USB Command */
  677. u32 sts; /* 0x144 USB Status */
  678. u32 intr; /* 0x148 USB Interrupt Enable */
  679. u32 frindex; /* 0x14C USB Frame Index */
  680. u32 res5; /* 0x150 (ctrl segment register in EHCI spec) */
  681. u32 prdlst; /* 0x154 Periodic Frame List Base Address */
  682. u32 aynclst; /* 0x158 Current Asynchronous List Address */
  683. u32 ttctrl; /* 0x15C Host TT Asynchronous Buffer Control (non-ehci) */
  684. u32 burstsize; /* 0x160 Master Interface Data Burst Size (non-ehci) */
  685. u32 txfill; /* 0x164 Host Transmit FIFO Tuning Control (non-ehci) */
  686. u32 res6[6]; /* 0x168 - 0x17F */
  687. u32 cfgflag; /* 0x180 Configure Flag Register */
  688. u32 portsc1; /* 0x184 Port Status/Control */
  689. u32 res7[8]; /* 0x188 - 0x1A7 */
  690. /* non-ehci registers */
  691. u32 mode; /* 0x1A8 USB mode register */
  692. u32 eptsetstat; /* 0x1AC Endpoint Setup status */
  693. u32 eptprime; /* 0x1B0 Endpoint initialization */
  694. u32 eptflush; /* 0x1B4 Endpoint de-initialize */
  695. u32 eptstat; /* 0x1B8 Endpoint status */
  696. u32 eptcomplete; /* 0x1BC Endpoint Complete */
  697. u32 eptctrl0; /* 0x1C0 Endpoint control 0 */
  698. u32 eptctrl1; /* 0x1C4 Endpoint control 1 */
  699. u32 eptctrl2; /* 0x1C8 Endpoint control 2 */
  700. u32 eptctrl3; /* 0x1CC Endpoint control 3 */
  701. } usbhost_t;
  702. /* SDRAM controller registers */
  703. typedef struct sdram_ctrl {
  704. u32 mode; /* 0x00 Mode/Extended Mode register */
  705. u32 ctrl; /* 0x04 Control register */
  706. u32 cfg1; /* 0x08 Configuration register 1 */
  707. u32 cfg2; /* 0x0C Configuration register 2 */
  708. u32 res1[64]; /* 0x10 - 0x10F */
  709. u32 cs0; /* 0x110 Chip Select 0 Configuration */
  710. u32 cs1; /* 0x114 Chip Select 1 Configuration */
  711. } sdram_t;
  712. /* Synchronous serial interface */
  713. typedef struct ssi_ctrl {
  714. u32 tx0; /* 0x00 Transmit Data Register 0 */
  715. u32 tx1; /* 0x04 Transmit Data Register 1 */
  716. u32 rx0; /* 0x08 Receive Data Register 0 */
  717. u32 rx1; /* 0x0C Receive Data Register 1 */
  718. u32 cr; /* 0x10 Control Register */
  719. u32 isr; /* 0x14 Interrupt Status Register */
  720. u32 ier; /* 0x18 Interrupt Enable Register */
  721. u32 tcr; /* 0x1C Transmit Configuration Register */
  722. u32 rcr; /* 0x20 Receive Configuration Register */
  723. u32 ccr; /* 0x24 Clock Control Register */
  724. u32 res1; /* 0x28 */
  725. u32 fcsr; /* 0x2C FIFO Control/Status Register */
  726. u32 res2[2]; /* 0x30 - 0x37 */
  727. u32 acr; /* 0x38 AC97 Control Register */
  728. u32 acadd; /* 0x3C AC97 Command Address Register */
  729. u32 acdat; /* 0x40 AC97 Command Data Register */
  730. u32 atag; /* 0x44 AC97 Tag Register */
  731. u32 tmask; /* 0x48 Transmit Time Slot Mask Register */
  732. u32 rmask; /* 0x4C Receive Time Slot Mask Register */
  733. } ssi_t;
  734. /* Clock Module registers */
  735. typedef struct pll_ctrl {
  736. u8 podr; /* 0x00 Output Divider Register */
  737. u8 res1[3];
  738. u8 pcr; /* 0x04 Control Register */
  739. u8 res2[3];
  740. u8 pmdr; /* 0x08 Modulation Divider Register */
  741. u8 res3[3];
  742. u8 pfdr; /* 0x0C Feedback Divider Register */
  743. u8 res4[3];
  744. } pll_t;
  745. #endif /* __IMMAP_5329__ */