hw_epi.h 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. //*****************************************************************************
  2. //
  3. // hw_epi.h - Macros for use in accessing the EPI registers.
  4. //
  5. // Copyright (c) 2008-2014 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions
  10. // are met:
  11. //
  12. // Redistributions of source code must retain the above copyright
  13. // notice, this list of conditions and the following disclaimer.
  14. //
  15. // Redistributions in binary form must reproduce the above copyright
  16. // notice, this list of conditions and the following disclaimer in the
  17. // documentation and/or other materials provided with the
  18. // distribution.
  19. //
  20. // Neither the name of Texas Instruments Incorporated nor the names of
  21. // its contributors may be used to endorse or promote products derived
  22. // from this software without specific prior written permission.
  23. //
  24. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. //
  36. // This is part of revision 2.1.0.12573 of the Tiva Firmware Development Package.
  37. //
  38. //*****************************************************************************
  39. #ifndef __HW_EPI_H__
  40. #define __HW_EPI_H__
  41. //*****************************************************************************
  42. //
  43. // The following are defines for the External Peripheral Interface register
  44. // offsets.
  45. //
  46. //*****************************************************************************
  47. #define EPI_O_CFG 0x00000000 // EPI Configuration
  48. #define EPI_O_BAUD 0x00000004 // EPI Main Baud Rate
  49. #define EPI_O_BAUD2 0x00000008 // EPI Main Baud Rate
  50. #define EPI_O_HB16CFG 0x00000010 // EPI Host-Bus 16 Configuration
  51. #define EPI_O_GPCFG 0x00000010 // EPI General-Purpose
  52. // Configuration
  53. #define EPI_O_SDRAMCFG 0x00000010 // EPI SDRAM Configuration
  54. #define EPI_O_HB8CFG 0x00000010 // EPI Host-Bus 8 Configuration
  55. #define EPI_O_HB8CFG2 0x00000014 // EPI Host-Bus 8 Configuration 2
  56. #define EPI_O_HB16CFG2 0x00000014 // EPI Host-Bus 16 Configuration 2
  57. #define EPI_O_ADDRMAP 0x0000001C // EPI Address Map
  58. #define EPI_O_RSIZE0 0x00000020 // EPI Read Size 0
  59. #define EPI_O_RADDR0 0x00000024 // EPI Read Address 0
  60. #define EPI_O_RPSTD0 0x00000028 // EPI Non-Blocking Read Data 0
  61. #define EPI_O_RSIZE1 0x00000030 // EPI Read Size 1
  62. #define EPI_O_RADDR1 0x00000034 // EPI Read Address 1
  63. #define EPI_O_RPSTD1 0x00000038 // EPI Non-Blocking Read Data 1
  64. #define EPI_O_STAT 0x00000060 // EPI Status
  65. #define EPI_O_RFIFOCNT 0x0000006C // EPI Read FIFO Count
  66. #define EPI_O_READFIFO0 0x00000070 // EPI Read FIFO
  67. #define EPI_O_READFIFO1 0x00000074 // EPI Read FIFO Alias 1
  68. #define EPI_O_READFIFO2 0x00000078 // EPI Read FIFO Alias 2
  69. #define EPI_O_READFIFO3 0x0000007C // EPI Read FIFO Alias 3
  70. #define EPI_O_READFIFO4 0x00000080 // EPI Read FIFO Alias 4
  71. #define EPI_O_READFIFO5 0x00000084 // EPI Read FIFO Alias 5
  72. #define EPI_O_READFIFO6 0x00000088 // EPI Read FIFO Alias 6
  73. #define EPI_O_READFIFO7 0x0000008C // EPI Read FIFO Alias 7
  74. #define EPI_O_FIFOLVL 0x00000200 // EPI FIFO Level Selects
  75. #define EPI_O_WFIFOCNT 0x00000204 // EPI Write FIFO Count
  76. #define EPI_O_DMATXCNT 0x00000208 // EPI DMA Transmit Count
  77. #define EPI_O_IM 0x00000210 // EPI Interrupt Mask
  78. #define EPI_O_RIS 0x00000214 // EPI Raw Interrupt Status
  79. #define EPI_O_MIS 0x00000218 // EPI Masked Interrupt Status
  80. #define EPI_O_EISC 0x0000021C // EPI Error and Interrupt Status
  81. // and Clear
  82. #define EPI_O_HB8CFG3 0x00000308 // EPI Host-Bus 8 Configuration 3
  83. #define EPI_O_HB16CFG3 0x00000308 // EPI Host-Bus 16 Configuration 3
  84. #define EPI_O_HB16CFG4 0x0000030C // EPI Host-Bus 16 Configuration 4
  85. #define EPI_O_HB8CFG4 0x0000030C // EPI Host-Bus 8 Configuration 4
  86. #define EPI_O_HB8TIME 0x00000310 // EPI Host-Bus 8 Timing Extension
  87. #define EPI_O_HB16TIME 0x00000310 // EPI Host-Bus 16 Timing Extension
  88. #define EPI_O_HB8TIME2 0x00000314 // EPI Host-Bus 8 Timing Extension
  89. #define EPI_O_HB16TIME2 0x00000314 // EPI Host-Bus 16 Timing Extension
  90. #define EPI_O_HB16TIME3 0x00000318 // EPI Host-Bus 16 Timing Extension
  91. #define EPI_O_HB8TIME3 0x00000318 // EPI Host-Bus 8 Timing Extension
  92. #define EPI_O_HB8TIME4 0x0000031C // EPI Host-Bus 8 Timing Extension
  93. #define EPI_O_HB16TIME4 0x0000031C // EPI Host-Bus 16 Timing Extension
  94. #define EPI_O_HBPSRAM 0x00000360 // EPI Host-Bus PSRAM
  95. //*****************************************************************************
  96. //
  97. // The following are defines for the bit fields in the EPI_O_CFG register.
  98. //
  99. //*****************************************************************************
  100. #define EPI_CFG_INTDIV 0x00000100 // Integer Clock Divider Enable
  101. #define EPI_CFG_BLKEN 0x00000010 // Block Enable
  102. #define EPI_CFG_MODE_M 0x0000000F // Mode Select
  103. #define EPI_CFG_MODE_NONE 0x00000000 // General Purpose
  104. #define EPI_CFG_MODE_SDRAM 0x00000001 // SDRAM
  105. #define EPI_CFG_MODE_HB8 0x00000002 // 8-Bit Host-Bus (HB8)
  106. #define EPI_CFG_MODE_HB16 0x00000003 // 16-Bit Host-Bus (HB16)
  107. //*****************************************************************************
  108. //
  109. // The following are defines for the bit fields in the EPI_O_BAUD register.
  110. //
  111. //*****************************************************************************
  112. #define EPI_BAUD_COUNT1_M 0xFFFF0000 // Baud Rate Counter 1
  113. #define EPI_BAUD_COUNT0_M 0x0000FFFF // Baud Rate Counter 0
  114. #define EPI_BAUD_COUNT1_S 16
  115. #define EPI_BAUD_COUNT0_S 0
  116. //*****************************************************************************
  117. //
  118. // The following are defines for the bit fields in the EPI_O_BAUD2 register.
  119. //
  120. //*****************************************************************************
  121. #define EPI_BAUD2_COUNT1_M 0xFFFF0000 // CS3n Baud Rate Counter 1
  122. #define EPI_BAUD2_COUNT0_M 0x0000FFFF // CS2n Baud Rate Counter 0
  123. #define EPI_BAUD2_COUNT1_S 16
  124. #define EPI_BAUD2_COUNT0_S 0
  125. //*****************************************************************************
  126. //
  127. // The following are defines for the bit fields in the EPI_O_HB16CFG register.
  128. //
  129. //*****************************************************************************
  130. #define EPI_HB16CFG_CLKGATE 0x80000000 // Clock Gated
  131. #define EPI_HB16CFG_CLKGATEI 0x40000000 // Clock Gated Idle
  132. #define EPI_HB16CFG_CLKINV 0x20000000 // Invert Output Clock Enable
  133. #define EPI_HB16CFG_RDYEN 0x10000000 // Input Ready Enable
  134. #define EPI_HB16CFG_IRDYINV 0x08000000 // Input Ready Invert
  135. #define EPI_HB16CFG_XFFEN 0x00800000 // External FIFO FULL Enable
  136. #define EPI_HB16CFG_XFEEN 0x00400000 // External FIFO EMPTY Enable
  137. #define EPI_HB16CFG_WRHIGH 0x00200000 // WRITE Strobe Polarity
  138. #define EPI_HB16CFG_RDHIGH 0x00100000 // READ Strobe Polarity
  139. #define EPI_HB16CFG_ALEHIGH 0x00080000 // ALE Strobe Polarity
  140. #define EPI_HB16CFG_WRCRE 0x00040000 // PSRAM Configuration Register
  141. // Write
  142. #define EPI_HB16CFG_RDCRE 0x00020000 // PSRAM Configuration Register
  143. // Read
  144. #define EPI_HB16CFG_BURST 0x00010000 // Burst Mode
  145. #define EPI_HB16CFG_MAXWAIT_M 0x0000FF00 // Maximum Wait
  146. #define EPI_HB16CFG_WRWS_M 0x000000C0 // Write Wait States
  147. #define EPI_HB16CFG_WRWS_2 0x00000000 // Active WRn is 2 EPI clocks
  148. #define EPI_HB16CFG_WRWS_4 0x00000040 // Active WRn is 4 EPI clocks
  149. #define EPI_HB16CFG_WRWS_6 0x00000080 // Active WRn is 6 EPI clocks
  150. #define EPI_HB16CFG_WRWS_8 0x000000C0 // Active WRn is 8 EPI clocks
  151. #define EPI_HB16CFG_RDWS_M 0x00000030 // Read Wait States
  152. #define EPI_HB16CFG_RDWS_2 0x00000000 // Active RDn is 2 EPI clocks
  153. #define EPI_HB16CFG_RDWS_4 0x00000010 // Active RDn is 4 EPI clocks
  154. #define EPI_HB16CFG_RDWS_6 0x00000020 // Active RDn is 6 EPI clocks
  155. #define EPI_HB16CFG_RDWS_8 0x00000030 // Active RDn is 8 EPI clocks
  156. #define EPI_HB16CFG_BSEL 0x00000004 // Byte Select Configuration
  157. #define EPI_HB16CFG_MODE_M 0x00000003 // Host Bus Sub-Mode
  158. #define EPI_HB16CFG_MODE_ADMUX 0x00000000 // ADMUX - AD[15:0]
  159. #define EPI_HB16CFG_MODE_ADNMUX 0x00000001 // ADNONMUX - D[15:0]
  160. #define EPI_HB16CFG_MODE_SRAM 0x00000002 // Continuous Read - D[15:0]
  161. #define EPI_HB16CFG_MODE_XFIFO 0x00000003 // XFIFO - D[15:0]
  162. #define EPI_HB16CFG_MAXWAIT_S 8
  163. //*****************************************************************************
  164. //
  165. // The following are defines for the bit fields in the EPI_O_GPCFG register.
  166. //
  167. //*****************************************************************************
  168. #define EPI_GPCFG_CLKPIN 0x80000000 // Clock Pin
  169. #define EPI_GPCFG_CLKGATE 0x40000000 // Clock Gated
  170. #define EPI_GPCFG_FRM50 0x04000000 // 50/50 Frame
  171. #define EPI_GPCFG_FRMCNT_M 0x03C00000 // Frame Count
  172. #define EPI_GPCFG_WR2CYC 0x00080000 // 2-Cycle Writes
  173. #define EPI_GPCFG_ASIZE_M 0x00000030 // Address Bus Size
  174. #define EPI_GPCFG_ASIZE_NONE 0x00000000 // No address
  175. #define EPI_GPCFG_ASIZE_4BIT 0x00000010 // Up to 4 bits wide
  176. #define EPI_GPCFG_ASIZE_12BIT 0x00000020 // Up to 12 bits wide. This size
  177. // cannot be used with 24-bit data
  178. #define EPI_GPCFG_ASIZE_20BIT 0x00000030 // Up to 20 bits wide. This size
  179. // cannot be used with data sizes
  180. // other than 8
  181. #define EPI_GPCFG_DSIZE_M 0x00000003 // Size of Data Bus
  182. #define EPI_GPCFG_DSIZE_4BIT 0x00000000 // 8 Bits Wide (EPI0S0 to EPI0S7)
  183. #define EPI_GPCFG_DSIZE_16BIT 0x00000001 // 16 Bits Wide (EPI0S0 to EPI0S15)
  184. #define EPI_GPCFG_DSIZE_24BIT 0x00000002 // 24 Bits Wide (EPI0S0 to EPI0S23)
  185. #define EPI_GPCFG_DSIZE_32BIT 0x00000003 // 32 Bits Wide (EPI0S0 to EPI0S31)
  186. #define EPI_GPCFG_FRMCNT_S 22
  187. //*****************************************************************************
  188. //
  189. // The following are defines for the bit fields in the EPI_O_SDRAMCFG register.
  190. //
  191. //*****************************************************************************
  192. #define EPI_SDRAMCFG_FREQ_M 0xC0000000 // EPI Frequency Range
  193. #define EPI_SDRAMCFG_FREQ_NONE 0x00000000 // 0 - 15 MHz
  194. #define EPI_SDRAMCFG_FREQ_15MHZ 0x40000000 // 15 - 30 MHz
  195. #define EPI_SDRAMCFG_FREQ_30MHZ 0x80000000 // 30 - 50 MHz
  196. #define EPI_SDRAMCFG_RFSH_M 0x07FF0000 // Refresh Counter
  197. #define EPI_SDRAMCFG_SLEEP 0x00000200 // Sleep Mode
  198. #define EPI_SDRAMCFG_SIZE_M 0x00000003 // Size of SDRAM
  199. #define EPI_SDRAMCFG_SIZE_8MB 0x00000000 // 64 megabits (8MB)
  200. #define EPI_SDRAMCFG_SIZE_16MB 0x00000001 // 128 megabits (16MB)
  201. #define EPI_SDRAMCFG_SIZE_32MB 0x00000002 // 256 megabits (32MB)
  202. #define EPI_SDRAMCFG_SIZE_64MB 0x00000003 // 512 megabits (64MB)
  203. #define EPI_SDRAMCFG_RFSH_S 16
  204. //*****************************************************************************
  205. //
  206. // The following are defines for the bit fields in the EPI_O_HB8CFG register.
  207. //
  208. //*****************************************************************************
  209. #define EPI_HB8CFG_CLKGATE 0x80000000 // Clock Gated
  210. #define EPI_HB8CFG_CLKGATEI 0x40000000 // Clock Gated when Idle
  211. #define EPI_HB8CFG_CLKINV 0x20000000 // Invert Output Clock Enable
  212. #define EPI_HB8CFG_RDYEN 0x10000000 // Input Ready Enable
  213. #define EPI_HB8CFG_IRDYINV 0x08000000 // Input Ready Invert
  214. #define EPI_HB8CFG_XFFEN 0x00800000 // External FIFO FULL Enable
  215. #define EPI_HB8CFG_XFEEN 0x00400000 // External FIFO EMPTY Enable
  216. #define EPI_HB8CFG_WRHIGH 0x00200000 // WRITE Strobe Polarity
  217. #define EPI_HB8CFG_RDHIGH 0x00100000 // READ Strobe Polarity
  218. #define EPI_HB8CFG_ALEHIGH 0x00080000 // ALE Strobe Polarity
  219. #define EPI_HB8CFG_MAXWAIT_M 0x0000FF00 // Maximum Wait
  220. #define EPI_HB8CFG_WRWS_M 0x000000C0 // Write Wait States
  221. #define EPI_HB8CFG_WRWS_2 0x00000000 // Active WRn is 2 EPI clocks
  222. #define EPI_HB8CFG_WRWS_4 0x00000040 // Active WRn is 4 EPI clocks
  223. #define EPI_HB8CFG_WRWS_6 0x00000080 // Active WRn is 6 EPI clocks
  224. #define EPI_HB8CFG_WRWS_8 0x000000C0 // Active WRn is 8 EPI clocks
  225. #define EPI_HB8CFG_RDWS_M 0x00000030 // Read Wait States
  226. #define EPI_HB8CFG_RDWS_2 0x00000000 // Active RDn is 2 EPI clocks
  227. #define EPI_HB8CFG_RDWS_4 0x00000010 // Active RDn is 4 EPI clocks
  228. #define EPI_HB8CFG_RDWS_6 0x00000020 // Active RDn is 6 EPI clocks
  229. #define EPI_HB8CFG_RDWS_8 0x00000030 // Active RDn is 8 EPI clocks
  230. #define EPI_HB8CFG_MODE_M 0x00000003 // Host Bus Sub-Mode
  231. #define EPI_HB8CFG_MODE_MUX 0x00000000 // ADMUX - AD[7:0]
  232. #define EPI_HB8CFG_MODE_NMUX 0x00000001 // ADNONMUX - D[7:0]
  233. #define EPI_HB8CFG_MODE_SRAM 0x00000002 // Continuous Read - D[7:0]
  234. #define EPI_HB8CFG_MODE_FIFO 0x00000003 // XFIFO - D[7:0]
  235. #define EPI_HB8CFG_MAXWAIT_S 8
  236. //*****************************************************************************
  237. //
  238. // The following are defines for the bit fields in the EPI_O_HB8CFG2 register.
  239. //
  240. //*****************************************************************************
  241. #define EPI_HB8CFG2_CSCFGEXT 0x08000000 // Chip Select Extended
  242. // Configuration
  243. #define EPI_HB8CFG2_CSBAUD 0x04000000 // Chip Select Baud Rate and
  244. // Multiple Sub-Mode Configuration
  245. // enable
  246. #define EPI_HB8CFG2_CSCFG_M 0x03000000 // Chip Select Configuration
  247. #define EPI_HB8CFG2_CSCFG_ALE 0x00000000 // ALE Configuration
  248. #define EPI_HB8CFG2_CSCFG_CS 0x01000000 // CSn Configuration
  249. #define EPI_HB8CFG2_CSCFG_DCS 0x02000000 // Dual CSn Configuration
  250. #define EPI_HB8CFG2_CSCFG_ADCS 0x03000000 // ALE with Dual CSn Configuration
  251. #define EPI_HB8CFG2_WRHIGH 0x00200000 // CS1n WRITE Strobe Polarity
  252. #define EPI_HB8CFG2_RDHIGH 0x00100000 // CS1n READ Strobe Polarity
  253. #define EPI_HB8CFG2_ALEHIGH 0x00080000 // CS1n ALE Strobe Polarity
  254. #define EPI_HB8CFG2_WRWS_M 0x000000C0 // CS1n Write Wait States
  255. #define EPI_HB8CFG2_WRWS_2 0x00000000 // Active WRn is 2 EPI clocks
  256. #define EPI_HB8CFG2_WRWS_4 0x00000040 // Active WRn is 4 EPI clocks
  257. #define EPI_HB8CFG2_WRWS_6 0x00000080 // Active WRn is 6 EPI clocks
  258. #define EPI_HB8CFG2_WRWS_8 0x000000C0 // Active WRn is 8 EPI clocks
  259. #define EPI_HB8CFG2_RDWS_M 0x00000030 // CS1n Read Wait States
  260. #define EPI_HB8CFG2_RDWS_2 0x00000000 // Active RDn is 2 EPI clocks
  261. #define EPI_HB8CFG2_RDWS_4 0x00000010 // Active RDn is 4 EPI clocks
  262. #define EPI_HB8CFG2_RDWS_6 0x00000020 // Active RDn is 6 EPI clocks
  263. #define EPI_HB8CFG2_RDWS_8 0x00000030 // Active RDn is 8 EPI clocks
  264. #define EPI_HB8CFG2_MODE_M 0x00000003 // CS1n Host Bus Sub-Mode
  265. #define EPI_HB8CFG2_MODE_ADMUX 0x00000000 // ADMUX - AD[7:0]
  266. #define EPI_HB8CFG2_MODE_AD 0x00000001 // ADNONMUX - D[7:0]
  267. //*****************************************************************************
  268. //
  269. // The following are defines for the bit fields in the EPI_O_HB16CFG2 register.
  270. //
  271. //*****************************************************************************
  272. #define EPI_HB16CFG2_CSCFGEXT 0x08000000 // Chip Select Extended
  273. // Configuration
  274. #define EPI_HB16CFG2_CSBAUD 0x04000000 // Chip Select Baud Rate and
  275. // Multiple Sub-Mode Configuration
  276. // enable
  277. #define EPI_HB16CFG2_CSCFG_M 0x03000000 // Chip Select Configuration
  278. #define EPI_HB16CFG2_CSCFG_ALE 0x00000000 // ALE Configuration
  279. #define EPI_HB16CFG2_CSCFG_CS 0x01000000 // CSn Configuration
  280. #define EPI_HB16CFG2_CSCFG_DCS 0x02000000 // Dual CSn Configuration
  281. #define EPI_HB16CFG2_CSCFG_ADCS 0x03000000 // ALE with Dual CSn Configuration
  282. #define EPI_HB16CFG2_WRHIGH 0x00200000 // CS1n WRITE Strobe Polarity
  283. #define EPI_HB16CFG2_RDHIGH 0x00100000 // CS1n READ Strobe Polarity
  284. #define EPI_HB16CFG2_ALEHIGH 0x00080000 // CS1n ALE Strobe Polarity
  285. #define EPI_HB16CFG2_WRCRE 0x00040000 // CS1n PSRAM Configuration
  286. // Register Write
  287. #define EPI_HB16CFG2_RDCRE 0x00020000 // CS1n PSRAM Configuration
  288. // Register Read
  289. #define EPI_HB16CFG2_BURST 0x00010000 // CS1n Burst Mode
  290. #define EPI_HB16CFG2_WRWS_M 0x000000C0 // CS1n Write Wait States
  291. #define EPI_HB16CFG2_WRWS_2 0x00000000 // Active WRn is 2 EPI clocks
  292. #define EPI_HB16CFG2_WRWS_4 0x00000040 // Active WRn is 4 EPI clocks
  293. #define EPI_HB16CFG2_WRWS_6 0x00000080 // Active WRn is 6 EPI clocks
  294. #define EPI_HB16CFG2_WRWS_8 0x000000C0 // Active WRn is 8 EPI clocks
  295. #define EPI_HB16CFG2_RDWS_M 0x00000030 // CS1n Read Wait States
  296. #define EPI_HB16CFG2_RDWS_2 0x00000000 // Active RDn is 2 EPI clocks
  297. #define EPI_HB16CFG2_RDWS_4 0x00000010 // Active RDn is 4 EPI clocks
  298. #define EPI_HB16CFG2_RDWS_6 0x00000020 // Active RDn is 6 EPI clocks
  299. #define EPI_HB16CFG2_RDWS_8 0x00000030 // Active RDn is 8 EPI clocks
  300. #define EPI_HB16CFG2_MODE_M 0x00000003 // CS1n Host Bus Sub-Mode
  301. #define EPI_HB16CFG2_MODE_ADMUX 0x00000000 // ADMUX - AD[15:0]
  302. #define EPI_HB16CFG2_MODE_AD 0x00000001 // ADNONMUX - D[15:0]
  303. //*****************************************************************************
  304. //
  305. // The following are defines for the bit fields in the EPI_O_ADDRMAP register.
  306. //
  307. //*****************************************************************************
  308. #define EPI_ADDRMAP_ECSZ_M 0x00000C00 // External Code Size
  309. #define EPI_ADDRMAP_ECSZ_256B 0x00000000 // 256 bytes; lower address range:
  310. // 0x00 to 0xFF
  311. #define EPI_ADDRMAP_ECSZ_64KB 0x00000400 // 64 KB; lower address range:
  312. // 0x0000 to 0xFFFF
  313. #define EPI_ADDRMAP_ECSZ_16MB 0x00000800 // 16 MB; lower address range:
  314. // 0x00.0000 to 0xFF.FFFF
  315. #define EPI_ADDRMAP_ECSZ_256MB 0x00000C00 // 256MB; lower address range:
  316. // 0x000.0000 to 0x0FFF.FFFF
  317. #define EPI_ADDRMAP_ECADR_M 0x00000300 // External Code Address
  318. #define EPI_ADDRMAP_ECADR_NONE 0x00000000 // Not mapped
  319. #define EPI_ADDRMAP_ECADR_1000 0x00000100 // At 0x1000.0000
  320. #define EPI_ADDRMAP_EPSZ_M 0x000000C0 // External Peripheral Size
  321. #define EPI_ADDRMAP_EPSZ_256B 0x00000000 // 256 bytes; lower address range:
  322. // 0x00 to 0xFF
  323. #define EPI_ADDRMAP_EPSZ_64KB 0x00000040 // 64 KB; lower address range:
  324. // 0x0000 to 0xFFFF
  325. #define EPI_ADDRMAP_EPSZ_16MB 0x00000080 // 16 MB; lower address range:
  326. // 0x00.0000 to 0xFF.FFFF
  327. #define EPI_ADDRMAP_EPSZ_256MB 0x000000C0 // 256 MB; lower address range:
  328. // 0x000.0000 to 0xFFF.FFFF
  329. #define EPI_ADDRMAP_EPADR_M 0x00000030 // External Peripheral Address
  330. #define EPI_ADDRMAP_EPADR_NONE 0x00000000 // Not mapped
  331. #define EPI_ADDRMAP_EPADR_A000 0x00000010 // At 0xA000.0000
  332. #define EPI_ADDRMAP_EPADR_C000 0x00000020 // At 0xC000.0000
  333. #define EPI_ADDRMAP_EPADR_HBQS 0x00000030 // Only to be used with Host Bus
  334. // quad chip select. In quad chip
  335. // select mode, CS2n maps to
  336. // 0xA000.0000 and CS3n maps to
  337. // 0xC000.0000
  338. #define EPI_ADDRMAP_ERSZ_M 0x0000000C // External RAM Size
  339. #define EPI_ADDRMAP_ERSZ_256B 0x00000000 // 256 bytes; lower address range:
  340. // 0x00 to 0xFF
  341. #define EPI_ADDRMAP_ERSZ_64KB 0x00000004 // 64 KB; lower address range:
  342. // 0x0000 to 0xFFFF
  343. #define EPI_ADDRMAP_ERSZ_16MB 0x00000008 // 16 MB; lower address range:
  344. // 0x00.0000 to 0xFF.FFFF
  345. #define EPI_ADDRMAP_ERSZ_256MB 0x0000000C // 256 MB; lower address range:
  346. // 0x000.0000 to 0xFFF.FFFF
  347. #define EPI_ADDRMAP_ERADR_M 0x00000003 // External RAM Address
  348. #define EPI_ADDRMAP_ERADR_NONE 0x00000000 // Not mapped
  349. #define EPI_ADDRMAP_ERADR_6000 0x00000001 // At 0x6000.0000
  350. #define EPI_ADDRMAP_ERADR_8000 0x00000002 // At 0x8000.0000
  351. #define EPI_ADDRMAP_ERADR_HBQS 0x00000003 // Only to be used with Host Bus
  352. // quad chip select. In quad chip
  353. // select mode, CS0n maps to
  354. // 0x6000.0000 and CS1n maps to
  355. // 0x8000.0000
  356. //*****************************************************************************
  357. //
  358. // The following are defines for the bit fields in the EPI_O_RSIZE0 register.
  359. //
  360. //*****************************************************************************
  361. #define EPI_RSIZE0_SIZE_M 0x00000003 // Current Size
  362. #define EPI_RSIZE0_SIZE_8BIT 0x00000001 // Byte (8 bits)
  363. #define EPI_RSIZE0_SIZE_16BIT 0x00000002 // Half-word (16 bits)
  364. #define EPI_RSIZE0_SIZE_32BIT 0x00000003 // Word (32 bits)
  365. //*****************************************************************************
  366. //
  367. // The following are defines for the bit fields in the EPI_O_RADDR0 register.
  368. //
  369. //*****************************************************************************
  370. #define EPI_RADDR0_ADDR_M 0xFFFFFFFF // Current Address
  371. #define EPI_RADDR0_ADDR_S 0
  372. //*****************************************************************************
  373. //
  374. // The following are defines for the bit fields in the EPI_O_RPSTD0 register.
  375. //
  376. //*****************************************************************************
  377. #define EPI_RPSTD0_POSTCNT_M 0x00001FFF // Post Count
  378. #define EPI_RPSTD0_POSTCNT_S 0
  379. //*****************************************************************************
  380. //
  381. // The following are defines for the bit fields in the EPI_O_RSIZE1 register.
  382. //
  383. //*****************************************************************************
  384. #define EPI_RSIZE1_SIZE_M 0x00000003 // Current Size
  385. #define EPI_RSIZE1_SIZE_8BIT 0x00000001 // Byte (8 bits)
  386. #define EPI_RSIZE1_SIZE_16BIT 0x00000002 // Half-word (16 bits)
  387. #define EPI_RSIZE1_SIZE_32BIT 0x00000003 // Word (32 bits)
  388. //*****************************************************************************
  389. //
  390. // The following are defines for the bit fields in the EPI_O_RADDR1 register.
  391. //
  392. //*****************************************************************************
  393. #define EPI_RADDR1_ADDR_M 0xFFFFFFFF // Current Address
  394. #define EPI_RADDR1_ADDR_S 0
  395. //*****************************************************************************
  396. //
  397. // The following are defines for the bit fields in the EPI_O_RPSTD1 register.
  398. //
  399. //*****************************************************************************
  400. #define EPI_RPSTD1_POSTCNT_M 0x00001FFF // Post Count
  401. #define EPI_RPSTD1_POSTCNT_S 0
  402. //*****************************************************************************
  403. //
  404. // The following are defines for the bit fields in the EPI_O_STAT register.
  405. //
  406. //*****************************************************************************
  407. #define EPI_STAT_XFFULL 0x00000100 // External FIFO Full
  408. #define EPI_STAT_XFEMPTY 0x00000080 // External FIFO Empty
  409. #define EPI_STAT_INITSEQ 0x00000040 // Initialization Sequence
  410. #define EPI_STAT_WBUSY 0x00000020 // Write Busy
  411. #define EPI_STAT_NBRBUSY 0x00000010 // Non-Blocking Read Busy
  412. #define EPI_STAT_ACTIVE 0x00000001 // Register Active
  413. //*****************************************************************************
  414. //
  415. // The following are defines for the bit fields in the EPI_O_RFIFOCNT register.
  416. //
  417. //*****************************************************************************
  418. #define EPI_RFIFOCNT_COUNT_M 0x0000000F // FIFO Count
  419. #define EPI_RFIFOCNT_COUNT_S 0
  420. //*****************************************************************************
  421. //
  422. // The following are defines for the bit fields in the EPI_O_READFIFO0
  423. // register.
  424. //
  425. //*****************************************************************************
  426. #define EPI_READFIFO0_DATA_M 0xFFFFFFFF // Reads Data
  427. #define EPI_READFIFO0_DATA_S 0
  428. //*****************************************************************************
  429. //
  430. // The following are defines for the bit fields in the EPI_O_READFIFO1
  431. // register.
  432. //
  433. //*****************************************************************************
  434. #define EPI_READFIFO1_DATA_M 0xFFFFFFFF // Reads Data
  435. #define EPI_READFIFO1_DATA_S 0
  436. //*****************************************************************************
  437. //
  438. // The following are defines for the bit fields in the EPI_O_READFIFO2
  439. // register.
  440. //
  441. //*****************************************************************************
  442. #define EPI_READFIFO2_DATA_M 0xFFFFFFFF // Reads Data
  443. #define EPI_READFIFO2_DATA_S 0
  444. //*****************************************************************************
  445. //
  446. // The following are defines for the bit fields in the EPI_O_READFIFO3
  447. // register.
  448. //
  449. //*****************************************************************************
  450. #define EPI_READFIFO3_DATA_M 0xFFFFFFFF // Reads Data
  451. #define EPI_READFIFO3_DATA_S 0
  452. //*****************************************************************************
  453. //
  454. // The following are defines for the bit fields in the EPI_O_READFIFO4
  455. // register.
  456. //
  457. //*****************************************************************************
  458. #define EPI_READFIFO4_DATA_M 0xFFFFFFFF // Reads Data
  459. #define EPI_READFIFO4_DATA_S 0
  460. //*****************************************************************************
  461. //
  462. // The following are defines for the bit fields in the EPI_O_READFIFO5
  463. // register.
  464. //
  465. //*****************************************************************************
  466. #define EPI_READFIFO5_DATA_M 0xFFFFFFFF // Reads Data
  467. #define EPI_READFIFO5_DATA_S 0
  468. //*****************************************************************************
  469. //
  470. // The following are defines for the bit fields in the EPI_O_READFIFO6
  471. // register.
  472. //
  473. //*****************************************************************************
  474. #define EPI_READFIFO6_DATA_M 0xFFFFFFFF // Reads Data
  475. #define EPI_READFIFO6_DATA_S 0
  476. //*****************************************************************************
  477. //
  478. // The following are defines for the bit fields in the EPI_O_READFIFO7
  479. // register.
  480. //
  481. //*****************************************************************************
  482. #define EPI_READFIFO7_DATA_M 0xFFFFFFFF // Reads Data
  483. #define EPI_READFIFO7_DATA_S 0
  484. //*****************************************************************************
  485. //
  486. // The following are defines for the bit fields in the EPI_O_FIFOLVL register.
  487. //
  488. //*****************************************************************************
  489. #define EPI_FIFOLVL_WFERR 0x00020000 // Write Full Error
  490. #define EPI_FIFOLVL_RSERR 0x00010000 // Read Stall Error
  491. #define EPI_FIFOLVL_WRFIFO_M 0x00000070 // Write FIFO
  492. #define EPI_FIFOLVL_WRFIFO_EMPT 0x00000000 // Interrupt is triggered while
  493. // WRFIFO is empty.
  494. #define EPI_FIFOLVL_WRFIFO_2 0x00000020 // Interrupt is triggered until
  495. // there are only two slots
  496. // available. Thus, trigger is
  497. // deasserted when there are two
  498. // WRFIFO entries present. This
  499. // configuration is optimized for
  500. // bursts of 2
  501. #define EPI_FIFOLVL_WRFIFO_1 0x00000030 // Interrupt is triggered until
  502. // there is one WRFIFO entry
  503. // available. This configuration
  504. // expects only single writes
  505. #define EPI_FIFOLVL_WRFIFO_NFULL \
  506. 0x00000040 // Trigger interrupt when WRFIFO is
  507. // not full, meaning trigger will
  508. // continue to assert until there
  509. // are four entries in the WRFIFO
  510. #define EPI_FIFOLVL_RDFIFO_M 0x00000007 // Read FIFO
  511. #define EPI_FIFOLVL_RDFIFO_EMPT 0x00000000 // Empty
  512. #define EPI_FIFOLVL_RDFIFO_1 0x00000001 // Trigger when there are 1 or more
  513. // entries in the NBRFIFO
  514. #define EPI_FIFOLVL_RDFIFO_2 0x00000002 // Trigger when there are 2 or more
  515. // entries in the NBRFIFO
  516. #define EPI_FIFOLVL_RDFIFO_4 0x00000003 // Trigger when there are 4 or more
  517. // entries in the NBRFIFO
  518. #define EPI_FIFOLVL_RDFIFO_6 0x00000004 // Trigger when there are 6 or more
  519. // entries in the NBRFIFO
  520. #define EPI_FIFOLVL_RDFIFO_7 0x00000005 // Trigger when there are 7 or more
  521. // entries in the NBRFIFO
  522. #define EPI_FIFOLVL_RDFIFO_8 0x00000006 // Trigger when there are 8 entries
  523. // in the NBRFIFO
  524. //*****************************************************************************
  525. //
  526. // The following are defines for the bit fields in the EPI_O_WFIFOCNT register.
  527. //
  528. //*****************************************************************************
  529. #define EPI_WFIFOCNT_WTAV_M 0x00000007 // Available Write Transactions
  530. #define EPI_WFIFOCNT_WTAV_S 0
  531. //*****************************************************************************
  532. //
  533. // The following are defines for the bit fields in the EPI_O_DMATXCNT register.
  534. //
  535. //*****************************************************************************
  536. #define EPI_DMATXCNT_TXCNT_M 0x0000FFFF // DMA Count
  537. #define EPI_DMATXCNT_TXCNT_S 0
  538. //*****************************************************************************
  539. //
  540. // The following are defines for the bit fields in the EPI_O_IM register.
  541. //
  542. //*****************************************************************************
  543. #define EPI_IM_DMAWRIM 0x00000010 // Write uDMA Interrupt Mask
  544. #define EPI_IM_DMARDIM 0x00000008 // Read uDMA Interrupt Mask
  545. #define EPI_IM_WRIM 0x00000004 // Write FIFO Empty Interrupt Mask
  546. #define EPI_IM_RDIM 0x00000002 // Read FIFO Full Interrupt Mask
  547. #define EPI_IM_ERRIM 0x00000001 // Error Interrupt Mask
  548. //*****************************************************************************
  549. //
  550. // The following are defines for the bit fields in the EPI_O_RIS register.
  551. //
  552. //*****************************************************************************
  553. #define EPI_RIS_DMAWRRIS 0x00000010 // Write uDMA Raw Interrupt Status
  554. #define EPI_RIS_DMARDRIS 0x00000008 // Read uDMA Raw Interrupt Status
  555. #define EPI_RIS_WRRIS 0x00000004 // Write Raw Interrupt Status
  556. #define EPI_RIS_RDRIS 0x00000002 // Read Raw Interrupt Status
  557. #define EPI_RIS_ERRRIS 0x00000001 // Error Raw Interrupt Status
  558. //*****************************************************************************
  559. //
  560. // The following are defines for the bit fields in the EPI_O_MIS register.
  561. //
  562. //*****************************************************************************
  563. #define EPI_MIS_DMAWRMIS 0x00000010 // Write uDMA Masked Interrupt
  564. // Status
  565. #define EPI_MIS_DMARDMIS 0x00000008 // Read uDMA Masked Interrupt
  566. // Status
  567. #define EPI_MIS_WRMIS 0x00000004 // Write Masked Interrupt Status
  568. #define EPI_MIS_RDMIS 0x00000002 // Read Masked Interrupt Status
  569. #define EPI_MIS_ERRMIS 0x00000001 // Error Masked Interrupt Status
  570. //*****************************************************************************
  571. //
  572. // The following are defines for the bit fields in the EPI_O_EISC register.
  573. //
  574. //*****************************************************************************
  575. #define EPI_EISC_DMAWRIC 0x00000010 // Write uDMA Interrupt Clear
  576. #define EPI_EISC_DMARDIC 0x00000008 // Read uDMA Interrupt Clear
  577. #define EPI_EISC_WTFULL 0x00000004 // Write FIFO Full Error
  578. #define EPI_EISC_RSTALL 0x00000002 // Read Stalled Error
  579. #define EPI_EISC_TOUT 0x00000001 // Timeout Error
  580. //*****************************************************************************
  581. //
  582. // The following are defines for the bit fields in the EPI_O_HB8CFG3 register.
  583. //
  584. //*****************************************************************************
  585. #define EPI_HB8CFG3_WRHIGH 0x00200000 // CS2n WRITE Strobe Polarity
  586. #define EPI_HB8CFG3_RDHIGH 0x00100000 // CS2n READ Strobe Polarity
  587. #define EPI_HB8CFG3_ALEHIGH 0x00080000 // CS2n ALE Strobe Polarity
  588. #define EPI_HB8CFG3_WRWS_M 0x000000C0 // CS2n Write Wait States
  589. #define EPI_HB8CFG3_WRWS_2 0x00000000 // Active WRn is 2 EPI clocks
  590. #define EPI_HB8CFG3_WRWS_4 0x00000040 // Active WRn is 4 EPI clocks
  591. #define EPI_HB8CFG3_WRWS_6 0x00000080 // Active WRn is 6 EPI clocks
  592. #define EPI_HB8CFG3_WRWS_8 0x000000C0 // Active WRn is 8 EPI clocks
  593. #define EPI_HB8CFG3_RDWS_M 0x00000030 // CS2n Read Wait States
  594. #define EPI_HB8CFG3_RDWS_2 0x00000000 // Active RDn is 2 EPI clocks
  595. #define EPI_HB8CFG3_RDWS_4 0x00000010 // Active RDn is 4 EPI clocks
  596. #define EPI_HB8CFG3_RDWS_6 0x00000020 // Active RDn is 6 EPI clocks
  597. #define EPI_HB8CFG3_RDWS_8 0x00000030 // Active RDn is 8 EPI clocks
  598. #define EPI_HB8CFG3_MODE_M 0x00000003 // CS2n Host Bus Sub-Mode
  599. #define EPI_HB8CFG3_MODE_ADMUX 0x00000000 // ADMUX - AD[7:0]
  600. #define EPI_HB8CFG3_MODE_AD 0x00000001 // ADNONMUX - D[7:0]
  601. //*****************************************************************************
  602. //
  603. // The following are defines for the bit fields in the EPI_O_HB16CFG3 register.
  604. //
  605. //*****************************************************************************
  606. #define EPI_HB16CFG3_WRHIGH 0x00200000 // CS2n WRITE Strobe Polarity
  607. #define EPI_HB16CFG3_RDHIGH 0x00100000 // CS2n READ Strobe Polarity
  608. #define EPI_HB16CFG3_ALEHIGH 0x00080000 // CS2n ALE Strobe Polarity
  609. #define EPI_HB16CFG3_WRCRE 0x00040000 // CS2n PSRAM Configuration
  610. // Register Write
  611. #define EPI_HB16CFG3_RDCRE 0x00020000 // CS2n PSRAM Configuration
  612. // Register Read
  613. #define EPI_HB16CFG3_BURST 0x00010000 // CS2n Burst Mode
  614. #define EPI_HB16CFG3_WRWS_M 0x000000C0 // CS2n Write Wait States
  615. #define EPI_HB16CFG3_WRWS_2 0x00000000 // Active WRn is 2 EPI clocks
  616. #define EPI_HB16CFG3_WRWS_4 0x00000040 // Active WRn is 4 EPI clocks
  617. #define EPI_HB16CFG3_WRWS_6 0x00000080 // Active WRn is 6 EPI clocks
  618. #define EPI_HB16CFG3_WRWS_8 0x000000C0 // Active WRn is 8 EPI clocks
  619. #define EPI_HB16CFG3_RDWS_M 0x00000030 // CS2n Read Wait States
  620. #define EPI_HB16CFG3_RDWS_2 0x00000000 // Active RDn is 2 EPI clocks
  621. #define EPI_HB16CFG3_RDWS_4 0x00000010 // Active RDn is 4 EPI clocks
  622. #define EPI_HB16CFG3_RDWS_6 0x00000020 // Active RDn is 6 EPI clocks
  623. #define EPI_HB16CFG3_RDWS_8 0x00000030 // Active RDn is 8 EPI clocks
  624. #define EPI_HB16CFG3_MODE_M 0x00000003 // CS2n Host Bus Sub-Mode
  625. #define EPI_HB16CFG3_MODE_ADMUX 0x00000000 // ADMUX - AD[15:0]
  626. #define EPI_HB16CFG3_MODE_AD 0x00000001 // ADNONMUX - D[15:0]
  627. //*****************************************************************************
  628. //
  629. // The following are defines for the bit fields in the EPI_O_HB16CFG4 register.
  630. //
  631. //*****************************************************************************
  632. #define EPI_HB16CFG4_WRHIGH 0x00200000 // CS3n WRITE Strobe Polarity
  633. #define EPI_HB16CFG4_RDHIGH 0x00100000 // CS3n READ Strobe Polarity
  634. #define EPI_HB16CFG4_ALEHIGH 0x00080000 // CS3n ALE Strobe Polarity
  635. #define EPI_HB16CFG4_WRCRE 0x00040000 // CS3n PSRAM Configuration
  636. // Register Write
  637. #define EPI_HB16CFG4_RDCRE 0x00020000 // CS3n PSRAM Configuration
  638. // Register Read
  639. #define EPI_HB16CFG4_BURST 0x00010000 // CS3n Burst Mode
  640. #define EPI_HB16CFG4_WRWS_M 0x000000C0 // CS3n Write Wait States
  641. #define EPI_HB16CFG4_WRWS_2 0x00000000 // Active WRn is 2 EPI clocks
  642. #define EPI_HB16CFG4_WRWS_4 0x00000040 // Active WRn is 4 EPI clocks
  643. #define EPI_HB16CFG4_WRWS_6 0x00000080 // Active WRn is 6 EPI clocks
  644. #define EPI_HB16CFG4_WRWS_8 0x000000C0 // Active WRn is 8 EPI clocks
  645. #define EPI_HB16CFG4_RDWS_M 0x00000030 // CS3n Read Wait States
  646. #define EPI_HB16CFG4_RDWS_2 0x00000000 // Active RDn is 2 EPI clocks
  647. #define EPI_HB16CFG4_RDWS_4 0x00000010 // Active RDn is 4 EPI clocks
  648. #define EPI_HB16CFG4_RDWS_6 0x00000020 // Active RDn is 6 EPI clocks
  649. #define EPI_HB16CFG4_RDWS_8 0x00000030 // Active RDn is 8 EPI clocks
  650. #define EPI_HB16CFG4_MODE_M 0x00000003 // CS3n Host Bus Sub-Mode
  651. #define EPI_HB16CFG4_MODE_ADMUX 0x00000000 // ADMUX - AD[15:0]
  652. #define EPI_HB16CFG4_MODE_AD 0x00000001 // ADNONMUX - D[15:0]
  653. //*****************************************************************************
  654. //
  655. // The following are defines for the bit fields in the EPI_O_HB8CFG4 register.
  656. //
  657. //*****************************************************************************
  658. #define EPI_HB8CFG4_WRHIGH 0x00200000 // CS3n WRITE Strobe Polarity
  659. #define EPI_HB8CFG4_RDHIGH 0x00100000 // CS2n READ Strobe Polarity
  660. #define EPI_HB8CFG4_ALEHIGH 0x00080000 // CS3n ALE Strobe Polarity
  661. #define EPI_HB8CFG4_WRWS_M 0x000000C0 // CS3n Write Wait States
  662. #define EPI_HB8CFG4_WRWS_2 0x00000000 // Active WRn is 2 EPI clocks
  663. #define EPI_HB8CFG4_WRWS_4 0x00000040 // Active WRn is 4 EPI clocks
  664. #define EPI_HB8CFG4_WRWS_6 0x00000080 // Active WRn is 6 EPI clocks
  665. #define EPI_HB8CFG4_WRWS_8 0x000000C0 // Active WRn is 8 EPI clocks
  666. #define EPI_HB8CFG4_RDWS_M 0x00000030 // CS3n Read Wait States
  667. #define EPI_HB8CFG4_RDWS_2 0x00000000 // Active RDn is 2 EPI clocks
  668. #define EPI_HB8CFG4_RDWS_4 0x00000010 // Active RDn is 4 EPI clocks
  669. #define EPI_HB8CFG4_RDWS_6 0x00000020 // Active RDn is 6 EPI clocks
  670. #define EPI_HB8CFG4_RDWS_8 0x00000030 // Active RDn is 8 EPI clocks
  671. #define EPI_HB8CFG4_MODE_M 0x00000003 // CS3n Host Bus Sub-Mode
  672. #define EPI_HB8CFG4_MODE_ADMUX 0x00000000 // ADMUX - AD[7:0]
  673. #define EPI_HB8CFG4_MODE_AD 0x00000001 // ADNONMUX - D[7:0]
  674. //*****************************************************************************
  675. //
  676. // The following are defines for the bit fields in the EPI_O_HB8TIME register.
  677. //
  678. //*****************************************************************************
  679. #define EPI_HB8TIME_IRDYDLY_M 0x03000000 // CS0n Input Ready Delay
  680. #define EPI_HB8TIME_CAPWIDTH_M 0x00003000 // CS0n Inter-transfer Capture
  681. // Width
  682. #define EPI_HB8TIME_WRWSM 0x00000010 // Write Wait State Minus One
  683. #define EPI_HB8TIME_RDWSM 0x00000001 // Read Wait State Minus One
  684. #define EPI_HB8TIME_IRDYDLY_S 24
  685. #define EPI_HB8TIME_CAPWIDTH_S 12
  686. //*****************************************************************************
  687. //
  688. // The following are defines for the bit fields in the EPI_O_HB16TIME register.
  689. //
  690. //*****************************************************************************
  691. #define EPI_HB16TIME_IRDYDLY_M 0x03000000 // CS0n Input Ready Delay
  692. #define EPI_HB16TIME_PSRAMSZ_M 0x00070000 // PSRAM Row Size
  693. #define EPI_HB16TIME_PSRAMSZ_0 0x00000000 // No row size limitation
  694. #define EPI_HB16TIME_PSRAMSZ_128B \
  695. 0x00010000 // 128 B
  696. #define EPI_HB16TIME_PSRAMSZ_256B \
  697. 0x00020000 // 256 B
  698. #define EPI_HB16TIME_PSRAMSZ_512B \
  699. 0x00030000 // 512 B
  700. #define EPI_HB16TIME_PSRAMSZ_1KB \
  701. 0x00040000 // 1024 B
  702. #define EPI_HB16TIME_PSRAMSZ_2KB \
  703. 0x00050000 // 2048 B
  704. #define EPI_HB16TIME_PSRAMSZ_4KB \
  705. 0x00060000 // 4096 B
  706. #define EPI_HB16TIME_PSRAMSZ_8KB \
  707. 0x00070000 // 8192 B
  708. #define EPI_HB16TIME_CAPWIDTH_M 0x00003000 // CS0n Inter-transfer Capture
  709. // Width
  710. #define EPI_HB16TIME_WRWSM 0x00000010 // Write Wait State Minus One
  711. #define EPI_HB16TIME_RDWSM 0x00000001 // Read Wait State Minus One
  712. #define EPI_HB16TIME_IRDYDLY_S 24
  713. #define EPI_HB16TIME_CAPWIDTH_S 12
  714. //*****************************************************************************
  715. //
  716. // The following are defines for the bit fields in the EPI_O_HB8TIME2 register.
  717. //
  718. //*****************************************************************************
  719. #define EPI_HB8TIME2_IRDYDLY_M 0x03000000 // CS1n Input Ready Delay
  720. #define EPI_HB8TIME2_CAPWIDTH_M 0x00003000 // CS1n Inter-transfer Capture
  721. // Width
  722. #define EPI_HB8TIME2_WRWSM 0x00000010 // CS1n Write Wait State Minus One
  723. #define EPI_HB8TIME2_RDWSM 0x00000001 // CS1n Read Wait State Minus One
  724. #define EPI_HB8TIME2_IRDYDLY_S 24
  725. #define EPI_HB8TIME2_CAPWIDTH_S 12
  726. //*****************************************************************************
  727. //
  728. // The following are defines for the bit fields in the EPI_O_HB16TIME2
  729. // register.
  730. //
  731. //*****************************************************************************
  732. #define EPI_HB16TIME2_IRDYDLY_M 0x03000000 // CS1n Input Ready Delay
  733. #define EPI_HB16TIME2_PSRAMSZ_M 0x00070000 // PSRAM Row Size
  734. #define EPI_HB16TIME2_PSRAMSZ_0 0x00000000 // No row size limitation
  735. #define EPI_HB16TIME2_PSRAMSZ_128B \
  736. 0x00010000 // 128 B
  737. #define EPI_HB16TIME2_PSRAMSZ_256B \
  738. 0x00020000 // 256 B
  739. #define EPI_HB16TIME2_PSRAMSZ_512B \
  740. 0x00030000 // 512 B
  741. #define EPI_HB16TIME2_PSRAMSZ_1KB \
  742. 0x00040000 // 1024 B
  743. #define EPI_HB16TIME2_PSRAMSZ_2KB \
  744. 0x00050000 // 2048 B
  745. #define EPI_HB16TIME2_PSRAMSZ_4KB \
  746. 0x00060000 // 4096 B
  747. #define EPI_HB16TIME2_PSRAMSZ_8KB \
  748. 0x00070000 // 8192 B
  749. #define EPI_HB16TIME2_CAPWIDTH_M \
  750. 0x00003000 // CS1n Inter-transfer Capture
  751. // Width
  752. #define EPI_HB16TIME2_WRWSM 0x00000010 // CS1n Write Wait State Minus One
  753. #define EPI_HB16TIME2_RDWSM 0x00000001 // CS1n Read Wait State Minus One
  754. #define EPI_HB16TIME2_IRDYDLY_S 24
  755. #define EPI_HB16TIME2_CAPWIDTH_S \
  756. 12
  757. //*****************************************************************************
  758. //
  759. // The following are defines for the bit fields in the EPI_O_HB16TIME3
  760. // register.
  761. //
  762. //*****************************************************************************
  763. #define EPI_HB16TIME3_IRDYDLY_M 0x03000000 // CS2n Input Ready Delay
  764. #define EPI_HB16TIME3_PSRAMSZ_M 0x00070000 // PSRAM Row Size
  765. #define EPI_HB16TIME3_PSRAMSZ_0 0x00000000 // No row size limitation
  766. #define EPI_HB16TIME3_PSRAMSZ_128B \
  767. 0x00010000 // 128 B
  768. #define EPI_HB16TIME3_PSRAMSZ_256B \
  769. 0x00020000 // 256 B
  770. #define EPI_HB16TIME3_PSRAMSZ_512B \
  771. 0x00030000 // 512 B
  772. #define EPI_HB16TIME3_PSRAMSZ_1KB \
  773. 0x00040000 // 1024 B
  774. #define EPI_HB16TIME3_PSRAMSZ_2KB \
  775. 0x00050000 // 2048 B
  776. #define EPI_HB16TIME3_PSRAMSZ_4KB \
  777. 0x00060000 // 4096 B
  778. #define EPI_HB16TIME3_PSRAMSZ_8KB \
  779. 0x00070000 // 8192 B
  780. #define EPI_HB16TIME3_CAPWIDTH_M \
  781. 0x00003000 // CS2n Inter-transfer Capture
  782. // Width
  783. #define EPI_HB16TIME3_WRWSM 0x00000010 // CS2n Write Wait State Minus One
  784. #define EPI_HB16TIME3_RDWSM 0x00000001 // CS2n Read Wait State Minus One
  785. #define EPI_HB16TIME3_IRDYDLY_S 24
  786. #define EPI_HB16TIME3_CAPWIDTH_S \
  787. 12
  788. //*****************************************************************************
  789. //
  790. // The following are defines for the bit fields in the EPI_O_HB8TIME3 register.
  791. //
  792. //*****************************************************************************
  793. #define EPI_HB8TIME3_IRDYDLY_M 0x03000000 // CS2n Input Ready Delay
  794. #define EPI_HB8TIME3_CAPWIDTH_M 0x00003000 // CS2n Inter-transfer Capture
  795. // Width
  796. #define EPI_HB8TIME3_WRWSM 0x00000010 // CS2n Write Wait State Minus One
  797. #define EPI_HB8TIME3_RDWSM 0x00000001 // CS2n Read Wait State Minus One
  798. #define EPI_HB8TIME3_IRDYDLY_S 24
  799. #define EPI_HB8TIME3_CAPWIDTH_S 12
  800. //*****************************************************************************
  801. //
  802. // The following are defines for the bit fields in the EPI_O_HB8TIME4 register.
  803. //
  804. //*****************************************************************************
  805. #define EPI_HB8TIME4_IRDYDLY_M 0x03000000 // CS3n Input Ready Delay
  806. #define EPI_HB8TIME4_CAPWIDTH_M 0x00003000 // CS3n Inter-transfer Capture
  807. // Width
  808. #define EPI_HB8TIME4_WRWSM 0x00000010 // CS3n Write Wait State Minus One
  809. #define EPI_HB8TIME4_RDWSM 0x00000001 // CS3n Read Wait State Minus One
  810. #define EPI_HB8TIME4_IRDYDLY_S 24
  811. #define EPI_HB8TIME4_CAPWIDTH_S 12
  812. //*****************************************************************************
  813. //
  814. // The following are defines for the bit fields in the EPI_O_HB16TIME4
  815. // register.
  816. //
  817. //*****************************************************************************
  818. #define EPI_HB16TIME4_IRDYDLY_M 0x03000000 // CS3n Input Ready Delay
  819. #define EPI_HB16TIME4_PSRAMSZ_M 0x00070000 // PSRAM Row Size
  820. #define EPI_HB16TIME4_PSRAMSZ_0 0x00000000 // No row size limitation
  821. #define EPI_HB16TIME4_PSRAMSZ_128B \
  822. 0x00010000 // 128 B
  823. #define EPI_HB16TIME4_PSRAMSZ_256B \
  824. 0x00020000 // 256 B
  825. #define EPI_HB16TIME4_PSRAMSZ_512B \
  826. 0x00030000 // 512 B
  827. #define EPI_HB16TIME4_PSRAMSZ_1KB \
  828. 0x00040000 // 1024 B
  829. #define EPI_HB16TIME4_PSRAMSZ_2KB \
  830. 0x00050000 // 2048 B
  831. #define EPI_HB16TIME4_PSRAMSZ_4KB \
  832. 0x00060000 // 4096 B
  833. #define EPI_HB16TIME4_PSRAMSZ_8KB \
  834. 0x00070000 // 8192 B
  835. #define EPI_HB16TIME4_CAPWIDTH_M \
  836. 0x00003000 // CS3n Inter-transfer Capture
  837. // Width
  838. #define EPI_HB16TIME4_WRWSM 0x00000010 // CS3n Write Wait State Minus One
  839. #define EPI_HB16TIME4_RDWSM 0x00000001 // CS3n Read Wait State Minus One
  840. #define EPI_HB16TIME4_IRDYDLY_S 24
  841. #define EPI_HB16TIME4_CAPWIDTH_S \
  842. 12
  843. //*****************************************************************************
  844. //
  845. // The following are defines for the bit fields in the EPI_O_HBPSRAM register.
  846. //
  847. //*****************************************************************************
  848. #define EPI_HBPSRAM_CR_M 0x001FFFFF // PSRAM Config Register
  849. #define EPI_HBPSRAM_CR_S 0
  850. //*****************************************************************************
  851. //
  852. // The following definitions are deprecated.
  853. //
  854. //*****************************************************************************
  855. #ifndef DEPRECATED
  856. //*****************************************************************************
  857. //
  858. // The following are deprecated defines for the bit fields in the EPI_O_FIFOLVL
  859. // register.
  860. //
  861. //*****************************************************************************
  862. #define EPI_FIFOLVL_WRFIFO_1_4 0x00000020 // Trigger when there are up to 3
  863. // spaces available in the WFIFO
  864. #define EPI_FIFOLVL_WRFIFO_1_2 0x00000030 // Trigger when there are up to 2
  865. // spaces available in the WFIFO
  866. #define EPI_FIFOLVL_WRFIFO_3_4 0x00000040 // Trigger when there is 1 space
  867. // available in the WFIFO
  868. #define EPI_FIFOLVL_RDFIFO_1_8 0x00000001 // Trigger when there are 1 or more
  869. // entries in the NBRFIFO
  870. #define EPI_FIFOLVL_RDFIFO_1_4 0x00000002 // Trigger when there are 2 or more
  871. // entries in the NBRFIFO
  872. #define EPI_FIFOLVL_RDFIFO_1_2 0x00000003 // Trigger when there are 4 or more
  873. // entries in the NBRFIFO
  874. #define EPI_FIFOLVL_RDFIFO_3_4 0x00000004 // Trigger when there are 6 or more
  875. // entries in the NBRFIFO
  876. #define EPI_FIFOLVL_RDFIFO_7_8 0x00000005 // Trigger when there are 7 or more
  877. // entries in the NBRFIFO
  878. #define EPI_FIFOLVL_RDFIFO_FULL 0x00000006 // Trigger when there are 8 entries
  879. // in the NBRFIFO
  880. #endif
  881. #endif // __HW_EPI_H__