lpc1768.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. #ifndef _ARCH_CM3_NXP_MACH_LPC1768_H_
  2. #define _ARCH_CM3_NXP_MACH_LPC1768_H_
  3. /*
  4. * Copyright 2011 by egnite GmbH
  5. *
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. * 3. Neither the name of the copyright holders nor the names of
  18. * contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  30. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  31. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  32. * SUCH DAMAGE.
  33. *
  34. * For additional information see http://www.ethernut.de/
  35. */
  36. /*!
  37. * \file arch/cm3/nxp/mach/lpc1768.h
  38. * \brief LPC1768 peripherals
  39. *
  40. * \verbatim
  41. * $Id$
  42. * \endverbatim
  43. */
  44. #ifndef LPC_FLASH_BASE
  45. /* Base addresses */
  46. #define LPC_FLASH_BASE 0x00000000
  47. #define LPC_RAM_BASE 0x10000000
  48. #define LPC_GPIO_BASE 0x2009C000
  49. #define LPC_APB0_BASE 0x40000000
  50. #define LPC_APB1_BASE 0x40080000
  51. #define LPC_AHB_BASE 0x50000000
  52. #define LPC_CM3_BASE 0xE0000000
  53. /* APB0 peripherals */
  54. #define LPC_WDT_BASE (LPC_APB0_BASE + 0x00000000)
  55. #define LPC_TIM0_BASE (LPC_APB0_BASE + 0x00004000)
  56. #define LPC_TIM1_BASE (LPC_APB0_BASE + 0x00008000)
  57. #define LPC_UART0_BASE (LPC_APB0_BASE + 0x0000C000)
  58. #define LPC_UART1_BASE (LPC_APB0_BASE + 0x00010000)
  59. #define LPC_PWM1_BASE (LPC_APB0_BASE + 0x00018000)
  60. #define LPC_I2C0_BASE (LPC_APB0_BASE + 0x0001C000)
  61. #define LPC_SPI_BASE (LPC_APB0_BASE + 0x00020000)
  62. #define LPC_RTC_BASE (LPC_APB0_BASE + 0x00024000)
  63. #define LPC_GPIOINT_BASE (LPC_APB0_BASE + 0x00028080)
  64. #define LPC_PINCON_BASE (LPC_APB0_BASE + 0x0002C000)
  65. #define LPC_SSP1_BASE (LPC_APB0_BASE + 0x00030000)
  66. #define LPC_ADC_BASE (LPC_APB0_BASE + 0x00034000)
  67. #define LPC_CANAF_RAM_BASE (LPC_APB0_BASE + 0x00038000)
  68. #define LPC_CANAF_BASE (LPC_APB0_BASE + 0x0003C000)
  69. #define LPC_CANCR_BASE (LPC_APB0_BASE + 0x00040000)
  70. #define LPC_CAN1_BASE (LPC_APB0_BASE + 0x00044000)
  71. #define LPC_CAN2_BASE (LPC_APB0_BASE + 0x00048000)
  72. #define LPC_I2C1_BASE (LPC_APB0_BASE + 0x0005C000)
  73. /* APB1 peripherals */
  74. #define LPC_SSP0_BASE (LPC_APB1_BASE + 0x00008000)
  75. #define LPC_DAC_BASE (LPC_APB1_BASE + 0x0000C000)
  76. #define LPC_TIM2_BASE (LPC_APB1_BASE + 0x00010000)
  77. #define LPC_TIM3_BASE (LPC_APB1_BASE + 0x00014000)
  78. #define LPC_UART2_BASE (LPC_APB1_BASE + 0x00018000)
  79. #define LPC_UART3_BASE (LPC_APB1_BASE + 0x0001C000)
  80. #define LPC_I2C2_BASE (LPC_APB1_BASE + 0x00020000)
  81. #define LPC_I2S_BASE (LPC_APB1_BASE + 0x00028000)
  82. #define LPC_RIT_BASE (LPC_APB1_BASE + 0x00030000)
  83. #define LPC_MCPWM_BASE (LPC_APB1_BASE + 0x00038000)
  84. #define LPC_QEI_BASE (LPC_APB1_BASE + 0x0003C000)
  85. #define LPC_SC_BASE (LPC_APB1_BASE + 0x0007C000)
  86. /* AHB peripherals */
  87. #define LPC_EMAC_BASE (LPC_AHB_BASE + 0x00000000)
  88. #define LPC_GPDMA_BASE (LPC_AHB_BASE + 0x00004000)
  89. #define LPC_GPDMACH0_BASE (LPC_AHB_BASE + 0x00004100)
  90. #define LPC_GPDMACH1_BASE (LPC_AHB_BASE + 0x00004120)
  91. #define LPC_GPDMACH2_BASE (LPC_AHB_BASE + 0x00004140)
  92. #define LPC_GPDMACH3_BASE (LPC_AHB_BASE + 0x00004160)
  93. #define LPC_GPDMACH4_BASE (LPC_AHB_BASE + 0x00004180)
  94. #define LPC_GPDMACH5_BASE (LPC_AHB_BASE + 0x000041A0)
  95. #define LPC_GPDMACH6_BASE (LPC_AHB_BASE + 0x000041C0)
  96. #define LPC_GPDMACH7_BASE (LPC_AHB_BASE + 0x000041E0)
  97. #define LPC_USB_BASE (LPC_AHB_BASE + 0x0000C000)
  98. /* GPIOs */
  99. #define LPC_GPIO0_BASE (LPC_GPIO_BASE + 0x00000000)
  100. #define LPC_GPIO1_BASE (LPC_GPIO_BASE + 0x00000020)
  101. #define LPC_GPIO2_BASE (LPC_GPIO_BASE + 0x00000040)
  102. #define LPC_GPIO3_BASE (LPC_GPIO_BASE + 0x00000060)
  103. #define LPC_GPIO4_BASE (LPC_GPIO_BASE + 0x00000080)
  104. #endif
  105. #include <arch/cm3/nxp/mach/lpc_adc.h>
  106. #include <arch/cm3/nxp/mach/lpc_can.h>
  107. #include <arch/cm3/nxp/mach/lpc_dac.h>
  108. #include <arch/cm3/nxp/mach/lpc_emac.h>
  109. /* TODO #include <arch/cm3/nxp/mach/lpc_gpdma.h> */
  110. #include <arch/cm3/nxp/mach/lpc_gpio.h>
  111. #include <arch/cm3/nxp/mach/lpc_i2c.h>
  112. /* TODO #include <arch/cm3/nxp/mach/lpc_i2s.h> */
  113. /* TODO #include <arch/cm3/nxp/mach/lpc_mcpwm.h> */
  114. #include <arch/cm3/nxp/mach/lpc_pincon.h>
  115. /* TODO #include <arch/cm3/nxp/mach/lpc_pwm.h> */
  116. /* TODO #include <arch/cm3/nxp/mach/lpc_qei.h> */
  117. /* TODO #include <arch/cm3/nxp/mach/lpc_rit.h> */
  118. /* TODO #include <arch/cm3/nxp/mach/lpc_rtc.h> */
  119. #include <arch/cm3/nxp/mach/lpc_sc.h>
  120. #include <arch/cm3/nxp/mach/lpc_spi.h>
  121. #include <arch/cm3/nxp/mach/lpc_ssp.h>
  122. #include <arch/cm3/nxp/mach/lpc_tim.h>
  123. #include <arch/cm3/nxp/mach/lpc_uart.h>
  124. /* TODO #include <arch/cm3/nxp/mach/lpc_usb.h> */
  125. /* TODO #include <arch/cm3/nxp/mach/lpc_wdt.h> */
  126. /*! \name Interrupt IDs */
  127. /*@{*/
  128. #define WDT_ID 0
  129. #define TIMER0_ID 1
  130. #define TIMER1_ID 2
  131. #define TC2_ID 3
  132. #define TIMER3_ID 4
  133. #define UART0_ID 5
  134. #define UART1_ID 6
  135. #define UART2_ID 7
  136. #define UART3_ID 8
  137. #define PWM1_ID 9
  138. #define I2C0_ID 10
  139. #define I2C1_ID 11
  140. #define I2C2_ID 12
  141. #define SPI_ID 13
  142. #define SSP0_ID 14
  143. #define SSP1_ID 15
  144. #define PLL0_ID 16
  145. #define RTC_ID 17
  146. #define EINT0_ID 18
  147. #define EINT1_ID 19
  148. #define EINT2_ID 20
  149. #define EINT3_ID 21
  150. #define ADC_ID 22
  151. #define BOD_ID 23
  152. #define USB_ID 24
  153. #define CAN_ID 25
  154. #define DMA_ID 26
  155. #define I2S_ID 27
  156. #define ENET_ID 28
  157. #define RIT_ID 29
  158. #define MCPWM_ID 30
  159. #define QEI_ID 31
  160. #define PLL1_ID 32
  161. #define USBACTIVITY_ID 33
  162. #define CANACTIVITY_ID 34
  163. /*@}*/
  164. /*! \name External Clock Multiplexing */
  165. /*@{*/
  166. #define PS7_P3_26_STCLK (1 << 20)
  167. #define PS3_P1_27_CLKOUT (1 << 22)
  168. /*@}*/
  169. /*! \name External Interrupt Multiplexing */
  170. /*@{*/
  171. #define PS4_P2_10_NMI (2 << 20)
  172. #define PS4_P2_10_EINT0 (1 << 20)
  173. #define PS4_P2_11_EINT1 (1 << 22)
  174. #define PS4_P2_12_EINT2 (1 << 24)
  175. #define PS4_P2_13_EINT3 (1 << 26)
  176. /*@}*/
  177. /*! \name Timer0/Counter0 Peripheral Multiplexing */
  178. /*@{*/
  179. #define PS3_P1_26_CAP0_0 (3 << 20)
  180. #define PS3_P1_27_CAP0_1 (3 << 22)
  181. #define PS3_P1_28_MAT0_0 (3 << 24)
  182. #define PS7_P3_25_MAT0_0 (2 << 18)
  183. #define PS3_P1_29_MAT0_1 (3 << 26)
  184. #define PS7_P3_26_MAT0_1 (2 << 20)
  185. /*@}*/
  186. /*! \name Timer1/Counter1 Peripheral Multiplexing */
  187. /*@{*/
  188. #define PS3_P1_18_CAP1_0 (3 << 4)
  189. #define PS3_P1_19_CAP1_1 (3 << 6)
  190. #define PS3_P1_22_MAT1_0 (3 << 12)
  191. #define PS3_P1_25_MAT1_1 (3 << 18)
  192. /*@}*/
  193. /*! \name Timer2/Counter2 Peripheral Multiplexing */
  194. /*@{*/
  195. #define PS0_P0_4_CAP2_0 (3 << 8)
  196. #define PS0_P0_5_CAP2_1 (3 << 10)
  197. #define PS0_P0_6_MAT2_0 (3 << 12)
  198. #define PS9_P4_28_MAT2_0 (2 << 24)
  199. #define PS0_P0_7_MAT2_1 (3 << 14)
  200. #define PS9_P4_29_MAT2_1 (2 << 26)
  201. #define PS0_P0_8_MAT2_2 (3 << 16)
  202. #define PS0_P0_9_MAT2_3 (3 << 18)
  203. /*@}*/
  204. /*! \name Timer3/Counter3 Peripheral Multiplexing */
  205. /*@{*/
  206. #define PS1_P0_23_CAP3_0 (3 << 14)
  207. #define PS1_P0_24_CAP3_1 (3 << 16)
  208. #define PS0_P0_10_MAT3_0 (3 << 20)
  209. #define PS0_P0_11_MAT3_1 (3 << 22)
  210. /*@}*/
  211. /*! \name ADC Peripheral Multiplexing */
  212. /*@{*/
  213. #define PS1_P0_23_AD0_0 (1 << 14)
  214. #define PS1_P0_24_AD0_1 (1 << 16)
  215. #define PS1_P0_25_AD0_2 (1 << 18)
  216. #define PS1_P0_26_AD0_3 (1 << 20)
  217. #define PS3_P1_30_AD0_4 (3 << 28)
  218. #define PS3_P1_31_AD0_5 (3 << 30)
  219. #define PS0_P0_2_AD0_7 (2 << 4)
  220. #define PS0_P0_3_AD0_6 (2 << 6)
  221. /*@}*/
  222. /*! \name DAC Peripheral Multiplexing */
  223. /*@{*/
  224. #define PS1_P0_26_AOUT (2 << 20)
  225. /*@}*/
  226. /*! \name SSP0 Peripheral Multiplexing */
  227. /*@{*/
  228. #define PS1_P0_17_MISO0 (2 << 2)
  229. #define PS3_P1_23_MISO0 (3 << 14)
  230. #define PS1_P0_18_MOSI0 (2 << 4)
  231. #define PS3_P1_24_MOSI0 (3 << 16)
  232. #define PS0_P0_15_SCK0 (2 << 30)
  233. #define PS3_P1_20_SCK0 (3 << 8)
  234. #define PS1_P0_16_SSEL0 (2 << 0)
  235. #define PS3_P1_21_SSEL0 (3 << 10)
  236. /*@}*/
  237. /*! \name SSP1 Peripheral Multiplexing */
  238. /*@{*/
  239. #define PS0_P0_8_MISO1 (2 << 16)
  240. #define PS0_P0_9_MOSI1 (2 << 18)
  241. #define PS0_P0_7_SCK1 (2 << 14)
  242. #define PS3_P1_31_SCK1 (2 << 30)
  243. #define PS0_P0_6_SSEL1 (2 << 12)
  244. /*@}*/
  245. /*! \name SPI Peripheral Multiplexing */
  246. /*@{*/
  247. #define PS1_P0_17_MISO (3 << 2)
  248. #define PS1_P0_18_MOSI (3 << 4)
  249. #define PS0_P0_15_SCK (3 << 30)
  250. #define PS1_P0_16_SSEL (3 << 0)
  251. /*@}*/
  252. /*! \name I2C0 Peripheral Multiplexing */
  253. /*@{*/
  254. #define PS1_P0_27_SDA0 (1 << 22)
  255. #define PS1_P0_28_SCL0 (1 << 24)
  256. /*@}*/
  257. /*! \name I2C1 Peripheral Multiplexing */
  258. /*@{*/
  259. #define PS0_P0_0_SDA1 (3 << 0)
  260. #define PS1_P0_19_SDA1 (3 << 6)
  261. #define PS0_P0_1_SCL1 (3 << 2)
  262. #define PS1_P0_20_SCL1 (3 << 8)
  263. /*@}*/
  264. /*! \name I2C2 Peripheral Multiplexing */
  265. /*@{*/
  266. #define PS0_P0_10_SDA2 (2 << 20)
  267. #define PS0_P0_11_SCL2 (2 << 22)
  268. /*@}*/
  269. /*! \name I2S Peripheral Multiplexing */
  270. /*@{*/
  271. #define PS0_P0_6_I2SRX_SDA (1 << 12)
  272. #define PS1_P0_25_I2SRX_SDA (2 << 18)
  273. #define PS0_P0_5_I2SRX_WS (1 << 10)
  274. #define PS1_P0_24_I2SRX_WS (2 << 16)
  275. #define PS0_P0_4_I2SRX_CLK (1 << 8)
  276. #define PS1_P0_23_I2SRX_CLK (2 << 14)
  277. #define PS9_P4_28_RX_MCLK (1 << 24)
  278. #define PS0_P0_9_I2STX_SDA (1 << 18)
  279. #define PS4_P2_13_I2STX_SDA (3 << 26)
  280. #define PS0_P0_8_I2STX_WS (1 << 16)
  281. #define PS4_P2_12_I2STX_WS (3 << 24)
  282. #define PS0_P0_7_I2STX_CLK (1 << 14)
  283. #define PS4_P2_11_I2STX_CLK (3 << 22)
  284. #define PS9_P4_29_TX_MCLK (1 << 26)
  285. /*@}*/
  286. /*! \name PWM1 Peripheral Multiplexing */
  287. /*@{*/
  288. #define PS3_P1_18_PWM1_1 (2 << 4)
  289. #define PS4_P2_0_PWM1_1 (1 << 0)
  290. #define PS3_P1_20_PWM1_2 (2 << 8)
  291. #define PS4_P2_1_PWM1_2 (1 << 2)
  292. #define PS7_P3_25_PWM1_2 (3 << 18)
  293. #define PS3_P1_21_PWM1_3 (2 << 10)
  294. #define PS4_P2_2_PWM1_3 (1 << 4)
  295. #define PS7_P3_26_PWM1_3 (3 << 20)
  296. #define PS3_P1_23_PWM1_4 (2 << 14)
  297. #define PS4_P2_3_PWM1_4 (1 << 6)
  298. #define PS3_P1_24_PWM1_5 (2 << 16)
  299. #define PS4_P2_4_PWM1_5 (1 << 8)
  300. #define PS3_P1_26_PWM1_6 (2 << 20)
  301. #define PS4_P2_5_PWM1_6 (1 << 10)
  302. #define PS3_P1_28_PCAP1_0 (2 << 24)
  303. #define PS4_P2_6_PCAP1_0 (1 << 12)
  304. #define PS3_P1_29_PCAP1_1 (2 << 26)
  305. /*@}*/
  306. /*! \name Motor Control Channel 0 Peripheral Multiplexing */
  307. /*@{*/
  308. #define PS3_P1_19_MCOA0 (1 << 6)
  309. #define PS3_P1_22_MCOB0 (1 << 12)
  310. #define PS3_P1_20_MCI0 (1 << 8)
  311. #define PS3_P1_21_MCABORT (1 << 10)
  312. /*@}*/
  313. /*! \name Motor Control Channel 1 Peripheral Multiplexing */
  314. /*@{*/
  315. #define PS3_P1_25_MCOA1 (1 << 18)
  316. #define PS3_P1_26_MCOB1 (1 << 20)
  317. #define PS3_P1_23_MCI1 (1 << 14)
  318. /*@}*/
  319. /*! \name Motor Control Channel 2 Peripheral Multiplexing */
  320. /*@{*/
  321. #define PS3_P1_28_MCOA2 (1 << 24)
  322. #define PS3_P1_29_MCOB2 (1 << 26)
  323. #define PS3_P1_24_MCI2 (1 << 16)
  324. /*@}*/
  325. /*! \name UART0 Peripheral Multiplexing */
  326. /*@{*/
  327. #define PS0_P0_2_TXD0 (1 << 4)
  328. #define PS0_P0_3_RXD0 (1 << 6)
  329. /*@}*/
  330. /*! \name UART1 Peripheral Multiplexing */
  331. /*@{*/
  332. #define PS0_P0_15_TXD1 (1 << 30)
  333. #define PS4_P2_0_TXD1 (2 << 0)
  334. #define PS1_P0_16_RXD1 (1 << 0)
  335. #define PS4_P2_1_RXD1 (2 << 2)
  336. #define PS1_P0_17_CTS1 (1 << 2)
  337. #define PS4_P2_2_CTS1 (2 << 4)
  338. #define PS1_P0_22_RTS1 (1 << 12)
  339. #define PS4_P2_7_RTS1 (2 << 14)
  340. #define PS1_P0_19_DSR1 (1 << 6)
  341. #define PS4_P2_4_DSR1 (2 << 8)
  342. #define PS1_P0_20_DTR1 (1 << 8)
  343. #define PS4_P2_5_DTR1 (2 << 10)
  344. #define PS1_P0_18_DCD1 (1 << 4)
  345. #define PS4_P2_3_DCD1 (2 << 6)
  346. #define PS1_P0_21_RI1 (1 << 10)
  347. #define PS4_P2_6_RI1 (2 << 12)
  348. /*@}*/
  349. /*! \name UART2 Peripheral Multiplexing */
  350. /*@{*/
  351. #define PS0_P0_10_TXD2 (1 << 20)
  352. #define PS4_P2_8_TXD2 (2 << 16)
  353. #define PS0_P0_11_RXD2 (1 << 22)
  354. #define PS4_P2_9_RXD2 (2 << 18)
  355. /*@}*/
  356. /*! \name UART3 Peripheral Multiplexing */
  357. /*@{*/
  358. #define PS0_P0_0_TXD3 (2 << 0)
  359. #define PS1_P0_25_TXD3 (3 << 18)
  360. #define PS9_P4_28_TXD3 (3 << 24)
  361. #define PS0_P0_1_RXD3 (2 << 2)
  362. #define PS1_P0_26_RXD3 (3 << 20)
  363. #define PS9_P4_29_RXD3 (3 << 26)
  364. /*@}*/
  365. /*! \name CAN1 Peripheral Multiplexing */
  366. /*@{*/
  367. #define PS0_P0_1_TD1 (1 << 2)
  368. #define PS1_P0_22_TD1 (3 << 12)
  369. #define PS0_P0_0_RD1 (1 << 0)
  370. #define PS1_P0_21_RD1 (3 << 10)
  371. /*@}*/
  372. /*! \name CAN2 Peripheral Multiplexing */
  373. /*@{*/
  374. #define PS0_P0_5_TD2 (2 << 10)
  375. #define PS4_P2_8_TD2 (1 << 16)
  376. #define PS0_P0_4_RD2 (2 << 8)
  377. #define PS4_P2_7_RD2 (1 << 14)
  378. /*@}*/
  379. /*! \name EMAC Peripheral Multiplexing */
  380. /*@{*/
  381. #define PS2_P1_0_ENET_TXD0 (1 << 0)
  382. #define PS2_P1_1_ENET_TXD1 (1 << 2)
  383. #define PS2_P1_9_ENET_RXD0 (1 << 18)
  384. #define PS2_P1_10_ENET_RXD1 (1 << 20)
  385. #define PS2_P1_4_ENET_TX_EN (1 << 8)
  386. #define PS2_P1_14_ENET_RX_ER (1 << 28)
  387. #define PS2_P1_8_ENET_CRS (1 << 16)
  388. #define PS2_P1_15_ENET_REF_CLK (1 << 30)
  389. #define PS3_P1_16_ENET_MDC (1 << 0)
  390. #define PS4_P2_8_ENET_MDC (3 << 16)
  391. #define PS3_P1_17_ENET_MDIO (1 << 2)
  392. #define PS4_P2_9_ENET_MDIO (3 << 18)
  393. /*@}*/
  394. /*! \name USB Peripheral Multiplexing */
  395. /*@{*/
  396. #define PS1_P0_29_USB_DP (1 << 26)
  397. #define PS1_P0_30_USB_DM (1 << 28)
  398. #define PS1_P0_28_USB_SCL (2 << 24)
  399. #define PS1_P0_27_USB_SDA (2 << 22)
  400. #define PS3_P1_18_USB_UP_LED (1 << 4)
  401. #define PS3_P1_19_USB_PPWR (2 << 6)
  402. #define PS3_P1_22_USB_PWRD (2 << 12)
  403. #define PS4_P2_9_USB_CONNECT (1 << 18)
  404. #define PS3_P1_27_USB_OVRCR (2 << 22)
  405. #define PS3_P1_30_VBUS (2 << 28)
  406. /*@}*/
  407. /*! \name Port 0 Peripheral Pins */
  408. /*@{*/
  409. #define P0_0_RD1_TXD3_SDA1 0
  410. #define P0_1_TD1_RXD3_SCL1 1
  411. #define P0_2_TXD0_AD0_7 2
  412. #define P0_3_RXD0_AD0_6 3
  413. #define P0_4_I2SRX_CLK_RD2_CAP2_0 4
  414. #define P0_5_I2SRX_WS_TD2_CAP2_1 5
  415. #define P0_6_I2SRX_SDA_SSEL1_MAT2_0 6
  416. #define P0_7_I2STX_CLK_SCK1_MAT2_1 7
  417. #define P0_8_I2STX_WS_MISO1_MAT2_2 8
  418. #define P0_9_I2STX_SDA_MOSI1_MAT2_3 9
  419. #define P0_10_TXD2_SDA2_MAT3_0 10
  420. #define P0_11_RXD2_SCL2_MAT3_1 11
  421. #define P0_15_TXD1_SCK0_SCK 15
  422. #define P0_16_RXD1_SSEL0_SSEL 16
  423. #define P0_17_CTS1_MISO0_MISO 17
  424. #define P0_18_DCD1_MOSI0_MOSI 18
  425. #define P0_19_DSR1_SDA1 19
  426. #define P0_20_DTR1_SCL1 20
  427. #define P0_21_RI1_RD1 21
  428. #define P0_22_RTS1_TD1 22
  429. #define P0_23_AD0_0_I2SRX_CLK_CAP3_0 23
  430. #define P0_24_AD0_1_I2SRX_WS_CAP3_1 24
  431. #define P0_25_AD0_2_I2SRX_SDA_TXD3 25
  432. #define P0_26_AD0_3_AOUT_RXD3 26
  433. #define P0_27_SDA0_USB_SDA 27
  434. #define P0_28_SCL0_USB_SCL 28
  435. #define P0_29_USB_DP 29
  436. #define P0_30_USB_DM 30
  437. /*@}*/
  438. /*! \name Port 1 Peripheral Pins */
  439. /*@{*/
  440. #define P1_0_ENET_TXD0 0
  441. #define P1_1_ENET_TXD1 1
  442. #define P1_4_ENET_TX_EN 4
  443. #define P1_8_ENET_CRS 8
  444. #define P1_9_ENET_RXD0 9
  445. #define P1_10_ENET_RXD1 10
  446. #define P1_14_ENET_RX_ER 14
  447. #define P1_15_ENET_REF_CLK 15
  448. #define P1_16_ENET_MDC 16
  449. #define P1_17_ENET_MDIO 17
  450. #define P1_18_USB_UP_LED_PWM1_1_CAP1_0 18
  451. #define P1_19_MCOA0_USB_PPWR_CAP1_1 19
  452. #define P1_20_MCI0_PWM1_2_SCK0 20
  453. #define P1_21_MCABORT_PWM1_3_SSEL0 21
  454. #define P1_22_MCOB0_USB_PWRD_MAT1_0 22
  455. #define P1_23_MCI1_PWM1_4_MISO0 23
  456. #define P1_24_MCI2_PWM1_5_MOSI0 24
  457. #define P1_25_MCOA1_MAT1_1 25
  458. #define P1_26_MCOB1_PWM1_6_CAP0_0 26
  459. #define P1_27_CLKOUT_USB_OVRCR_CAP0_1 27
  460. #define P1_28_MCOA2_PCAP1_0_MAT0_0 28
  461. #define P1_29_MCOB2_PCAP1_1_MAT0_1 29
  462. #define P1_30_VBUS_AD0_4 30
  463. #define P1_31_SCK1_AD0_5 31
  464. /*@}*/
  465. /*! \name Port 2 Peripheral Pins */
  466. /*@{*/
  467. #define P2_0_PWM1_1_TXD1 0
  468. #define P2_1_PWM1_2_RXD1 1
  469. #define P2_2_PWM1_3_CTS1_TRACEDATA3 2
  470. #define P2_3_PWM1_4_DCD1_TRACEDATA2 3
  471. #define P2_4_PWM1_5_DSR1_TRACEDATA1 4
  472. #define P2_5_PWM1_6_DTR1_TRACEDATA0 5
  473. #define P2_6_PCAP1_0_RI1_TRACECLK 6
  474. #define P2_7_RD2_RTS1 7
  475. #define P2_8_TD2_TXD2_ENET_MDC 8
  476. #define P2_9_USB_CONNECT_RXD2_ENET_MDIO 9
  477. #define P2_10_EINT0_NMI 10
  478. #define P2_11_EINT1_I2STX_CLK 11
  479. #define P2_12_EINT2_I2STX_WS 12
  480. #define P2_13_EINT3_I2STX_SDA 13
  481. /*@}*/
  482. /*! \name Port 3 Peripheral Pins */
  483. /*@{*/
  484. #define P3_25_MAT0_0_PWM1_2 25
  485. #define P3_26_STCLK_MAT0_1_PWM1_3 26
  486. /*@}*/
  487. /*! \name Port 4 Peripheral Pins */
  488. /*@{*/
  489. #define P4_28_RX_MCLK_MAT2_0_TXD3 28
  490. #define P4_29_TX_MCLK_MAT2_1_RXD3 29
  491. /*@}*/
  492. /*@}*/
  493. #endif