m5329.h 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023
  1. /*
  2. * mcf5329.h -- Definitions for Freescale Coldfire 5329
  3. *
  4. * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
  5. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef mcf5329_h
  26. #define mcf5329_h
  27. /****************************************************************************/
  28. /*********************************************************************
  29. * System Control Module (SCM)
  30. *********************************************************************/
  31. /* Bit definitions and macros for SCM_MPR */
  32. #define SCM_MPR_MPROT0(x) (((x)&0x0F)<<28)
  33. #define SCM_MPR_MPROT1(x) (((x)&0x0F)<<24)
  34. #define SCM_MPR_MPROT2(x) (((x)&0x0F)<<20)
  35. #define SCM_MPR_MPROT4(x) (((x)&0x0F)<<12)
  36. #define SCM_MPR_MPROT5(x) (((x)&0x0F)<<8)
  37. #define SCM_MPR_MPROT6(x) (((x)&0x0F)<<4)
  38. #define MPROT_MTR 4
  39. #define MPROT_MTW 2
  40. #define MPROT_MPL 1
  41. /* Bit definitions and macros for SCM_BMT */
  42. #define BMT_BME (0x08)
  43. #define BMT_8 (0x07)
  44. #define BMT_16 (0x06)
  45. #define BMT_32 (0x05)
  46. #define BMT_64 (0x04)
  47. #define BMT_128 (0x03)
  48. #define BMT_256 (0x02)
  49. #define BMT_512 (0x01)
  50. #define BMT_1024 (0x00)
  51. /* Bit definitions and macros for SCM_PACRA */
  52. #define SCM_PACRA_PACR0(x) (((x)&0x0F)<<28)
  53. #define SCM_PACRA_PACR1(x) (((x)&0x0F)<<24)
  54. #define SCM_PACRA_PACR2(x) (((x)&0x0F)<<20)
  55. #define PACR_SP 4
  56. #define PACR_WP 2
  57. #define PACR_TP 1
  58. /* Bit definitions and macros for SCM_PACRB */
  59. #define SCM_PACRB_PACR8(x) (((x)&0x0F)<<28)
  60. #define SCM_PACRB_PACR12(x) (((x)&0x0F)<<12)
  61. /* Bit definitions and macros for SCM_PACRC */
  62. #define SCM_PACRC_PACR16(x) (((x)&0x0F)<<28)
  63. #define SCM_PACRC_PACR17(x) (((x)&0x0F)<<24)
  64. #define SCM_PACRC_PACR18(x) (((x)&0x0F)<<20)
  65. #define SCM_PACRC_PACR19(x) (((x)&0x0F)<<16)
  66. #define SCM_PACRC_PACR21(x) (((x)&0x0F)<<8)
  67. #define SCM_PACRC_PACR22(x) (((x)&0x0F)<<4)
  68. #define SCM_PACRC_PACR23(x) (((x)&0x0F)<<0)
  69. /* Bit definitions and macros for SCM_PACRD */
  70. #define SCM_PACRD_PACR24(x) (((x)&0x0F)<<28)
  71. #define SCM_PACRD_PACR25(x) (((x)&0x0F)<<24)
  72. #define SCM_PACRD_PACR26(x) (((x)&0x0F)<<20)
  73. #define SCM_PACRD_PACR28(x) (((x)&0x0F)<<12)
  74. #define SCM_PACRD_PACR29(x) (((x)&0x0F)<<8)
  75. #define SCM_PACRD_PACR30(x) (((x)&0x0F)<<4)
  76. #define SCM_PACRD_PACR31(x) (((x)&0x0F)<<0)
  77. /* Bit definitions and macros for SCM_PACRE */
  78. #define SCM_PACRE_PACR32(x) (((x)&0x0F)<<28)
  79. #define SCM_PACRE_PACR33(x) (((x)&0x0F)<<24)
  80. #define SCM_PACRE_PACR34(x) (((x)&0x0F)<<20)
  81. #define SCM_PACRE_PACR35(x) (((x)&0x0F)<<16)
  82. #define SCM_PACRE_PACR36(x) (((x)&0x0F)<<12)
  83. #define SCM_PACRE_PACR37(x) (((x)&0x0F)<<8)
  84. #define SCM_PACRE_PACR38(x) (((x)&0x0F)<<4)
  85. /* Bit definitions and macros for SCM_PACRF */
  86. #define SCM_PACRF_PACR40(x) (((x)&0x0F)<<28)
  87. #define SCM_PACRF_PACR41(x) (((x)&0x0F)<<24)
  88. #define SCM_PACRF_PACR42(x) (((x)&0x0F)<<20)
  89. #define SCM_PACRF_PACR43(x) (((x)&0x0F)<<16)
  90. #define SCM_PACRF_PACR44(x) (((x)&0x0F)<<12)
  91. #define SCM_PACRF_PACR45(x) (((x)&0x0F)<<8)
  92. #define SCM_PACRF_PACR46(x) (((x)&0x0F)<<4)
  93. #define SCM_PACRF_PACR47(x) (((x)&0x0F)<<0)
  94. /* Bit definitions and macros for SCM_PACRG */
  95. #define SCM_PACRG_PACR48(x) (((x)&0x0F)<<28)
  96. /* Bit definitions and macros for SCM_PACRH */
  97. #define SCM_PACRH_PACR56(x) (((x)&0x0F)<<28)
  98. #define SCM_PACRH_PACR57(x) (((x)&0x0F)<<24)
  99. #define SCM_PACRH_PACR58(x) (((x)&0x0F)<<20)
  100. /* PACRn Assignments */
  101. #define PACR0(x) SCM_PACRA_PACR0(x)
  102. #define PACR1(x) SCM_PACRA_PACR1(x)
  103. #define PACR2(x) SCM_PACRA_PACR2(x)
  104. #define PACR8(x) SCM_PACRB_PACR8(x)
  105. #define PACR12(x) SCM_PACRB_PACR12(x)
  106. #define PACR16(x) SCM_PACRC_PACR16(x)
  107. #define PACR17(x) SCM_PACRC_PACR17(x)
  108. #define PACR18(x) SCM_PACRC_PACR18(x)
  109. #define PACR19(x) SCM_PACRC_PACR19(x)
  110. #define PACR21(x) SCM_PACRC_PACR21(x)
  111. #define PACR22(x) SCM_PACRC_PACR22(x)
  112. #define PACR23(x) SCM_PACRC_PACR23(x)
  113. #define PACR24(x) SCM_PACRD_PACR24(x)
  114. #define PACR25(x) SCM_PACRD_PACR25(x)
  115. #define PACR26(x) SCM_PACRD_PACR26(x)
  116. #define PACR28(x) SCM_PACRD_PACR28(x)
  117. #define PACR29(x) SCM_PACRD_PACR29(x)
  118. #define PACR30(x) SCM_PACRD_PACR30(x)
  119. #define PACR31(x) SCM_PACRD_PACR31(x)
  120. #define PACR32(x) SCM_PACRE_PACR32(x)
  121. #define PACR33(x) SCM_PACRE_PACR33(x)
  122. #define PACR34(x) SCM_PACRE_PACR34(x)
  123. #define PACR35(x) SCM_PACRE_PACR35(x)
  124. #define PACR36(x) SCM_PACRE_PACR36(x)
  125. #define PACR37(x) SCM_PACRE_PACR37(x)
  126. #define PACR38(x) SCM_PACRE_PACR38(x)
  127. #define PACR40(x) SCM_PACRF_PACR40(x)
  128. #define PACR41(x) SCM_PACRF_PACR41(x)
  129. #define PACR42(x) SCM_PACRF_PACR42(x)
  130. #define PACR43(x) SCM_PACRF_PACR43(x)
  131. #define PACR44(x) SCM_PACRF_PACR44(x)
  132. #define PACR45(x) SCM_PACRF_PACR45(x)
  133. #define PACR46(x) SCM_PACRF_PACR46(x)
  134. #define PACR47(x) SCM_PACRF_PACR47(x)
  135. #define PACR48(x) SCM_PACRG_PACR48(x)
  136. #define PACR56(x) SCM_PACRH_PACR56(x)
  137. #define PACR57(x) SCM_PACRH_PACR57(x)
  138. #define PACR58(x) SCM_PACRH_PACR58(x)
  139. /* Bit definitions and macros for SCM_CWCR */
  140. #define CWCR_RO (0x8000)
  141. #define CWCR_CWR_WH (0x0100)
  142. #define CWCR_CWE (0x0080)
  143. #define CWRI_WINDOW (0x0060)
  144. #define CWRI_RESET (0x0040)
  145. #define CWRI_INT_RESET (0x0020)
  146. #define CWRI_INT (0x0000)
  147. #define CWCR_CWT(x) (((x)&0x001F))
  148. /* Bit definitions and macros for SCM_ISR */
  149. #define SCMISR_CFEI (0x02)
  150. #define SCMISR_CWIC (0x01)
  151. /* Bit definitions and macros for SCM_BCR */
  152. #define BCR_GBR (0x00000200)
  153. #define BCR_GBW (0x00000100)
  154. #define BCR_S7 (0x00000080)
  155. #define BCR_S6 (0x00000040)
  156. #define BCR_S4 (0x00000010)
  157. #define BCR_S1 (0x00000002)
  158. /* Bit definitions and macros for SCM_CFIER */
  159. #define CFIER_ECFEI (0x01)
  160. /* Bit definitions and macros for SCM_CFLOC */
  161. #define CFLOC_LOC (0x80)
  162. /* Bit definitions and macros for SCM_CFATR */
  163. #define CFATR_WRITE (0x80)
  164. #define CFATR_SZ32 (0x20)
  165. #define CFATR_SZ16 (0x10)
  166. #define CFATR_SZ08 (0x00)
  167. #define CFATR_CACHE (0x08)
  168. #define CFATR_MODE (0x02)
  169. #define CFATR_TYPE (0x01)
  170. /*********************************************************************
  171. *
  172. * Random Number Generator (RNG)
  173. *
  174. *********************************************************************/
  175. /* Bit definitions and macros for RNG_RNGCR */
  176. #define RNGCR_CI (0x00000008)
  177. #define RNGCR_IM (0x00000004)
  178. #define RNGCR_HA (0x00000002)
  179. #define RNGCR_GO (0x00000001)
  180. /* Bit definitions and macros for RNG_RNGSR */
  181. #define RNGSR_OFS(x) (((x)&0xFF)<<16)
  182. #define RNGSR_OFL(x) (((x)&0xFF)<<8)
  183. #define RNGSR_EI (0x00000008)
  184. #define RNGSR_FUF (0x00000004)
  185. #define RNGSR_LRS (0x00000002)
  186. #define RNGSR_SV (0x00000001)
  187. /*********************************************************************
  188. * FlexBus Chip Selects (FBCS)
  189. *********************************************************************/
  190. /* Bit definitions and macros for FBCS_CSAR */
  191. #define CSAR_BA(x) (((x)&0xFFFF)<<16)
  192. /* Bit definitions and macros for FBCS_CSMR */
  193. #define CSMR_BAM(x) (((x)&0xFFFF)<<16)
  194. #define CSMR_BAM_4G (0xFFFF0000)
  195. #define CSMR_BAM_2G (0x7FFF0000)
  196. #define CSMR_BAM_1G (0x3FFF0000)
  197. #define CSMR_BAM_1024M (0x3FFF0000)
  198. #define CSMR_BAM_512M (0x1FFF0000)
  199. #define CSMR_BAM_256M (0x0FFF0000)
  200. #define CSMR_BAM_128M (0x07FF0000)
  201. #define CSMR_BAM_64M (0x03FF0000)
  202. #define CSMR_BAM_32M (0x01FF0000)
  203. #define CSMR_BAM_16M (0x00FF0000)
  204. #define CSMR_BAM_8M (0x007F0000)
  205. #define CSMR_BAM_4M (0x003F0000)
  206. #define CSMR_BAM_2M (0x001F0000)
  207. #define CSMR_BAM_1M (0x000F0000)
  208. #define CSMR_BAM_1024K (0x000F0000)
  209. #define CSMR_BAM_512K (0x00070000)
  210. #define CSMR_BAM_256K (0x00030000)
  211. #define CSMR_BAM_128K (0x00010000)
  212. #define CSMR_BAM_64K (0x00000000)
  213. #define CSMR_WP (0x00000100)
  214. #define CSMR_V (0x00000001)
  215. /* Bit definitions and macros for FBCS_CSCR */
  216. #define CSCR_SWS(x) (((x)&0x3F)<<26)
  217. #define CSCR_ASET(x) (((x)&0x03)<<20)
  218. #define CSCR_SWSEN (0x00800000)
  219. #define CSCR_ASET_4CLK (0x00300000)
  220. #define CSCR_ASET_3CLK (0x00200000)
  221. #define CSCR_ASET_2CLK (0x00100000)
  222. #define CSCR_ASET_1CLK (0x00000000)
  223. #define CSCR_RDAH(x) (((x)&0x03)<<18)
  224. #define CSCR_RDAH_4CYC (0x000C0000)
  225. #define CSCR_RDAH_3CYC (0x00080000)
  226. #define CSCR_RDAH_2CYC (0x00040000)
  227. #define CSCR_RDAH_1CYC (0x00000000)
  228. #define CSCR_WRAH(x) (((x)&0x03)<<16)
  229. #define CSCR_WDAH_4CYC (0x00003000)
  230. #define CSCR_WDAH_3CYC (0x00002000)
  231. #define CSCR_WDAH_2CYC (0x00001000)
  232. #define CSCR_WDAH_1CYC (0x00000000)
  233. #define CSCR_WS(x) (((x)&0x3F)<<10)
  234. #define CSCR_SBM (0x00000200)
  235. #define CSCR_AA (0x00000100)
  236. #define CSCR_PS_MASK (0x000000C0)
  237. #define CSCR_PS_32 (0x00000000)
  238. #define CSCR_PS_16 (0x00000080)
  239. #define CSCR_PS_8 (0x00000040)
  240. #define CSCR_BEM (0x00000020)
  241. #define CSCR_BSTR (0x00000010)
  242. #define CSCR_BSTW (0x00000008)
  243. /*********************************************************************
  244. * FlexCAN Module (CAN)
  245. *********************************************************************/
  246. /* Bit definitions and macros for CAN_CANMCR */
  247. #define CANMCR_MDIS (0x80000000)
  248. #define CANMCR_FRZ (0x40000000)
  249. #define CANMCR_HALT (0x10000000)
  250. #define CANMCR_NORDY (0x08000000)
  251. #define CANMCR_SOFTRST (0x02000000)
  252. #define CANMCR_FRZACK (0x01000000)
  253. #define CANMCR_SUPV (0x00800000)
  254. #define CANMCR_LPMACK (0x00100000)
  255. #define CANMCR_MAXMB(x) (((x)&0x0F))
  256. /* Bit definitions and macros for CAN_CANCTRL */
  257. #define CANCTRL_PRESDIV(x) (((x)&0xFF)<<24)
  258. #define CANCTRL_RJW(x) (((x)&0x03)<<22)
  259. #define CANCTRL_PSEG1(x) (((x)&0x07)<<19)
  260. #define CANCTRL_PSEG2(x) (((x)&0x07)<<16)
  261. #define CANCTRL_BOFFMSK (0x00008000)
  262. #define CANCTRL_ERRMSK (0x00004000)
  263. #define CANCTRL_CLKSRC (0x00002000)
  264. #define CANCTRL_LPB (0x00001000)
  265. #define CANCTRL_SMP (0x00000080)
  266. #define CANCTRL_BOFFREC (0x00000040)
  267. #define CANCTRL_TSYNC (0x00000020)
  268. #define CANCTRL_LBUF (0x00000010)
  269. #define CANCTRL_LOM (0x00000008)
  270. #define CANCTRL_PROPSEG(x) (((x)&0x07))
  271. /* Bit definitions and macros for CAN_TIMER */
  272. #define TIMER_TIMER(x) ((x)&0xFFFF)
  273. /* Bit definitions and macros for CAN_RXGMASK */
  274. #define RXGMASK_MI(x) ((x)&0x1FFFFFFF)
  275. /* Bit definitions and macros for CAN_ERRCNT */
  276. #define ERRCNT_TXECTR(x) (((x)&0xFF))
  277. #define ERRCNT_RXECTR(x) (((x)&0xFF)<<8)
  278. /* Bit definitions and macros for CAN_ERRSTAT */
  279. #define ERRSTAT_BITERR1 (0x00008000)
  280. #define ERRSTAT_BITERR0 (0x00004000)
  281. #define ERRSTAT_ACKERR (0x00002000)
  282. #define ERRSTAT_CRCERR (0x00001000)
  283. #define ERRSTAT_FRMERR (0x00000800)
  284. #define ERRSTAT_STFERR (0x00000400)
  285. #define ERRSTAT_TXWRN (0x00000200)
  286. #define ERRSTAT_RXWRN (0x00000100)
  287. #define ERRSTAT_IDLE (0x00000080)
  288. #define ERRSTAT_TXRX (0x00000040)
  289. #define ERRSTAT_FLT_BUSOFF (0x00000020)
  290. #define ERRSTAT_FLT_PASSIVE (0x00000010)
  291. #define ERRSTAT_FLT_ACTIVE (0x00000000)
  292. #define ERRSTAT_BOFFINT (0x00000004)
  293. #define ERRSTAT_ERRINT (0x00000002)
  294. #define ERRSTAT_WAKINT (0x00000001)
  295. /* Bit definitions and macros for CAN_IMASK */
  296. #define IMASK_BUF15M (0x00008000)
  297. #define IMASK_BUF14M (0x00004000)
  298. #define IMASK_BUF13M (0x00002000)
  299. #define IMASK_BUF12M (0x00001000)
  300. #define IMASK_BUF11M (0x00000800)
  301. #define IMASK_BUF10M (0x00000400)
  302. #define IMASK_BUF9M (0x00000200)
  303. #define IMASK_BUF8M (0x00000100)
  304. #define IMASK_BUF7M (0x00000080)
  305. #define IMASK_BUF6M (0x00000040)
  306. #define IMASK_BUF5M (0x00000020)
  307. #define IMASK_BUF4M (0x00000010)
  308. #define IMASK_BUF3M (0x00000008)
  309. #define IMASK_BUF2M (0x00000004)
  310. #define IMASK_BUF1M (0x00000002)
  311. #define IMASK_BUF0M (0x00000001)
  312. /* Bit definitions and macros for CAN_IFLAG */
  313. #define IFLAG_BUF15I (0x00008000)
  314. #define IFLAG_BUF14I (0x00004000)
  315. #define IFLAG_BUF13I (0x00002000)
  316. #define IFLAG_BUF12I (0x00001000)
  317. #define IFLAG_BUF11I (0x00000800)
  318. #define IFLAG_BUF10I (0x00000400)
  319. #define IFLAG_BUF9I (0x00000200)
  320. #define IFLAG_BUF8I (0x00000100)
  321. #define IFLAG_BUF7I (0x00000080)
  322. #define IFLAG_BUF6I (0x00000040)
  323. #define IFLAG_BUF5I (0x00000020)
  324. #define IFLAG_BUF4I (0x00000010)
  325. #define IFLAG_BUF3I (0x00000008)
  326. #define IFLAG_BUF2I (0x00000004)
  327. #define IFLAG_BUF1I (0x00000002)
  328. #define IFLAG_BUF0I (0x00000001)
  329. /*********************************************************************
  330. * Interrupt Controller (INTC)
  331. *********************************************************************/
  332. #define INTC0_EPORT INTC_IPRL_INT1
  333. #define INT0_LO_RSVD0 (0)
  334. #define INT0_LO_EPORT1 (1)
  335. #define INT0_LO_EPORT2 (2)
  336. #define INT0_LO_EPORT3 (3)
  337. #define INT0_LO_EPORT4 (4)
  338. #define INT0_LO_EPORT5 (5)
  339. #define INT0_LO_EPORT6 (6)
  340. #define INT0_LO_EPORT7 (7)
  341. #define INT0_LO_EDMA_00 (8)
  342. #define INT0_LO_EDMA_01 (9)
  343. #define INT0_LO_EDMA_02 (10)
  344. #define INT0_LO_EDMA_03 (11)
  345. #define INT0_LO_EDMA_04 (12)
  346. #define INT0_LO_EDMA_05 (13)
  347. #define INT0_LO_EDMA_06 (14)
  348. #define INT0_LO_EDMA_07 (15)
  349. #define INT0_LO_EDMA_08 (16)
  350. #define INT0_LO_EDMA_09 (17)
  351. #define INT0_LO_EDMA_10 (18)
  352. #define INT0_LO_EDMA_11 (19)
  353. #define INT0_LO_EDMA_12 (20)
  354. #define INT0_LO_EDMA_13 (21)
  355. #define INT0_LO_EDMA_14 (22)
  356. #define INT0_LO_EDMA_15 (23)
  357. #define INT0_LO_EDMA_ERR (24)
  358. #define INT0_LO_SCM (25)
  359. #define INT0_LO_UART0 (26)
  360. #define INT0_LO_UART1 (27)
  361. #define INT0_LO_UART2 (28)
  362. #define INT0_LO_RSVD1 (29)
  363. #define INT0_LO_I2C (30)
  364. #define INT0_LO_QSPI (31)
  365. #define INT0_HI_DTMR0 (32)
  366. #define INT0_HI_DTMR1 (33)
  367. #define INT0_HI_DTMR2 (34)
  368. #define INT0_HI_DTMR3 (35)
  369. #define INT0_HI_FEC_TXF (36)
  370. #define INT0_HI_FEC_TXB (37)
  371. #define INT0_HI_FEC_UN (38)
  372. #define INT0_HI_FEC_RL (39)
  373. #define INT0_HI_FEC_RXF (40)
  374. #define INT0_HI_FEC_RXB (41)
  375. #define INT0_HI_FEC_MII (42)
  376. #define INT0_HI_FEC_LC (43)
  377. #define INT0_HI_FEC_HBERR (44)
  378. #define INT0_HI_FEC_GRA (45)
  379. #define INT0_HI_FEC_EBERR (46)
  380. #define INT0_HI_FEC_BABT (47)
  381. #define INT0_HI_FEC_BABR (48)
  382. /* 49 - 61 Reserved */
  383. #define INT0_HI_SCM (62)
  384. /*#define INT1_HI_ */
  385. /* Bit definitions and macros for INTC_IPRH */
  386. #define INTC_IPRH_INT63 (0x80000000)
  387. #define INTC_IPRH_INT62 (0x40000000)
  388. #define INTC_IPRH_INT61 (0x20000000)
  389. #define INTC_IPRH_INT60 (0x10000000)
  390. #define INTC_IPRH_INT59 (0x08000000)
  391. #define INTC_IPRH_INT58 (0x04000000)
  392. #define INTC_IPRH_INT57 (0x02000000)
  393. #define INTC_IPRH_INT56 (0x01000000)
  394. #define INTC_IPRH_INT55 (0x00800000)
  395. #define INTC_IPRH_INT54 (0x00400000)
  396. #define INTC_IPRH_INT53 (0x00200000)
  397. #define INTC_IPRH_INT52 (0x00100000)
  398. #define INTC_IPRH_INT51 (0x00080000)
  399. #define INTC_IPRH_INT50 (0x00040000)
  400. #define INTC_IPRH_INT49 (0x00020000)
  401. #define INTC_IPRH_INT48 (0x00010000)
  402. #define INTC_IPRH_INT47 (0x00008000)
  403. #define INTC_IPRH_INT46 (0x00004000)
  404. #define INTC_IPRH_INT45 (0x00002000)
  405. #define INTC_IPRH_INT44 (0x00001000)
  406. #define INTC_IPRH_INT43 (0x00000800)
  407. #define INTC_IPRH_INT42 (0x00000400)
  408. #define INTC_IPRH_INT41 (0x00000200)
  409. #define INTC_IPRH_INT40 (0x00000100)
  410. #define INTC_IPRH_INT39 (0x00000080)
  411. #define INTC_IPRH_INT38 (0x00000040)
  412. #define INTC_IPRH_INT37 (0x00000020)
  413. #define INTC_IPRH_INT36 (0x00000010)
  414. #define INTC_IPRH_INT35 (0x00000008)
  415. #define INTC_IPRH_INT34 (0x00000004)
  416. #define INTC_IPRH_INT33 (0x00000002)
  417. #define INTC_IPRH_INT32 (0x00000001)
  418. /* Bit definitions and macros for INTC_IPRL */
  419. #define INTC_IPRL_INT31 (0x80000000)
  420. #define INTC_IPRL_INT30 (0x40000000)
  421. #define INTC_IPRL_INT29 (0x20000000)
  422. #define INTC_IPRL_INT28 (0x10000000)
  423. #define INTC_IPRL_INT27 (0x08000000)
  424. #define INTC_IPRL_INT26 (0x04000000)
  425. #define INTC_IPRL_INT25 (0x02000000)
  426. #define INTC_IPRL_INT24 (0x01000000)
  427. #define INTC_IPRL_INT23 (0x00800000)
  428. #define INTC_IPRL_INT22 (0x00400000)
  429. #define INTC_IPRL_INT21 (0x00200000)
  430. #define INTC_IPRL_INT20 (0x00100000)
  431. #define INTC_IPRL_INT19 (0x00080000)
  432. #define INTC_IPRL_INT18 (0x00040000)
  433. #define INTC_IPRL_INT17 (0x00020000)
  434. #define INTC_IPRL_INT16 (0x00010000)
  435. #define INTC_IPRL_INT15 (0x00008000)
  436. #define INTC_IPRL_INT14 (0x00004000)
  437. #define INTC_IPRL_INT13 (0x00002000)
  438. #define INTC_IPRL_INT12 (0x00001000)
  439. #define INTC_IPRL_INT11 (0x00000800)
  440. #define INTC_IPRL_INT10 (0x00000400)
  441. #define INTC_IPRL_INT9 (0x00000200)
  442. #define INTC_IPRL_INT8 (0x00000100)
  443. #define INTC_IPRL_INT7 (0x00000080)
  444. #define INTC_IPRL_INT6 (0x00000040)
  445. #define INTC_IPRL_INT5 (0x00000020)
  446. #define INTC_IPRL_INT4 (0x00000010)
  447. #define INTC_IPRL_INT3 (0x00000008)
  448. #define INTC_IPRL_INT2 (0x00000004)
  449. #define INTC_IPRL_INT1 (0x00000002)
  450. #define INTC_IPRL_INT0 (0x00000001)
  451. /* Bit definitions and macros for INTC_ICONFIG */
  452. #define INTC_ICFG_ELVLPRI7 (0x8000)
  453. #define INTC_ICFG_ELVLPRI6 (0x4000)
  454. #define INTC_ICFG_ELVLPRI5 (0x2000)
  455. #define INTC_ICFG_ELVLPRI4 (0x1000)
  456. #define INTC_ICFG_ELVLPRI3 (0x0800)
  457. #define INTC_ICFG_ELVLPRI2 (0x0400)
  458. #define INTC_ICFG_ELVLPRI1 (0x0200)
  459. #define INTC_ICFG_EMASK (0x0020)
  460. /* Bit definitions and macros for INTC_SIMR */
  461. #define INTC_SIMR_SALL (0x40)
  462. #define INTC_SIMR_SIMR(x) ((x)&0x3F)
  463. /* Bit definitions and macros for INTC_CIMR */
  464. #define INTC_CIMR_CALL (0x40)
  465. #define INTC_CIMR_CIMR(x) ((x)&0x3F)
  466. /* Bit definitions and macros for INTC_CLMASK */
  467. #define INTC_CLMASK_CLMASK(x) ((x)&0x0F)
  468. /* Bit definitions and macros for INTC_SLMASK */
  469. #define INTC_SLMASK_SLMASK(x) ((x)&0x0F)
  470. /* Bit definitions and macros for INTC_ICR */
  471. #define INTC_ICR_IL(x) ((x)&0x07)
  472. /*********************************************************************
  473. * I2C Module (I2C)
  474. *********************************************************************/
  475. /* Bit definitions and macros for I2C_AR */
  476. #define I2C_AR_ADR(x) (((x)&0x7F)<<1)
  477. /* Bit definitions and macros for I2C_FDR */
  478. #define I2C_FDR_IC(x) ((x)&0x3F)
  479. /* Bit definitions and macros for I2C_CR */
  480. #define I2C_CR_IEN (0x80)
  481. #define I2C_CR_IIEN (0x40)
  482. #define I2C_CR_MSTA (0x20)
  483. #define I2C_CR_MTX (0x10)
  484. #define I2C_CR_TXAK (0x08)
  485. #define I2C_CR_RSTA (0x04)
  486. /* Bit definitions and macros for I2C_SR */
  487. #define I2C_SR_ICF (0x80)
  488. #define I2C_SR_IAAS (0x40)
  489. #define I2C_SR_IBB (0x20)
  490. #define I2C_SR_IAL (0x10)
  491. #define I2C_SR_SRW (0x04)
  492. #define I2C_SR_IIF (0x02)
  493. #define I2C_SR_RXAK (0x01)
  494. /* Bit definitions and macros for I2C_ICR */
  495. #define I2C_ICR_BNBE (0x08)
  496. #define I2C_ICR_TE (0x04)
  497. #define I2C_ICR_RE (0x02)
  498. #define I2C_ICR_IE (0x01)
  499. /*********************************************************************
  500. * Queued Serial Peripheral Interface (QSPI)
  501. *********************************************************************/
  502. /* Bit definitions and macros for QSPI_QMR */
  503. #define QSPI_QMR_MSTR (0x8000)
  504. #define QSPI_QMR_DOHIE (0x4000)
  505. #define QSPI_QMR_BITS(x) (((x)&0x000F)<<10)
  506. #define QSPI_QMR_CPOL (0x0200)
  507. #define QSPI_QMR_CPHA (0x0100)
  508. #define QSPI_QMR_BAUD(x) ((x)&0x00FF)
  509. /* Bit definitions and macros for QSPI_QDLYR */
  510. #define QSPI_QDLYR_SPE (0x8000)
  511. #define QSPI_QDLYR_QCD(x) (((x)&0x007F)<<8)
  512. #define QSPI_QDLYR_DTL(x) ((x)&0x00FF)
  513. /* Bit definitions and macros for QSPI_QWR */
  514. #define QSPI_QWR_NEWQP(x) ((x)&0x000F)
  515. #define QSPI_QWR_ENDQP(x) (((x)&0x000F)<<8)
  516. #define QSPI_QWR_CSIV (0x1000)
  517. #define QSPI_QWR_WRTO (0x2000)
  518. #define QSPI_QWR_WREN (0x4000)
  519. #define QSPI_QWR_HALT (0x8000)
  520. /* Bit definitions and macros for QSPI_QIR */
  521. #define QSPI_QIR_WCEFB (0x8000)
  522. #define QSPI_QIR_ABRTB (0x4000)
  523. #define QSPI_QIR_ABRTL (0x1000)
  524. #define QSPI_QIR_WCEFE (0x0800)
  525. #define QSPI_QIR_ABRTE (0x0400)
  526. #define QSPI_QIR_SPIFE (0x0100)
  527. #define QSPI_QIR_WCEF (0x0008)
  528. #define QSPI_QIR_ABRT (0x0004)
  529. #define QSPI_QIR_SPIF (0x0001)
  530. /* Bit definitions and macros for QSPI_QAR */
  531. #define QSPI_QAR_ADDR(x) ((x)&0x003F)
  532. #define QSPI_QAR_TRANS (0x0000)
  533. #define QSPI_QAR_RECV (0x0010)
  534. #define QSPI_QAR_CMD (0x0020)
  535. /* Bit definitions and macros for QSPI_QDR */
  536. #define QSPI_QDR_CONT (0x8000)
  537. #define QSPI_QDR_BITSE (0x4000)
  538. #define QSPI_QDR_DT (0x2000)
  539. #define QSPI_QDR_DSCK (0x1000)
  540. #define QSPI_QDR_QSPI_CS3 (0x0800)
  541. #define QSPI_QDR_QSPI_CS2 (0x0400)
  542. #define QSPI_QDR_QSPI_CS1 (0x0200)
  543. #define QSPI_QDR_QSPI_CS0 (0x0100)
  544. /*********************************************************************
  545. * Pulse Width Modulation (PWM)
  546. *********************************************************************/
  547. /* Bit definitions and macros for PWM_E */
  548. #define PWM_EN_PWME7 (0x80)
  549. #define PWM_EN_PWME5 (0x20)
  550. #define PWM_EN_PWME3 (0x08)
  551. #define PWM_EN_PWME1 (0x02)
  552. /* Bit definitions and macros for PWM_POL */
  553. #define PWM_POL_PPOL7 (0x80)
  554. #define PWM_POL_PPOL5 (0x20)
  555. #define PWM_POL_PPOL3 (0x08)
  556. #define PWM_POL_PPOL1 (0x02)
  557. /* Bit definitions and macros for PWM_CLK */
  558. #define PWM_CLK_PCLK7 (0x80)
  559. #define PWM_CLK_PCLK5 (0x20)
  560. #define PWM_CLK_PCLK3 (0x08)
  561. #define PWM_CLK_PCLK1 (0x02)
  562. /* Bit definitions and macros for PWM_PRCLK */
  563. #define PWM_PRCLK_PCKB(x) (((x)&0x07)<<4)
  564. #define PWM_PRCLK_PCKA(x) ((x)&0x07)
  565. /* Bit definitions and macros for PWM_CAE */
  566. #define PWM_CAE_CAE7 (0x80)
  567. #define PWM_CAE_CAE5 (0x20)
  568. #define PWM_CAE_CAE3 (0x08)
  569. #define PWM_CAE_CAE1 (0x02)
  570. /* Bit definitions and macros for PWM_CTL */
  571. #define PWM_CTL_CON67 (0x80)
  572. #define PWM_CTL_CON45 (0x40)
  573. #define PWM_CTL_CON23 (0x20)
  574. #define PWM_CTL_CON01 (0x10)
  575. #define PWM_CTL_PSWAR (0x08)
  576. #define PWM_CTL_PFRZ (0x04)
  577. /* Bit definitions and macros for PWM_SDN */
  578. #define PWM_SDN_IF (0x80)
  579. #define PWM_SDN_IE (0x40)
  580. #define PWM_SDN_RESTART (0x20)
  581. #define PWM_SDN_LVL (0x10)
  582. #define PWM_SDN_PWM7IN (0x04)
  583. #define PWM_SDN_PWM7IL (0x02)
  584. #define PWM_SDN_SDNEN (0x01)
  585. /*********************************************************************
  586. * Watchdog Timer Modules (WTM)
  587. *********************************************************************/
  588. /* Bit definitions and macros for WTM_WCR */
  589. #define WTM_WCR_WAIT (0x0008)
  590. #define WTM_WCR_DOZE (0x0004)
  591. #define WTM_WCR_HALTED (0x0002)
  592. #define WTM_WCR_EN (0x0001)
  593. /*********************************************************************
  594. * Chip Configuration Module (CCM)
  595. *********************************************************************/
  596. /* Bit definitions and macros for CCM_CCR */
  597. #define CCM_CCR_CSC(x) (((x)&0x0003)<<8|0x0001)
  598. #define CCM_CCR_LIMP (0x0041)
  599. #define CCM_CCR_LOAD (0x0021)
  600. #define CCM_CCR_BOOTPS(x) (((x)&0x0003)<<3|0x0001)
  601. #define CCM_CCR_OSC_MODE (0x0005)
  602. #define CCM_CCR_PLL_MODE (0x0003)
  603. #define CCM_CCR_RESERVED (0x0001)
  604. /* Bit definitions and macros for CCM_RCON */
  605. #define CCM_RCON_CSC(x) (((x)&0x0003)<<8|0x0001)
  606. #define CCM_RCON_LIMP (0x0041)
  607. #define CCM_RCON_LOAD (0x0021)
  608. #define CCM_RCON_BOOTPS(x) (((x)&0x0003)<<3|0x0001)
  609. #define CCM_RCON_OSC_MODE (0x0005)
  610. #define CCM_RCON_PLL_MODE (0x0003)
  611. #define CCM_RCON_RESERVED (0x0001)
  612. /* Bit definitions and macros for CCM_CIR */
  613. #define CCM_CIR_PIN(x) (((x)&0x03FF)<<6)
  614. #define CCM_CIR_PRN(x) ((x)&0x003F)
  615. /* Bit definitions and macros for CCM_MISCCR */
  616. #define CCM_MISCCR_PLL_LOCK (0x2000)
  617. #define CCM_MISCCR_LIMP (0x1000)
  618. #define CCM_MISCCR_LCD_CHEN (0x0100)
  619. #define CCM_MISCCR_SSI_PUE (0x0080)
  620. #define CCM_MISCCR_SSI_PUS (0x0040)
  621. #define CCM_MISCCR_TIM_DMA (0x0020)
  622. #define CCM_MISCCR_SSI_SRC (0x0010)
  623. #define CCM_MISCCR_USBDIV (0x0002)
  624. #define CCM_MISCCR_USBSRC (0x0001)
  625. /* Bit definitions and macros for CCM_CDR */
  626. #define CCM_CDR_LPDIV(x) (((x)&0x000F)<<8)
  627. #define CCM_CDR_SSIDIV(x) ((x)&0x000F)
  628. /* Bit definitions and macros for CCM_UHCSR */
  629. #define CCM_UHCSR_PORTIND(x) (((x)&0x0003)<<14)
  630. #define CCM_UHCSR_WKUP (0x0004)
  631. #define CCM_UHCSR_UHMIE (0x0002)
  632. #define CCM_UHCSR_XPDE (0x0001)
  633. /* Bit definitions and macros for CCM_UOCSR */
  634. #define CCM_UOCSR_PORTIND(x) (((x)&0x0003)<<14)
  635. #define CCM_UOCSR_DPPD (0x2000)
  636. #define CCM_UOCSR_DMPD (0x1000)
  637. #define CCM_UOCSR_DRV_VBUS (0x0800)
  638. #define CCM_UOCSR_CRG_VBUS (0x0400)
  639. #define CCM_UOCSR_DCR_VBUS (0x0200)
  640. #define CCM_UOCSR_DPPU (0x0100)
  641. #define CCM_UOCSR_AVLD (0x0080)
  642. #define CCM_UOCSR_BVLD (0x0040)
  643. #define CCM_UOCSR_VVLD (0x0020)
  644. #define CCM_UOCSR_SEND (0x0010)
  645. #define CCM_UOCSR_PWRFLT (0x0008)
  646. #define CCM_UOCSR_WKUP (0x0004)
  647. #define CCM_UOCSR_UOMIE (0x0002)
  648. #define CCM_UOCSR_XPDE (0x0001)
  649. /* not done yet */
  650. /*********************************************************************
  651. * General Purpose I/O (GPIO)
  652. *********************************************************************/
  653. /* Bit definitions and macros for GPIO_PODR_FECH_L */
  654. #define GPIO_PODR_FECH_L7 (0x80)
  655. #define GPIO_PODR_FECH_L6 (0x40)
  656. #define GPIO_PODR_FECH_L5 (0x20)
  657. #define GPIO_PODR_FECH_L4 (0x10)
  658. #define GPIO_PODR_FECH_L3 (0x08)
  659. #define GPIO_PODR_FECH_L2 (0x04)
  660. #define GPIO_PODR_FECH_L1 (0x02)
  661. #define GPIO_PODR_FECH_L0 (0x01)
  662. /* Bit definitions and macros for GPIO_PODR_SSI */
  663. #define GPIO_PODR_SSI_4 (0x10)
  664. #define GPIO_PODR_SSI_3 (0x08)
  665. #define GPIO_PODR_SSI_2 (0x04)
  666. #define GPIO_PODR_SSI_1 (0x02)
  667. #define GPIO_PODR_SSI_0 (0x01)
  668. /* Bit definitions and macros for GPIO_PODR_BUSCTL */
  669. #define GPIO_PODR_BUSCTL_3 (0x08)
  670. #define GPIO_PODR_BUSCTL_2 (0x04)
  671. #define GPIO_PODR_BUSCTL_1 (0x02)
  672. #define GPIO_PODR_BUSCTL_0 (0x01)
  673. /* Bit definitions and macros for GPIO_PODR_BE */
  674. #define GPIO_PODR_BE_3 (0x08)
  675. #define GPIO_PODR_BE_2 (0x04)
  676. #define GPIO_PODR_BE_1 (0x02)
  677. #define GPIO_PODR_BE_0 (0x01)
  678. /* Bit definitions and macros for GPIO_PODR_CS */
  679. #define GPIO_PODR_CS_5 (0x20)
  680. #define GPIO_PODR_CS_4 (0x10)
  681. #define GPIO_PODR_CS_3 (0x08)
  682. #define GPIO_PODR_CS_2 (0x04)
  683. #define GPIO_PODR_CS_1 (0x02)
  684. /* Bit definitions and macros for GPIO_PODR_PWM */
  685. #define GPIO_PODR_PWM_5 (0x20)
  686. #define GPIO_PODR_PWM_4 (0x10)
  687. #define GPIO_PODR_PWM_3 (0x08)
  688. #define GPIO_PODR_PWM_2 (0x04)
  689. /* Bit definitions and macros for GPIO_PODR_FECI2C */
  690. #define GPIO_PODR_FECI2C_3 (0x08)
  691. #define GPIO_PODR_FECI2C_2 (0x04)
  692. #define GPIO_PODR_FECI2C_1 (0x02)
  693. #define GPIO_PODR_FECI2C_0 (0x01)
  694. /* Bit definitions and macros for GPIO_PODR_UART */
  695. #define GPIO_PODR_UART_7 (0x80)
  696. #define GPIO_PODR_UART_6 (0x40)
  697. #define GPIO_PODR_UART_5 (0x20)
  698. #define GPIO_PODR_UART_4 (0x10)
  699. #define GPIO_PODR_UART_3 (0x08)
  700. #define GPIO_PODR_UART_2 (0x04)
  701. #define GPIO_PODR_UART_1 (0x02)
  702. #define GPIO_PODR_UART_0 (0x01)
  703. /* Bit definitions and macros for GPIO_PODR_QSPI */
  704. #define GPIO_PODR_QSPI_5 (0x20)
  705. #define GPIO_PODR_QSPI_4 (0x10)
  706. #define GPIO_PODR_QSPI_3 (0x08)
  707. #define GPIO_PODR_QSPI_2 (0x04)
  708. #define GPIO_PODR_QSPI_1 (0x02)
  709. #define GPIO_PODR_QSPI_0 (0x01)
  710. /* Bit definitions and macros for GPIO_PODR_TIMER */
  711. #define GPIO_PODR_TIMER_3 (0x08)
  712. #define GPIO_PODR_TIMER_2 (0x04)
  713. #define GPIO_PODR_TIMER_1 (0x02)
  714. #define GPIO_PODR_TIMER_0 (0x01)
  715. /* Bit definitions and macros for GPIO_PODR_LCDDATAH */
  716. #define GPIO_PODR_LCDDATAH_1 (0x02)
  717. #define GPIO_PODR_LCDDATAH_0 (0x01)
  718. /* Bit definitions and macros for GPIO_PODR_LCDDATAM */
  719. #define GPIO_PODR_LCDDATAM_7 (0x80)
  720. #define GPIO_PODR_LCDDATAM_6 (0x40)
  721. #define GPIO_PODR_LCDDATAM_5 (0x20)
  722. #define GPIO_PODR_LCDDATAM_4 (0x10)
  723. #define GPIO_PODR_LCDDATAM_3 (0x08)
  724. #define GPIO_PODR_LCDDATAM_2 (0x04)
  725. #define GPIO_PODR_LCDDATAM_1 (0x02)
  726. #define GPIO_PODR_LCDDATAM_0 (0x01)
  727. /* Bit definitions and macros for GPIO_PODR_LCDDATAL */
  728. #define GPIO_PODR_LCDDATAL_7 (0x80)
  729. #define GPIO_PODR_LCDDATAL_6 (0x40)
  730. #define GPIO_PODR_LCDDATAL_5 (0x20)
  731. #define GPIO_PODR_LCDDATAL_4 (0x10)
  732. #define GPIO_PODR_LCDDATAL_3 (0x08)
  733. #define GPIO_PODR_LCDDATAL_2 (0x04)
  734. #define GPIO_PODR_LCDDATAL_1 (0x02)
  735. #define GPIO_PODR_LCDDATAL_0 (0x01)
  736. /* Bit definitions and macros for GPIO_PODR_LCDCTLH */
  737. #define GPIO_PODR_LCDCTLH_0 (0x01)
  738. /* Bit definitions and macros for GPIO_PODR_LCDCTLL */
  739. #define GPIO_PODR_LCDCTLL_7 (0x80)
  740. #define GPIO_PODR_LCDCTLL_6 (0x40)
  741. #define GPIO_PODR_LCDCTLL_5 (0x20)
  742. #define GPIO_PODR_LCDCTLL_4 (0x10)
  743. #define GPIO_PODR_LCDCTLL_3 (0x08)
  744. #define GPIO_PODR_LCDCTLL_2 (0x04)
  745. #define GPIO_PODR_LCDCTLL_1 (0x02)
  746. #define GPIO_PODR_LCDCTLL_0 (0x01)
  747. /* Bit definitions and macros for GPIO_PDDR_FECH */
  748. #define GPIO_PDDR_FECH_L7 (0x80)
  749. #define GPIO_PDDR_FECH_L6 (0x40)
  750. #define GPIO_PDDR_FECH_L5 (0x20)
  751. #define GPIO_PDDR_FECH_L4 (0x10)
  752. #define GPIO_PDDR_FECH_L3 (0x08)
  753. #define GPIO_PDDR_FECH_L2 (0x04)
  754. #define GPIO_PDDR_FECH_L1 (0x02)
  755. #define GPIO_PDDR_FECH_L0 (0x01)
  756. /* Bit definitions and macros for GPIO_PDDR_SSI */
  757. #define GPIO_PDDR_SSI_4 (0x10)
  758. #define GPIO_PDDR_SSI_3 (0x08)
  759. #define GPIO_PDDR_SSI_2 (0x04)
  760. #define GPIO_PDDR_SSI_1 (0x02)
  761. #define GPIO_PDDR_SSI_0 (0x01)
  762. /* Bit definitions and macros for GPIO_PDDR_BUSCTL */
  763. #define GPIO_PDDR_BUSCTL_3 (0x08)
  764. #define GPIO_PDDR_BUSCTL_2 (0x04)
  765. #define GPIO_PDDR_BUSCTL_1 (0x02)
  766. #define GPIO_PDDR_BUSCTL_0 (0x01)
  767. /* Bit definitions and macros for GPIO_PDDR_BE */
  768. #define GPIO_PDDR_BE_3 (0x08)
  769. #define GPIO_PDDR_BE_2 (0x04)
  770. #define GPIO_PDDR_BE_1 (0x02)
  771. #define GPIO_PDDR_BE_0 (0x01)
  772. /* Bit definitions and macros for GPIO_PDDR_CS */
  773. #define GPIO_PDDR_CS_1 (0x02)
  774. #define GPIO_PDDR_CS_2 (0x04)
  775. #define GPIO_PDDR_CS_3 (0x08)
  776. #define GPIO_PDDR_CS_4 (0x10)
  777. #define GPIO_PDDR_CS_5 (0x20)
  778. /* Bit definitions and macros for GPIO_PDDR_PWM */
  779. #define GPIO_PDDR_PWM_2 (0x04)
  780. #define GPIO_PDDR_PWM_3 (0x08)
  781. #define GPIO_PDDR_PWM_4 (0x10)
  782. #define GPIO_PDDR_PWM_5 (0x20)
  783. /* Bit definitions and macros for GPIO_PDDR_FECI2C */
  784. #define GPIO_PDDR_FECI2C_0 (0x01)
  785. #define GPIO_PDDR_FECI2C_1 (0x02)
  786. #define GPIO_PDDR_FECI2C_2 (0x04)
  787. #define GPIO_PDDR_FECI2C_3 (0x08)
  788. /* Bit definitions and macros for GPIO_PDDR_UART */
  789. #define GPIO_PDDR_UART_0 (0x01)
  790. #define GPIO_PDDR_UART_1 (0x02)
  791. #define GPIO_PDDR_UART_2 (0x04)
  792. #define GPIO_PDDR_UART_3 (0x08)
  793. #define GPIO_PDDR_UART_4 (0x10)
  794. #define GPIO_PDDR_UART_5 (0x20)
  795. #define GPIO_PDDR_UART_6 (0x40)
  796. #define GPIO_PDDR_UART_7 (0x80)
  797. /* Bit definitions and macros for GPIO_PDDR_QSPI */
  798. #define GPIO_PDDR_QSPI_0 (0x01)
  799. #define GPIO_PDDR_QSPI_1 (0x02)
  800. #define GPIO_PDDR_QSPI_2 (0x04)
  801. #define GPIO_PDDR_QSPI_3 (0x08)
  802. #define GPIO_PDDR_QSPI_4 (0x10)
  803. #define GPIO_PDDR_QSPI_5 (0x20)
  804. /* Bit definitions and macros for GPIO_PDDR_TIMER */
  805. #define GPIO_PDDR_TIMER_0 (0x01)
  806. #define GPIO_PDDR_TIMER_1 (0x02)
  807. #define GPIO_PDDR_TIMER_2 (0x04)
  808. #define GPIO_PDDR_TIMER_3 (0x08)
  809. /* Bit definitions and macros for GPIO_PDDR_LCDDATAH */
  810. #define GPIO_PDDR_LCDDATAH_0 (0x01)
  811. #define GPIO_PDDR_LCDDATAH_1 (0x02)
  812. /* Bit definitions and macros for GPIO_PDDR_LCDDATAM */
  813. #define GPIO_PDDR_LCDDATAM_0 (0x01)
  814. #define GPIO_PDDR_LCDDATAM_1 (0x02)
  815. #define GPIO_PDDR_LCDDATAM_2 (0x04)
  816. #define GPIO_PDDR_LCDDATAM_3 (0x08)
  817. #define GPIO_PDDR_LCDDATAM_4 (0x10)
  818. #define GPIO_PDDR_LCDDATAM_5 (0x20)
  819. #define GPIO_PDDR_LCDDATAM_6 (0x40)
  820. #define GPIO_PDDR_LCDDATAM_7 (0x80)
  821. /* Bit definitions and macros for GPIO_PDDR_LCDDATAL */
  822. #define GPIO_PDDR_LCDDATAL_0 (0x01)
  823. #define GPIO_PDDR_LCDDATAL_1 (0x02)
  824. #define GPIO_PDDR_LCDDATAL_2 (0x04)
  825. #define GPIO_PDDR_LCDDATAL_3 (0x08)
  826. #define GPIO_PDDR_LCDDATAL_4 (0x10)
  827. #define GPIO_PDDR_LCDDATAL_5 (0x20)
  828. #define GPIO_PDDR_LCDDATAL_6 (0x40)
  829. #define GPIO_PDDR_LCDDATAL_7 (0x80)
  830. /* Bit definitions and macros for GPIO_PDDR_LCDCTLH */
  831. #define GPIO_PDDR_LCDCTLH_0 (0x01)
  832. /* Bit definitions and macros for GPIO_PDDR_LCDCTLL */
  833. #define GPIO_PDDR_LCDCTLL_0 (0x01)
  834. #define GPIO_PDDR_LCDCTLL_1 (0x02)
  835. #define GPIO_PDDR_LCDCTLL_2 (0x04)
  836. #define GPIO_PDDR_LCDCTLL_3 (0x08)
  837. #define GPIO_PDDR_LCDCTLL_4 (0x10)
  838. #define GPIO_PDDR_LCDCTLL_5 (0x20)
  839. #define GPIO_PDDR_LCDCTLL_6 (0x40)
  840. #define GPIO_PDDR_LCDCTLL_7 (0x80)
  841. /* Bit definitions and macros for GPIO_PPDSDR_FECH */
  842. #define GPIO_PPDSDR_FECH_L0 (0x01)
  843. #define GPIO_PPDSDR_FECH_L1 (0x02)
  844. #define GPIO_PPDSDR_FECH_L2 (0x04)
  845. #define GPIO_PPDSDR_FECH_L3 (0x08)
  846. #define GPIO_PPDSDR_FECH_L4 (0x10)
  847. #define GPIO_PPDSDR_FECH_L5 (0x20)
  848. #define GPIO_PPDSDR_FECH_L6 (0x40)
  849. #define GPIO_PPDSDR_FECH_L7 (0x80)
  850. /* Bit definitions and macros for GPIO_PPDSDR_SSI */
  851. #define GPIO_PPDSDR_SSI_0 (0x01)
  852. #define GPIO_PPDSDR_SSI_1 (0x02)
  853. #define GPIO_PPDSDR_SSI_2 (0x04)
  854. #define GPIO_PPDSDR_SSI_3 (0x08)
  855. #define GPIO_PPDSDR_SSI_4 (0x10)
  856. /* Bit definitions and macros for GPIO_PPDSDR_BUSCTL */
  857. #define GPIO_PPDSDR_BUSCTL_0 (0x01)
  858. #define GPIO_PPDSDR_BUSCTL_1 (0x02)
  859. #define GPIO_PPDSDR_BUSCTL_2 (0x04)
  860. #define GPIO_PPDSDR_BUSCTL_3 (0x08)
  861. /* Bit definitions and macros for GPIO_PPDSDR_BE */
  862. #define GPIO_PPDSDR_BE_0 (0x01)
  863. #define GPIO_PPDSDR_BE_1 (0x02)
  864. #define GPIO_PPDSDR_BE_2 (0x04)
  865. #define GPIO_PPDSDR_BE_3 (0x08)
  866. /* Bit definitions and macros for GPIO_PPDSDR_CS */
  867. #define GPIO_PPDSDR_CS_1 (0x02)
  868. #define GPIO_PPDSDR_CS_2 (0x04)
  869. #define GPIO_PPDSDR_CS_3 (0x08)
  870. #define GPIO_PPDSDR_CS_4 (0x10)
  871. #define GPIO_PPDSDR_CS_5 (0x20)
  872. /* Bit definitions and macros for GPIO_PPDSDR_PWM */
  873. #define GPIO_PPDSDR_PWM_2 (0x04)
  874. #define GPIO_PPDSDR_PWM_3 (0x08)
  875. #define GPIO_PPDSDR_PWM_4 (0x10)
  876. #define GPIO_PPDSDR_PWM_5 (0x20)
  877. /* Bit definitions and macros for GPIO_PPDSDR_FECI2C */
  878. #define GPIO_PPDSDR_FECI2C_0 (0x01)
  879. #define GPIO_PPDSDR_FECI2C_1 (0x02)
  880. #define GPIO_PPDSDR_FECI2C_2 (0x04)
  881. #define GPIO_PPDSDR_FECI2C_3 (0x08)
  882. /* Bit definitions and macros for GPIO_PPDSDR_UART */
  883. #define GPIO_PPDSDR_UART_0 (0x01)
  884. #define GPIO_PPDSDR_UART_1 (0x02)
  885. #define GPIO_PPDSDR_UART_2 (0x04)
  886. #define GPIO_PPDSDR_UART_3 (0x08)
  887. #define GPIO_PPDSDR_UART_4 (0x10)
  888. #define GPIO_PPDSDR_UART_5 (0x20)
  889. #define GPIO_PPDSDR_UART_6 (0x40)
  890. #define GPIO_PPDSDR_UART_7 (0x80)
  891. /* Bit definitions and macros for GPIO_PPDSDR_QSPI */
  892. #define GPIO_PPDSDR_QSPI_0 (0x01)
  893. #define GPIO_PPDSDR_QSPI_1 (0x02)
  894. #define GPIO_PPDSDR_QSPI_2 (0x04)
  895. #define GPIO_PPDSDR_QSPI_3 (0x08)
  896. #define GPIO_PPDSDR_QSPI_4 (0x10)
  897. #define GPIO_PPDSDR_QSPI_5 (0x20)
  898. /* Bit definitions and macros for GPIO_PPDSDR_TIMER */
  899. #define GPIO_PPDSDR_TIMER_0 (0x01)
  900. #define GPIO_PPDSDR_TIMER_1 (0x02)
  901. #define GPIO_PPDSDR_TIMER_2 (0x04)
  902. #define GPIO_PPDSDR_TIMER_3 (0x08)
  903. /* Bit definitions and macros for GPIO_PPDSDR_LCDDATAH */
  904. #define GPIO_PPDSDR_LCDDATAH_0 (0x01)
  905. #define GPIO_PPDSDR_LCDDATAH_1 (0x02)
  906. /* Bit definitions and macros for GPIO_PPDSDR_LCDDATAM */
  907. #define GPIO_PPDSDR_LCDDATAM_0 (0x01)
  908. #define GPIO_PPDSDR_LCDDATAM_1 (0x02)
  909. #define GPIO_PPDSDR_LCDDATAM_2 (0x04)
  910. #define GPIO_PPDSDR_LCDDATAM_3 (0x08)
  911. #define GPIO_PPDSDR_LCDDATAM_4 (0x10)
  912. #define GPIO_PPDSDR_LCDDATAM_5 (0x20)
  913. #define GPIO_PPDSDR_LCDDATAM_6 (0x40)
  914. #define GPIO_PPDSDR_LCDDATAM_7 (0x80)
  915. /* Bit definitions and macros for GPIO_PPDSDR_LCDDATAL */
  916. #define GPIO_PPDSDR_LCDDATAL_0 (0x01)
  917. #define GPIO_PPDSDR_LCDDATAL_1 (0x02)
  918. #define GPIO_PPDSDR_LCDDATAL_2 (0x04)
  919. #define GPIO_PPDSDR_LCDDATAL_3 (0x08)
  920. #define GPIO_PPDSDR_LCDDATAL_4 (0x10)
  921. #define GPIO_PPDSDR_LCDDATAL_5 (0x20)
  922. #define GPIO_PPDSDR_LCDDATAL_6 (0x40)
  923. #define GPIO_PPDSDR_LCDDATAL_7 (0x80)
  924. /* Bit definitions and macros for GPIO_PPDSDR_LCDCTLH */
  925. #define GPIO_PPDSDR_LCDCTLH_0 (0x01)
  926. /* Bit definitions and macros for GPIO_PPDSDR_LCDCTLL */
  927. #define GPIO_PPDSDR_LCDCTLL_0 (0x01)
  928. #define GPIO_PPDSDR_LCDCTLL_1 (0x02)
  929. #define GPIO_PPDSDR_LCDCTLL_2 (0x04)
  930. #define GPIO_PPDSDR_LCDCTLL_3 (0x08)
  931. #define GPIO_PPDSDR_LCDCTLL_4 (0x10)
  932. #define GPIO_PPDSDR_LCDCTLL_5 (0x20)
  933. #define GPIO_PPDSDR_LCDCTLL_6 (0x40)
  934. #define GPIO_PPDSDR_LCDCTLL_7 (0x80)
  935. /* Bit definitions and macros for GPIO_PCLRR_FECH */
  936. #define GPIO_PCLRR_FECH_L0 (0x01)
  937. #define GPIO_PCLRR_FECH_L1 (0x02)
  938. #define GPIO_PCLRR_FECH_L2 (0x04)
  939. #define GPIO_PCLRR_FECH_L3 (0x08)
  940. #define GPIO_PCLRR_FECH_L4 (0x10)
  941. #define GPIO_PCLRR_FECH_L5 (0x20)
  942. #define GPIO_PCLRR_FECH_L6 (0x40)
  943. #define GPIO_PCLRR_FECH_L7 (0x80)
  944. /* Bit definitions and macros for GPIO_PCLRR_SSI */
  945. #define GPIO_PCLRR_SSI_0 (0x01)
  946. #define GPIO_PCLRR_SSI_1 (0x02)
  947. #define GPIO_PCLRR_SSI_2 (0x04)
  948. #define GPIO_PCLRR_SSI_3 (0x08)
  949. #define GPIO_PCLRR_SSI_4 (0x10)
  950. /* Bit definitions and macros for GPIO_PCLRR_BUSCTL */
  951. #define GPIO_PCLRR_BUSCTL_L0 (0x01)
  952. #define GPIO_PCLRR_BUSCTL_L1 (0x02)
  953. #define GPIO_PCLRR_BUSCTL_L2 (0x04)
  954. #define GPIO_PCLRR_BUSCTL_L3 (0x08)
  955. /* Bit definitions and macros for GPIO_PCLRR_BE */
  956. #define GPIO_PCLRR_BE_0 (0x01)
  957. #define GPIO_PCLRR_BE_1 (0x02)
  958. #define GPIO_PCLRR_BE_2 (0x04)
  959. #define GPIO_PCLRR_BE_3 (0x08)
  960. /* Bit definitions and macros for GPIO_PCLRR_CS */
  961. #define GPIO_PCLRR_CS_1 (0x02)
  962. #define GPIO_PCLRR_CS_2 (0x04)
  963. #define GPIO_PCLRR_CS_3 (0x08)
  964. #define GPIO_PCLRR_CS_4 (0x10)
  965. #define GPIO_PCLRR_CS_5 (0x20)
  966. /* Bit definitions and macros for GPIO_PCLRR_PWM */
  967. #define GPIO_PCLRR_PWM_2 (0x04)
  968. #define GPIO_PCLRR_PWM_3 (0x08)
  969. #define GPIO_PCLRR_PWM_4 (0x10)
  970. #define GPIO_PCLRR_PWM_5 (0x20)
  971. /* Bit definitions and macros for GPIO_PCLRR_FECI2C */
  972. #define GPIO_PCLRR_FECI2C_0 (0x01)
  973. #define GPIO_PCLRR_FECI2C_1 (0x02)
  974. #define GPIO_PCLRR_FECI2C_2 (0x04)
  975. #define GPIO_PCLRR_FECI2C_3 (0x08)
  976. /* Bit definitions and macros for GPIO_PCLRR_UART */
  977. #define GPIO_PCLRR_UART0 (0x01)
  978. #define GPIO_PCLRR_UART1 (0x02)
  979. #define GPIO_PCLRR_UART2 (0x04)
  980. #define GPIO_PCLRR_UART3 (0x08)
  981. #define GPIO_PCLRR_UART4 (0x10)
  982. #define GPIO_PCLRR_UART5 (0x20)
  983. #define GPIO_PCLRR_UART6 (0x40)
  984. #define GPIO_PCLRR_UART7 (0x80)
  985. /* Bit definitions and macros for GPIO_PCLRR_QSPI */
  986. #define GPIO_PCLRR_QSPI0 (0x01)
  987. #define GPIO_PCLRR_QSPI1 (0x02)
  988. #define GPIO_PCLRR_QSPI2 (0x04)
  989. #define GPIO_PCLRR_QSPI3 (0x08)
  990. #define GPIO_PCLRR_QSPI4 (0x10)
  991. #define GPIO_PCLRR_QSPI5 (0x20)
  992. /* Bit definitions and macros for GPIO_PCLRR_TIMER */
  993. #define GPIO_PCLRR_TIMER0 (0x01)
  994. #define GPIO_PCLRR_TIMER1 (0x02)
  995. #define GPIO_PCLRR_TIMER2 (0x04)
  996. #define GPIO_PCLRR_TIMER3 (0x08)
  997. /* Bit definitions and macros for GPIO_PCLRR_LCDDATAH */
  998. #define GPIO_PCLRR_LCDDATAH0 (0x01)
  999. #define GPIO_PCLRR_LCDDATAH1 (0x02)
  1000. /* Bit definitions and macros for GPIO_PCLRR_LCDDATAM */
  1001. #define GPIO_PCLRR_LCDDATAM0 (0x01)
  1002. #define GPIO_PCLRR_LCDDATAM1 (0x02)
  1003. #define GPIO_PCLRR_LCDDATAM2 (0x04)
  1004. #define GPIO_PCLRR_LCDDATAM3 (0x08)
  1005. #define GPIO_PCLRR_LCDDATAM4 (0x10)
  1006. #define GPIO_PCLRR_LCDDATAM5 (0x20)
  1007. #define GPIO_PCLRR_LCDDATAM6 (0x40)
  1008. #define GPIO_PCLRR_LCDDATAM7 (0x80)
  1009. /* Bit definitions and macros for GPIO_PCLRR_LCDDATAL */
  1010. #define GPIO_PCLRR_LCDDATAL0 (0x01)
  1011. #define GPIO_PCLRR_LCDDATAL1 (0x02)
  1012. #define GPIO_PCLRR_LCDDATAL2 (0x04)
  1013. #define GPIO_PCLRR_LCDDATAL3 (0x08)
  1014. #define GPIO_PCLRR_LCDDATAL4 (0x10)
  1015. #define GPIO_PCLRR_LCDDATAL5 (0x20)
  1016. #define GPIO_PCLRR_LCDDATAL6 (0x40)
  1017. #define GPIO_PCLRR_LCDDATAL7 (0x80)
  1018. /* Bit definitions and macros for GPIO_PCLRR_LCDCTLH */
  1019. #define GPIO_PCLRR_LCDCTLH_PCLRR_LCDCTLH0 (0x01)
  1020. /* Bit definitions and macros for GPIO_PCLRR_LCDCTLL */
  1021. #define GPIO_PCLRR_LCDCTLL0 (0x01)
  1022. #define GPIO_PCLRR_LCDCTLL1 (0x02)
  1023. #define GPIO_PCLRR_LCDCTLL2 (0x04)
  1024. #define GPIO_PCLRR_LCDCTLL3 (0x08)
  1025. #define GPIO_PCLRR_LCDCTLL4 (0x10)
  1026. #define GPIO_PCLRR_LCDCTLL5 (0x20)
  1027. #define GPIO_PCLRR_LCDCTLL6 (0x40)
  1028. #define GPIO_PCLRR_LCDCTLL7 (0x80)
  1029. /* Bit definitions and macros for GPIO_PAR_FEC */
  1030. #define GPIO_PAR_FEC_MII(x) (((x)&0x03)<<0)
  1031. #define GPIO_PAR_FEC_7W(x) (((x)&0x03)<<2)
  1032. #define GPIO_PAR_FEC_7W_GPIO (0x00)
  1033. #define GPIO_PAR_FEC_7W_URTS1 (0x04)
  1034. #define GPIO_PAR_FEC_7W_FEC (0x0C)
  1035. #define GPIO_PAR_FEC_MII_GPIO (0x00)
  1036. #define GPIO_PAR_FEC_MII_UART (0x01)
  1037. #define GPIO_PAR_FEC_MII_FEC (0x03)
  1038. /* Bit definitions and macros for GPIO_PAR_PWM */
  1039. #define GPIO_PAR_PWM1(x) (((x)&0x03)<<0)
  1040. #define GPIO_PAR_PWM3(x) (((x)&0x03)<<2)
  1041. #define GPIO_PAR_PWM5 (0x10)
  1042. #define GPIO_PAR_PWM7 (0x20)
  1043. /* Bit definitions and macros for GPIO_PAR_BUSCTL */
  1044. #define GPIO_PAR_BUSCTL_TS(x) (((x)&0x03)<<3)
  1045. #define GPIO_PAR_BUSCTL_RWB (0x20)
  1046. #define GPIO_PAR_BUSCTL_TA (0x40)
  1047. #define GPIO_PAR_BUSCTL_OE (0x80)
  1048. #define GPIO_PAR_BUSCTL_OE_GPIO (0x00)
  1049. #define GPIO_PAR_BUSCTL_OE_OE (0x80)
  1050. #define GPIO_PAR_BUSCTL_TA_GPIO (0x00)
  1051. #define GPIO_PAR_BUSCTL_TA_TA (0x40)
  1052. #define GPIO_PAR_BUSCTL_RWB_GPIO (0x00)
  1053. #define GPIO_PAR_BUSCTL_RWB_RWB (0x20)
  1054. #define GPIO_PAR_BUSCTL_TS_GPIO (0x00)
  1055. #define GPIO_PAR_BUSCTL_TS_DACK0 (0x10)
  1056. #define GPIO_PAR_BUSCTL_TS_TS (0x18)
  1057. /* Bit definitions and macros for GPIO_PAR_FECI2C */
  1058. #define GPIO_PAR_FECI2C_SDA(x) (((x)&0x03)<<0)
  1059. #define GPIO_PAR_FECI2C_SCL(x) (((x)&0x03)<<2)
  1060. #define GPIO_PAR_FECI2C_MDIO(x) (((x)&0x03)<<4)
  1061. #define GPIO_PAR_FECI2C_MDC(x) (((x)&0x03)<<6)
  1062. #define GPIO_PAR_FECI2C_MDC_GPIO (0x00)
  1063. #define GPIO_PAR_FECI2C_MDC_UTXD2 (0x40)
  1064. #define GPIO_PAR_FECI2C_MDC_SCL (0x80)
  1065. #define GPIO_PAR_FECI2C_MDC_EMDC (0xC0)
  1066. #define GPIO_PAR_FECI2C_MDIO_GPIO (0x00)
  1067. #define GPIO_PAR_FECI2C_MDIO_URXD2 (0x10)
  1068. #define GPIO_PAR_FECI2C_MDIO_SDA (0x20)
  1069. #define GPIO_PAR_FECI2C_MDIO_EMDIO (0x30)
  1070. #define GPIO_PAR_FECI2C_SCL_GPIO (0x00)
  1071. #define GPIO_PAR_FECI2C_SCL_UTXD2 (0x04)
  1072. #define GPIO_PAR_FECI2C_SCL_SCL (0x0C)
  1073. #define GPIO_PAR_FECI2C_SDA_GPIO (0x00)
  1074. #define GPIO_PAR_FECI2C_SDA_URXD2 (0x02)
  1075. #define GPIO_PAR_FECI2C_SDA_SDA (0x03)
  1076. /* Bit definitions and macros for GPIO_PAR_BE */
  1077. #define GPIO_PAR_BE0 (0x01)
  1078. #define GPIO_PAR_BE1 (0x02)
  1079. #define GPIO_PAR_BE2 (0x04)
  1080. #define GPIO_PAR_BE3 (0x08)
  1081. /* Bit definitions and macros for GPIO_PAR_CS */
  1082. #define GPIO_PAR_CS1 (0x02)
  1083. #define GPIO_PAR_CS2 (0x04)
  1084. #define GPIO_PAR_CS3 (0x08)
  1085. #define GPIO_PAR_CS4 (0x10)
  1086. #define GPIO_PAR_CS5 (0x20)
  1087. #define GPIO_PAR_CS1_GPIO (0x00)
  1088. #define GPIO_PAR_CS1_SDCS1 (0x01)
  1089. #define GPIO_PAR_CS1_CS1 (0x03)
  1090. /* Bit definitions and macros for GPIO_PAR_SSI */
  1091. #define GPIO_PAR_SSI_MCLK (0x0080)
  1092. #define GPIO_PAR_SSI_TXD(x) (((x)&0x0003)<<8)
  1093. #define GPIO_PAR_SSI_RXD(x) (((x)&0x0003)<<10)
  1094. #define GPIO_PAR_SSI_FS(x) (((x)&0x0003)<<12)
  1095. #define GPIO_PAR_SSI_BCLK(x) (((x)&0x0003)<<14)
  1096. /* Bit definitions and macros for GPIO_PAR_UART */
  1097. #define GPIO_PAR_UART_TXD0 (0x0001)
  1098. #define GPIO_PAR_UART_RXD0 (0x0002)
  1099. #define GPIO_PAR_UART_RTS0 (0x0004)
  1100. #define GPIO_PAR_UART_CTS0 (0x0008)
  1101. #define GPIO_PAR_UART_TXD1(x) (((x)&0x0003)<<4)
  1102. #define GPIO_PAR_UART_RXD1(x) (((x)&0x0003)<<6)
  1103. #define GPIO_PAR_UART_RTS1(x) (((x)&0x0003)<<8)
  1104. #define GPIO_PAR_UART_CTS1(x) (((x)&0x0003)<<10)
  1105. #define GPIO_PAR_UART_CTS1_GPIO (0x0000)
  1106. #define GPIO_PAR_UART_CTS1_SSI_BCLK (0x0800)
  1107. #define GPIO_PAR_UART_CTS1_ULPI_D7 (0x0400)
  1108. #define GPIO_PAR_UART_CTS1_UCTS1 (0x0C00)
  1109. #define GPIO_PAR_UART_RTS1_GPIO (0x0000)
  1110. #define GPIO_PAR_UART_RTS1_SSI_FS (0x0200)
  1111. #define GPIO_PAR_UART_RTS1_ULPI_D6 (0x0100)
  1112. #define GPIO_PAR_UART_RTS1_URTS1 (0x0300)
  1113. #define GPIO_PAR_UART_RXD1_GPIO (0x0000)
  1114. #define GPIO_PAR_UART_RXD1_SSI_RXD (0x0080)
  1115. #define GPIO_PAR_UART_RXD1_ULPI_D5 (0x0040)
  1116. #define GPIO_PAR_UART_RXD1_URXD1 (0x00C0)
  1117. #define GPIO_PAR_UART_TXD1_GPIO (0x0000)
  1118. #define GPIO_PAR_UART_TXD1_SSI_TXD (0x0020)
  1119. #define GPIO_PAR_UART_TXD1_ULPI_D4 (0x0010)
  1120. #define GPIO_PAR_UART_TXD1_UTXD1 (0x0030)
  1121. /* Bit definitions and macros for GPIO_PAR_QSPI */
  1122. #define GPIO_PAR_QSPI_SCK(x) (((x)&0x0003)<<4)
  1123. #define GPIO_PAR_QSPI_DOUT(x) (((x)&0x0003)<<6)
  1124. #define GPIO_PAR_QSPI_DIN(x) (((x)&0x0003)<<8)
  1125. #define GPIO_PAR_QSPI_PCS0(x) (((x)&0x0003)<<10)
  1126. #define GPIO_PAR_QSPI_PCS1(x) (((x)&0x0003)<<12)
  1127. #define GPIO_PAR_QSPI_PCS2(x) (((x)&0x0003)<<14)
  1128. /* Bit definitions and macros for GPIO_PAR_TIMER */
  1129. #define GPIO_PAR_TIN0(x) (((x)&0x03)<<0)
  1130. #define GPIO_PAR_TIN1(x) (((x)&0x03)<<2)
  1131. #define GPIO_PAR_TIN2(x) (((x)&0x03)<<4)
  1132. #define GPIO_PAR_TIN3(x) (((x)&0x03)<<6)
  1133. #define GPIO_PAR_TIN3_GPIO (0x00)
  1134. #define GPIO_PAR_TIN3_TOUT3 (0x80)
  1135. #define GPIO_PAR_TIN3_URXD2 (0x40)
  1136. #define GPIO_PAR_TIN3_TIN3 (0xC0)
  1137. #define GPIO_PAR_TIN2_GPIO (0x00)
  1138. #define GPIO_PAR_TIN2_TOUT2 (0x20)
  1139. #define GPIO_PAR_TIN2_UTXD2 (0x10)
  1140. #define GPIO_PAR_TIN2_TIN2 (0x30)
  1141. #define GPIO_PAR_TIN1_GPIO (0x00)
  1142. #define GPIO_PAR_TIN1_TOUT1 (0x08)
  1143. #define GPIO_PAR_TIN1_DACK1 (0x04)
  1144. #define GPIO_PAR_TIN1_TIN1 (0x0C)
  1145. #define GPIO_PAR_TIN0_GPIO (0x00)
  1146. #define GPIO_PAR_TIN0_TOUT0 (0x02)
  1147. #define GPIO_PAR_TIN0_DREQ0 (0x01)
  1148. #define GPIO_PAR_TIN0_TIN0 (0x03)
  1149. /* Bit definitions and macros for GPIO_PAR_LCDDATA */
  1150. #define GPIO_PAR_LCDDATA_LD7_0(x) ((x)&0x03)
  1151. #define GPIO_PAR_LCDDATA_LD15_8(x) (((x)&0x03)<<2)
  1152. #define GPIO_PAR_LCDDATA_LD16(x) (((x)&0x03)<<4)
  1153. #define GPIO_PAR_LCDDATA_LD17(x) (((x)&0x03)<<6)
  1154. /* Bit definitions and macros for GPIO_PAR_LCDCTL */
  1155. #define GPIO_PAR_LCDCTL_CLS (0x0001)
  1156. #define GPIO_PAR_LCDCTL_PS (0x0002)
  1157. #define GPIO_PAR_LCDCTL_REV (0x0004)
  1158. #define GPIO_PAR_LCDCTL_SPL_SPR (0x0008)
  1159. #define GPIO_PAR_LCDCTL_CONTRAST (0x0010)
  1160. #define GPIO_PAR_LCDCTL_LSCLK (0x0020)
  1161. #define GPIO_PAR_LCDCTL_LP_HSYNC (0x0040)
  1162. #define GPIO_PAR_LCDCTL_FLM_VSYNC (0x0080)
  1163. #define GPIO_PAR_LCDCTL_ACD_OE (0x0100)
  1164. /* Bit definitions and macros for GPIO_PAR_IRQ */
  1165. #define GPIO_PAR_IRQ1(x) (((x)&0x0003)<<4)
  1166. #define GPIO_PAR_IRQ2(x) (((x)&0x0003)<<6)
  1167. #define GPIO_PAR_IRQ4(x) (((x)&0x0003)<<8)
  1168. #define GPIO_PAR_IRQ5(x) (((x)&0x0003)<<10)
  1169. #define GPIO_PAR_IRQ6(x) (((x)&0x0003)<<12)
  1170. /* Bit definitions and macros for GPIO_MSCR_FLEXBUS */
  1171. #define GPIO_MSCR_FLEXBUS_ADDRCTL(x) ((x)&0x03)
  1172. #define GPIO_MSCR_FLEXBUS_DLOWER(x) (((x)&0x03)<<2)
  1173. #define GPIO_MSCR_FLEXBUS_DUPPER(x) (((x)&0x03)<<4)
  1174. /* Bit definitions and macros for GPIO_MSCR_SDRAM */
  1175. #define GPIO_MSCR_SDRAM_SDRAM(x) ((x)&0x03)
  1176. #define GPIO_MSCR_SDRAM_SDCLK(x) (((x)&0x03)<<2)
  1177. #define GPIO_MSCR_SDRAM_SDCLKB(x) (((x)&0x03)<<4)
  1178. /* Bit definitions and macros for GPIO_DSCR_I2C */
  1179. #define GPIO_DSCR_I2C_DSE(x) ((x)&0x03)
  1180. /* Bit definitions and macros for GPIO_DSCR_PWM */
  1181. #define GPIO_DSCR_PWM_DSE(x) ((x)&0x03)
  1182. /* Bit definitions and macros for GPIO_DSCR_FEC */
  1183. #define GPIO_DSCR_FEC_DSE(x) ((x)&0x03)
  1184. /* Bit definitions and macros for GPIO_DSCR_UART */
  1185. #define GPIO_DSCR_UART0_DSE(x) ((x)&0x03)
  1186. #define GPIO_DSCR_UART1_DSE(x) (((x)&0x03)<<2)
  1187. /* Bit definitions and macros for GPIO_DSCR_QSPI */
  1188. #define GPIO_DSCR_QSPI_DSE(x) ((x)&0x03)
  1189. /* Bit definitions and macros for GPIO_DSCR_TIMER */
  1190. #define GPIO_DSCR_TIMER_DSE(x) ((x)&0x03)
  1191. /* Bit definitions and macros for GPIO_DSCR_SSI */
  1192. #define GPIO_DSCR_SSI_DSE(x) ((x)&0x03)
  1193. /* Bit definitions and macros for GPIO_DSCR_LCD */
  1194. #define GPIO_DSCR_LCD_DSE(x) ((x)&0x03)
  1195. /* Bit definitions and macros for GPIO_DSCR_DEBUG */
  1196. #define GPIO_DSCR_DEBUG_DSE(x) ((x)&0x03)
  1197. /* Bit definitions and macros for GPIO_DSCR_CLKRST */
  1198. #define GPIO_DSCR_CLKRST_DSE(x) ((x)&0x03)
  1199. /* Bit definitions and macros for GPIO_DSCR_IRQ */
  1200. #define GPIO_DSCR_IRQ_DSE(x) ((x)&0x03)
  1201. /* not done yet */
  1202. /*********************************************************************
  1203. * LCD Controller (LCDC)
  1204. *********************************************************************/
  1205. /* Bit definitions and macros for LCDC_LSSAR */
  1206. #define LCDC_LSSAR_SSA(x) (((x)&0x3FFFFFFF)<<2)
  1207. /* Bit definitions and macros for LCDC_LSR */
  1208. #define LCDC_LSR_YMAX(x) (((x)&0x000003FF)<<0)
  1209. #define LCDC_LSR_XMAX(x) (((x)&0x0000003F)<<20)
  1210. /* Bit definitions and macros for LCDC_LVPWR */
  1211. #define LCDC_LVPWR_VPW(x) (((x)&0x000003FF)<<0)
  1212. /* Bit definitions and macros for LCDC_LCPR */
  1213. #define LCDC_LCPR_CYP(x) (((x)&0x000003FF)<<0)
  1214. #define LCDC_LCPR_CXP(x) (((x)&0x000003FF)<<16)
  1215. #define LCDC_LCPR_OP (0x10000000)
  1216. #define LCDC_LCPR_CC(x) (((x)&0x00000003)<<30)
  1217. #define LCDC_LCPR_CC_TRANSPARENT (0x00000000)
  1218. #define LCDC_LCPR_CC_OR (0x40000000)
  1219. #define LCDC_LCPR_CC_XOR (0x80000000)
  1220. #define LCDC_LCPR_CC_AND (0xC0000000)
  1221. #define LCDC_LCPR_OP_ON (0x10000000)
  1222. #define LCDC_LCPR_OP_OFF (0x00000000)
  1223. /* Bit definitions and macros for LCDC_LCWHBR */
  1224. #define LCDC_LCWHBR_BD(x) (((x)&0x000000FF)<<0)
  1225. #define LCDC_LCWHBR_CH(x) (((x)&0x0000001F)<<16)
  1226. #define LCDC_LCWHBR_CW(x) (((x)&0x0000001F)<<24)
  1227. #define LCDC_LCWHBR_BK_EN (0x80000000)
  1228. #define LCDC_LCWHBR_BK_EN_ON (0x80000000)
  1229. #define LCDC_LCWHBR_BK_EN_OFF (0x00000000)
  1230. /* Bit definitions and macros for LCDC_LCCMR */
  1231. #define LCDC_LCCMR_CUR_COL_B(x) (((x)&0x0000003F)<<0)
  1232. #define LCDC_LCCMR_CUR_COL_G(x) (((x)&0x0000003F)<<6)
  1233. #define LCDC_LCCMR_CUR_COL_R(x) (((x)&0x0000003F)<<12)
  1234. /* Bit definitions and macros for LCDC_LPCR */
  1235. #define LCDC_LPCR_PCD(x) (((x)&0x0000003F)<<0)
  1236. #define LCDC_LPCR_SHARP (0x00000040)
  1237. #define LCDC_LPCR_SCLKSEL (0x00000080)
  1238. #define LCDC_LPCR_ACD(x) (((x)&0x0000007F)<<8)
  1239. #define LCDC_LPCR_ACDSEL (0x00008000)
  1240. #define LCDC_LPCR_REV_VS (0x00010000)
  1241. #define LCDC_LPCR_SWAP_SEL (0x00020000)
  1242. #define LCDC_LPCR_ENDSEL (0x00040000)
  1243. #define LCDC_LPCR_SCLKIDLE (0x00080000)
  1244. #define LCDC_LPCR_OEPOL (0x00100000)
  1245. #define LCDC_LPCR_CLKPOL (0x00200000)
  1246. #define LCDC_LPCR_LPPOL (0x00400000)
  1247. #define LCDC_LPCR_FLM (0x00800000)
  1248. #define LCDC_LPCR_PIXPOL (0x01000000)
  1249. #define LCDC_LPCR_BPIX(x) (((x)&0x00000007)<<25)
  1250. #define LCDC_LPCR_PBSIZ(x) (((x)&0x00000003)<<28)
  1251. #define LCDC_LPCR_COLOR (0x40000000)
  1252. #define LCDC_LPCR_TFT (0x80000000)
  1253. #define LCDC_LPCR_MODE_MONOCHROME (0x00000000)
  1254. #define LCDC_LPCR_MODE_CSTN (0x40000000)
  1255. #define LCDC_LPCR_MODE_TFT (0xC0000000)
  1256. #define LCDC_LPCR_PBSIZ_1 (0x00000000)
  1257. #define LCDC_LPCR_PBSIZ_2 (0x10000000)
  1258. #define LCDC_LPCR_PBSIZ_4 (0x20000000)
  1259. #define LCDC_LPCR_PBSIZ_8 (0x30000000)
  1260. #define LCDC_LPCR_BPIX_1bpp (0x00000000)
  1261. #define LCDC_LPCR_BPIX_2bpp (0x02000000)
  1262. #define LCDC_LPCR_BPIX_4bpp (0x04000000)
  1263. #define LCDC_LPCR_BPIX_8bpp (0x06000000)
  1264. #define LCDC_LPCR_BPIX_12bpp (0x08000000)
  1265. #define LCDC_LPCR_BPIX_16bpp (0x0A000000)
  1266. #define LCDC_LPCR_BPIX_18bpp (0x0C000000)
  1267. #define LCDC_LPCR_PANEL_TYPE(x) (((x)&0x00000003)<<30)
  1268. /* Bit definitions and macros for LCDC_LHCR */
  1269. #define LCDC_LHCR_H_WAIT_2(x) (((x)&0x000000FF)<<0)
  1270. #define LCDC_LHCR_H_WAIT_1(x) (((x)&0x000000FF)<<8)
  1271. #define LCDC_LHCR_H_WIDTH(x) (((x)&0x0000003F)<<26)
  1272. /* Bit definitions and macros for LCDC_LVCR */
  1273. #define LCDC_LVCR_V_WAIT_2(x) (((x)&0x000000FF)<<0)
  1274. #define LCDC_LVCR_V_WAIT_1(x) (((x)&0x000000FF)<<8)
  1275. #define LCDC_LVCR_V_WIDTH(x) (((x)&0x0000003F)<<26)
  1276. /* Bit definitions and macros for LCDC_LPOR */
  1277. #define LCDC_LPOR_POS(x) (((x)&0x0000001F)<<0)
  1278. /* Bit definitions and macros for LCDC_LPCCR */
  1279. #define LCDC_LPCCR_PW(x) (((x)&0x000000FF)<<0)
  1280. #define LCDC_LPCCR_CC_EN (0x00000100)
  1281. #define LCDC_LPCCR_SCR(x) (((x)&0x00000003)<<9)
  1282. #define LCDC_LPCCR_LDMSK (0x00008000)
  1283. #define LCDC_LPCCR_CLS_HI_WIDTH(x) (((x)&0x000001FF)<<16)
  1284. #define LCDC_LPCCR_SCR_LINEPULSE (0x00000000)
  1285. #define LCDC_LPCCR_SCR_PIXELCLK (0x00002000)
  1286. #define LCDC_LPCCR_SCR_LCDCLOCK (0x00004000)
  1287. /* Bit definitions and macros for LCDC_LDCR */
  1288. #define LCDC_LDCR_TM(x) (((x)&0x0000001F)<<0)
  1289. #define LCDC_LDCR_HM(x) (((x)&0x0000001F)<<16)
  1290. #define LCDC_LDCR_BURST (0x80000000)
  1291. /* Bit definitions and macros for LCDC_LRMCR */
  1292. #define LCDC_LRMCR_SEL_REF (0x00000001)
  1293. /* Bit definitions and macros for LCDC_LICR */
  1294. #define LCDC_LICR_INTCON (0x00000001)
  1295. #define LCDC_LICR_INTSYN (0x00000004)
  1296. #define LCDC_LICR_GW_INT_CON (0x00000010)
  1297. /* Bit definitions and macros for LCDC_LIER */
  1298. #define LCDC_LIER_BOF_EN (0x00000001)
  1299. #define LCDC_LIER_EOF_EN (0x00000002)
  1300. #define LCDC_LIER_ERR_RES_EN (0x00000004)
  1301. #define LCDC_LIER_UDR_ERR_EN (0x00000008)
  1302. #define LCDC_LIER_GW_BOF_EN (0x00000010)
  1303. #define LCDC_LIER_GW_EOF_EN (0x00000020)
  1304. #define LCDC_LIER_GW_ERR_RES_EN (0x00000040)
  1305. #define LCDC_LIER_GW_UDR_ERR_EN (0x00000080)
  1306. /* Bit definitions and macros for LCDC_LISR */
  1307. #define LCDC_LISR_BOF (0x00000001)
  1308. #define LCDC_LISR_EOF (0x00000002)
  1309. #define LCDC_LISR_ERR_RES (0x00000004)
  1310. #define LCDC_LISR_UDR_ERR (0x00000008)
  1311. #define LCDC_LISR_GW_BOF (0x00000010)
  1312. #define LCDC_LISR_GW_EOF (0x00000020)
  1313. #define LCDC_LISR_GW_ERR_RES (0x00000040)
  1314. #define LCDC_LISR_GW_UDR_ERR (0x00000080)
  1315. /* Bit definitions and macros for LCDC_LGWSAR */
  1316. #define LCDC_LGWSAR_GWSA(x) (((x)&0x3FFFFFFF)<<2)
  1317. /* Bit definitions and macros for LCDC_LGWSR */
  1318. #define LCDC_LGWSR_GWH(x) (((x)&0x000003FF)<<0)
  1319. #define LCDC_LGWSR_GWW(x) (((x)&0x0000003F)<<20)
  1320. /* Bit definitions and macros for LCDC_LGWVPWR */
  1321. #define LCDC_LGWVPWR_GWVPW(x) (((x)&0x000003FF)<<0)
  1322. /* Bit definitions and macros for LCDC_LGWPOR */
  1323. #define LCDC_LGWPOR_GWPO(x) (((x)&0x0000001F)<<0)
  1324. /* Bit definitions and macros for LCDC_LGWPR */
  1325. #define LCDC_LGWPR_GWYP(x) (((x)&0x000003FF)<<0)
  1326. #define LCDC_LGWPR_GWXP(x) (((x)&0x000003FF)<<16)
  1327. /* Bit definitions and macros for LCDC_LGWCR */
  1328. #define LCDC_LGWCR_GWCKB(x) (((x)&0x0000003F)<<0)
  1329. #define LCDC_LGWCR_GWCKG(x) (((x)&0x0000003F)<<6)
  1330. #define LCDC_LGWCR_GWCKR(x) (((x)&0x0000003F)<<12)
  1331. #define LCDC_LGWCR_GW_RVS (0x00200000)
  1332. #define LCDC_LGWCR_GWE (0x00400000)
  1333. #define LCDC_LGWCR_GWCKE (0x00800000)
  1334. #define LCDC_LGWCR_GWAV(x) (((x)&0x000000FF)<<24)
  1335. /* Bit definitions and macros for LCDC_LGWDCR */
  1336. #define LCDC_LGWDCR_GWTM(x) (((x)&0x0000001F)<<0)
  1337. #define LCDC_LGWDCR_GWHM(x) (((x)&0x0000001F)<<16)
  1338. #define LCDC_LGWDCR_GWBT (0x80000000)
  1339. /* Bit definitions and macros for LCDC_BPLUT_BASE */
  1340. #define LCDC_BPLUT_BASE_BASE(x) (((x)&0xFFFFFFFF)<<0)
  1341. /* Bit definitions and macros for LCDC_GWLUT_BASE */
  1342. #define LCDC_GWLUT_BASE_BASE(x) (((x)&0xFFFFFFFF)<<0)
  1343. /* not done yet */
  1344. /*********************************************************************
  1345. * USB Controller (USB)
  1346. *********************************************************************/
  1347. /* Bit definitions and macros for USB_HCSPARAMS */
  1348. #define USB_HCSPARAMS_N_PORTS(x) ((x)&0x0000000F)
  1349. #define USB_HCSPARAMS_PPC (0x00000010)
  1350. #define USB_HCSPARAMS_N_PCC(x) (((x)&0x0000000F)<<8)
  1351. #define USB_HCSPARAMS_N_CC(x) (((x)&0x0000000F)<<12)
  1352. #define USB_HCSPARAMS_PI (0x00010000)
  1353. #define USB_HCSPARAMS_N_PTT(x) (((x)&0x0000000F)<<20)
  1354. #define USB_HCSPARAMS_N_TT(x) (((x)&0x0000000F)<<24)
  1355. /* Bit definitions and macros for USB_HCCPARAMS */
  1356. #define USB_HCCPARAMS_ADC (0x00000001)
  1357. #define USB_HCCPARAMS_PFL (0x00000002)
  1358. #define USB_HCCPARAMS_ASP (0x00000004)
  1359. #define USB_HCCPARAMS_IST(x) (((x)&0x0000000F)<<4)
  1360. #define USB_HCCPARAMS_EECP(x) (((x)&0x000000FF)<<8)
  1361. /* Bit definitions and macros for USB_DCIVERSION */
  1362. #define USB_DCIVERSION_DCIVERSION(x) (((x)&0xFFFF)<<0)
  1363. /* Bit definitions and macros for USB_DCCPARAMS */
  1364. #define USB_DCCPARAMS_DEN(x) (((x)&0x0000001F)<<0)
  1365. #define USB_DCCPARAMS_DC (0x00000080)
  1366. #define USB_DCCPARAMS_HC (0x00000100)
  1367. /* Bit definitions and macros for USB_USBCMD */
  1368. #define USB_USBCMD_RS (0x00000001)
  1369. #define USB_USBCMD_RST (0x00000002)
  1370. #define USB_USBCMD_FS0 (0x00000004)
  1371. #define USB_USBCMD_FS1 (0x00000008)
  1372. #define USB_USBCMD_PSE (0x00000010)
  1373. #define USB_USBCMD_ASE (0x00000020)
  1374. #define USB_USBCMD_IAA (0x00000040)
  1375. #define USB_USBCMD_LR (0x00000080)
  1376. #define USB_USBCMD_ASP(x) (((x)&0x00000003)<<8)
  1377. #define USB_USBCMD_ASPE (0x00000800)
  1378. #define USB_USBCMD_SUTW (0x00002000)
  1379. #define USB_USBCMD_ATDTW (0x00004000)
  1380. #define USB_USBCMD_FS2 (0x00008000)
  1381. #define USB_USBCMD_ITC(x) (((x)&0x000000FF)<<16)
  1382. #define USB_USBCMD_ITC_IMM (0x00000000)
  1383. #define USB_USBCMD_ITC_1 (0x00010000)
  1384. #define USB_USBCMD_ITC_2 (0x00020000)
  1385. #define USB_USBCMD_ITC_4 (0x00040000)
  1386. #define USB_USBCMD_ITC_8 (0x00080000)
  1387. #define USB_USBCMD_ITC_16 (0x00100000)
  1388. #define USB_USBCMD_ITC_32 (0x00200000)
  1389. #define USB_USBCMD_ITC_40 (0x00400000)
  1390. #define USB_USBCMD_FS_1024 (0x00000000)
  1391. #define USB_USBCMD_FS_512 (0x00000004)
  1392. #define USB_USBCMD_FS_256 (0x00000008)
  1393. #define USB_USBCMD_FS_128 (0x0000000C)
  1394. #define USB_USBCMD_FS_64 (0x00008000)
  1395. #define USB_USBCMD_FS_32 (0x00008004)
  1396. #define USB_USBCMD_FS_16 (0x00008008)
  1397. #define USB_USBCMD_FS_8 (0x0000800C)
  1398. /* Bit definitions and macros for USB_USBSTS */
  1399. #define USB_USBSTS_UI (0x00000001)
  1400. #define USB_USBSTS_UEI (0x00000002)
  1401. #define USB_USBSTS_PCI (0x00000004)
  1402. #define USB_USBSTS_FRI (0x00000008)
  1403. #define USB_USBSTS_SEI (0x00000010)
  1404. #define USB_USBSTS_AAI (0x00000020)
  1405. #define USB_USBSTS_URI (0x00000040)
  1406. #define USB_USBSTS_SRI (0x00000080)
  1407. #define USB_USBSTS_SLI (0x00000100)
  1408. #define USB_USBSTS_HCH (0x00001000)
  1409. #define USB_USBSTS_RCL (0x00002000)
  1410. #define USB_USBSTS_PS (0x00004000)
  1411. #define USB_USBSTS_AS (0x00008000)
  1412. /* Bit definitions and macros for USB_USBINTR */
  1413. #define USB_USBINTR_UE (0x00000001)
  1414. #define USB_USBINTR_UEE (0x00000002)
  1415. #define USB_USBINTR_PCE (0x00000004)
  1416. #define USB_USBINTR_FRE (0x00000008)
  1417. #define USB_USBINTR_SEE (0x00000010)
  1418. #define USB_USBINTR_AAE (0x00000020)
  1419. #define USB_USBINTR_URE (0x00000040)
  1420. #define USB_USBINTR_SRE (0x00000080)
  1421. #define USB_USBINTR_SLE (0x00000100)
  1422. /* Bit definitions and macros for USB_FRINDEX */
  1423. #define USB_FRINDEX_FRINDEX(x) (((x)&0x00003FFF)<<0)
  1424. /* Bit definitions and macros for USB_PERIODICLISTBASE */
  1425. #define USB_PERIODICLISTBASE_PERBASE(x) (((x)&0x000FFFFF)<<12)
  1426. /* Bit definitions and macros for USB_DEVICEADDR */
  1427. #define USB_DEVICEADDR_USBADR(x) (((x)&0x0000007F)<<25)
  1428. /* Bit definitions and macros for USB_ASYNCLISTADDR */
  1429. #define USB_ASYNCLISTADDR_ASYBASE(x) (((x)&0x07FFFFFF)<<5)
  1430. /* Bit definitions and macros for USB_EPLISTADDR */
  1431. #define USB_EPLISTADDR_EPBASE(x) (((x)&0x001FFFFF)<<11)
  1432. /* Bit definitions and macros for USB_ASNCTTSTS */
  1433. #define USB_ASNCTTSTS_TTAS (0x00000001)
  1434. #define USB_ASNCTTSTS_TTAC (0x00000002)
  1435. /* Bit definitions and macros for USB_BURSTSIZE */
  1436. #define USB_BURSTSIZE_RXPBURST(x) (((x)&0x000000FF)<<0)
  1437. #define USB_BURSTSIZE_TXPBURST(x) (((x)&0x000000FF)<<8)
  1438. /* Bit definitions and macros for USB_TXFILLTUNING */
  1439. #define USB_TXFILLTUNING_TXSCHOH(x) (((x)&0x000000FF)<<0)
  1440. #define USB_TXFILLTUNING_TXSCHHEALTH(x) (((x)&0x0000001F)<<8)
  1441. #define USB_TXFILLTUNING_TXFIFOTHRES(x) (((x)&0x0000003F)<<16)
  1442. /* Bit definitions and macros for USB_TXTTFILLTUNING */
  1443. #define USB_TXTTFILLTUNING_TXTTSCHOH(x) (((x)&0x0000001F)<<0)
  1444. #define USB_TXTTFILLTUNING_TXTTSCHHEALTH(x) (((x)&0x0000001F)<<8)
  1445. /* Bit definitions and macros for USB_ULPI_VIEWPORT */
  1446. #define USB_ULPI_VIEWPORT_ULPI_DATWR(x) (((x)&0x000000FF)<<0)
  1447. #define USB_ULPI_VIEWPORT_ULPI_DATRD(x) (((x)&0x000000FF)<<8)
  1448. #define USB_ULPI_VIEWPORT_ULPI_ADDR(x) (((x)&0x000000FF)<<16)
  1449. #define USB_ULPI_VIEWPORT_ULPI_PORT(x) (((x)&0x00000007)<<24)
  1450. #define USB_ULPI_VIEWPORT_ULPI_SS (0x08000000)
  1451. #define USB_ULPI_VIEWPORT_ULPI_RW (0x20000000)
  1452. #define USB_ULPI_VIEWPORT_ULPI_RUN (0x40000000)
  1453. #define USB_ULPI_VIEWPORT_ULPI_WU (0x80000000)
  1454. /* Bit definitions and macros for USB_CONFIGFLAG */
  1455. #define USB_CONFIGFLAG_CONFIGFLAG(x) (((x)&0xFFFFFFFF)<<0)
  1456. /* Bit definitions and macros for USB_PORTSC */
  1457. #define USB_PORTSC_CCS (0x00000001)
  1458. #define USB_PORTSC_CSC (0x00000002)
  1459. #define USB_PORTSC_PE (0x00000004)
  1460. #define USB_PORTSC_PEC (0x00000008)
  1461. #define USB_PORTSC_OCA (0x00000010)
  1462. #define USB_PORTSC_OCC (0x00000020)
  1463. #define USB_PORTSC_FPR (0x00000040)
  1464. #define USB_PORTSC_SUSP (0x00000080)
  1465. #define USB_PORTSC_PR (0x00000100)
  1466. #define USB_PORTSC_LS(x) (((x)&0x00000003)<<10)
  1467. #define USB_PORTSC_PP (0x00001000)
  1468. #define USB_PORTSC_PO (0x00002000)
  1469. #define USB_PORTSC_PIC(x) (((x)&0x00000003)<<14)
  1470. #define USB_PORTSC_PTC(x) (((x)&0x0000000F)<<16)
  1471. #define USB_PORTSC_WLCN (0x00100000)
  1472. #define USB_PORTSC_WKDS (0x00200000)
  1473. #define USB_PORTSC_WKOC (0x00400000)
  1474. #define USB_PORTSC_PHCD (0x00800000)
  1475. #define USB_PORTSC_PFSC (0x01000000)
  1476. #define USB_PORTSC_PSPD(x) (((x)&0x00000003)<<26)
  1477. #define USB_PORTSC_PTS(x) (((x)&0x00000003)<<30)
  1478. #define USB_PORTSC_PTS_ULPI (0x80000000)
  1479. #define USB_PORTSC_PTS_FS_LS (0xC0000000)
  1480. #define USB_PORTSC_PSPD_FULL (0x00000000)
  1481. #define USB_PORTSC_PSPD_LOW (0x04000000)
  1482. #define USB_PORTSC_PSPD_HIGH (0x08000000)
  1483. #define USB_PORTSC_PTC_DISBALE (0x00000000)
  1484. #define USB_PORTSC_PTC_JSTATE (0x00010000)
  1485. #define USB_PORTSC_PTC_KSTATE (0x00020000)
  1486. #define USB_PORTSC_PTC_SEQ_NAK (0x00030000)
  1487. #define USB_PORTSC_PTC_PACKET (0x00040000)
  1488. #define USB_PORTSC_PTC_FORCE_ENABLE (0x00050000)
  1489. #define USB_PORTSC_PIC_OFF (0x00000000)
  1490. #define USB_PORTSC_PIC_AMBER (0x00004000)
  1491. #define USB_PORTSC_PIC_GREEN (0x00008000)
  1492. #define USB_PORTSC_LS_SE0 (0x00000000)
  1493. #define USB_PORTSC_LS_JSTATE (0x00000400)
  1494. #define USB_PORTSC_LS_KSTATE (0x00000800)
  1495. /* Bit definitions and macros for USB_OTGSC */
  1496. #define USB_OTGSC_VD (0x00000001)
  1497. #define USB_OTGSC_VC (0x00000002)
  1498. #define USB_OTGSC_OT (0x00000008)
  1499. #define USB_OTGSC_DP (0x00000010)
  1500. #define USB_OTGSC_ID (0x00000100)
  1501. #define USB_OTGSC_AVV (0x00000200)
  1502. #define USB_OTGSC_ASV (0x00000400)
  1503. #define USB_OTGSC_BSV (0x00000800)
  1504. #define USB_OTGSC_BSE (0x00001000)
  1505. #define USB_OTGSC_1MST (0x00002000)
  1506. #define USB_OTGSC_DPS (0x00004000)
  1507. #define USB_OTGSC_IDIS (0x00010000)
  1508. #define USB_OTGSC_AVVIS (0x00020000)
  1509. #define USB_OTGSC_ASVIS (0x00040000)
  1510. #define USB_OTGSC_BSVIS (0x00080000)
  1511. #define USB_OTGSC_BSEIS (0x00100000)
  1512. #define USB_OTGSC_1MSS (0x00200000)
  1513. #define USB_OTGSC_DPIS (0x00400000)
  1514. #define USB_OTGSC_IDIE (0x01000000)
  1515. #define USB_OTGSC_AVVIE (0x02000000)
  1516. #define USB_OTGSC_ASVIE (0x04000000)
  1517. #define USB_OTGSC_BSVIE (0x08000000)
  1518. #define USB_OTGSC_BSEIE (0x10000000)
  1519. #define USB_OTGSC_1MSE (0x20000000)
  1520. #define USB_OTGSC_DPIE (0x40000000)
  1521. #define USB_OTGSC_CLEAR (0x007F0000)
  1522. #define USB_OTGSC_ENABLE_ALL (0x7F000000)
  1523. /* Bit definitions and macros for USB_USBMODE */
  1524. #define USB_USBMODE_CM(x) (((x)&0x00000003)<<0)
  1525. #define USB_USBMODE_SLOM (0x00000008)
  1526. #define USB_USBMODE_SDIS (0x00000010)
  1527. #define USB_USBMODE_CM_IDLE (0x00000000)
  1528. #define USB_USBMODE_CM_DEVICE (0x00000002)
  1529. #define USB_USBMODE_CM_HOST (0x00000003)
  1530. #define USB_USBMODE_ES (0x00000004)
  1531. /* Bit definitions and macros for USB_EPSETUPSR */
  1532. #define USB_EPSETUPSR_EPSETUPSTAT(x) (((x)&0x0000003F)<<0)
  1533. /* Bit definitions and macros for USB_EPPRIME */
  1534. #define USB_EPPRIME_PERB(x) (((x)&0x0000003F)<<0)
  1535. #define USB_EPPRIME_PETB(x) (((x)&0x0000003F)<<16)
  1536. #define USB_EPPRIME_PETB0 (0x00010000)
  1537. #define USB_EPPRIME_PETB1 (0x00020000)
  1538. #define USB_EPPRIME_PETB2 (0x00040000)
  1539. #define USB_EPPRIME_PETB3 (0x00080000)
  1540. #define USB_EPPRIME_PETB4 (0x00100000)
  1541. #define USB_EPPRIME_PETB5 (0x00200000)
  1542. #define USB_EPPRIME_PERB0 (0x00000001)
  1543. #define USB_EPPRIME_PERB1 (0x00000002)
  1544. #define USB_EPPRIME_PERB2 (0x00000004)
  1545. #define USB_EPPRIME_PERB3 (0x00000008)
  1546. #define USB_EPPRIME_PERB4 (0x00000010)
  1547. #define USB_EPPRIME_PERB5 (0x00000020)
  1548. /* Bit definitions and macros for USB_EPFLUSH */
  1549. #define USB_EPFLUSH_FERB(x) (((x)&0x0000003F)<<0)
  1550. #define USB_EPFLUSH_FETB(x) (((x)&0x0000003F)<<16)
  1551. #define USB_EPFLUSH_FETB0 (0x00010000)
  1552. #define USB_EPFLUSH_FETB1 (0x00020000)
  1553. #define USB_EPFLUSH_FETB2 (0x00040000)
  1554. #define USB_EPFLUSH_FETB3 (0x00080000)
  1555. #define USB_EPFLUSH_FETB4 (0x00100000)
  1556. #define USB_EPFLUSH_FETB5 (0x00200000)
  1557. #define USB_EPFLUSH_FERB0 (0x00000001)
  1558. #define USB_EPFLUSH_FERB1 (0x00000002)
  1559. #define USB_EPFLUSH_FERB2 (0x00000004)
  1560. #define USB_EPFLUSH_FERB3 (0x00000008)
  1561. #define USB_EPFLUSH_FERB4 (0x00000010)
  1562. #define USB_EPFLUSH_FERB5 (0x00000020)
  1563. /* Bit definitions and macros for USB_EPSR */
  1564. #define USB_EPSR_ERBR(x) (((x)&0x0000003F)<<0)
  1565. #define USB_EPSR_ETBR(x) (((x)&0x0000003F)<<16)
  1566. #define USB_EPSR_ETBR0 (0x00010000)
  1567. #define USB_EPSR_ETBR1 (0x00020000)
  1568. #define USB_EPSR_ETBR2 (0x00040000)
  1569. #define USB_EPSR_ETBR3 (0x00080000)
  1570. #define USB_EPSR_ETBR4 (0x00100000)
  1571. #define USB_EPSR_ETBR5 (0x00200000)
  1572. #define USB_EPSR_ERBR0 (0x00000001)
  1573. #define USB_EPSR_ERBR1 (0x00000002)
  1574. #define USB_EPSR_ERBR2 (0x00000004)
  1575. #define USB_EPSR_ERBR3 (0x00000008)
  1576. #define USB_EPSR_ERBR4 (0x00000010)
  1577. #define USB_EPSR_ERBR5 (0x00000020)
  1578. /* Bit definitions and macros for USB_EPCOMPLETE */
  1579. #define USB_EPCOMPLETE_ERCE(x) (((x)&0x0000003F)<<0)
  1580. #define USB_EPCOMPLETE_ETCE(x) (((x)&0x0000003F)<<16)
  1581. #define USB_EPCOMPLETE_ETCE0 (0x00010000)
  1582. #define USB_EPCOMPLETE_ETCE1 (0x00020000)
  1583. #define USB_EPCOMPLETE_ETCE2 (0x00040000)
  1584. #define USB_EPCOMPLETE_ETCE3 (0x00080000)
  1585. #define USB_EPCOMPLETE_ETCE4 (0x00100000)
  1586. #define USB_EPCOMPLETE_ETCE5 (0x00200000)
  1587. #define USB_EPCOMPLETE_ERCE0 (0x00000001)
  1588. #define USB_EPCOMPLETE_ERCE1 (0x00000002)
  1589. #define USB_EPCOMPLETE_ERCE2 (0x00000004)
  1590. #define USB_EPCOMPLETE_ERCE3 (0x00000008)
  1591. #define USB_EPCOMPLETE_ERCE4 (0x00000010)
  1592. #define USB_EPCOMPLETE_ERCE5 (0x00000020)
  1593. /* Bit definitions and macros for USB_EPCR0 */
  1594. #define USB_EPCR0_RXS (0x00000001)
  1595. #define USB_EPCR0_RXT(x) (((x)&0x00000003)<<2)
  1596. #define USB_EPCR0_RXE (0x00000080)
  1597. #define USB_EPCR0_TXS (0x00010000)
  1598. #define USB_EPCR0_TXT(x) (((x)&0x00000003)<<18)
  1599. #define USB_EPCR0_TXE (0x00800000)
  1600. /* Bit definitions and macros for USB_EPCR */
  1601. #define USB_EPCR_RXS (0x00000001)
  1602. #define USB_EPCR_RXD (0x00000002)
  1603. #define USB_EPCR_RXT(x) (((x)&0x00000003)<<2)
  1604. #define USB_EPCR_RXI (0x00000020)
  1605. #define USB_EPCR_RXR (0x00000040)
  1606. #define USB_EPCR_RXE (0x00000080)
  1607. #define USB_EPCR_TXS (0x00010000)
  1608. #define USB_EPCR_TXD (0x00020000)
  1609. #define USB_EPCR_TXT(x) (((x)&0x00000003)<<18)
  1610. #define USB_EPCR_TXI (0x00200000)
  1611. #define USB_EPCR_TXR (0x00400000)
  1612. #define USB_EPCR_TXE (0x00800000)
  1613. #define USB_EPCR_TXT_CONTROL (0x00000000)
  1614. #define USB_EPCR_TXT_ISO (0x00040000)
  1615. #define USB_EPCR_TXT_BULK (0x00080000)
  1616. #define USB_EPCR_TXT_INT (0x000C0000)
  1617. #define USB_EPCR_RXT_CONTROL (0x00000000)
  1618. #define USB_EPCR_RXT_ISO (0x00000004)
  1619. #define USB_EPCR_RXT_BULK (0x00000008)
  1620. #define USB_EPCR_RXT_INT (0x0000000C)
  1621. /*********************************************************************
  1622. * SDRAM Controller (SDRAMC)
  1623. *********************************************************************/
  1624. /* Bit definitions and macros for SDRAMC_SDMR */
  1625. #define SDRAMC_SDMR_BNKAD_LEMR (0x40000000)
  1626. #define SDRAMC_SDMR_BNKAD_LMR (0x00000000)
  1627. #define SDRAMC_SDMR_AD(x) (((x)&0x00000FFF)<<18)
  1628. #define SDRAMC_SDMR_CMD (0x00010000)
  1629. /* Bit definitions and macros for SDRAMC_SDCR */
  1630. #define SDRAMC_SDCR_MODE_EN (0x80000000)
  1631. #define SDRAMC_SDCR_CKE (0x40000000)
  1632. #define SDRAMC_SDCR_DDR (0x20000000)
  1633. #define SDRAMC_SDCR_REF (0x10000000)
  1634. #define SDRAMC_SDCR_MUX(x) (((x)&0x00000003)<<24)
  1635. #define SDRAMC_SDCR_OE_RULE (0x00400000)
  1636. #define SDRAMC_SDCR_RCNT(x) (((x)&0x0000003F)<<16)
  1637. #define SDRAMC_SDCR_PS_32 (0x00000000)
  1638. #define SDRAMC_SDCR_PS_16 (0x00002000)
  1639. #define SDRAMC_SDCR_DQS_OE(x) (((x)&0x0000000F)<<8)
  1640. #define SDRAMC_SDCR_IREF (0x00000004)
  1641. #define SDRAMC_SDCR_IPALL (0x00000002)
  1642. /* Bit definitions and macros for SDRAMC_SDCFG1 */
  1643. #define SDRAMC_SDCFG1_SRD2RW(x) (((x)&0x0000000F)<<28)
  1644. #define SDRAMC_SDCFG1_SWT2RD(x) (((x)&0x00000007)<<24)
  1645. #define SDRAMC_SDCFG1_RDLAT(x) (((x)&0x0000000F)<<20)
  1646. #define SDRAMC_SDCFG1_ACT2RW(x) (((x)&0x00000007)<<16)
  1647. #define SDRAMC_SDCFG1_PRE2ACT(x) (((x)&0x00000007)<<12)
  1648. #define SDRAMC_SDCFG1_REF2ACT(x) (((x)&0x0000000F)<<8)
  1649. #define SDRAMC_SDCFG1_WTLAT(x) (((x)&0x00000007)<<4)
  1650. /* Bit definitions and macros for SDRAMC_SDCFG2 */
  1651. #define SDRAMC_SDCFG2_BRD2PRE(x) (((x)&0x0000000F)<<28)
  1652. #define SDRAMC_SDCFG2_BWT2RW(x) (((x)&0x0000000F)<<24)
  1653. #define SDRAMC_SDCFG2_BRD2WT(x) (((x)&0x0000000F)<<20)
  1654. #define SDRAMC_SDCFG2_BL(x) (((x)&0x0000000F)<<16)
  1655. /* Bit definitions and macros for SDRAMC_SDDS */
  1656. #define SDRAMC_SDDS_SB_E(x) (((x)&0x00000003)<<8)
  1657. #define SDRAMC_SDDS_SB_C(x) (((x)&0x00000003)<<6)
  1658. #define SDRAMC_SDDS_SB_A(x) (((x)&0x00000003)<<4)
  1659. #define SDRAMC_SDDS_SB_S(x) (((x)&0x00000003)<<2)
  1660. #define SDRAMC_SDDS_SB_D(x) ((x)&0x00000003)
  1661. /* Bit definitions and macros for SDRAMC_SDCS */
  1662. #define SDRAMC_SDCS_BASE(x) (((x)&0x00000FFF)<<20)
  1663. #define SDRAMC_SDCS_CSSZ(x) ((x)&0x0000001F)
  1664. #define SDRAMC_SDCS_CSSZ_4GBYTE (0x0000001F)
  1665. #define SDRAMC_SDCS_CSSZ_2GBYTE (0x0000001E)
  1666. #define SDRAMC_SDCS_CSSZ_1GBYTE (0x0000001D)
  1667. #define SDRAMC_SDCS_CSSZ_512MBYTE (0x0000001C)
  1668. #define SDRAMC_SDCS_CSSZ_256MBYTE (0x0000001B)
  1669. #define SDRAMC_SDCS_CSSZ_128MBYTE (0x0000001A)
  1670. #define SDRAMC_SDCS_CSSZ_64MBYTE (0x00000019)
  1671. #define SDRAMC_SDCS_CSSZ_32MBYTE (0x00000018)
  1672. #define SDRAMC_SDCS_CSSZ_16MBYTE (0x00000017)
  1673. #define SDRAMC_SDCS_CSSZ_8MBYTE (0x00000016)
  1674. #define SDRAMC_SDCS_CSSZ_4MBYTE (0x00000015)
  1675. #define SDRAMC_SDCS_CSSZ_2MBYTE (0x00000014)
  1676. #define SDRAMC_SDCS_CSSZ_1MBYTE (0x00000013)
  1677. #define SDRAMC_SDCS_CSSZ_DIABLE (0x00000000)
  1678. /*********************************************************************
  1679. * Synchronous Serial Interface (SSI)
  1680. *********************************************************************/
  1681. /* Bit definitions and macros for SSI_CR */
  1682. #define SSI_CR_CIS (0x00000200)
  1683. #define SSI_CR_TCH (0x00000100)
  1684. #define SSI_CR_MCE (0x00000080)
  1685. #define SSI_CR_I2S_SLAVE (0x00000040)
  1686. #define SSI_CR_I2S_MASTER (0x00000020)
  1687. #define SSI_CR_I2S_NORMAL (0x00000000)
  1688. #define SSI_CR_SYN (0x00000010)
  1689. #define SSI_CR_NET (0x00000008)
  1690. #define SSI_CR_RE (0x00000004)
  1691. #define SSI_CR_TE (0x00000002)
  1692. #define SSI_CR_SSI_EN (0x00000001)
  1693. /* Bit definitions and macros for SSI_ISR */
  1694. #define SSI_ISR_CMDAU (0x00040000)
  1695. #define SSI_ISR_CMDDU (0x00020000)
  1696. #define SSI_ISR_RXT (0x00010000)
  1697. #define SSI_ISR_RDR1 (0x00008000)
  1698. #define SSI_ISR_RDR0 (0x00004000)
  1699. #define SSI_ISR_TDE1 (0x00002000)
  1700. #define SSI_ISR_TDE0 (0x00001000)
  1701. #define SSI_ISR_ROE1 (0x00000800)
  1702. #define SSI_ISR_ROE0 (0x00000400)
  1703. #define SSI_ISR_TUE1 (0x00000200)
  1704. #define SSI_ISR_TUE0 (0x00000100)
  1705. #define SSI_ISR_TFS (0x00000080)
  1706. #define SSI_ISR_RFS (0x00000040)
  1707. #define SSI_ISR_TLS (0x00000020)
  1708. #define SSI_ISR_RLS (0x00000010)
  1709. #define SSI_ISR_RFF1 (0x00000008)
  1710. #define SSI_ISR_RFF0 (0x00000004)
  1711. #define SSI_ISR_TFE1 (0x00000002)
  1712. #define SSI_ISR_TFE0 (0x00000001)
  1713. /* Bit definitions and macros for SSI_IER */
  1714. #define SSI_IER_RDMAE (0x00400000)
  1715. #define SSI_IER_RIE (0x00200000)
  1716. #define SSI_IER_TDMAE (0x00100000)
  1717. #define SSI_IER_TIE (0x00080000)
  1718. #define SSI_IER_CMDAU (0x00040000)
  1719. #define SSI_IER_CMDU (0x00020000)
  1720. #define SSI_IER_RXT (0x00010000)
  1721. #define SSI_IER_RDR1 (0x00008000)
  1722. #define SSI_IER_RDR0 (0x00004000)
  1723. #define SSI_IER_TDE1 (0x00002000)
  1724. #define SSI_IER_TDE0 (0x00001000)
  1725. #define SSI_IER_ROE1 (0x00000800)
  1726. #define SSI_IER_ROE0 (0x00000400)
  1727. #define SSI_IER_TUE1 (0x00000200)
  1728. #define SSI_IER_TUE0 (0x00000100)
  1729. #define SSI_IER_TFS (0x00000080)
  1730. #define SSI_IER_RFS (0x00000040)
  1731. #define SSI_IER_TLS (0x00000020)
  1732. #define SSI_IER_RLS (0x00000010)
  1733. #define SSI_IER_RFF1 (0x00000008)
  1734. #define SSI_IER_RFF0 (0x00000004)
  1735. #define SSI_IER_TFE1 (0x00000002)
  1736. #define SSI_IER_TFE0 (0x00000001)
  1737. /* Bit definitions and macros for SSI_TCR */
  1738. #define SSI_TCR_TXBIT0 (0x00000200)
  1739. #define SSI_TCR_TFEN1 (0x00000100)
  1740. #define SSI_TCR_TFEN0 (0x00000080)
  1741. #define SSI_TCR_TFDIR (0x00000040)
  1742. #define SSI_TCR_TXDIR (0x00000020)
  1743. #define SSI_TCR_TSHFD (0x00000010)
  1744. #define SSI_TCR_TSCKP (0x00000008)
  1745. #define SSI_TCR_TFSI (0x00000004)
  1746. #define SSI_TCR_TFSL (0x00000002)
  1747. #define SSI_TCR_TEFS (0x00000001)
  1748. /* Bit definitions and macros for SSI_RCR */
  1749. #define SSI_RCR_RXEXT (0x00000400)
  1750. #define SSI_RCR_RXBIT0 (0x00000200)
  1751. #define SSI_RCR_RFEN1 (0x00000100)
  1752. #define SSI_RCR_RFEN0 (0x00000080)
  1753. #define SSI_RCR_RSHFD (0x00000010)
  1754. #define SSI_RCR_RSCKP (0x00000008)
  1755. #define SSI_RCR_RFSI (0x00000004)
  1756. #define SSI_RCR_RFSL (0x00000002)
  1757. #define SSI_RCR_REFS (0x00000001)
  1758. /* Bit definitions and macros for SSI_CCR */
  1759. #define SSI_CCR_DIV2 (0x00040000)
  1760. #define SSI_CCR_PSR (0x00020000)
  1761. #define SSI_CCR_WL(x) (((x)&0x0000000F)<<13)
  1762. #define SSI_CCR_DC(x) (((x)&0x0000001F)<<8)
  1763. #define SSI_CCR_PM(x) ((x)&0x000000FF)
  1764. /* Bit definitions and macros for SSI_FCSR */
  1765. #define SSI_FCSR_RFCNT1(x) (((x)&0x0000000F)<<28)
  1766. #define SSI_FCSR_TFCNT1(x) (((x)&0x0000000F)<<24)
  1767. #define SSI_FCSR_RFWM1(x) (((x)&0x0000000F)<<20)
  1768. #define SSI_FCSR_TFWM1(x) (((x)&0x0000000F)<<16)
  1769. #define SSI_FCSR_RFCNT0(x) (((x)&0x0000000F)<<12)
  1770. #define SSI_FCSR_TFCNT0(x) (((x)&0x0000000F)<<8)
  1771. #define SSI_FCSR_RFWM0(x) (((x)&0x0000000F)<<4)
  1772. #define SSI_FCSR_TFWM0(x) ((x)&0x0000000F)
  1773. /* Bit definitions and macros for SSI_ACR */
  1774. #define SSI_ACR_FRDIV(x) (((x)&0x0000003F)<<5)
  1775. #define SSI_ACR_WR (0x00000010)
  1776. #define SSI_ACR_RD (0x00000008)
  1777. #define SSI_ACR_TIF (0x00000004)
  1778. #define SSI_ACR_FV (0x00000002)
  1779. #define SSI_ACR_AC97EN (0x00000001)
  1780. /* Bit definitions and macros for SSI_ACADD */
  1781. #define SSI_ACADD_SSI_ACADD(x) ((x)&0x0007FFFF)
  1782. /* Bit definitions and macros for SSI_ACDAT */
  1783. #define SSI_ACDAT_SSI_ACDAT(x) ((x)&0x0007FFFF)
  1784. /* Bit definitions and macros for SSI_ATAG */
  1785. #define SSI_ATAG_DDI_ATAG(x) ((x)&0x0000FFFF)
  1786. /*********************************************************************
  1787. * Phase Locked Loop (PLL)
  1788. *********************************************************************/
  1789. /* Bit definitions and macros for PLL_PODR */
  1790. #define PLL_PODR_CPUDIV(x) (((x)&0x0F)<<4)
  1791. #define PLL_PODR_BUSDIV(x) ((x)&0x0F)
  1792. /* Bit definitions and macros for PLL_PLLCR */
  1793. #define PLL_PLLCR_DITHEN (0x80)
  1794. #define PLL_PLLCR_DITHDEV(x) ((x)&0x07)
  1795. #endif /* mcf5329_h */