m5441x.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. /*
  2. * MCF5441X Internal Memory Map
  3. *
  4. * Copyright 2010-2012 Freescale Semiconductor, Inc.
  5. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef __MCF5441X__
  10. #define __MCF5441X__
  11. /* Interrupt Controller (INTC) */
  12. #define INT0_LO_RSVD0 (0)
  13. #define INT0_LO_EPORT1 (1)
  14. #define INT0_LO_EPORT2 (2)
  15. #define INT0_LO_EPORT3 (3)
  16. #define INT0_LO_EPORT4 (4)
  17. #define INT0_LO_EPORT5 (5)
  18. #define INT0_LO_EPORT6 (6)
  19. #define INT0_LO_EPORT7 (7)
  20. #define INT0_LO_EDMA_00 (8)
  21. #define INT0_LO_EDMA_01 (9)
  22. #define INT0_LO_EDMA_02 (10)
  23. #define INT0_LO_EDMA_03 (11)
  24. #define INT0_LO_EDMA_04 (12)
  25. #define INT0_LO_EDMA_05 (13)
  26. #define INT0_LO_EDMA_06 (14)
  27. #define INT0_LO_EDMA_07 (15)
  28. #define INT0_LO_EDMA_08 (16)
  29. #define INT0_LO_EDMA_09 (17)
  30. #define INT0_LO_EDMA_10 (18)
  31. #define INT0_LO_EDMA_11 (19)
  32. #define INT0_LO_EDMA_12 (20)
  33. #define INT0_LO_EDMA_13 (21)
  34. #define INT0_LO_EDMA_14 (22)
  35. #define INT0_LO_EDMA_15 (23)
  36. #define INT0_LO_EDMA_ERR (24)
  37. #define INT0_LO_SCM (25)
  38. #define INT0_LO_UART0 (26)
  39. #define INT0_LO_UART1 (27)
  40. #define INT0_LO_UART2 (28)
  41. #define INT0_LO_UART3 (29)
  42. #define INT0_LO_I2C0 (30)
  43. #define INT0_LO_DSPI0 (31)
  44. #define INT0_HI_DTMR0 (32)
  45. #define INT0_HI_DTMR1 (33)
  46. #define INT0_HI_DTMR2 (34)
  47. #define INT0_HI_DTMR3 (35)
  48. #define INT0_HI_MACNET0_TXF (36)
  49. #define INT0_HI_MACNET0_TXB (37)
  50. #define INT0_HI_MACNET0_UN (38)
  51. #define INT0_HI_MACNET0_RL (39)
  52. #define INT0_HI_MACNET0_RXF (40)
  53. #define INT0_HI_MACNET0_RXB (41)
  54. #define INT0_HI_MACNET0_MII (42)
  55. #define INT0_HI_MACNET0_LC (43)
  56. /* not used 44 */
  57. #define INT0_HI_MACNET0_GRA (45)
  58. #define INT0_HI_MACNET0_EBERR (46)
  59. #define INT0_HI_MACNET0_BABT (47)
  60. #define INT0_HI_MACNET0_BABR (48)
  61. #define INT0_HI_MACNET1_TXF (49)
  62. #define INT0_HI_MACNET1_TXB (50)
  63. #define INT0_HI_MACNET1_UN (51)
  64. #define INT0_HI_MACNET1_RL (52)
  65. #define INT0_HI_MACNET1_RXF (53)
  66. #define INT0_HI_MACNET1_RXB (54)
  67. #define INT0_HI_MACNET1_MII (55)
  68. #define INT0_HI_MACNET1_LC (56)
  69. /* not used 57 */
  70. #define INT0_HI_MACNET1_GRA (58)
  71. #define INT0_HI_MACNET1_EBERR (59)
  72. #define INT0_HI_MACNET1_BABT (60)
  73. #define INT0_HI_MACNET1_BABR (61)
  74. #define INT0_HI_SCMIR (62)
  75. #define INT0_HI_OW (63)
  76. #define INT1_LO_CAN0_IFG (0)
  77. #define INT1_LO_CAN0_BOFF (1)
  78. /* not used 2 */
  79. #define INT1_LO_CAN0_TXRXWRN (3)
  80. #define INT1_LO_CAN1_IFG (4)
  81. #define INT1_LO_CAN1_BOFF (5)
  82. /* not used 6 */
  83. #define INT1_LO_CAN1_TXRXWRN (7)
  84. #define INT1_LO_EDMA_16 (8)
  85. #define INT1_LO_EDMA_17 (9)
  86. #define INT1_LO_EDMA_18 (10)
  87. #define INT1_LO_EDMA_19 (11)
  88. #define INT1_LO_EDMA_20 (12)
  89. #define INT1_LO_EDMA_21 (13)
  90. #define INT1_LO_EDMA_22 (14)
  91. #define INT1_LO_EDMA_23 (15)
  92. #define INT1_LO_EDMA_24 (16)
  93. #define INT1_LO_EDMA_25 (17)
  94. #define INT1_LO_EDMA_26 (18)
  95. #define INT1_LO_EDMA_27 (19)
  96. #define INT1_LO_EDMA_28 (20)
  97. #define INT1_LO_EDMA_29 (21)
  98. #define INT1_LO_EDMA_30 (22)
  99. #define INT1_LO_EDMA_31 (23)
  100. #define INT1_LO_EDMA_32 (24)
  101. #define INT1_LO_EDMA_33 (25)
  102. #define INT1_LO_EDMA_34 (26)
  103. #define INT1_LO_EDMA_35 (27)
  104. #define INT1_LO_EDMA_36 (28)
  105. #define INT1_LO_EDMA_37 (29)
  106. #define INT1_LO_EDMA_38 (30)
  107. #define INT1_LO_EDMA_39 (31)
  108. #define INT1_LO_EDMA_40 (32)
  109. #define INT1_HI_EDMA_41 (33)
  110. #define INT1_HI_EDMA_42 (34)
  111. #define INT1_HI_EDMA_43 (35)
  112. #define INT1_HI_EDMA_44 (36)
  113. #define INT1_HI_EDMA_45 (37)
  114. #define INT1_HI_EDMA_46 (38)
  115. #define INT1_HI_EDMA_47 (39)
  116. #define INT1_HI_EDMA_48 (40)
  117. #define INT1_HI_EDMA_49 (41)
  118. #define INT1_HI_EDMA_50 (42)
  119. #define INT1_HI_EDMA_51 (43)
  120. #define INT1_HI_EDMA_52 (44)
  121. #define INT1_HI_EDMA_53 (45)
  122. #define INT1_HI_EDMA_54 (46)
  123. #define INT1_HI_EDMA_55 (47)
  124. #define INT1_HI_UART4 (48)
  125. #define INT1_HI_UART5 (49)
  126. #define INT1_HI_UART6 (50)
  127. #define INT1_HI_UART7 (51)
  128. #define INT1_HI_UART8 (52)
  129. #define INT1_HI_UART9 (53)
  130. #define INT1_HI_DSPI1 (54)
  131. #define INT1_HI_DSPI2 (55)
  132. #define INT1_HI_DSPI3 (56)
  133. #define INT1_HI_I2C1 (57)
  134. #define INT1_HI_I2C2 (58)
  135. #define INT1_HI_I2C3 (59)
  136. #define INT1_HI_I2C4 (60)
  137. #define INT1_HI_I2C5 (61)
  138. #define INT2_LO_EDMA56_63 (0)
  139. #define INT2_LO_PWM_SM0SR_CF (1)
  140. #define INT2_LO_PWM_SM1SR_CF (2)
  141. #define INT2_LO_PWM_SM2SR_CF (3)
  142. #define INT2_LO_PWM_SM3SR_CF (4)
  143. #define INT2_LO_PWM_SM0SR_RF (5)
  144. #define INT2_LO_PWM_SM1SR_RF (6)
  145. #define INT2_LO_PWM_SM2SR_RF (7)
  146. #define INT2_LO_PWM_SM3SR_RF (8)
  147. #define INT2_LO_PWM_FSR (9)
  148. #define INT2_LO_PWM_SMSR_REF (10)
  149. #define INT2_LO_PLL_SR_LOCF (11)
  150. #define INT2_LO_PLL_SR_LOLF (12)
  151. #define INT2_LO_PIT0_PIF (13)
  152. #define INT2_LO_PIT1_PIF (14)
  153. #define INT2_LO_PIT2_PIF (15)
  154. #define INT2_LO_PIT3_PIF (16)
  155. #define INT2_LO_USBOTG_USBSTS (17)
  156. #define INT2_LO_USBH_USBSTS (18)
  157. /* not used 19-20 */
  158. #define INT2_LO_SSI0 (21)
  159. #define INT2_LO_SSI1 (22)
  160. #define INT2_LO_NFC (23)
  161. /* not used 24-25 */
  162. #define INT2_LO_RTC (26)
  163. #define INT2_LO_CCM_UOCSR (27)
  164. #define INT2_LO_RNG_EI (28)
  165. #define INT2_LO_SIM1_DATA (29)
  166. #define INT2_LO_SIM1 (30)
  167. #define INT2_LO_SDHC (31)
  168. /* not used 32-37 */
  169. #define INT2_HI_L2SW_BERR (38)
  170. #define INT2_HI_L2SW_RXB (39)
  171. #define INT2_HI_L2SW_RXF (40)
  172. #define INT2_HI_L2SW_TXB (41)
  173. #define INT2_HI_L2SW_TXF (42)
  174. #define INT2_HI_L2SW_QM (43)
  175. #define INT2_HI_L2SW_OD0 (44)
  176. #define INT2_HI_L2SW_OD1 (45)
  177. #define INT2_HI_L2SW_OD2 (46)
  178. #define INT2_HI_L2SW_LRN (47)
  179. #define INT2_HI_MACNET0_TS (48)
  180. #define INT2_HI_MACNET0_WAKE (49)
  181. #define INT2_HI_MACNET0_PLR (50)
  182. /* not used 51-54 */
  183. #define INT2_HI_MACNET1_TS (51)
  184. #define INT2_HI_MACNET1_WAKE (52)
  185. #define INT2_HI_MACNET1_PLR (53)
  186. /* Serial Boot Facility (SBF) */
  187. #define SBF_SBFCR_BLDIV(x) (((x)&0x000F))
  188. #define SBF_SBFCR_FR (0x0010)
  189. /* Reset Controller Module (RCM) */
  190. #define RCM_RCR_SOFTRST (0x80)
  191. #define RCM_RCR_FRCRSTOUT (0x40)
  192. #define RCM_RSR_SOFT (0x20)
  193. #define RCM_RSR_LOC (0x10)
  194. #define RCM_RSR_POR (0x08)
  195. #define RCM_RSR_EXT (0x04)
  196. #define RCM_RSR_WDR_CORE (0x02)
  197. #define RCM_RSR_LOL (0x01)
  198. /* Chip Configuration Module (CCM) */
  199. #define CCM_CCR_BOOTMOD (0xC000)
  200. #define CCM_CCR_PLLMULT (0x0FC0)
  201. #define CCM_CCR_BOOTPS (0x0030)
  202. #define CCM_CCR_BOOTPS_32 (0x0000)
  203. #define CCM_CCR_BOOTPS_16 (0x0020)
  204. #define CCM_CCR_BOOTPS_8 (0x0010)
  205. #define CCM_CCR_BOOTPS_ (0x0000)
  206. #define CCM_CCR_ALESEL (0x0008)
  207. #define CCM_CCR_OSCMOD (0x0004)
  208. #define CCM_CCR_PLLMOD (0x0002)
  209. #define CCM_CCR_BOOTMEM (0x0001)
  210. #define CCM_CIR_PIN_MASK (0xFFC0)
  211. #define CCM_CIR_PRN_MASK (0x003F)
  212. #define CCM_CIR_PIN_MCF54410 (0x9F<<6)
  213. #define CCM_CIR_PIN_MCF54415 (0xA0<<6)
  214. #define CCM_CIR_PIN_MCF54416 (0xA1<<6)
  215. #define CCM_CIR_PIN_MCF54417 (0xA2<<6)
  216. #define CCM_CIR_PIN_MCF54418 (0xA3<<6)
  217. #define CCM_MISCCR_PWM_EXTCLK(x) (((x)&(0x0003)<<14)
  218. #define CCM_MISCCR_PWM_EXTCLK_MASK (0x3FFF)
  219. #define CCM_MISCCR_PWM_EXTCLK_TMR0 (0x0000)
  220. #define CCM_MISCCR_PWM_EXTCLK_TMR1 (0x4000)
  221. #define CCM_MISCCR_PWM_EXTCLK_TMR2 (0x8000)
  222. #define CCM_MISCCR_PWM_EXTCLK_TMR3 (0xC000)
  223. #define CCM_MISCCR_LIMP (0x1000)
  224. #define CCM_MISCCR_BME (0x0800)
  225. #define CCM_MISCCR_BMT(x) (((x)&0x0007)<<8)
  226. #define CCM_MISCCR_BMT_65536 (0)
  227. #define CCM_MISCCR_BMT_32768 (1)
  228. #define CCM_MISCCR_BMT_16384 (2)
  229. #define CCM_MISCCR_BMT_8192 (3)
  230. #define CCM_MISCCR_BMT_4096 (4)
  231. #define CCM_MISCCR_BMT_2048 (5)
  232. #define CCM_MISCCR_BMT_1024 (6)
  233. #define CCM_MISCCR_BMT_512 (7)
  234. #define CCM_MISCCR_SDHCSRC (0x0040)
  235. #define CCM_MISCCR_SSI1SRC (0x0020)
  236. #define CCM_MISCCR_SSI0SRC (0x0010)
  237. #define CCM_MISCCR_USBHOC (0x0008)
  238. #define CCM_MISCCR_USBOOC (0x0004)
  239. #define CCM_MISCCR_USBPUE (0x0002)
  240. #define CCM_MISCCR_USBSRC (0x0001)
  241. #define CCM_CDRH_SSI0DIV(x) (((x)&0x00FF)<<8)
  242. #define CCM_CDRH_SSI0DIV_MASK (0x00FF)
  243. #define CCM_CDRH_SSI1DIV(x) (((x)&0x00FF))
  244. #define CCM_CDRH_SSI1DIV_MASK (0xFF00)
  245. #define CCM_CDRL_LPDIV(x) (((x)&0x000F)<<8)
  246. #define CCM_CDRL_LPDIV_MASK (0xFF0F)
  247. #define CCM_CDR_LPDIV(x) CCM_CDRL_LPDIV(x)
  248. #define CCM_UOCSR_DPPD (0x2000)
  249. #define CCM_UOCSR_DMPD (0x1000)
  250. #define CCM_UOCSR_DRV_VBUS (0x0800)
  251. #define CCM_UOCSR_CRG_VBUS (0x0400)
  252. #define CCM_UOCSR_DCR_VBUS (0x0200)
  253. #define CCM_UOCSR_DPPU (0x0100)
  254. #define CCM_UOCSR_AVLD (0x0080)
  255. #define CCM_UOCSR_BVLD (0x0040)
  256. #define CCM_UOCSR_VVLD (0x0020)
  257. #define CCM_UOCSR_SEND (0x0010)
  258. #define CCM_UOCSR_PWRFLT (0x0008)
  259. #define CCM_UOCSR_WKUP (0x0004)
  260. #define CCM_UOCSR_UOMIE (0x0002)
  261. #define CCM_UOCSR_XPDE (0x0001)
  262. #define CCM_UHCSR_DRV_VBUS (0x0010)
  263. #define CCM_UHCSR_PWRFLT (0x0008)
  264. #define CCM_UHCSR_WKUP (0x0004)
  265. #define CCM_UHCSR_UOMIE (0x0002)
  266. #define CCM_UHCSR_XPDE (0x0001)
  267. #define CCM_MISCCR3_TMR_ENET (0x1000)
  268. #define CCM_MISCCR3_ENETCLK(x) (((x)&7)<<8)
  269. #define CCM_MISCCR3_ENETCLK_MASK (0xF8FF)
  270. #define CCM_MISCCR3_ENETCLK_MII (0x0700)
  271. #define CCM_MISCCR3_ENETCLK_OSC (0x0600)
  272. #define CCM_MISCCR3_ENETCLK_USB (0x0500)
  273. #define CCM_MISCCR3_ENETCLK_TMR3 (0x0400)
  274. #define CCM_MISCCR3_ENETCLK_TMR2 (0x0300)
  275. #define CCM_MISCCR3_ENETCLK_TMR1 (0x0200)
  276. #define CCM_MISCCR3_ENETCLK_TMR0 (0x0100)
  277. #define CCM_MISCCR3_ENETCLK_INTBUS (0x0000)
  278. #define CCM_MISCCR2_EXTCLKBYP (0x8000)
  279. #define CCM_MISCCR2_DDR2CLK (0x4000)
  280. #define CCM_MISCCR2_RGPIO_HALF (0x2000)
  281. #define CCM_MISCCR2_SWTSCR (0x1000)
  282. #define CCM_MISCCR2_PLLMODE(x) (((x)&7)<<8)
  283. #define CCM_MISCCR2_PLLMODE_MASK (0xF8FF)
  284. #define CCM_MISCCR2_DCCBYP (0x0080)
  285. #define CCM_MISCCR2_DAC1SEL (0x0040)
  286. #define CCM_MISCCR2_DAC0SEL (0x0020)
  287. #define CCM_MISCCR2_ADCEN (0x0010)
  288. #define CCM_MISCCR2_ADC7SEL (0x0008)
  289. #define CCM_MISCCR2_ADC3SEL (0x0004)
  290. #define CCM_MISCCR2_FBHALF (0x0002)
  291. #define CCM_MISCCR2_ULPI (0x0001)
  292. #define CCM_FNACR_PCR(x) (((x)&0x0F)<<24)
  293. #define CCM_FNACR_PCR_MASK (0xF0FFFFFF)
  294. #define CCM_FNACR_MCC(x) ((x)&0xFFFF)
  295. #define CCM_FNACR_MCC_MASK (0xFFFF0000)
  296. /* General Purpose I/O Module (GPIO) */
  297. #define GPIO_PAR_FBCTL_ALE(x) (((x)&3)<<6)
  298. #define GPIO_PAR_FBCTL_ALE_MASK (0x3F)
  299. #define GPIO_PAR_FBCTL_ALE_FB_ALE (0xC0)
  300. #define GPIO_PAR_FBCTL_ALE_FB_TS (0x80)
  301. #define GPIO_PAR_FBCTL_ALE_GPIO (0x00)
  302. #define GPIO_PAR_FBCTL_OE(x) (((x)&3)<<4)
  303. #define GPIO_PAR_FBCTL_OE_MASK (0xCF)
  304. #define GPIO_PAR_FBCTL_OE_FB_OE (0x30)
  305. #define GPIO_PAR_FBCTL_OE_FB_TBST (0x20)
  306. #define GPIO_PAR_FBCTL_OE_NFC_RE (0x20)
  307. #define GPIO_PAR_FBCTL_OE_GPIO (0x00)
  308. #define GPIO_PAR_FBCTL_FBCLK (0x08)
  309. #define GPIO_PAR_FBCTL_RW (0x04)
  310. #define GPIO_PAR_FBCTL_TA(x) ((x)&3)
  311. #define GPIO_PAR_FBCTL_TA_MASK (0xFC)
  312. #define GPIO_PAR_FBCTL_TA_TA (0x03)
  313. #define GPIO_PAR_FBCTL_TA_NFC_RB (0x01)
  314. #define GPIO_PAR_FBCTL_TA_GPIO (0x00)
  315. #define GPIO_PAR_BE_BS3(x) (((x)&0x03)<<6)
  316. #define GPIO_PAR_BE_BE3_MASK (0x3F)
  317. #define GPIO_PAR_BE_BE3_BE3 (0xC0)
  318. #define GPIO_PAR_BE_BE3_CS3 (0x80)
  319. #define GPIO_PAR_BE_BE3_FB_A1 (0x40)
  320. #define GPIO_PAR_BE_BE3_NFC_ALE (0x40)
  321. #define GPIO_PAR_BE_BE3_GPIO (0x00)
  322. #define GPIO_PAR_BE_BS2(x) (((x)&0x03)<<4)
  323. #define GPIO_PAR_BE_BE2_MASK (0xCF)
  324. #define GPIO_PAR_BE_BE2_BE2 (0x30)
  325. #define GPIO_PAR_BE_BE2_CS2 (0x20)
  326. #define GPIO_PAR_BE_BE2_FB_A0 (0x10)
  327. #define GPIO_PAR_BE_BE2_NFC_CLE (0x10)
  328. #define GPIO_PAR_BE_BE2_GPIO (0x00)
  329. #define GPIO_PAR_BE_BS1(x) (((x)&0x03)<<2)
  330. #define GPIO_PAR_BE_BE1_MASK (0xF3)
  331. #define GPIO_PAR_BE_BE1_BE1 (0x0C)
  332. #define GPIO_PAR_BE_BE1_FB_TSZ1 (0x08)
  333. #define GPIO_PAR_BE_BE1_GPIO (0x00)
  334. #define GPIO_PAR_BE_BS0(x) ((x)&0x03)
  335. #define GPIO_PAR_BE_BE0_MASK (0xFC)
  336. #define GPIO_PAR_BE_BE0_BE0 (0x03)
  337. #define GPIO_PAR_BE_BE0_FB_TSZ0 (0x02)
  338. #define GPIO_PAR_BE_BE0_GPIO (0x00)
  339. #define GPIO_PAR_CS_CS5(x) (((x)&0x03)<<6)
  340. #define GPIO_PAR_CS_CS5_MASK (0x3F)
  341. #define GPIO_PAR_CS_CS5_CS5 (0xC0)
  342. #define GPIO_PAR_CS_CS5_DACK1 (0x80)
  343. #define GPIO_PAR_CS_CS5_GPIO (0x00)
  344. #define GPIO_PAR_CS_CS4(x) (((x)&0x03)<<4)
  345. #define GPIO_PAR_CS_CS4_MASK (0xCF)
  346. #define GPIO_PAR_CS_CS4_CS4 (0x30)
  347. #define GPIO_PAR_CS_CS4_DREQ1 (0x20)
  348. #define GPIO_PAR_CS_CS4_GPIO (0x00)
  349. #define GPIO_PAR_CS_CS1(x) (((x)&0x03)<<2)
  350. #define GPIO_PAR_CS_CS1_MASK (0xF3)
  351. #define GPIO_PAR_CS_CS1_CS1 (0x0C)
  352. #define GPIO_PAR_CS_CS1_NFC_CE (0x04)
  353. #define GPIO_PAR_CS_CS1_GPIO (0x00)
  354. #define GPIO_PAR_CS_CS0_CS0 (0x01)
  355. #define GPIO_PAR_CANI2C_I2C0SCL(x) (((x)&0x03)<<6)
  356. #define GPIO_PAR_CANI2C_I2C0SCL_MASK (0x3F)
  357. #define GPIO_PAR_CANI2C_I2C0SCL_I2C0SCL (0xC0)
  358. #define GPIO_PAR_CANI2C_I2C0SCL_U8TXD (0x80)
  359. #define GPIO_PAR_CANI2C_I2C0SCL_CAN0TX (0x40)
  360. #define GPIO_PAR_CANI2C_I2C0SCL_GPIO (0x00)
  361. #define GPIO_PAR_CANI2C_I2C0SDA(x) (((x)&0x03)<<4)
  362. #define GPIO_PAR_CANI2C_I2C0SDA_MASK (0xCF)
  363. #define GPIO_PAR_CANI2C_I2C0SDA_I2C0SDA (0x30)
  364. #define GPIO_PAR_CANI2C_I2C0SDA_U8RXD (0x20)
  365. #define GPIO_PAR_CANI2C_I2C0SDA_CAN0RX (0x10)
  366. #define GPIO_PAR_CANI2C_I2C0SDA_GPIO (0x00)
  367. #define GPIO_PAR_CANI2C_CAN1TX(x) (((x)&0x03)<<2)
  368. #define GPIO_PAR_CANI2C_CAN1TX_MASK (0xF3)
  369. #define GPIO_PAR_CANI2C_CAN1TX_CAN1TX (0x0C)
  370. #define GPIO_PAR_CANI2C_CAN1TX_U9TXD (0x08)
  371. #define GPIO_PAR_CANI2C_CAN1TX_I2C1SCL (0x04)
  372. #define GPIO_PAR_CANI2C_CAN1TX_GPIO (0x00)
  373. #define GPIO_PAR_CANI2C_CAN1RX(x) ((x)&0x03)
  374. #define GPIO_PAR_CANI2C_CAN1RX_MASK (0xFC)
  375. #define GPIO_PAR_CANI2C_CAN1RX_CAN1RX (0x03)
  376. #define GPIO_PAR_CANI2C_CAN1RX_U9RXD (0x02)
  377. #define GPIO_PAR_CANI2C_CAN1RX_I2C1SDA (0x01)
  378. #define GPIO_PAR_CANI2C_CAN1RX_GPIO (0x00)
  379. #define GPIO_PAR_IRQH_IRQ7 (0x10)
  380. #define GPIO_PAR_IRQH_IRQ4(x) (((x)&0x03)<<2)
  381. #define GPIO_PAR_IRQH_IRQ4_MASK (0xF3)
  382. #define GPIO_PAR_IRQH_IRQ4_IRQ4 (0x0C)
  383. #define GPIO_PAR_IRQH_IRQ4_DREQ0 (0x08)
  384. #define GPIO_PAR_IRQH_IRQ4_GPIO (0x00)
  385. #define GPIO_PAR_IRQH_IRQ1 (0x03)
  386. #define GPIO_PAR_IRQL_IRQ6(x) (((x)&0x03)<<6)
  387. #define GPIO_PAR_IRQL_IRQ6_MASK (0x3F)
  388. #define GPIO_PAR_IRQL_IRQ6_IRQ6 (0xC0)
  389. #define GPIO_PAR_IRQL_IRQ6_USBCLKIN (0x40)
  390. #define GPIO_PAR_IRQL_IRQ6_GPIO (0x00)
  391. #define GPIO_PAR_IRQL_IRQ3(x) (((x)&0x03)<<4)
  392. #define GPIO_PAR_IRQL_IRQ3_MASK (0xCF)
  393. #define GPIO_PAR_IRQL_IRQ3_IRQ3 (0x30)
  394. #define GPIO_PAR_IRQL_IRQ3_DSPI0_PCS3 (0x20)
  395. #define GPIO_PAR_IRQL_IRQ3_USB1_VBUS_EN (0x10)
  396. #define GPIO_PAR_IRQL_IRQ3_GPIO (0x00)
  397. #define GPIO_PAR_IRQL_IRQ2(x) (((x)&0x03)<<2)
  398. #define GPIO_PAR_IRQL_IRQ2_MASK (0xF3)
  399. #define GPIO_PAR_IRQL_IRQ2_IRQ2 (0x0C)
  400. #define GPIO_PAR_IRQL_IRQ2_DSPI0_PCS2 (0x08)
  401. #define GPIO_PAR_IRQL_IRQ2_USB1_VBUS_OC (0x04)
  402. #define GPIO_PAR_IRQL_IRQ2_GPIO (0x00)
  403. #define GPIO_PAR_DSPI0_SIN(x) (((x)&0x03)<<6)
  404. #define GPIO_PAR_DSPI0_SIN_MASK (0x3F)
  405. #define GPIO_PAR_DSPI0_SIN_DSPI0SIN (0xC0)
  406. #define GPIO_PAR_DSPI0_SIN_SBF_DI (0xC0)
  407. #define GPIO_PAR_DSPI0_SIN_U3RXD (0x80)
  408. #define GPIO_PAR_DSPI0_SIN_SDHC_CMD (0x40)
  409. #define GPIO_PAR_DSPI0_SIN_GPIO (0x00)
  410. #define GPIO_PAR_DSPI0_SOUT(x) (((x)&0x03)<<4)
  411. #define GPIO_PAR_DSPI0_SOUT_MASK (0xCF)
  412. #define GPIO_PAR_DSPI0_SOUT_DSPI0SOUT (0x30)
  413. #define GPIO_PAR_DSPI0_SOUT_SBF_DO (0x30)
  414. #define GPIO_PAR_DSPI0_SOUT_U3TXD (0x20)
  415. #define GPIO_PAR_DSPI0_SOUT_SDHC_DAT0 (0x10)
  416. #define GPIO_PAR_DSPI0_SOUT_GPIO (0x00)
  417. #define GPIO_PAR_DSPI0_SCK(x) (((x)&0x03)<<2)
  418. #define GPIO_PAR_DSPI0_SCK_MASK (0xF3)
  419. #define GPIO_PAR_DSPI0_SCK_DSPI0SCK (0x0C)
  420. #define GPIO_PAR_DSPI0_SCK_SBF_CK (0x0C)
  421. #define GPIO_PAR_DSPI0_SCK_I2C3SCL (0x08)
  422. #define GPIO_PAR_DSPI0_SCK_SDHC_CLK (0x04)
  423. #define GPIO_PAR_DSPI0_SCK_GPIO (0x00)
  424. #define GPIO_PAR_DSPI0_PCS0(x) ((x)&0x03)
  425. #define GPIO_PAR_DSPI0_PCS0_MASK (0xFC)
  426. #define GPIO_PAR_DSPI0_PCS0_DSPI0PCS0 (0x03)
  427. #define GPIO_PAR_DSPI0_PCS0_SS (0x03)
  428. #define GPIO_PAR_DSPI0_PCS0_I2C3SDA (0x02)
  429. #define GPIO_PAR_DSPI0_PCS0_SDHC_DAT3 (0x01)
  430. #define GPIO_PAR_DSPI0_PCS0_GPIO (0x00)
  431. #define GPIO_PAR_DSPIOW_DSPI0PSC1 (0x80)
  432. #define GPIO_PAR_DSPIOW_SBF_CS (0x80)
  433. #define GPIO_PAR_DSPIOW_OWDAT (((x)&0x03)<<4)
  434. #define GPIO_PAR_DSPIOW_OWDAT_MASK (0xCF)
  435. #define GPIO_PAR_DSPIOW_OWDAT_OWDAT (0x30)
  436. #define GPIO_PAR_DSPIOW_OWDAT_DACK0 (0x20)
  437. #define GPIO_PAR_DSPIOW_OWDAT_GPIO (0x00)
  438. #define GPIO_PAR_TIMER_T3IN(x) (((x)&0x03)<<6)
  439. #define GPIO_PAR_TIMER_T3IN_MASK (0x3F)
  440. #define GPIO_PAR_TIMER_T3IN_T3IN (0xC0)
  441. #define GPIO_PAR_TIMER_T3IN_EXTA3 (0xC0)
  442. #define GPIO_PAR_TIMER_T3IN_T3OUT (0x80)
  443. #define GPIO_PAR_TIMER_T3IN_USB0_VBUSEN (0x40)
  444. #define GPIO_PAR_TIMER_T3IN_ULIPI_DIR (0x40)
  445. #define GPIO_PAR_TIMER_T3IN_GPIO (0x00)
  446. #define GPIO_PAR_TIMER_T2IN(x) (((x)&0x03)<<4)
  447. #define GPIO_PAR_TIMER_T2IN_MASK (0xCF)
  448. #define GPIO_PAR_TIMER_T2IN_T2IN (0x30)
  449. #define GPIO_PAR_TIMER_T2IN_EXTA2 (0x30)
  450. #define GPIO_PAR_TIMER_T2IN_T2OUT (0x20)
  451. #define GPIO_PAR_TIMER_T2IN_SDHC_DAT2 (0x10)
  452. #define GPIO_PAR_TIMER_T2IN_GPIO (0x00)
  453. #define GPIO_PAR_TIMER_T1IN(x) (((x)&0x03)<<2)
  454. #define GPIO_PAR_TIMER_T1IN_MASK (0xF3)
  455. #define GPIO_PAR_TIMER_T1IN_T1IN (0x0C)
  456. #define GPIO_PAR_TIMER_T1IN_EXTA1 (0x0C)
  457. #define GPIO_PAR_TIMER_T1IN_T1OUT (0x08)
  458. #define GPIO_PAR_TIMER_T1IN_SDHC_DAT1 (0x04)
  459. #define GPIO_PAR_TIMER_T1IN_GPIO (0x00)
  460. #define GPIO_PAR_TIMER_T0IN(x) ((x)&0x03)
  461. #define GPIO_PAR_TIMER_T0IN_MASK (0xFC)
  462. #define GPIO_PAR_TIMER_T0IN_T0IN (0x03)
  463. #define GPIO_PAR_TIMER_T0IN_EXTA0 (0x03)
  464. #define GPIO_PAR_TIMER_T0IN_T0OUT (0x02)
  465. #define GPIO_PAR_TIMER_T0IN_USBO_VBUSOC (0x01)
  466. #define GPIO_PAR_TIMER_T0IN_ULPI_NXT (0x01)
  467. #define GPIO_PAR_TIMER_T0IN_GPIO (0x00)
  468. #define GPIO_PAR_UART2_U2CTS(x) (((x)&0x03)<<6)
  469. #define GPIO_PAR_UART2_U2CTS_MASK (0x3F)
  470. #define GPIO_PAR_UART2_U2CTS_U2CTS (0xC0)
  471. #define GPIO_PAR_UART2_U2CTS_U6TXD (0x80)
  472. #define GPIO_PAR_UART2_U2CTS_SSI1_BCLK (0x40)
  473. #define GPIO_PAR_UART2_U2CTS_GPIO (0x00)
  474. #define GPIO_PAR_UART2_U2RTS(x) (((x)&0x03)<<4)
  475. #define GPIO_PAR_UART2_U2RTS_MASK (0xCF)
  476. #define GPIO_PAR_UART2_U2RTS_U2RTS (0x30)
  477. #define GPIO_PAR_UART2_U2RTS_U6RXD (0x20)
  478. #define GPIO_PAR_UART2_U2RTS_SSI1_FS (0x10)
  479. #define GPIO_PAR_UART2_U2RTS_GPIO (0x00)
  480. #define GPIO_PAR_UART2_U2RXD(x) (((x)&0x03)<<2)
  481. #define GPIO_PAR_UART2_U2RXD_MASK (0xF3)
  482. #define GPIO_PAR_UART2_U2RXD_U2RXD (0x0C)
  483. #define GPIO_PAR_UART2_U2RXD_PWM_A3 (0x08)
  484. #define GPIO_PAR_UART2_U2RXD_SSI1_RXD (0x04)
  485. #define GPIO_PAR_UART2_U2RXD_GPIO (0x00)
  486. #define GPIO_PAR_UART2_U2TXD(x) ((x)&0x03)
  487. #define GPIO_PAR_UART2_U2TXD_MASK (0xFC)
  488. #define GPIO_PAR_UART2_U2TXD_U2TXD (0x03)
  489. #define GPIO_PAR_UART2_U2TXD_PWM_B3 (0x02)
  490. #define GPIO_PAR_UART2_U2TXD_SSI1_TXD (0x01)
  491. #define GPIO_PAR_UART2_U2TXD_GPIO (0x00)
  492. #define GPIO_PAR_UART1_U1CTS(x) (((x)&0x03)<<6)
  493. #define GPIO_PAR_UART1_U1CTS_MASK (0x3F)
  494. #define GPIO_PAR_UART1_U1CTS_U1CTS (0xC0)
  495. #define GPIO_PAR_UART1_U1CTS_U5TXD (0x80)
  496. #define GPIO_PAR_UART1_U1CTS_DSPI3_SCK (0x40)
  497. #define GPIO_PAR_UART1_U1CTS_GPIO (0x00)
  498. #define GPIO_PAR_UART1_U1RTS(x) (((x)&0x03)<<4)
  499. #define GPIO_PAR_UART1_U1RTS_MASK (0xCF)
  500. #define GPIO_PAR_UART1_U1RTS_U1RTS (0x30)
  501. #define GPIO_PAR_UART1_U1RTS_U5RXD (0x20)
  502. #define GPIO_PAR_UART1_U1RTS_DSPI3_PCS0 (0x10)
  503. #define GPIO_PAR_UART1_U1RTS_GPIO (0x00)
  504. #define GPIO_PAR_UART1_U1RXD(x) (((x)&0x03)<<2)
  505. #define GPIO_PAR_UART1_U1RXD_MASK (0xF3)
  506. #define GPIO_PAR_UART1_U1RXD_U1RXD (0x0C)
  507. #define GPIO_PAR_UART1_U1RXD_I2C5SDA (0x08)
  508. #define GPIO_PAR_UART1_U1RXD_DSPI3_SIN (0x04)
  509. #define GPIO_PAR_UART1_U1RXD_GPIO (0x00)
  510. #define GPIO_PAR_UART1_U1TXD(x) ((x)&0x03)
  511. #define GPIO_PAR_UART1_U1TXD_MASK (0xFC)
  512. #define GPIO_PAR_UART1_U1TXD_U1TXD (0x03)
  513. #define GPIO_PAR_UART1_U1TXD_I2C5SCL (0x02)
  514. #define GPIO_PAR_UART1_U1TXD_DSPI3_SOUT (0x01)
  515. #define GPIO_PAR_UART1_U1TXD_GPIO (0x00)
  516. #define GPIO_PAR_UART0_U0CTS(x) (((x)&0x03)<<6)
  517. #define GPIO_PAR_UART0_U0CTS_MASK (0x3F)
  518. #define GPIO_PAR_UART0_U0CTS_U0CTS (0xC0)
  519. #define GPIO_PAR_UART0_U0CTS_U4TXD (0x80)
  520. #define GPIO_PAR_UART0_U0CTS_DSPI2_SCK (0x40)
  521. #define GPIO_PAR_UART0_U0CTS_GPIO (0x00)
  522. #define GPIO_PAR_UART0_U0RTS(x) (((x)&0x03)<<4)
  523. #define GPIO_PAR_UART0_U0RTS_MASK (0xCF)
  524. #define GPIO_PAR_UART0_U0RTS_U0RTS (0x30)
  525. #define GPIO_PAR_UART0_U0RTS_U4RXD (0x20)
  526. #define GPIO_PAR_UART0_U0RTS_DSPI2_PCS0 (0x10)
  527. #define GPIO_PAR_UART0_U0RTS_GPIO (0x00)
  528. #define GPIO_PAR_UART0_U0RXD(x) (((x)&0x03)<<2)
  529. #define GPIO_PAR_UART0_U0RXD_MASK (0xF3)
  530. #define GPIO_PAR_UART0_U0RXD_U0RXD (0x0C)
  531. #define GPIO_PAR_UART0_U0RXD_I2C4SDA (0x08)
  532. #define GPIO_PAR_UART0_U0RXD_DSPI2_SIN (0x04)
  533. #define GPIO_PAR_UART0_U0RXD_GPIO (0x00)
  534. #define GPIO_PAR_UART0_U0TXD(x) ((x)&0x03)
  535. #define GPIO_PAR_UART0_U0TXD_MASK (0xFC)
  536. #define GPIO_PAR_UART0_U0TXD_U0TXD (0x03)
  537. #define GPIO_PAR_UART0_U0TXD_I2C4SCL (0x02)
  538. #define GPIO_PAR_UART0_U0TXD_DSPI2_SOUT (0x01)
  539. #define GPIO_PAR_UART0_U0TXD_GPIO (0x00)
  540. #define GPIO_PAR_SDHCH_DAT3(x) (((x)&0x03)<<6)
  541. #define GPIO_PAR_SDHCH_DAT3_MASK (0x3F)
  542. #define GPIO_PAR_SDHCH_DAT3_DAT3 (0xC0)
  543. #define GPIO_PAR_SDHCH_DAT3_PWM_A1 (0x80)
  544. #define GPIO_PAR_SDHCH_DAT3_DSPI1_PCS0 (0x40)
  545. #define GPIO_PAR_SDHCH_DAT3_GPIO (0x00)
  546. #define GPIO_PAR_SDHCH_DAT2(x) (((x)&0x03)<<4)
  547. #define GPIO_PAR_SDHCH_DAT2_MASK (0xCF)
  548. #define GPIO_PAR_SDHCH_DAT2_DAT2 (0x30)
  549. #define GPIO_PAR_SDHCH_DAT2_PWM_B1 (0x20)
  550. #define GPIO_PAR_SDHCH_DAT2_DSPI1_PCS2 (0x10)
  551. #define GPIO_PAR_SDHCH_DAT2_GPIO (0x00)
  552. #define GPIO_PAR_SDHCH_DAT1(x) (((x)&0x03)<<2)
  553. #define GPIO_PAR_SDHCH_DAT1_MASK (0xF3)
  554. #define GPIO_PAR_SDHCH_DAT1_DAT1 (0x0C)
  555. #define GPIO_PAR_SDHCH_DAT1_PWM_A2 (0x08)
  556. #define GPIO_PAR_SDHCH_DAT1_DSPI1_PCS1 (0x04)
  557. #define GPIO_PAR_SDHCH_DAT1_GPIO (0x00)
  558. #define GPIO_PAR_SDHCH_DAT0(x) ((x)&0x03)
  559. #define GPIO_PAR_SDHCH_DAT0_MASK (0xFC)
  560. #define GPIO_PAR_SDHCH_DAT0_DAT0 (0x03)
  561. #define GPIO_PAR_SDHCH_DAT0_PWM_B2 (0x02)
  562. #define GPIO_PAR_SDHCH_DAT0_DSPI1_SOUT (0x01)
  563. #define GPIO_PAR_SDHCH_DAT0_GPIO (0x00)
  564. #define GPIO_PAR_SDHCL_CMD(x) (((x)&0x03)<<2)
  565. #define GPIO_PAR_SDHCL_CMD_MASK (0xF3)
  566. #define GPIO_PAR_SDHCL_CMD_CMD (0x0C)
  567. #define GPIO_PAR_SDHCL_CMD_PWM_A0 (0x08)
  568. #define GPIO_PAR_SDHCL_CMD_DSPI1_SIN (0x04)
  569. #define GPIO_PAR_SDHCL_CMD_GPIO (0x00)
  570. #define GPIO_PAR_SDHCL_CLK(x) ((x)&0x03)
  571. #define GPIO_PAR_SDHCL_CLK_MASK (0xFC)
  572. #define GPIO_PAR_SDHCL_CLK_CLK (0x03)
  573. #define GPIO_PAR_SDHCL_CLK_PWM_B0 (0x02)
  574. #define GPIO_PAR_SDHCL_CLK_DSPI1_SCK (0x01)
  575. #define GPIO_PAR_SDHCL_CLK_GPIO (0x00)
  576. #define GPIO_PAR_SIMP0H_DAT(x) (((x)&0x03)<<6)
  577. #define GPIO_PAR_SIMP0H_DAT_MASK (0x3F)
  578. #define GPIO_PAR_SIMP0H_DAT_DAT (0xC0)
  579. #define GPIO_PAR_SIMP0H_DAT_PWM_FAULT2 (0x80)
  580. #define GPIO_PAR_SIMP0H_DAT_SDHC_DAT7 (0x40)
  581. #define GPIO_PAR_SIMP0H_DAT_GPIO (0x00)
  582. #define GPIO_PAR_SIMP0H_VEN(x) (((x)&0x03)<<4)
  583. #define GPIO_PAR_SIMP0H_VEN_MASK (0xCF)
  584. #define GPIO_PAR_SIMP0H_VEN_VEN (0x30)
  585. #define GPIO_PAR_SIMP0H_VEN_PWM_FAULT0 (0x20)
  586. #define GPIO_PAR_SIMP0H_VEN_GPIO (0x00)
  587. #define GPIO_PAR_SIMP0H_RST(x) (((x)&0x03)<<2)
  588. #define GPIO_PAR_SIMP0H_RST_MASK (0xF3)
  589. #define GPIO_PAR_SIMP0H_RST_RST (0x0C)
  590. #define GPIO_PAR_SIMP0H_RST_PWM_FORCE (0x08)
  591. #define GPIO_PAR_SIMP0H_RST_SDHC_DAT6 (0x04)
  592. #define GPIO_PAR_SIMP0H_RST_GPIO (0x00)
  593. #define GPIO_PAR_SIMP0H_PD(x) ((x)&0x03)
  594. #define GPIO_PAR_SIMP0H_PD_MASK (0xFC)
  595. #define GPIO_PAR_SIMP0H_PD_PD (0x03)
  596. #define GPIO_PAR_SIMP0H_PD_PWM_SYNC (0x02)
  597. #define GPIO_PAR_SIMP0H_PD_SDHC_DAT5 (0x01)
  598. #define GPIO_PAR_SIMP0H_PD_GPIO (0x00)
  599. #define GPIO_PAR_SIMP0L_CLK(x) ((x)&0x03)
  600. #define GPIO_PAR_SIMP0L_CLK_MASK (0xFC)
  601. #define GPIO_PAR_SIMP0L_CLK_CLK (0x03)
  602. #define GPIO_PAR_SIMP0L_CLK_PWM_FAULT1 (0x02)
  603. #define GPIO_PAR_SIMP0L_CLK_SDHC_DAT4 (0x01)
  604. #define GPIO_PAR_SIMP0L_CLK_GPIO (0x00)
  605. #define GPIO_PAR_SSI0H_RXD(x) (((x)&0x03)<<6)
  606. #define GPIO_PAR_SSI0H_RXD_MASK (0x3F)
  607. #define GPIO_PAR_SSI0H_RXD_RXD (0xC0)
  608. #define GPIO_PAR_SSI0H_RXD_I2C2SDA (0x80)
  609. #define GPIO_PAR_SSI0H_RXD_SIM1_VEN (0x40)
  610. #define GPIO_PAR_SSI0H_RXD_GPIO (0x00)
  611. #define GPIO_PAR_SSI0H_TXD(x) (((x)&0x03)<<4)
  612. #define GPIO_PAR_SSI0H_TXD_MASK (0xCF)
  613. #define GPIO_PAR_SSI0H_TXD_TXD (0x30)
  614. #define GPIO_PAR_SSI0H_TXD_I2C2SCL (0x20)
  615. #define GPIO_PAR_SSI0H_TXD_SIM1_DAT (0x10)
  616. #define GPIO_PAR_SSI0H_TXD_GPIO (0x00)
  617. #define GPIO_PAR_SSI0H_FS(x) (((x)&0x03)<<2)
  618. #define GPIO_PAR_SSI0H_FS_MASK (0xF3)
  619. #define GPIO_PAR_SSI0H_FS_FS (0x0C)
  620. #define GPIO_PAR_SSI0H_FS_U7TXD (0x08)
  621. #define GPIO_PAR_SSI0H_FS_SIM1_RST (0x04)
  622. #define GPIO_PAR_SSI0H_FS_GPIO (0x00)
  623. #define GPIO_PAR_SSI0H_MCLK(x) ((x)&0x03)
  624. #define GPIO_PAR_SSI0H_MCLK_MASK (0xFC)
  625. #define GPIO_PAR_SSI0H_MCLK_MCLK (0x03)
  626. #define GPIO_PAR_SSI0H_MCLK_SSI_CLKIN (0x02)
  627. #define GPIO_PAR_SSI0H_MCLK_SIM1_CLK (0x01)
  628. #define GPIO_PAR_SSI0H_MCLK_GPIO (0x00)
  629. #define GPIO_PAR_SSI0L_BCLK(x) ((x)&0x03)
  630. #define GPIO_PAR_SSI0L_BCLK_MASK (0xFC)
  631. #define GPIO_PAR_SSI0L_BCLK_BCLK (0x03)
  632. #define GPIO_PAR_SSI0L_BCLK_U7RXD (0x02)
  633. #define GPIO_PAR_SSI0L_BCLK_SIM1_PD (0x01)
  634. #define GPIO_PAR_SSI0L_BCLK_GPIO (0x00)
  635. #define GPIO_PAR_DEBUGH1_DAT3 (0x40)
  636. #define GPIO_PAR_DEBUGH1_DAT2 (0x10)
  637. #define GPIO_PAR_DEBUGH1_DAT1 (0x04)
  638. #define GPIO_PAR_DEBUGH1_DAT0 (0x01)
  639. #define GPIO_PAR_DEBUGH0_PST3 (0x40)
  640. #define GPIO_PAR_DEBUGH0_PST2 (0x10)
  641. #define GPIO_PAR_DEBUGH0_PST1 (0x04)
  642. #define GPIO_PAR_DEBUGH0_PST0 (0x01)
  643. #define GPIO_PODR_G4_VAL (0x01 << 4)
  644. #define GPIO_PODR_G4_MASK (0xff & ~GPIO_PODR_G4_VAL)
  645. #define GPIO_PDDR_G4_OUTPUT (0x01 << 4)
  646. #define GPIO_PDDR_G4_MASK (0xff & ~GPIO_PDDR_G4_OUTPUT)
  647. #define GPIO_PAR_DEBUGL_ALLPST (0x01)
  648. #define GPIO_PAR_FEC_FEC(x) ((x)&0x0F)
  649. #define GPIO_PAR_FEC_FEC_MASK (0xF0)
  650. #define GPIO_PAR_FEC_FEC_GPIO (0x0D)
  651. #define GPIO_PAR_FEC_FEC_RMII1 (0x0C)
  652. #define GPIO_PAR_FEC_FEC_RMII1FUL (0x0B)
  653. #define GPIO_PAR_FEC_FEC_RMII_ULPI (0x0A)
  654. #define GPIO_PAR_FEC_FEC_RMII0 (0x09)
  655. #define GPIO_PAR_FEC_FEC_RMII0FUL_ULPI (0x08)
  656. #define GPIO_PAR_FEC_FEC_RMII0FUL (0x07)
  657. #define GPIO_PAR_FEC_FEC_RMII0_1FUL (0x06)
  658. #define GPIO_PAR_FEC_FEC_RMII0FUL_1 (0x05) /* 0:Full 1: */
  659. /* Both 0&1: MDC, MDIO, COL & TXER - GPIO */
  660. #define GPIO_PAR_FEC_FEC_RMII0_1 (0x04)
  661. #define GPIO_PAR_FEC_FEC_RMII0FUL_1FUL (0x03)
  662. #define GPIO_PAR_FEC_FEC_MII (0x01) /* MDC & MDIO - GPIO */
  663. #define GPIO_PAR_FEC_FEC_MIIFUL (0x00)
  664. /* TC: Need to edit here.... */
  665. /* Mode Select Control */
  666. #define GPIO_MSCR_SDRAM_MSC(x) ((x)&0x03)
  667. #define GPIO_MSCR_SDRAM_MSC_MASK (0xFC)
  668. /* Slew Rate Control */
  669. #define GPIO_SRCR_FB3_FB3(x) ((x)&0x03)
  670. #define GPIO_SRCR_FB3_FB3_MASK (0xFC)
  671. #define GPIO_SRCR_FB2_FB2(x) ((x)&0x03)
  672. #define GPIO_SRCR_FB2_FB2_MASK (0xFC)
  673. #define GPIO_SRCR_FB1_FB1(x) ((x)&0x03)
  674. #define GPIO_SRCR_FB1_FB1_MASK (0xFC)
  675. #define GPIO_SRCR_FB4_FB5(x) (((x)&0x03)<<2)
  676. #define GPIO_SRCR_FB4_FB5_MASK (0xF3)
  677. #define GPIO_SRCR_FB4_FB4(x) ((x)&0x03)
  678. #define GPIO_SRCR_FB4_FB4_MASK (0xFC)
  679. #define GPIO_SRCR_DSPIOW_OWDAT(x) (((x)&0x03)<<4)
  680. #define GPIO_SRCR_DSPIOW_OWDAT_MASK (0xCF)
  681. #define GPIO_SRCR_DSPIOW_DSPI0(x) ((x)&0x03)
  682. #define GPIO_SRCR_DSPIOW_DSPI0_MASK (0xFC)
  683. #define GPIO_SRCR_CANI2C_CAN1(x) (((x)&0x03)<<2)
  684. #define GPIO_SRCR_CANI2C_CAN1_MASK (0xF3)
  685. #define GPIO_SRCR_CANI2C_I2C0(x) ((x)&0x03)
  686. #define GPIO_SRCR_CANI2C_I2C0_MASK (0xFC)
  687. #define GPIO_SRCR_IRQ0_IRQ0(x) ((x)&0x03)
  688. #define GPIO_SRCR_IRQ0_IRQ0_MASK (0xFC)
  689. #define GPIO_SRCR_TIMER_TMR3(x) (((x)&0x03)<<6)
  690. #define GPIO_SRCR_TIMER_TMR3_MASK (0x3F)
  691. #define GPIO_SRCR_TIMER_TMR2(x) (((x)&0x03)<<4)
  692. #define GPIO_SRCR_TIMER_TMR2_MASK (0xCF)
  693. #define GPIO_SRCR_TIMER_TMR1(x) (((x)&0x03)<<2)
  694. #define GPIO_SRCR_TIMER_TMR1_MASK (0xF3)
  695. #define GPIO_SRCR_TIMER_TMR0(x) ((x)&0x03)
  696. #define GPIO_SRCR_TIMER_TMR0_MASK (0xFC)
  697. #define GPIO_SRCR_UART_U2(x) (((x)&0x03)<<4)
  698. #define GPIO_SRCR_UART_U2_MASK (0xCF)
  699. #define GPIO_SRCR_UART_U1(x) (((x)&0x03)<<2)
  700. #define GPIO_SRCR_UART_U1_MASK (0xF3)
  701. #define GPIO_SRCR_UART_U0(x) ((x)&0x03)
  702. #define GPIO_SRCR_UART_U0_MASK (0xFC)
  703. #define GPIO_SRCR_FEC_RMII0(x) (((x)&0x03)<<2)
  704. #define GPIO_SRCR_FEC_RMII0_MASK (0xF3)
  705. #define GPIO_SRCR_FEC_RMII1(x) ((x)&0x03)
  706. #define GPIO_SRCR_FEC_RMII1_MASK (0xFC)
  707. #define GPIO_SRCR_SDHC_SDHC(x) ((x)&0x03)
  708. #define GPIO_SRCR_SDHC_SDHC_MASK (0xFC)
  709. #define GPIO_SRCR_SIM0_SIMP0(x) ((x)&0x03)
  710. #define GPIO_SRCR_SIM0_SIMP0_MASK (0xFC)
  711. #define GPIO_SRCR_SSI0_SSI0(x) ((x)&0x03)
  712. #define GPIO_SRCR_SSI0_SSI0_MASK (0xFC)
  713. #define GPIO_PCR_URTS_U2 (0x0004)
  714. #define GPIO_PCR_URTS_U1 (0x0002)
  715. #define GPIO_PCR_URTS_U0 (0x0001)
  716. #define GPIO_PCR_UCTS_U2 (0x0004)
  717. #define GPIO_PCR_UCTS_U1 (0x0002)
  718. #define GPIO_PCR_UCTS_U0 (0x0001)
  719. #define GPIO_UTXD_WOM_U9 (0x0200)
  720. #define GPIO_UTXD_WOM_U8 (0x0100)
  721. #define GPIO_UTXD_WOM_U7 (0x0080)
  722. #define GPIO_UTXD_WOM_U6 (0x0040)
  723. #define GPIO_UTXD_WOM_U5 (0x0020)
  724. #define GPIO_UTXD_WOM_U4 (0x0010)
  725. #define GPIO_UTXD_WOM_U3 (0x0008)
  726. #define GPIO_UTXD_WOM_U2 (0x0004)
  727. #define GPIO_UTXD_WOM_U1 (0x0002)
  728. #define GPIO_UTXD_WOM_U0 (0x0001)
  729. #define GPIO_URXD_WOM_U9(x) (((x)&3)<<18)
  730. #define GPIO_URXD_WOM_U9_MASK (0xFFF3FFFF)
  731. #define GPIO_URXD_WOM_U8(x) (((x)&3)<<16)
  732. #define GPIO_URXD_WOM_U8_MASK (0xFFFCFFFF)
  733. #define GPIO_URXD_WOM_U7(x) (((x)&3)<<14)
  734. #define GPIO_URXD_WOM_U7_MASK (0xFFFF3FFF)
  735. #define GPIO_URXD_WOM_U6(x) (((x)&3)<<12)
  736. #define GPIO_URXD_WOM_U6_MASK (0xFFFFCFFF)
  737. #define GPIO_URXD_WOM_U5(x) (((x)&3)<<10)
  738. #define GPIO_URXD_WOM_U5_MASK (0xFFFFF3FF)
  739. #define GPIO_URXD_WOM_U4(x) (((x)&3)<<8)
  740. #define GPIO_URXD_WOM_U4_MASK (0xFFFFFCFF)
  741. #define GPIO_URXD_WOM_U3(x) (((x)&3)<<6)
  742. #define GPIO_URXD_WOM_U3_MASK (0xFFFFFF3F)
  743. #define GPIO_URXD_WOM_U2(x) (((x)&3)<<4)
  744. #define GPIO_URXD_WOM_U2_MASK (0xFFFFFFCF)
  745. #define GPIO_URXD_WOM_U1(x) (((x)&3)<<2)
  746. #define GPIO_URXD_WOM_U1_MASK (0xFFFFFFF3)
  747. #define GPIO_URXD_WOM_U0(x) ((x)&3)
  748. #define GPIO_URXD_WOM_U0_MASK (0xFFFFFFFC)
  749. #define GPIO_HCR1_PG4_0(x) (((x)&0x1F)<<27)
  750. #define GPIO_HCR1_PG4_0_MASK (0x07FFFFFF)
  751. #define GPIO_HCR1_PF7_3(x) (((x)&0x1F)<<22)
  752. #define GPIO_HCR1_PF7_3_MASK (0xF83FFFFF)
  753. #define GPIO_HCR1_PE6_0(x) (((x)&0x7F)<<15)
  754. #define GPIO_HCR1_PE6_0_MASK (0xFFC07FFF)
  755. #define GPIO_HCR1_PD7_3(x) (((x)&0x1F)<<10)
  756. #define GPIO_HCR1_PD7_3_MASK (0xFFFF83FF)
  757. #define GPIO_HCR1_PC7_1(x) (((x)&0x7F)<<3)
  758. #define GPIO_HCR1_PC7_1_MASK (0xFFFFFC07)
  759. #define GPIO_HCR1_PB2_0(x) ((x)&7)
  760. #define GPIO_HCR1_PB2_0_MASK (0xFFFFFFF8)
  761. #define GPIO_HCR0_PK3 (0x00000400)
  762. #define GPIO_HCR0_PK0 (0x00000200)
  763. #define GPIO_HCR0_PD2_0(x) (((x)&7)<<6)
  764. #define GPIO_HCR0_PD2_0_MASK (0xFFFFFE3F)
  765. #define GPIO_HCR0_PE7 (0x00000020)
  766. #define GPIO_HCR0_PH7_3(x) ((x)&0x1F)
  767. #define GPIO_HCR0_PH7_3_MASK(x) (0xFFFFFFE0)
  768. /* SDRAM Controller (SDRAMC) */
  769. /* Phase Locked Loop (PLL) */
  770. #define PLL_CR_LOCIRQ (0x00040000)
  771. #define PLL_CR_LOCRE (0x00020000)
  772. #define PLL_CR_LOCEN (0x00010000)
  773. #define PLL_CR_LOLIRQ (0x00004000)
  774. #define PLL_CR_LOLRE (0x00002000)
  775. #define PLL_CR_LOLEN (0x00001000)
  776. #define PLL_CR_REFDIV(x) (((x)&7)<<8)
  777. #define PLL_CR_REFDIV_MASK (0xFFFFF8FF)
  778. #define PLL_CR_FBKDIV(x) ((x)&0x3F)
  779. #define PLL_CR_FBKDIV_MASK (0xFFFFFFC0)
  780. #define PLL_CR_FBKDIV_BITS (0x3F)
  781. #define PLL_DR_OUTDIV5(x) (((x)&0x1F)<<21)
  782. #define PLL_DR_OUTDIV5_MASK (0xFC1FFFFF)
  783. #define PLL_DR_OUTDIV5_BITS (0x03E00000)
  784. #define PLL_DR_OUTDIV4(x) (((x)&0x1F)<<16)
  785. #define PLL_DR_OUTDIV4_MASK (0xFFE0FFFF)
  786. #define PLL_DR_OUTDIV4_BITS (0x001F0000)
  787. #define PLL_DR_OUTDIV3(x) (((x)&0x1F)<<10)
  788. #define PLL_DR_OUTDIV3_MASK (0xFFFF83FF)
  789. #define PLL_DR_OUTDIV3_BITS (0x00007C00)
  790. #define PLL_DR_OUTDIV2(x) (((x)&0x1F)<<5)
  791. #define PLL_DR_OUTDIV2_MASK (0xFFFFFC1F)
  792. #define PLL_DR_OUTDIV2_BITS (0x000003E0)
  793. #define PLL_DR_OUTDIV1(x) ((x)&0x1F)
  794. #define PLL_DR_OUTDIV1_MASK (0xFFFFFFE0)
  795. #define PLL_DR_OUTDIV1_BITS (0x0000001F)
  796. #define PLL_SR_LOCF (0x00000200)
  797. #define PLL_SR_LOC (0x00000100)
  798. #define PLL_SR_LOLF (0x00000040)
  799. #define PLL_SR_LOCKS (0x00000020)
  800. #define PLL_SR_LOCK (0x00000010)
  801. #define PLL_PSR_LOCK PLL_SR_LOCK /* compatible with 5x */
  802. #define PLL_SR_MODE(x) ((x)&7)
  803. #define PLL_SR_MODE_MASK (0xFFFFFFF8)
  804. #endif /* __MCF5441X__ */