config.inc 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852
  1. ;/*****************************************************************************/
  2. ;/* S3C2440.S: Startup file for Samsung S3C440 */
  3. ;/*****************************************************************************/
  4. ;/* <<< Use Configuration Wizard in Context Menu >>> */
  5. ;/*****************************************************************************/
  6. ;/* This file is part of the uVision/ARM development tools. */
  7. ;/* Copyright (c) 2005-2008 Keil Software. All rights reserved. */
  8. ;/* This software may only be used under the terms of a valid, current, */
  9. ;/* end user licence from KEIL for a compatible version of KEIL software */
  10. ;/* development tools. Nothing else gives you the right to use this software. */
  11. ;/*****************************************************************************/
  12. ;/*
  13. ; * The S3C2440.S code is executed after CPU Reset. This file may be
  14. ; * translated with the following SET symbols. In uVision these SET
  15. ; * symbols are entered under Options - ASM - Define.
  16. ; *
  17. ; * NO_CLOCK_SETUP: when set the startup code will not initialize Clock
  18. ; * (used mostly when clock is already initialized from script .ini
  19. ; * file).
  20. ; *
  21. ; * NO_MC_SETUP: when set the startup code will not initialize Memory
  22. ; * Controller (used mostly when clock is already initialized from script
  23. ; * .ini file).
  24. ; *
  25. ; * NO_GP_SETUP: when set the startup code will not initialize General Ports
  26. ; * (used mostly when clock is already initialized from script .ini
  27. ; * file).
  28. ; *
  29. ; * RAM_INTVEC: when set the startup code copies exception vectors
  30. ; * from execution address to on-chip RAM.
  31. ; */
  32. ; Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs
  33. Mode_USR EQU 0x10
  34. Mode_FIQ EQU 0x11
  35. Mode_IRQ EQU 0x12
  36. Mode_SVC EQU 0x13
  37. Mode_ABT EQU 0x17
  38. Mode_UND EQU 0x1B
  39. Mode_SYS EQU 0x1F
  40. I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled
  41. F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled
  42. FLASH_BASE_ADDR EQU 0x00
  43. ;----------------------- Stack and Heap Definitions ----------------------------
  44. ;// <h> Stack Configuration (Stack Sizes in Bytes)
  45. ;// <o0> Undefined Mode <0x0-0xFFFFFFFF:8>
  46. ;// <o1> Supervisor Mode <0x0-0xFFFFFFFF:8>
  47. ;// <o2> Abort Mode <0x0-0xFFFFFFFF:8>
  48. ;// <o3> Fast Interrupt Mode <0x0-0xFFFFFFFF:8>
  49. ;// <o4> Interrupt Mode <0x0-0xFFFFFFFF:8>
  50. ;// <o5> User/System Mode <0x0-0xFFFFFFFF:8>
  51. ;// </h>
  52. UND_Stack_Size EQU 0x00000000
  53. SVC_Stack_Size EQU 0x00000100
  54. ABT_Stack_Size EQU 0x00000000
  55. FIQ_Stack_Size EQU 0x00000000
  56. IRQ_Stack_Size EQU 0x00000100
  57. USR_Stack_Size EQU 0x00000100
  58. ISR_Stack_Size EQU (UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + \
  59. FIQ_Stack_Size + IRQ_Stack_Size)
  60. AREA STACK, NOINIT, READWRITE, ALIGN=3
  61. Stack_Mem SPACE USR_Stack_Size
  62. __initial_sp SPACE ISR_Stack_Size
  63. Stack_Top
  64. ;// <h> Heap Configuration
  65. ;// <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF>
  66. ;// </h>
  67. Heap_Size EQU 0x00000000
  68. AREA HEAP, NOINIT, READWRITE, ALIGN=3
  69. __heap_base
  70. Heap_Mem SPACE Heap_Size
  71. __heap_limit
  72. ;----------------------- Memory Definitions ------------------------------------
  73. ; Internal Memory Base Addresses
  74. IRAM_BASE EQU 0x40000000
  75. ;----------------------- Watchdog Timer Definitions ----------------------------
  76. WT_BASE EQU 0x53000000 ; Watchdog Timer Base Address
  77. WTCON_OFS EQU 0x00 ; Watchdog Timer Control Register Offset
  78. WTDAT_OFS EQU 0x04 ; Watchdog Timer Data Register Offset
  79. WTCNT_OFS EQU 0x08 ; Watchdog Timer Count Register Offset
  80. ;// <e> Watchdog Timer Setup
  81. ;// <h> Watchdog Timer Control Register (WTCON)
  82. ;// <o1.8..15> Prescaler Value <0-255>
  83. ;// <o1.5> Watchdog Timer Enable
  84. ;// <o1.3..4> Clock Division Factor
  85. ;// <0=> 16 <1=> 32 <2=> 64 <3=> 128
  86. ;// <o1.2> Interrupt Generation Enable
  87. ;// <o1.0> Reset Enable
  88. ;// </h>
  89. ;// <h> Watchdog Timer Data Register (WTDAT)
  90. ;// <o2.0..15> Count Reload Value <0-65535>
  91. ;// </h>
  92. ;// </e> Watchdog Timer Setup
  93. WT_SETUP EQU 1
  94. WTCON_Val EQU 0x00000000
  95. WTDAT_Val EQU 0x00008000
  96. ;----------------------- Clock and Power Management Definitions ----------------
  97. CLOCK_BASE EQU 0x4C000000 ; Clock Base Address
  98. LOCKTIME_OFS EQU 0x00 ; PLL Lock Time Count Register Offset
  99. MPLLCON_OFS EQU 0x04 ; MPLL Configuration Register Offset
  100. UPLLCON_OFS EQU 0x08 ; UPLL Configuration Register Offset
  101. CLKCON_OFS EQU 0x0C ; Clock Generator Control Reg Offset
  102. CLKSLOW_OFS EQU 0x10 ; Clock Slow Control Register Offset
  103. CLKDIVN_OFS EQU 0x14 ; Clock Divider Control Register Offset
  104. CAMDIVN_OFS EQU 0x18 ; Camera Clock Divider Register Offset
  105. ;// <e> Clock Setup
  106. ;// <h> PLL Lock Time Count Register (LOCKTIME)
  107. ;// <o1.16..31> U_LTIME: UPLL Lock Time Count Value for UCLK <0x0-0xFFFF>
  108. ;// <o1.0..15> M_LTIME: MPLL Lock Time Count Value for FCLK, HCLK and PCLK <0x0-0xFFFF>
  109. ;// </h>
  110. ;// <h> MPLL Configuration Register (MPLLCON)
  111. ;// <i> MPLL = (2 * m * Fin) / (p * 2^s)
  112. ;// <o2.12..19> m: Main Divider m Value <9-256><#-8>
  113. ;// <i> m = MDIV + 8
  114. ;// <o2.4..9> p: Pre-divider p Value <3-64><#-2>
  115. ;// <i> p = PDIV + 2
  116. ;// <o2.0..1> s: Post Divider s Value <0-3>
  117. ;// <i> s = SDIV
  118. ;// </h>
  119. ;// <h> UPLL Configuration Register (UPLLCON)
  120. ;// <i> UPLL = ( m * Fin) / (p * 2^s)
  121. ;// <o3.12..19> m: Main Divider m Value <8-263><#-8>
  122. ;// <i> m = MDIV + 8
  123. ;// <o3.4..9> p: Pre-divider p Value <2-65><#-2>
  124. ;// <i> p = PDIV + 2
  125. ;// <o3.0..1> s: Post Divider s Value <0-3>
  126. ;// <i> s = SDIV
  127. ;// </h>
  128. ;// <h> Clock Generation Control Register (CLKCON)
  129. ;// <o4.20> AC97 Enable
  130. ;// <o4.19> Camera Enable
  131. ;// <o4.18> SPI Enable
  132. ;// <o4.17> IIS Enable
  133. ;// <o4.16> IIC Enable
  134. ;// <o4.15> ADC + Touch Screen Enable
  135. ;// <o4.14> RTC Enable
  136. ;// <o4.13> GPIO Enable
  137. ;// <o4.12> UART2 Enable
  138. ;// <o4.11> UART1 Enable
  139. ;// <o4.10> UART0 Enable
  140. ;// <o4.9> SDI Enable
  141. ;// <o4.8> PWMTIMER Enable
  142. ;// <o4.7> USB Device Enable
  143. ;// <o4.6> USB Host Enable
  144. ;// <o4.5> LCDC Enable
  145. ;// <o4.4> NAND FLASH Controller Enable
  146. ;// <o4.3> SLEEP Enable
  147. ;// <o4.2> IDLE BIT Enable
  148. ;// </h>
  149. ;// <h> Clock Slow Control Register (CLKSLOW)
  150. ;// <o5.7> UCLK_ON: UCLK ON
  151. ;// <o5.5> MPLL_OFF: Turn off PLL
  152. ;// <o5.4> SLOW_BIT: Slow Mode Enable
  153. ;// <o5.0..2> SLOW_VAL: Slow Clock Divider <0-7>
  154. ;// </h>
  155. ;// <h> Clock Divider Control Register (CLKDIVN)
  156. ;// <o6.3> DIVN_UPLL: UCLK Select
  157. ;// <0=> UCLK = UPLL clock
  158. ;// <1=> UCLK = UPLL clock / 2
  159. ;// <o6.1..2> HDIVN: HCLK Select
  160. ;// <0=> HCLK = FCLK
  161. ;// <1=> HCLK = FCLK / 2
  162. ;// <2=> HCLK = FCLK / 4 if HCLK4_HALF = 0 in CAMDIVN, else HCLK = FCLK / 8
  163. ;// <3=> HCLK = FCLK / 3 if HCLK3_HALF = 0 in CAMDIVN, else HCLK = FCLK / 6
  164. ;// <o6.0> PDIVN: PCLK Select
  165. ;// <0=> PCLK = HCLK
  166. ;// <1=> PCLK = HCLK / 2
  167. ;// </h>
  168. ;// <h> Camera Clock Divider Control Register (CAMDIVN)
  169. ;// <o7.12> DVS_EN: ARM Core Clock Select
  170. ;// <0=> ARM core runs at FCLK
  171. ;// <1=> ARM core runs at HCLK
  172. ;// <o7.9> HCLK4_HALF: HDIVN Division Rate Change Bit
  173. ;// <0=> If HDIVN = 2 in CLKDIVN then HCLK = FCLK / 4
  174. ;// <1=> If HDIVN = 2 in CLKDIVN then HCLK = FCLK / 8
  175. ;// <o7.8> HCLK3_HALF: HDIVN Division Rate Change Bit
  176. ;// <0=> If HDIVN = 3 in CLKDIVN then HCLK = FCLK / 3
  177. ;// <1=> If HDIVN = 3 in CLKDIVN then HCLK = FCLK / 6
  178. ;// <o7.4> CAMCLK Select
  179. ;// <0=> CAMCLK = UPLL
  180. ;// <1=> CAMCLK = UPLL / CAMCLK_DIV
  181. ;// <o7.0..3> CAMCLK_DIV: CAMCLK Divider <0-15>
  182. ;// <i> Camera Clock = UPLL / (2 * (CAMCLK_DIV + 1))
  183. ;// <i> Divider is used only if CAMCLK_SEL = 1
  184. ;// </h>
  185. ;// </e> Clock Setup
  186. CLOCK_SETUP EQU 1
  187. LOCKTIME_Val EQU 0x0FFF0FFF
  188. MPLLCON_Val EQU 0x00043011
  189. UPLLCON_Val EQU 0x00038021
  190. CLKCON_Val EQU 0x001FFFF0
  191. CLKSLOW_Val EQU 0x00000004
  192. CLKDIVN_Val EQU 0x0000000F
  193. CAMDIVN_Val EQU 0x00000000
  194. ;----------------------- Memory Controller Definitions -------------------------
  195. MC_BASE EQU 0x48000000 ; Memory Controller Base Address
  196. BWSCON_OFS EQU 0x00 ; Bus Width and Wait Status Ctrl Offset
  197. BANKCON0_OFS EQU 0x04 ; Bank 0 Control Register Offset
  198. BANKCON1_OFS EQU 0x08 ; Bank 1 Control Register Offset
  199. BANKCON2_OFS EQU 0x0C ; Bank 2 Control Register Offset
  200. BANKCON3_OFS EQU 0x10 ; Bank 3 Control Register Offset
  201. BANKCON4_OFS EQU 0x14 ; Bank 4 Control Register Offset
  202. BANKCON5_OFS EQU 0x18 ; Bank 5 Control Register Offset
  203. BANKCON6_OFS EQU 0x1C ; Bank 6 Control Register Offset
  204. BANKCON7_OFS EQU 0x20 ; Bank 7 Control Register Offset
  205. REFRESH_OFS EQU 0x24 ; SDRAM Refresh Control Register Offset
  206. BANKSIZE_OFS EQU 0x28 ; Flexible Bank Size Register Offset
  207. MRSRB6_OFS EQU 0x2C ; Bank 6 Mode Register Offset
  208. MRSRB7_OFS EQU 0x30 ; Bank 7 Mode Register Offset
  209. ;------------------------NAND FLASH----------------------------------------------
  210. NAND_CTL_BASE EQU 0x4E000000
  211. ;/* offset */
  212. oNFCONF EQU 0x00
  213. oNFCONT EQU 0x04
  214. oNFCMD EQU 0x08
  215. oNFADDR EQU 0x0c
  216. oNFDATA EQU 0x10
  217. oNFSTAT EQU 0x20
  218. oNFECC EQU 0x2c
  219. ;// <e> Memory Controller Setup
  220. ;// <h> Bus Width and Wait Control Register (BWSCON)
  221. ;// <o1.31> ST7: Use UB/LB for Bank 7
  222. ;// <o1.30> WS7: Enable Wait Status for Bank 7
  223. ;// <o1.28..29> DW7: Data Bus Width for Bank 7
  224. ;// <0=> 8-bit <1=> 16-bit <2=> 32-bit <3=> Reserved
  225. ;// <o1.27> ST6: Use UB/LB for Bank 6
  226. ;// <o1.26> WS6: Enable Wait Status for Bank 6
  227. ;// <o1.24..25> DW6: Data Bus Width for Bank 6
  228. ;// <0=> 8-bit <1=> 16-bit <2=> 32-bit <3=> Reserved
  229. ;// <o1.23> ST5: Use UB/LB for Bank 5
  230. ;// <o1.22> WS5: Enable Wait Status for Bank 5
  231. ;// <o1.20..21> DW5: Data Bus Width for Bank 5
  232. ;// <0=> 8-bit <1=> 16-bit <2=> 32-bit <3=> Reserved
  233. ;// <o1.19> ST4: Use UB/LB for Bank 4
  234. ;// <o1.18> WS4: Enable Wait Status for Bank 4
  235. ;// <o1.16..17> DW4: Data Bus Width for Bank 4
  236. ;// <0=> 8-bit <1=> 16-bit <2=> 32-bit <3=> Reserved
  237. ;// <o1.15> ST3: Use UB/LB for Bank 3
  238. ;// <o1.14> WS3: Enable Wait Status for Bank 3
  239. ;// <o1.12..13> DW3: Data Bus Width for Bank 3
  240. ;// <0=> 8-bit <1=> 16-bit <2=> 32-bit <3=> Reserved
  241. ;// <o1.11> ST2: Use UB/LB for Bank 2
  242. ;// <o1.10> WS2: Enable Wait Status for Bank 2
  243. ;// <o1.8..9> DW2: Data Bus Width for Bank 2
  244. ;// <0=> 8-bit <1=> 16-bit <2=> 32-bit <3=> Reserved
  245. ;// <o1.7> ST1: Use UB/LB for Bank 1
  246. ;// <o1.6> WS1: Enable Wait Status for Bank 1
  247. ;// <o1.4..5> DW1: Data Bus Width for Bank 1
  248. ;// <0=> 8-bit <1=> 16-bit <2=> 32-bit <3=> Reserved
  249. ;// <o1.1..2> DW0: Indicate Data Bus Width for Bank 0
  250. ;// <1=> 16-bit <2=> 32-bit
  251. ;// </h>
  252. ;// <h> Bank 0 Control Register (BANKCON0)
  253. ;// <o2.13..14> Tacs: Address Set-up Time before nGCS
  254. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  255. ;// <o2.11..12> Tcos: Chip Selection Set-up Time before nOE
  256. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  257. ;// <o2.8..10> Tacc: Access Cycle
  258. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks <3=> 4 clocks
  259. ;// <4=> 6 clocks <5=> 8 clocks <6=> 10 clocks <7=> 14 clocks
  260. ;// <o2.6..7> Tcoh: Chip Selection Hold Time after nOE
  261. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  262. ;// <o2.4..5> Tcah: Address Hold Time after nGCS
  263. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  264. ;// <o2.2..3> Tacp: Page Mode Access Cycle at Page Mode
  265. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> 6 clocks
  266. ;// <o2.0..1> PMC: Page Mode Configuration
  267. ;// <0=> normal (1 data) <1=> 4 data <2=> 8 data <3=> 16 data
  268. ;// </h>
  269. ;// <h> Bank 1 Control Register (BANKCON1)
  270. ;// <o3.13..14> Tacs: Address Set-up Time before nGCS
  271. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  272. ;// <o3.11..12> Tcos: Chip Selection Set-up Time before nOE
  273. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  274. ;// <o3.8..10> Tacc: Access Cycle
  275. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks <3=> 4 clocks
  276. ;// <4=> 6 clocks <5=> 8 clocks <6=> 10 clocks <7=> 14 clocks
  277. ;// <o3.6..7> Tcoh: Chip Selection Hold Time after nOE
  278. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  279. ;// <o3.4..5> Tcah: Address Hold Time after nGCS
  280. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  281. ;// <o3.2..3> Tacp: Page Mode Access Cycle at Page Mode
  282. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> 6 clocks
  283. ;// <o3.0..1> PMC: Page Mode Configuration
  284. ;// <0=> normal (1 data) <1=> 4 data <2=> 8 data <3=> 16 data
  285. ;// </h>
  286. ;// <h> Bank 2 Control Register (BANKCON2)
  287. ;// <o4.13..14> Tacs: Address Set-up Time before nGCS
  288. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  289. ;// <o4.11..12> Tcos: Chip Selection Set-up Time before nOE
  290. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  291. ;// <o4.8..10> Tacc: Access Cycle
  292. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks <3=> 4 clocks
  293. ;// <4=> 6 clocks <5=> 8 clocks <6=> 10 clocks <7=> 14 clocks
  294. ;// <o4.6..7> Tcoh: Chip Selection Hold Time after nOE
  295. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  296. ;// <o4.4..5> Tcah: Address Hold Time after nGCS
  297. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  298. ;// <o4.2..3> Tacp: Page Mode Access Cycle at Page Mode
  299. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> 6 clocks
  300. ;// <o4.0..1> PMC: Page Mode Configuration
  301. ;// <0=> normal (1 data) <1=> 4 data <2=> 8 data <3=> 16 data
  302. ;// </h>
  303. ;// <h> Bank 3 Control Register (BANKCON3)
  304. ;// <o5.13..14> Tacs: Address Set-up Time before nGCS
  305. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  306. ;// <o5.11..12> Tcos: Chip Selection Set-up Time before nOE
  307. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  308. ;// <o5.8..10> Tacc: Access Cycle
  309. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks <3=> 4 clocks
  310. ;// <4=> 6 clocks <5=> 8 clocks <6=> 10 clocks <7=> 14 clocks
  311. ;// <o5.6..7> Tcoh: Chip Selection Hold Time after nOE
  312. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  313. ;// <o5.4..5> Tcah: Address Hold Time after nGCS
  314. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  315. ;// <o5.2..3> Tacp: Page Mode Access Cycle at Page Mode
  316. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> 6 clocks
  317. ;// <o5.0..1> PMC: Page Mode Configuration
  318. ;// <0=> normal (1 data) <1=> 4 data <2=> 8 data <3=> 16 data
  319. ;// </h>
  320. ;// <h> Bank 4 Control Register (BANKCON4)
  321. ;// <o6.13..14> Tacs: Address Set-up Time before nGCS
  322. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  323. ;// <o6.11..12> Tcos: Chip Selection Set-up Time before nOE
  324. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  325. ;// <o6.8..10> Tacc: Access Cycle
  326. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks <3=> 4 clocks
  327. ;// <4=> 6 clocks <5=> 8 clocks <6=> 10 clocks <7=> 14 clocks
  328. ;// <o6.6..7> Tcoh: Chip Selection Hold Time after nOE
  329. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  330. ;// <o6.4..5> Tcah: Address Hold Time after nGCS
  331. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  332. ;// <o6.2..3> Tacp: Page Mode Access Cycle at Page Mode
  333. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> 6 clocks
  334. ;// <o6.0..1> PMC: Page Mode Configuration
  335. ;// <0=> normal (1 data) <1=> 4 data <2=> 8 data <3=> 16 data
  336. ;// </h>
  337. ;// <h> Bank 5 Control Register (BANKCON5)
  338. ;// <o7.13..14> Tacs: Address Set-up Time before nGCS
  339. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  340. ;// <o7.11..12> Tcos: Chip Selection Set-up Time before nOE
  341. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  342. ;// <o7.8..10> Tacc: Access Cycle
  343. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks <3=> 4 clocks
  344. ;// <4=> 6 clocks <5=> 8 clocks <6=> 10 clocks <7=> 14 clocks
  345. ;// <o7.6..7> Tcoh: Chip Selection Hold Time after nOE
  346. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  347. ;// <o7.4..5> Tcah: Address Hold Time after nGCS
  348. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  349. ;// <o7.2..3> Tacp: Page Mode Access Cycle at Page Mode
  350. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> 6 clocks
  351. ;// <o7.0..1> PMC: Page Mode Configuration
  352. ;// <0=> normal (1 data) <1=> 4 data <2=> 8 data <3=> 16 data
  353. ;// </h>
  354. ;// <h> Bank 6 Control Register (BANKCON6)
  355. ;// <o8.15..16> Memory Type Selection
  356. ;// <0=> ROM or SRAM <3=> SDRAM
  357. ;// <o8.13..14> Tacs: Address Set-up Time before nGCS
  358. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  359. ;// <o8.11..12> Tcos: Chip Selection Set-up Time before nOE
  360. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  361. ;// <o8.8..10> Tacc: Access Cycle
  362. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks <3=> 4 clocks
  363. ;// <4=> 6 clocks <5=> 8 clocks <6=> 10 clocks <7=> 14 clocks
  364. ;// <o8.6..7> Tcoh: Chip Selection Hold Time after nOE
  365. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  366. ;// <o8.4..5> Tcah: Address Hold Time after nGCS
  367. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  368. ;// <o8.2..3> Tacp/Trcd: Page Mode Access Cycle at Page Mode / RAS to CAS Delay
  369. ;// <i> Parameter depends on Memory Type: if type SRAM then parameter is Tacp,
  370. ;// <i> if type is SDRAM then parameter is Trcd
  371. ;// <i> For SDRAM 6 cycles setting is not allowed
  372. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> 6 clocks
  373. ;// <o8.0..1> PMC/SCAN: Page Mode Configuration / Column Address Number <0-3>
  374. ;// <i> Parameter depends on Memory Type: if type SRAM then parameter is PMC,
  375. ;// <i> if type is SDRAM then parameter is SCAN
  376. ;// </h>
  377. ;// <h> Bank 7 Control Register (BANKCON7)
  378. ;// <o9.15..16> Memory Type Selection
  379. ;// <0=> ROM or SRAM <3=> SDRAM
  380. ;// <o9.13..14> Tacs: Address Set-up Time before nGCS
  381. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  382. ;// <o9.11..12> Tcos: Chip Selection Set-up Time before nOE
  383. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  384. ;// <o9.8..10> Tacc: Access Cycle
  385. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks <3=> 4 clocks
  386. ;// <4=> 6 clocks <5=> 8 clocks <6=> 10 clocks <7=> 14 clocks
  387. ;// <o9.6..7> Tcoh: Chip Selection Hold Time after nOE
  388. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  389. ;// <o9.4..5> Tcah: Address Hold Time after nGCS
  390. ;// <0=> 0 clocks <1=> 1 clocks <2=> 2 clocks <3=> 4 clocks
  391. ;// <o9.2..3> Tacp/Trcd: Page Mode Access Cycle at Page Mode / RAS to CAS Delay
  392. ;// <i> Parameter depends on Memory Type: if type SRAM then parameter is Tacp,
  393. ;// <i> if type is SDRAM then parameter is Trcd
  394. ;// <i> For SDRAM 6 cycles setting is not allowed
  395. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> 6 clocks
  396. ;// <o9.0..1> PMC/SCAN: Page Mode Configuration / Column Address Number <0-3>
  397. ;// <i> Parameter depends on Memory Type: if type SRAM then parameter is PMC,
  398. ;// <i> if type is SDRAM then parameter is SCAN
  399. ;// </h>
  400. ;// <h> SDRAM Refresh Control Register (REFRESH)
  401. ;// <o10.23> REFEN: SDRAM Refresh Enable
  402. ;// <o10.22> TREFMD: SDRAM Refresh Mode
  403. ;// <0=> CBR/Auto Refresh <1=> Self Refresh
  404. ;// <o10.20..21> Trp: SDRAM RAS Pre-charge Time
  405. ;// <0=> 2 clocks <1=> 3 clocks <2=> 4 clocks <3=> Reserved
  406. ;// <o10.18..19> Tsrc: SDRAM Semi Row Cycle Time
  407. ;// <i> SDRAM Row cycle time: Trc = Tsrc + Trp
  408. ;// <0=> 4 clocks <1=> 5 clocks <2=> 6 clocks <3=> 7 clocks
  409. ;// <o10.0..10> Refresh Counter <0-1023>
  410. ;// <i> Refresh Period = (2048 - Refresh Count + 1) / HCLK
  411. ;// </h>
  412. ;// <h> Flexible Bank Size Register (BANKSIZE)
  413. ;// <o11.7> BURST_EN: ARM Core Burst Operation Enable
  414. ;// <o11.5> SCKE_EN: SDRAM Power Down Mode Enable
  415. ;// <o11.4> SCLK_EN: SCLK Enabled During SDRAM Access Cycle
  416. ;// <0=> SCLK is always active <1=> SCLK is active only during the access
  417. ;// <o11.0..2> BK76MAP: BANK6 and BANK7 Memory Map
  418. ;// <0=> 32MB / 32MB <1=> 64MB / 64MB <2=> 128MB / 128MB
  419. ;// <4=> 2MB / 2MB <5=> 4MB / 4MB <6=> 8MB / 8MB <7=> 16MB / 16MB
  420. ;// <o11.0..10> Refresh Counter <0-1023>
  421. ;// <i> Refresh Period = (2048 - Refresh Count + 1) / HCLK
  422. ;// </h>
  423. ;// <h> SDRAM Mode Register Set Register 6 (MRSRB6)
  424. ;// <o12.7> WBL: Write Burst Length
  425. ;// <0=> Burst (Fixed)
  426. ;// <o12.7..8> TM: Test Mode
  427. ;// <0=> Mode register set (Fixed)
  428. ;// <o12.4..6> CL: CAS Latency
  429. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks
  430. ;// <o12.3> BT: Burst Type
  431. ;// <0=> Sequential (Fixed)
  432. ;// <o12.0..2> BL: Burst Length
  433. ;// <0=> 1 (Fixed)
  434. ;// </h>
  435. ;// <h> SDRAM Mode Register Set Register 7 (MRSRB7)
  436. ;// <o13.7> WBL: Write Burst Length
  437. ;// <0=> Burst (Fixed)
  438. ;// <o13.7..8> TM: Test Mode
  439. ;// <0=> Mode register set (Fixed)
  440. ;// <o13.4..6> CL: CAS Latency
  441. ;// <0=> 1 clocks <1=> 2 clocks <2=> 3 clocks
  442. ;// <o13.3> BT: Burst Type
  443. ;// <0=> Sequential (Fixed)
  444. ;// <o13.0..2> BL: Burst Length
  445. ;// <0=> 1 (Fixed)
  446. ;// </h>
  447. ;// </e> Memory Controller Setup
  448. MC_SETUP EQU 1
  449. BWSCON_Val EQU 0x22151112
  450. BANKCON0_Val EQU 0x00000700
  451. BANKCON1_Val EQU 0x00000700
  452. BANKCON2_Val EQU 0x00000700
  453. BANKCON3_Val EQU 0x00000700
  454. BANKCON4_Val EQU 0x00002E50
  455. BANKCON5_Val EQU 0x00000700
  456. BANKCON6_Val EQU 0x00018005
  457. BANKCON7_Val EQU 0x00018005
  458. REFRESH_Val EQU 0x008E07A3
  459. BANKSIZE_Val EQU 0x000000B2
  460. MRSRB6_Val EQU 0x00000030
  461. MRSRB7_Val EQU 0x00000030
  462. ;----------------------- Interrupt Config -----------------------------------
  463. SRCPND EQU 0x4a000000 ;Interrupt request status
  464. INTMOD EQU 0x4a000004 ;Interrupt mode control
  465. INTMSK EQU 0x4a000008 ;Interrupt mask control
  466. PRIORITY EQU 0x4a00000c ;IRQ priority control <-- May 06, 2002 SOP
  467. INTPND EQU 0x4a000010 ;Interrupt request status
  468. INTOFFSET EQU 0x4a000014 ;Interruot request source offset
  469. SUSSRCPND EQU 0x4a000018 ;Sub source pending
  470. INTSUBMSK EQU 0x4a00001c ;Interrupt sub mask
  471. ;----------------------- I/O Port Definitions ----------------------------------
  472. GPA_BASE EQU 0x56000000 ; GPA Base Address
  473. GPB_BASE EQU 0x56000010 ; GPB Base Address
  474. GPC_BASE EQU 0x56000020 ; GPC Base Address
  475. GPD_BASE EQU 0x56000030 ; GPD Base Address
  476. GPE_BASE EQU 0x56000040 ; GPE Base Address
  477. GPF_BASE EQU 0x56000050 ; GPF Base Address
  478. GPG_BASE EQU 0x56000060 ; GPG Base Address
  479. GPH_BASE EQU 0x56000070 ; GPH Base Address
  480. GPJ_BASE EQU 0x560000D0 ; GPJ Base Address
  481. GPCON_OFS EQU 0x00 ; Control Register Offset
  482. GPDAT_OFS EQU 0x04 ; Data Register Offset
  483. GPUP_OFS EQU 0x08 ; Pull-up Disable Register Offset
  484. ;// <e> I/O Setup
  485. GP_SETUP EQU 0
  486. ;// <e> Port A Settings
  487. ;// <h> Port A Control Register (GPACON)
  488. ;// <o1.22> GPA22 <0=> Output <1=> nFCE
  489. ;// <o1.21> GPA21 <0=> Output <1=> nRSTOUT
  490. ;// <o1.20> GPA20 <0=> Output <1=> nFRE
  491. ;// <o1.19> GPA19 <0=> Output <1=> nFWE
  492. ;// <o1.18> GPA18 <0=> Output <1=> ALE
  493. ;// <o1.17> GPA17 <0=> Output <1=> CLE
  494. ;// <o1.16> GPA16 <0=> Output <1=> nGCS[5]
  495. ;// <o1.15> GPA15 <0=> Output <1=> nGCS[4]
  496. ;// <o1.14> GPA14 <0=> Output <1=> nGCS[3]
  497. ;// <o1.13> GPA13 <0=> Output <1=> nGCS[2]
  498. ;// <o1.12> GPA12 <0=> Output <1=> nGCS[1]
  499. ;// <o1.11> GPA11 <0=> Output <1=> ADDR26
  500. ;// <o1.10> GPA10 <0=> Output <1=> ADDR25
  501. ;// <o1.9> GPA9 <0=> Output <1=> ADDR24
  502. ;// <o1.8> GPA8 <0=> Output <1=> ADDR23
  503. ;// <o1.7> GPA7 <0=> Output <1=> ADDR22
  504. ;// <o1.6> GPA6 <0=> Output <1=> ADDR21
  505. ;// <o1.5> GPA5 <0=> Output <1=> ADDR20
  506. ;// <o1.4> GPA4 <0=> Output <1=> ADDR19
  507. ;// <o1.3> GPA3 <0=> Output <1=> ADDR18
  508. ;// <o1.2> GPA2 <0=> Output <1=> ADDR17
  509. ;// <o1.1> GPA1 <0=> Output <1=> ADDR16
  510. ;// <o1.0> GPA0 <0=> Output <1=> ADDR0
  511. ;// </h>
  512. ;// </e>
  513. GPA_SETUP EQU 0
  514. GPACON_Val EQU 0x000003FF
  515. ;// <e> Port B Settings
  516. ;// <h> Port B Control Register (GPBCON)
  517. ;// <o1.20..21> GPB10 <0=> Input <1=> Output <2=> nXDREQ0 <3=> Reserved
  518. ;// <o1.18..19> GPB9 <0=> Input <1=> Output <2=> nXDACK0 <3=> Reserved
  519. ;// <o1.16..17> GPB8 <0=> Input <1=> Output <2=> nXDREQ1 <3=> Reserved
  520. ;// <o1.14..15> GPB7 <0=> Input <1=> Output <2=> nXDACK1 <3=> Reserved
  521. ;// <o1.12..13> GPB6 <0=> Input <1=> Output <2=> nXBREQ <3=> Reserved
  522. ;// <o1.10..11> GPB5 <0=> Input <1=> Output <2=> nXBACK <3=> Reserved
  523. ;// <o1.8..9> GPB4 <0=> Input <1=> Output <2=> TCLK[0] <3=> Reserved
  524. ;// <o1.6..7> GPB3 <0=> Input <1=> Output <2=> TOUT3 <3=> Reserved
  525. ;// <o1.4..5> GPB2 <0=> Input <1=> Output <2=> TOUT2 <3=> Reserved
  526. ;// <o1.2..3> GPB1 <0=> Input <1=> Output <2=> TOUT1 <3=> Reserved
  527. ;// <o1.0..1> GPB0 <0=> Input <1=> Output <2=> TOUT0 <3=> Reserved
  528. ;// </h>
  529. ;// <h> Port B Pull-up Settings Register (GPBUP)
  530. ;// <o2.10> GPB10 Pull-up Disable
  531. ;// <o2.9> GPB9 Pull-up Disable
  532. ;// <o2.8> GPB8 Pull-up Disable
  533. ;// <o2.7> GPB7 Pull-up Disable
  534. ;// <o2.6> GPB6 Pull-up Disable
  535. ;// <o2.5> GPB5 Pull-up Disable
  536. ;// <o2.4> GPB4 Pull-up Disable
  537. ;// <o2.3> GPB3 Pull-up Disable
  538. ;// <o2.2> GPB2 Pull-up Disable
  539. ;// <o2.1> GPB1 Pull-up Disable
  540. ;// <o2.0> GPB0 Pull-up Disable
  541. ;// </h>
  542. ;// </e>
  543. GPB_SETUP EQU 0
  544. GPBCON_Val EQU 0x00000000
  545. GPBUP_Val EQU 0x00000000
  546. ;// <e> Port C Settings
  547. ;// <h> Port C Control Register (GPCCON)
  548. ;// <o1.30..31> GPC15 <0=> Input <1=> Output <2=> VD[7] <3=> Reserved
  549. ;// <o1.28..29> GPC14 <0=> Input <1=> Output <2=> VD[6] <3=> Reserved
  550. ;// <o1.26..27> GPC13 <0=> Input <1=> Output <2=> VD[5] <3=> Reserved
  551. ;// <o1.24..25> GPC12 <0=> Input <1=> Output <2=> VD[4] <3=> Reserved
  552. ;// <o1.22..23> GPC11 <0=> Input <1=> Output <2=> VD[3] <3=> Reserved
  553. ;// <o1.20..21> GPC10 <0=> Input <1=> Output <2=> VD[2] <3=> Reserved
  554. ;// <o1.18..19> GPC9 <0=> Input <1=> Output <2=> VD[1] <3=> Reserved
  555. ;// <o1.16..17> GPC8 <0=> Input <1=> Output <2=> VD[0] <3=> Reserved
  556. ;// <o1.14..15> GPC7 <0=> Input <1=> Output <2=> LCD_LPCREVB <3=> Reserved
  557. ;// <o1.12..13> GPC6 <0=> Input <1=> Output <2=> LCD_LPCREV <3=> Reserved
  558. ;// <o1.10..11> GPC5 <0=> Input <1=> Output <2=> LCD_LPCOE <3=> Reserved
  559. ;// <o1.8..9> GPC4 <0=> Input <1=> Output <2=> VM <3=> I2SSDI
  560. ;// <o1.6..7> GPC3 <0=> Input <1=> Output <2=> VFRAME <3=> Reserved
  561. ;// <o1.4..5> GPC2 <0=> Input <1=> Output <2=> VLINE <3=> Reserved
  562. ;// <o1.2..3> GPC1 <0=> Input <1=> Output <2=> VCLK <3=> Reserved
  563. ;// <o1.0..1> GPC0 <0=> Input <1=> Output <2=> LEND <3=> Reserved
  564. ;// </h>
  565. ;// <h> Port C Pull-up Settings Register (GPCUP)
  566. ;// <o2.15> GPC15 Pull-up Disable
  567. ;// <o2.14> GPC14 Pull-up Disable
  568. ;// <o2.13> GPC13 Pull-up Disable
  569. ;// <o2.12> GPC12 Pull-up Disable
  570. ;// <o2.11> GPC11 Pull-up Disable
  571. ;// <o2.10> GPC10 Pull-up Disable
  572. ;// <o2.9> GPC9 Pull-up Disable
  573. ;// <o2.8> GPC8 Pull-up Disable
  574. ;// <o2.7> GPC7 Pull-up Disable
  575. ;// <o2.6> GPC6 Pull-up Disable
  576. ;// <o2.5> GPC5 Pull-up Disable
  577. ;// <o2.4> GPC4 Pull-up Disable
  578. ;// <o2.3> GPC3 Pull-up Disable
  579. ;// <o2.2> GPC2 Pull-up Disable
  580. ;// <o2.1> GPC1 Pull-up Disable
  581. ;// <o2.0> GPC0 Pull-up Disable
  582. ;// </h>
  583. ;// </e>
  584. GPC_SETUP EQU 0
  585. GPCCON_Val EQU 0x00000000
  586. GPCUP_Val EQU 0x00000000
  587. ;// <e> Port D Settings
  588. ;// <h> Port D Control Register (GPDCON)
  589. ;// <o1.30..31> GPD15 <0=> Input <1=> Output <2=> VD[23] <3=> nSS0
  590. ;// <o1.28..29> GPD14 <0=> Input <1=> Output <2=> VD[22] <3=> nSS1
  591. ;// <o1.26..27> GPD13 <0=> Input <1=> Output <2=> VD[21] <3=> Reserved
  592. ;// <o1.24..25> GPD12 <0=> Input <1=> Output <2=> VD[20] <3=> Reserved
  593. ;// <o1.22..23> GPD11 <0=> Input <1=> Output <2=> VD[19] <3=> Reserved
  594. ;// <o1.20..21> GPD10 <0=> Input <1=> Output <2=> VD[18] <3=> SPICLK1
  595. ;// <o1.18..19> GPD9 <0=> Input <1=> Output <2=> VD[17] <3=> SPIMOSI1
  596. ;// <o1.16..17> GPD8 <0=> Input <1=> Output <2=> VD[16] <3=> SPIMISO1
  597. ;// <o1.14..15> GPD7 <0=> Input <1=> Output <2=> VD[15] <3=> Reserved
  598. ;// <o1.12..13> GPD6 <0=> Input <1=> Output <2=> VD[14] <3=> Reserved
  599. ;// <o1.10..11> GPD5 <0=> Input <1=> Output <2=> VD[13] <3=> Reserved
  600. ;// <o1.8..9> GPD4 <0=> Input <1=> Output <2=> VD[12] <3=> Reserved
  601. ;// <o1.6..7> GPD3 <0=> Input <1=> Output <2=> VD[11] <3=> Reserved
  602. ;// <o1.4..5> GPD2 <0=> Input <1=> Output <2=> VD[10] <3=> Reserved
  603. ;// <o1.2..3> GPD1 <0=> Input <1=> Output <2=> VD[9] <3=> Reserved
  604. ;// <o1.0..1> GPD0 <0=> Input <1=> Output <2=> VD[8] <3=> Reserved
  605. ;// </h>
  606. ;// <h> Port D Pull-up Settings Register (GPDUP)
  607. ;// <o2.15> GPD15 Pull-up Disable
  608. ;// <o2.14> GPD14 Pull-up Disable
  609. ;// <o2.13> GPD13 Pull-up Disable
  610. ;// <o2.12> GPD12 Pull-up Disable
  611. ;// <o2.11> GPD11 Pull-up Disable
  612. ;// <o2.10> GPD10 Pull-up Disable
  613. ;// <o2.9> GPD9 Pull-up Disable
  614. ;// <o2.8> GPD8 Pull-up Disable
  615. ;// <o2.7> GPD7 Pull-up Disable
  616. ;// <o2.6> GPD6 Pull-up Disable
  617. ;// <o2.5> GPD5 Pull-up Disable
  618. ;// <o2.4> GPD4 Pull-up Disable
  619. ;// <o2.3> GPD3 Pull-up Disable
  620. ;// <o2.2> GPD2 Pull-up Disable
  621. ;// <o2.1> GPD1 Pull-up Disable
  622. ;// <o2.0> GPD0 Pull-up Disable
  623. ;// </h>
  624. ;// </e>
  625. GPD_SETUP EQU 0
  626. GPDCON_Val EQU 0x00000000
  627. GPDUP_Val EQU 0x00000000
  628. ;// <e> Port E Settings
  629. ;// <h> Port E Control Register (GPECON)
  630. ;// <o1.30..31> GPE15 <0=> Input <1=> Output <2=> IICSDA <3=> Reserved
  631. ;// <i> This pad is open-drain, and has no pull-up option.
  632. ;// <o1.28..29> GPE14 <0=> Input <1=> Output <2=> IICSCL <3=> Reserved
  633. ;// <i> This pad is open-drain, and has no pull-up option.
  634. ;// <o1.26..27> GPE13 <0=> Input <1=> Output <2=> SPICLK0 <3=> Reserved
  635. ;// <o1.24..25> GPE12 <0=> Input <1=> Output <2=> SPIMOSI0 <3=> Reserved
  636. ;// <o1.22..23> GPE11 <0=> Input <1=> Output <2=> SPIMISO0 <3=> Reserved
  637. ;// <o1.20..21> GPE10 <0=> Input <1=> Output <2=> SDDAT3 <3=> Reserved
  638. ;// <o1.18..19> GPE9 <0=> Input <1=> Output <2=> SDDAT2 <3=> Reserved
  639. ;// <o1.16..17> GPE8 <0=> Input <1=> Output <2=> SDDAT1 <3=> Reserved
  640. ;// <o1.14..15> GPE7 <0=> Input <1=> Output <2=> SDDAT0 <3=> Reserved
  641. ;// <o1.12..13> GPE6 <0=> Input <1=> Output <2=> SDCMD <3=> Reserved
  642. ;// <o1.10..11> GPE5 <0=> Input <1=> Output <2=> SDCLK <3=> Reserved
  643. ;// <o1.8..9> GPE4 <0=> Input <1=> Output <2=> I2SDO <3=> AC_SDATA_OUT
  644. ;// <o1.6..7> GPE3 <0=> Input <1=> Output <2=> I2SDI <3=> AC_SDATA_IN
  645. ;// <o1.4..5> GPE2 <0=> Input <1=> Output <2=> CDCLK <3=> AC_nRESET
  646. ;// <o1.2..3> GPE1 <0=> Input <1=> Output <2=> I2SSCLK <3=> AC_BIT_CLK
  647. ;// <o1.0..1> GPE0 <0=> Input <1=> Output <2=> I2SLRCK <3=> AC_SYNC
  648. ;// </h>
  649. ;// <h> Port E Pull-up Settings Register (GPEUP)
  650. ;// <o2.13> GPE13 Pull-up Disable
  651. ;// <o2.12> GPE12 Pull-up Disable
  652. ;// <o2.11> GPE11 Pull-up Disable
  653. ;// <o2.10> GPE10 Pull-up Disable
  654. ;// <o2.9> GPE9 Pull-up Disable
  655. ;// <o2.8> GPE8 Pull-up Disable
  656. ;// <o2.7> GPE7 Pull-up Disable
  657. ;// <o2.6> GPE6 Pull-up Disable
  658. ;// <o2.5> GPE5 Pull-up Disable
  659. ;// <o2.4> GPE4 Pull-up Disable
  660. ;// <o2.3> GPE3 Pull-up Disable
  661. ;// <o2.2> GPE2 Pull-up Disable
  662. ;// <o2.1> GPE1 Pull-up Disable
  663. ;// <o2.0> GPE0 Pull-up Disable
  664. ;// </h>
  665. ;// </e>
  666. GPE_SETUP EQU 0
  667. GPECON_Val EQU 0x00000000
  668. GPEUP_Val EQU 0x00000000
  669. ;// <e> Port F Settings
  670. ;// <h> Port F Control Register (GPFCON)
  671. ;// <o1.14..15> GPF7 <0=> Input <1=> Output <2=> EINT[7] <3=> Reserved
  672. ;// <o1.12..13> GPF6 <0=> Input <1=> Output <2=> EINT[6] <3=> Reserved
  673. ;// <o1.10..11> GPF5 <0=> Input <1=> Output <2=> EINT[5] <3=> Reserved
  674. ;// <o1.8..9> GPF4 <0=> Input <1=> Output <2=> EINT[4] <3=> Reserved
  675. ;// <o1.6..7> GPF3 <0=> Input <1=> Output <2=> EINT[3] <3=> Reserved
  676. ;// <o1.4..5> GPF2 <0=> Input <1=> Output <2=> EINT[2] <3=> Reserved
  677. ;// <o1.2..3> GPF1 <0=> Input <1=> Output <2=> EINT[1] <3=> Reserved
  678. ;// <o1.0..1> GPF0 <0=> Input <1=> Output <2=> EINT[0] <3=> Reserved
  679. ;// </h>
  680. ;// <h> Port F Pull-up Settings Register (GPFUP)
  681. ;// <o2.7> GPF7 Pull-up Disable
  682. ;// <o2.6> GPF6 Pull-up Disable
  683. ;// <o2.5> GPF5 Pull-up Disable
  684. ;// <o2.4> GPF4 Pull-up Disable
  685. ;// <o2.3> GPF3 Pull-up Disable
  686. ;// <o2.2> GPF2 Pull-up Disable
  687. ;// <o2.1> GPF1 Pull-up Disable
  688. ;// <o2.0> GPF0 Pull-up Disable
  689. ;// </h>
  690. ;// </e>
  691. GPF_SETUP EQU 0
  692. GPFCON_Val EQU 0x00000000
  693. GPFUP_Val EQU 0x00000000
  694. ;// <e> Port G Settings
  695. ;// <h> Port G Control Register (GPGCON)
  696. ;// <o1.30..31> GPG15 <0=> Input <1=> Output <2=> EINT[23] <3=> Reserved
  697. ;// <o1.28..29> GPG14 <0=> Input <1=> Output <2=> EINT[22] <3=> Reserved
  698. ;// <o1.26..27> GPG13 <0=> Input <1=> Output <2=> EINT[21] <3=> Reserved
  699. ;// <o1.24..25> GPG12 <0=> Input <1=> Output <2=> EINT[20] <3=> Reserved
  700. ;// <o1.22..23> GPG11 <0=> Input <1=> Output <2=> EINT[19] <3=> TCLK[1]
  701. ;// <o1.20..21> GPG10 <0=> Input <1=> Output <2=> EINT[18] <3=> nCTS1
  702. ;// <o1.18..19> GPG9 <0=> Input <1=> Output <2=> EINT[17] <3=> nRTS1
  703. ;// <o1.16..17> GPG8 <0=> Input <1=> Output <2=> EINT[16] <3=> Reserved
  704. ;// <o1.14..15> GPG7 <0=> Input <1=> Output <2=> EINT[15] <3=> SPICLK1
  705. ;// <o1.12..13> GPG6 <0=> Input <1=> Output <2=> EINT[14] <3=> SPIMOSI1
  706. ;// <o1.10..11> GPG5 <0=> Input <1=> Output <2=> EINT[13] <3=> SPIMISO1
  707. ;// <o1.8..9> GPG4 <0=> Input <1=> Output <2=> EINT[12] <3=> LCD_PWRDN
  708. ;// <o1.6..7> GPG3 <0=> Input <1=> Output <2=> EINT[11] <3=> nSS1
  709. ;// <o1.4..5> GPG2 <0=> Input <1=> Output <2=> EINT[10] <3=> nSS0
  710. ;// <o1.2..3> GPG1 <0=> Input <1=> Output <2=> EINT[9] <3=> Reserved
  711. ;// <o1.0..1> GPG0 <0=> Input <1=> Output <2=> EINT[8] <3=> Reserved
  712. ;// </h>
  713. ;// <h> Port G Pull-up Settings Register (GPGUP)
  714. ;// <o2.15> GPG15 Pull-up Disable
  715. ;// <o2.14> GPG14 Pull-up Disable
  716. ;// <o2.13> GPG13 Pull-up Disable
  717. ;// <o2.12> GPG12 Pull-up Disable
  718. ;// <o2.11> GPG11 Pull-up Disable
  719. ;// <o2.10> GPG10 Pull-up Disable
  720. ;// <o2.9> GPG9 Pull-up Disable
  721. ;// <o2.8> GPG8 Pull-up Disable
  722. ;// <o2.7> GPG7 Pull-up Disable
  723. ;// <o2.6> GPG6 Pull-up Disable
  724. ;// <o2.5> GPG5 Pull-up Disable
  725. ;// <o2.4> GPG4 Pull-up Disable
  726. ;// <o2.3> GPG3 Pull-up Disable
  727. ;// <o2.2> GPG2 Pull-up Disable
  728. ;// <o2.1> GPG1 Pull-up Disable
  729. ;// <o2.0> GPG0 Pull-up Disable
  730. ;// </h>
  731. ;// </e>
  732. GPG_SETUP EQU 0
  733. GPGCON_Val EQU 0x00000000
  734. GPGUP_Val EQU 0x00000000
  735. ;// <e> Port H Settings
  736. ;// <h> Port H Control Register (GPHCON)
  737. ;// <o1.20..21> GPH10 <0=> Input <1=> Output <2=> CLKOUT1 <3=> Reserved
  738. ;// <o1.18..19> GPH9 <0=> Input <1=> Output <2=> CLKOUT0 <3=> Reserved
  739. ;// <o1.16..17> GPH8 <0=> Input <1=> Output <2=> UEXTCLK <3=> Reserved
  740. ;// <o1.14..15> GPH7 <0=> Input <1=> Output <2=> RXD[2] <3=> nCTS1
  741. ;// <o1.12..13> GPH6 <0=> Input <1=> Output <2=> TXD[2] <3=> nRTS1
  742. ;// <o1.10..11> GPH5 <0=> Input <1=> Output <2=> RXD[1] <3=> Reserved
  743. ;// <o1.8..9> GPH4 <0=> Input <1=> Output <2=> TXD[1] <3=> Reserved
  744. ;// <o1.6..7> GPH3 <0=> Input <1=> Output <2=> RXD[0] <3=> Reserved
  745. ;// <o1.4..5> GPH2 <0=> Input <1=> Output <2=> TXD[0] <3=> Reserved
  746. ;// <o1.2..3> GPH1 <0=> Input <1=> Output <2=> nRTS0 <3=> Reserved
  747. ;// <o1.0..1> GPH0 <0=> Input <1=> Output <2=> nCTS0 <3=> Reserved
  748. ;// </h>
  749. ;// <h> Port H Pull-up Settings Register (GPHUP)
  750. ;// <o2.10> GPH10 Pull-up Disable
  751. ;// <o2.9> GPH9 Pull-up Disable
  752. ;// <o2.8> GPH8 Pull-up Disable
  753. ;// <o2.7> GPH7 Pull-up Disable
  754. ;// <o2.6> GPH6 Pull-up Disable
  755. ;// <o2.5> GPH5 Pull-up Disable
  756. ;// <o2.4> GPH4 Pull-up Disable
  757. ;// <o2.3> GPH3 Pull-up Disable
  758. ;// <o2.2> GPH2 Pull-up Disable
  759. ;// <o2.1> GPH1 Pull-up Disable
  760. ;// <o2.0> GPH0 Pull-up Disable
  761. ;// </h>
  762. ;// </e>
  763. GPH_SETUP EQU 0
  764. GPHCON_Val EQU 0x00000000
  765. GPHUP_Val EQU 0x00000000
  766. ;// <e> Port J Settings
  767. ;// <h> Port J Control Register (GPJCON)
  768. ;// <o1.24..25> GPJ12 <0=> Input <1=> Output <2=> CAMRESET <3=> Reserved
  769. ;// <o1.22..23> GPJ11 <0=> Input <1=> Output <2=> CAMCLKOUT <3=> Reserved
  770. ;// <o1.20..21> GPJ10 <0=> Input <1=> Output <2=> CAMHREF <3=> Reserved
  771. ;// <o1.18..19> GPJ9 <0=> Input <1=> Output <2=> CAMVSYNC <3=> Reserved
  772. ;// <o1.16..17> GPJ8 <0=> Input <1=> Output <2=> CAMPCLK <3=> Reserved
  773. ;// <o1.14..15> GPJ7 <0=> Input <1=> Output <2=> CAMDATA[7] <3=> Reserved
  774. ;// <o1.12..13> GPJ6 <0=> Input <1=> Output <2=> CAMDATA[6] <3=> Reserved
  775. ;// <o1.10..11> GPJ5 <0=> Input <1=> Output <2=> CAMDATA[5] <3=> Reserved
  776. ;// <o1.8..9> GPJ4 <0=> Input <1=> Output <2=> CAMDATA[4] <3=> Reserved
  777. ;// <o1.6..7> GPJ3 <0=> Input <1=> Output <2=> CAMDATA[3] <3=> Reserved
  778. ;// <o1.4..5> GPJ2 <0=> Input <1=> Output <2=> CAMDATA[2] <3=> Reserved
  779. ;// <o1.2..3> GPJ1 <0=> Input <1=> Output <2=> CAMDATA[1] <3=> Reserved
  780. ;// <o1.0..1> GPJ0 <0=> Input <1=> Output <2=> CAMDATA[0] <3=> Reserved
  781. ;// </h>
  782. ;// <h> Port J Pull-up Settings Register (GPJUP)
  783. ;// <o2.12> GPJ12 Pull-up Disable
  784. ;// <o2.11> GPJ11 Pull-up Disable
  785. ;// <o2.10> GPJ10 Pull-up Disable
  786. ;// <o2.9> GPJ9 Pull-up Disable
  787. ;// <o2.8> GPJ8 Pull-up Disable
  788. ;// <o2.7> GPJ7 Pull-up Disable
  789. ;// <o2.6> GPJ6 Pull-up Disable
  790. ;// <o2.5> GPJ5 Pull-up Disable
  791. ;// <o2.4> GPJ4 Pull-up Disable
  792. ;// <o2.3> GPJ3 Pull-up Disable
  793. ;// <o2.2> GPJ2 Pull-up Disable
  794. ;// <o2.1> GPJ1 Pull-up Disable
  795. ;// <o2.0> GPJ0 Pull-up Disable
  796. ;// </h>
  797. ;// </e>
  798. GPJ_SETUP EQU 0
  799. GPJCON_Val EQU 0x00000000
  800. GPJUP_Val EQU 0x00000000
  801. ;// </e> I/O Setup
  802. END