config.inc 41 KB

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