immap_5329.h 28 KB

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