at91sam9g45.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. #ifndef _ARCH_ARM_SAM9G45_H_
  2. #define _ARCH_ARM_SAM9G45_H_
  3. /*
  4. * Copyright (C) 2006-2007 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  23. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. */
  34. /*!
  35. * \file arch/arm/at91sam9g45.h
  36. * \brief AT91SAM9G45 peripherals.
  37. *
  38. */
  39. #include <arch/arm/v5te.h>
  40. #if 0
  41. extern int sprintf (char *__restrict __s,
  42. __const char *__restrict __format, ...);
  43. void PrintBlockingDebug(char *Str);
  44. #endif
  45. #define FLASH_BASE 0x100000UL
  46. #define RAM_BASE 0x200000UL
  47. #define NAND_FLASH_BASE 0x40000000
  48. // Internal peripherals
  49. #define LCDC_BASE 0x00500000 /*!< \brief USB device port base address. */
  50. #define UDP_BASE 0xFFF78000 /*!< \brief USB device port base address. */
  51. #define TC_BASE 0xFFF7C000 /*!< \brief Timer/counter base address. (TC0-TC2) */
  52. #define MCI_BASE 0xFFF80000 /*!< \brief MMC/SDCard interface base address. (MCI0) */
  53. #define TWI_BASE 0xFFF84000 /*!< \brief Two-wire interface base address. (TWI0-TWI1) */
  54. #define USART0_BASE 0xFFF8C000 /*!< \brief USART 0 base address. */
  55. #define USART1_BASE 0xFFF90000 /*!< \brief USART 1 base address. */
  56. #define USART2_BASE 0xFFF94000 /*!< \brief USART 2 base address. */
  57. #define USART3_BASE 0xFFF98000 /*!< \brief USART 2 base address. */
  58. #define SSC_BASE 0xFFF9C000 /*!< \brief Serial synchronous controller base address. (SSC0-SSC1) */
  59. #define SPI0_BASE 0xFFFA4000 /*!< \brief SPI0 0 base address. */
  60. #define SPI1_BASE 0xFFFA8000 /*!< \brief SPI0 1 base address. */
  61. #define AC97_BASE 0xFFFAC000 /*!< \brief AC97 Codec interface. */
  62. #define TSADCC_BASE 0xFFFB0000 /*!< \brief Touch screen ADC controller. */
  63. #define ISI_BASE 0xFFFB4000 /*!< \brief Image sensor interface base address. */
  64. #define PWMC_BASE 0xFFFB8000 /*!< \brief PWM controller base address. */
  65. #define EMAC_BASE 0xFFFBC000 /*!< \brief EMAC base address. */
  66. #define TRNG_BASE 0xFFFCC000 /*!< \brief True random number generator. */
  67. #define MCI1_BASE 0xFFFD0000 /*!< \brief MMC/SDCard interface base address. (MCI1) */
  68. #define TC345_BASE 0xFFFD4000 /*!< \brief Timer/counter base address. (TC3-TC5) */
  69. // System controller
  70. #define DDRSDRC1_BASE 0xFFFFE400 /*!< \brief DDRSDRC1 base address. */
  71. #define DDRSDRC0_BASE 0xFFFFE600 /*!< \brief DDRSDRC0 base address. */
  72. #define SMC_BASE 0xFFFFE800 /*!< \brief SMC base address. */
  73. #define MATRIX_BASE 0xFFFFEA00 /*!< \brief MATRIX base address. */
  74. #define CCFG_BASE 0xFFFFEB10
  75. #define DMAC_BASE 0xFFFFEC00 /*!< \brief DMA controller base address. */
  76. #define DBGU_BASE 0xFFFFEE00 /*!< \brief DBGU base address. */
  77. #define AIC_BASE 0xFFFFF000 /*!< \brief AIC base address. */
  78. #define PIOA_BASE 0xFFFFF200 /*!< \brief PIO A base address. */
  79. #define PIOB_BASE 0xFFFFF400 /*!< \brief PIO B base address. */
  80. #define PIOC_BASE 0xFFFFF600 /*!< \brief PIO C base address. */
  81. #define PIOD_BASE 0xFFFFF800 /*!< \brief PIO D base address. */
  82. #define PIOE_BASE 0xFFFFFA00 /*!< \brief PIO E base address. */
  83. #define PMC_BASE 0xFFFFFC00 /*!< \brief PMC base address. */
  84. #define RSTC_BASE 0xFFFFFD00 /*!< \brief Resect controller register base address. */
  85. #define SHDWC_BASE 0xFFFFFD10 /*!< \brief Shutdown controller. */
  86. #define RTT_BASE 0xFFFFFD20 /*!< \brief Realtime timer base address. */
  87. #define PIT_BASE 0xFFFFFD30 /*!< \brief Periodic interval timer base address. */
  88. #define WDT_BASE 0xFFFFFD40 /*!< \brief Watch Dog register base address. */
  89. #define SCKCR_BASE 0xFFFFFD50 /*!< \brief Slow clock control register. */
  90. #define GPBR_BASE 0xFFFFFD60 /*!< \brief General purpose backup registers. */
  91. #define RTC_BASE 0xFFFFFDB0 /*!< \brief RTC. */
  92. // Undocumented Base adress iin datasheet! HECC? -> Atmel Header-File (HECC ==? ECC)
  93. #define ECC_BASE 0xFFFFE200 /*!< \brief ECC base address. */
  94. // Peripheral DMA Controller (PDC) User Interface
  95. #define PERIPH_RPR_OFF 0x00000100 /*!< \brief Receive pointer register offset. */
  96. #define PERIPH_RCR_OFF 0x00000104 /*!< \brief Receive counter register offset. */
  97. #define PERIPH_TPR_OFF 0x00000108 /*!< \brief Transmit pointer register offset. */
  98. #define PERIPH_TCR_OFF 0x0000010C /*!< \brief Transmit counter register offset. */
  99. #define PERIPH_RNPR_OFF 0x00000110 /*!< \brief Receive next pointer register offset. */
  100. #define PERIPH_RNCR_OFF 0x00000114 /*!< \brief Receive next counter register offset. */
  101. #define PERIPH_TNPR_OFF 0x00000118 /*!< \brief Transmit next pointer register offset. */
  102. #define PERIPH_TNCR_OFF 0x0000011C /*!< \brief Transmit next counter register offset. */
  103. #define PERIPH_PTCR_OFF 0x00000120 /*!< \brief PDC transfer control register offset. */
  104. #define PERIPH_PTSR_OFF 0x00000124 /*!< \brief PDC transfer status register offset. */
  105. // Transfer Control Register - Bits
  106. #define PDC_RXTEN 0x00000001 /*!< \brief Receiver transfer enable. */
  107. #define PDC_RXTDIS 0x00000002 /*!< \brief Receiver transfer disable. */
  108. #define PDC_TXTEN 0x00000100 /*!< \brief Transmitter transfer enable. */
  109. #define PDC_TXTDIS 0x00000200 /*!< \brief Transmitter transfer disable. */
  110. // Check...
  111. #define DBGU_HAS_PDC
  112. #define SPI_HAS_PDC
  113. #define SSC_HAS_PDC
  114. #define USART_HAS_PDC
  115. #define USART_HAS_MODE
  116. #define MCI_HAS_PDC
  117. #define PMC_HAS_PLLB
  118. #define PMC_HAS_MDIV
  119. #define EBI_HAS_CSA
  120. // Check....
  121. #define PIO_HAS_MULTIDRIVER
  122. #define PIO_HAS_PULLUP
  123. #define PIO_HAS_PERIPHERALSELECT
  124. #define PIO_HAS_OUTPUTWRITEENABLE
  125. #include <arch/arm/atmel/at91_rtc.h>
  126. #include <arch/arm/atmel/at91_ecc.h>
  127. #include <arch/arm/atmel/at91_ebi.h>
  128. #include <arch/arm/atmel/at91_tc.h>
  129. #include <arch/arm/atmel/at91_us.h>
  130. #include <arch/arm/atmel/at91_dbgu.h>
  131. #include <arch/arm/atmel/at91_emac.h>
  132. #include <arch/arm/atmel/at91_spi.h>
  133. #include <arch/arm/atmel/at91_aic.h>
  134. #include <arch/arm/atmel/at91_pio.h>
  135. #include <arch/arm/atmel/at91_pmc.h>
  136. #include <arch/arm/atmel/at91_rstc.h>
  137. #include <arch/arm/atmel/at91_wdt.h>
  138. #include <arch/arm/atmel/at91_ssc.h>
  139. #include <arch/arm/atmel/at91_twi.h>
  140. #include <arch/arm/atmel/at91_smc.h>
  141. #include <arch/arm/atmel/at91_mci.h>
  142. #include <arch/arm/atmel/at91_matrix.h>
  143. #include <arch/arm/atmel/at91_ccfg.h>
  144. #include <arch/arm/atmel/at91_ddrsdrc.h>
  145. #include <arch/arm/atmel/at91_adc.h>
  146. #include <arch/arm/atmel/at91_pit.h>
  147. #include <arch/arm/atmel/at91_lcdc.h>
  148. #include <arch/arm/atmel/at91_tsadcc.h>
  149. /*! \addtogroup xgNutArchArmAt91Sam9g45 */
  150. /*@{*/
  151. /*! \name Peripheral Identifiers and Interrupts */
  152. /*@{*/
  153. #define FIQ_ID 0 /*!< \brief Fast interrupt. */
  154. #define SYSC_ID 1 /*!< \brief System interrupt. */
  155. #define PIOA_ID 2 /*!< \brief Parallel I/O controller A. */
  156. #define PIOB_ID 3 /*!< \brief Parallel I/O controller B. */
  157. #define PIOC_ID 4 /*!< \brief Parallel I/O controller C. */
  158. #define PIODE_ID 5 /*!< \brief Parallel I/O controller D and E. */
  159. #define TRNG_ID 6 /*!< \brief True random number generator. */
  160. #define US0_ID 7 /*!< \brief USART 0. */
  161. #define US1_ID 8 /*!< \brief USART 1. */
  162. #define US2_ID 9 /*!< \brief USART 2. */
  163. #define US3_ID 10 /*!< \brief USART 3. */
  164. #define MCI0_ID 11 /*!< \brief MMC interface 0. */
  165. #define TWI0_ID 12 /*!< \brief Two wire interface 0. */
  166. #define TWI1_ID 13 /*!< \brief Two wire interface 1. */
  167. #define SPI0_ID 14 /*!< \brief Serial peripheral 0. */
  168. #define SPI1_ID 15 /*!< \brief Serial peripheral 1. */
  169. #define SSC0_ID 16 /*!< \brief Serial peripheral interface 0. */
  170. #define SSC1_ID 17 /*!< \brief Serial peripheral interface 1. */
  171. #define TC0_ID 18 /*!< \brief Timer/counter 0. */
  172. #define TC1_ID 18 /*!< \brief Timer/counter 1. */
  173. #define TC2_ID 18 /*!< \brief Timer/counter 2. */
  174. #define TC3_ID 18 /*!< \brief Timer/counter 3. */
  175. #define TC4_ID 18 /*!< \brief Timer/counter 4. */
  176. #define TC5_ID 18 /*!< \brief Timer/counter 5. */
  177. #define PWMC_ID 19 /*!< \brief Pulse width modulation controller. */
  178. #define TSADCC_ID 20 /*!< \brief Touch screen ADC controller. */
  179. #define DMA_ID 21 /*!< \brief DMA controller. */
  180. #define UHPHS_ID 22 /*!< \brief USB host port. */
  181. #define LCDC_ID 23 /*!< \brief LCD controller. */
  182. #define AC97C_ID 24 /*!< \brief AC97 controller. */
  183. #define EMAC_ID 25 /*!< \brief Ethernet MAC. */
  184. #define ISI_ID 26 /*!< \brief Image sensor interface. */
  185. #define UDPHS_ID 27 /*!< \brief USB device port. */
  186. #define MCI1_ID 29 /*!< \brief MMC interface. */
  187. #define IRQ0_ID 31 /*!< \brief External interrupt 0. */
  188. #define TWI_ID TWI0_ID /*!< \brief Two wire interface. */
  189. #define MCI_ID MCI0_ID /*!< \brief MMC interface. */
  190. #define SSC_ID SSC0_ID /*!< \brief Serial peripheral interface. */
  191. /*@}*/
  192. /*! \name USART Peripheral Multiplexing */
  193. /*@{*/
  194. #define PB16_SCK0_B 16 /*!< \brief Channel 0 serial clock pin. */
  195. #define PB19_TXD0_A 19 /*!< \brief Channel 0 transmit data pin. */
  196. #define PB18_RXD0_A 18 /*!< \brief Channel 0 receive data pin. */
  197. #define PB15_CTS0_B 15 /*!< \brief Channel 0 clear to send pin. */
  198. #define PB17_RTS0_B 17 /*!< \brief Channel 0 request to send pin. */
  199. #define PD29_SCK1_B 29 /*!< \brief Channel 1 serial clock pin. */
  200. #define PB4_TXD1_A 4 /*!< \brief Channel 1 transmit data pin. */
  201. #define PB5_RXD1_A 5 /*!< \brief Channel 1 receive data pin. */
  202. #define PD17_CTS1_A 17 /*!< \brief Channel 1 clear to send pin. */
  203. #define PD16_RTS1_A 16 /*!< \brief Channel 1 request to send pin. */
  204. #define PD30_SCK2_B 30 /*!< \brief Channel 2 serial clock pin. */
  205. #define PB6_TXD2_A 6 /*!< \brief Channel 2 transmit data pin. */
  206. #define PB7_RXD2_A 7 /*!< \brief Channel 2 receive data pin. */
  207. #define PC11_CTS2_B 11 /*!< \brief Channel 2 clear to send pin. */
  208. #define PC9_RTS2_B 9 /*!< \brief Channel 2 request to send pin. */
  209. #define PA22_SCK3_B 22 /*!< \brief Channel 3 serial clock pin. */
  210. #define PB8_TXD3_A 8 /*!< \brief Channel 3 transmit data pin. */
  211. #define PB9_RXD3_A 9 /*!< \brief Channel 3 receive data pin. */
  212. #define PA24_CTS3_B 24 /*!< \brief Channel 3 clear to send pin. */
  213. #define PA23_RTS3_B 23 /*!< \brief Channel 3 request to send pin. */
  214. /*@}*/
  215. /*! \name SPI Peripheral Multiplexing */
  216. /*@{*/
  217. #define PB0_SPI0_MISO_A 0 /*!< \brief Channel 0 master input slave output pin. */
  218. #define PB1_SPI0_MOSI_A 1 /*!< \brief Channel 0 master output slave input pin. */
  219. #define PB2_SPI0_SPCK_A 2 /*!< \brief Channel 0 serial clock pin. */
  220. #define PB3_SPI0_NPCS0_A 3 /*!< \brief Channel 0 chip select 0 pin. */
  221. #define PB18_SPI0_NPCS1_B 18 /*!< \brief Channel 0 chip select 1 pin. */
  222. #define PD24_SPI0_NPCS1_A 24 /*!< \brief Channel 0 chip select 1 pin. */
  223. #define PB19_SPI0_NPCS2_B 19 /*!< \brief Channel 0 chip select 2 pin. */
  224. #define PD25_SPI0_NPCS2_A 25 /*!< \brief Channel 0 chip select 1 pin. */
  225. #define PD27_SPI0_NPCS3_B 27 /*!< \brief Channel 0 chip select 3 pin. */
  226. #define SPI0_PINS _BV(PB0_SPI0_MISO_A) | _BV(PB1_SPI0_MOSI_A) | _BV(PB2_SPI0_SPCK_A)
  227. #define SPI0_PIO_BASE PIOA_BASE
  228. #define SPI0_PSR_OFF PIO_ASR_OFF
  229. #define SPI0_CS0_PIN _BV(PB3_SPI0_NPCS0_A)
  230. #define SPI0_CS0_PIO_BASE PIOB_BASE
  231. #define SPI0_CS0_PSR_OFF PIO_ASR_OFF
  232. #define SPI0_CS1_PIN _BV(PB18_SPI0_NPCS1_B)
  233. #define SPI0_CS1_PIO_BASE PIOB_BASE
  234. #define SPI0_CS1_PSR_OFF PIO_BSR_OFF
  235. #define PB14_SPI1_MISO_A 14 /*!< \brief Channel 1 master input slave output pin. */
  236. #define PB15_SPI1_MOSI_A 15 /*!< \brief Channel 1 master output slave input pin. */
  237. #define PB16_SPI1_SPCK_A 16 /*!< \brief Channel 1 serial clock pin. */
  238. #define PB17_SPI1_NPCS0_A 17 /*!< \brief Channel 1 chip select 0 pin. */
  239. #define PD28_SPI1_NPCS1_B 28 /*!< \brief Channel 1 chip select 1 pin. */
  240. #define PD18_SPI1_NPCS2_A 18 /*!< \brief Channel 1 chip select 2 pin. */
  241. #define PD19_SPI1_NPCS3_A 19 /*!< \brief Channel 1 chip select 3 pin. */
  242. #define SPI1_PINS _BV(PB14_SPI1_MISO_A) | _BV(PB15_SPI1_MOSI_A) | _BV(PB16_SPI1_SPCK_A)
  243. #define SPI1_PIO_BASE PIOB_BASE
  244. #define SPI1_PSR_OFF PIO_ASR_OFF
  245. #define SPI1_CS0_PIN _BV(PB17_SPI1_NPCS0_A)
  246. #define SPI1_CS0_PIO_BASE PIOB_BASE
  247. #define SPI1_CS0_PSR_OFF PIO_ASR_OFF
  248. #ifndef SPI1_CS3_PIN
  249. #define SPI1_CS3_PIN _BV(PD19_SPI1_NPCS3_A)
  250. #define SPI1_CS3_PIO_BASE PIOD_BASE
  251. #define SPI1_CS3_PSR_OFF PIO_ASR_OFF
  252. #endif
  253. /*@}*/
  254. /*! \name Image Sensor Interface Peripheral Multiplexing */
  255. /*@{*/
  256. #define PB20_ISI_D0_A 20 /*!< \brief Image sensor data bit 0 pin. */
  257. #define PB21_ISI_D1_A 21 /*!< \brief Image sensor data bit 1 pin. */
  258. #define PB22_ISI_D2_A 22 /*!< \brief Image sensor data bit 2 pin. */
  259. #define PB23_ISI_D3_A 23 /*!< \brief Image sensor data bit 3 pin. */
  260. #define PB24_ISI_D4_A 24 /*!< \brief Image sensor data bit 4 pin. */
  261. #define PB25_ISI_D5_A 25 /*!< \brief Image sensor data bit 5 pin. */
  262. #define PB26_ISI_D6_A 26 /*!< \brief Image sensor data bit 6 pin. */
  263. #define PB27_ISI_D7_A 27 /*!< \brief Image sensor data bit 7 pin. */
  264. #define PB10_ISI_D8_B 10 /*!< \brief Image sensor data bit 8 pin. */
  265. #define PB11_ISI_D9_B 11 /*!< \brief Image sensor data bit 9 pin. */
  266. #define PB12_ISI_D10_B 12 /*!< \brief Image sensor data bit 10 pin. */
  267. #define PB13_ISI_D11_B 13 /*!< \brief Image sensor data bit 11 pin. */
  268. #define PB28_ISI_PCK_A 28 /*!< \brief Image sensor data clock pin. */
  269. #define PB29_ISI_VSYNC_A 29 /*!< \brief Image sensor vertical sync pin. */
  270. #define PB30_ISI_HSYNC_A 30 /*!< \brief Image sensor horizontal sync pin. */
  271. #define PB31_ISI_MCK_A 31 /*!< \brief Image sensor reference clock pin. */
  272. /*@}*/
  273. /*! \name EMAC Interface Peripheral Multiplexing */
  274. /*@{*/
  275. #define PA6_ETX2_B 6 /*!< \brief Transmit data bit 2 pin. */
  276. #define PA7_ETX3_B 7 /*!< \brief Transmit data bit 3 pin. */
  277. #define PA10_ETX0_A 10 /*!< \brief Transmit data bit 0 pin. */
  278. #define PA11_ETX1_A 11 /*!< \brief Transmit data bit 1 pin. */
  279. #define PA12_ERX0_A 12 /*!< \brief Receive data bit 0 pin. */
  280. #define PA13_ERX1_A 13 /*!< \brief Receive data bit 1 pin. */
  281. #define PA14_ETXEN_A 14 /*!< \brief Transmit enable pin. */
  282. #define PA15_ERXDV_A 15 /*!< \brief Data valid pin. */
  283. #define PA16_ERXER_A 16 /*!< \brief Receive error pin. */
  284. #define PA17_ETXCK_A 17 /*!< \brief Transmit clock pin. */
  285. #define PA18_EMDC_A 18 /*!< \brief Management data clock pin. */
  286. #define PA19_EMDIO_A 19 /*!< \brief Management data I/O pin. */
  287. #define PA27_ETXER_B 27 /*!< \brief Transmit error pin. */
  288. #define PA8_ERX2_B 8 /*!< \brief Receive data bit 2 pin. */
  289. #define PA9_ERX3_B 9 /*!< \brief Receive data bit 3 pin. */
  290. #define PA28_ERXCK_B 28 /*!< \brief Receive clock pin. */
  291. #define PA29_ECRS_B 29 /*!< \brief Carrier sense pin. */
  292. #define PA30_ECOL_B 30 /*!< \brief Collision detect pin. */
  293. /*@}*/
  294. /*! \name AT91SAM9G45-EKES-Specific LAN defintitions */
  295. /*@{*/
  296. #define PHY_MODE_RMII
  297. #define EMAC_PIO_ASR PIO_ASR_OFF
  298. #define PHY_MII_PINS_A (PA10_ETX0_A | PA11_ETX1_A | PA12_ERX0_A | PA13_ERX1_A | PA14_ETXEN_A | PA15_ERXDV_A | PA16_ERXER_A | \
  299. PA17_ETXCK_A | PA18_EMDC_A | PA19_EMDIO_A)
  300. #define EMAC_PIO_BSR PIO_BSR_OFF
  301. #define PHY_MII_PINS_B (PA6_ETX2_B | PA7_ETX3_B | PA27_ETXER_B | PA8_ERX2_B | PA9_ERX3_B | PA28_ERXCK_B | PA29_ECRS_B | PA30_ECOL_B)
  302. #define EMAC_PIO_PDR PIOA_PDR
  303. /*@}*/
  304. /*! \name ADC Interface Peripheral Multiplexing */
  305. /*@{*/
  306. #define PD28_ADTRG_A 28 /*!< \brief ADC trigger pin. */
  307. /*@}*/
  308. /*! \name Debug Unit Peripheral Multiplexing */
  309. /*@{*/
  310. #define PB12_DRXD_A 12 /*!< \brief Debug unit receive data pin. */
  311. #define PB13_DTXD_A 13 /*!< \brief Debug unit transmit data pin. */
  312. /*@}*/
  313. /*! \name Synchronous Serial Controller Peripheral Multiplexing */
  314. /*@{*/
  315. #define PD2_TD0_A 2 /*!< \brief Transmit data pin. */
  316. #define PD3_RD0_A 3 /*!< \brief Receive data pin. */
  317. #define PD0_TK0_A 0 /*!< \brief Transmit clock pin. */
  318. #define PD4_RK0_A 4 /*!< \brief Receive clock pin. */
  319. #define PD1_TF0_A 1 /*!< \brief Transmit frame sync. pin. */
  320. #define PD5_RF0_A 5 /*!< \brief Receive frame sync. pin. */
  321. /*@}*/
  322. /*! \name Two Wire Interface Peripheral Multiplexing */
  323. /*@{*/
  324. #define PA20_TWD0_A 20 /*!< \brief Two wire serial data pin. */
  325. #define PA21_TWCK0_A 21 /*!< \brief Two wire serial clock pin. */
  326. #define PB10_TWD1_A 10 /*!< \brief Two wire serial data pin. */
  327. #define PB11_TWCK1_A 11 /*!< \brief Two wire serial clock pin. */
  328. /*@}*/
  329. /*! \name Timer/Counter Peripheral Multiplexing */
  330. /*@{*/
  331. #define PD23_TCLK0_A 23 /*!< \brief Timer/counter 0 external clock input. */
  332. #define PD20_TIOA0_A 20 /*!< \brief Timer/counter 0 I/O line A. */
  333. #define PD30_TIOB0_A 30 /*!< \brief Timer/counter 0 I/O line B. */
  334. #define PD29_TCLK1_A 29 /*!< \brief Timer/counter 1 external clock input. */
  335. #define PD21_TIOA1_A 21 /*!< \brief Timer/counter 1 I/O line A. */
  336. #define PD31_TIOB1_A 31 /*!< \brief Timer/counter 1 I/O line B. */
  337. #define PC10_TCLK2_B 10 /*!< \brief Timer/counter 2 external clock input. */
  338. #define PD22_TIOA2_A 22 /*!< \brief Timer/counter 2 I/O line A. */
  339. #define PA26_TIOB2_B 26 /*!< \brief Timer/counter 2 I/O line B. */
  340. #define PA0_TCLK3_B 0 /*!< \brief Timer/counter 3 external clock input. */
  341. #define PA1_TIOA3_B 1 /*!< \brief Timer/counter 3 I/O line A. */
  342. #define PA2_TIOB3_B 2 /*!< \brief Timer/counter 3 I/O line B. */
  343. #define PA3_TCLK4_B 3 /*!< \brief Timer/counter 4 external clock input. */
  344. #define PA4_TIOA4_B 4 /*!< \brief Timer/counter 4 I/O line A. */
  345. #define PA5_TIOB4_B 5 /*!< \brief Timer/counter 4 I/O line B. */
  346. #define PD9_TCLK5_B 9 /*!< \brief Timer/counter 5 external clock input. */
  347. #define PD7_TIOA5_B 7 /*!< \brief Timer/counter 5 I/O line A. */
  348. #define PD8_TIOB5_B 8 /*!< \brief Timer/counter 5 I/O line B. */
  349. /*@}*/
  350. /*! \name Clocks, Oscillators and PLLs Peripheral Multiplexing */
  351. /*@{*/
  352. #define PD26_PCK0_A 26 /*!< \brief Programmable clock 0 output pin. */
  353. #define PE0_PCK0_B 0 /*!< \brief Programmable clock 0 output pin. */
  354. #define PD27_PCK1_A 27 /*!< \brief Programmable clock 1 output pin. */
  355. #define PE31_PCK1_B 31 /*!< \brief Programmable clock 1 output pin. */
  356. /*@}*/
  357. /*! \name CompactFlash Peripheral Multiplexing */
  358. /*@{*/
  359. #define PC12_A25_CFRNW_A 12 /*!< \brief Read not write pin. */
  360. #define PC10_NCS4_CFCS0_A 10 /*!< \brief Chip select line 0 pin. */
  361. #define PC11_NCS5_CFCS1_A 11 /*!< \brief Chip select line 1 pin. */
  362. #define PC8_CFCE1_A 8 /*!< \brief Chip enable line 1 pin. */
  363. #define PC9_CFCE2_A 9 /*!< \brief Chip enable line 2 pin. */
  364. /*@}*/
  365. /*! \name External Bus Interface Peripheral Multiplexing */
  366. /*@{*/
  367. #define PC16_D16_A 16 /*!< \brief Data bus bit 16 pin. */
  368. #define PC17_D17_A 17 /*!< \brief Data bus bit 17 pin. */
  369. #define PC18_D18_A 18 /*!< \brief Data bus bit 18 pin. */
  370. #define PC19_D19_A 19 /*!< \brief Data bus bit 19 pin. */
  371. #define PC20_D20_A 20 /*!< \brief Data bus bit 20 pin. */
  372. #define PC21_D21_A 21 /*!< \brief Data bus bit 21 pin. */
  373. #define PC22_D22_A 22 /*!< \brief Data bus bit 22 pin. */
  374. #define PC23_D23_A 23 /*!< \brief Data bus bit 23 pin. */
  375. #define PC24_D24_A 24 /*!< \brief Data bus bit 24 pin. */
  376. #define PC25_D25_A 25 /*!< \brief Data bus bit 25 pin. */
  377. #define PC26_D26_A 26 /*!< \brief Data bus bit 26 pin. */
  378. #define PC27_D27_A 27 /*!< \brief Data bus bit 27 pin. */
  379. #define PC28_D28_A 28 /*!< \brief Data bus bit 28 pin. */
  380. #define PC29_D29_A 29 /*!< \brief Data bus bit 29 pin. */
  381. #define PC30_D30_A 30 /*!< \brief Data bus bit 30 pin. */
  382. #define PC31_D31_A 31 /*!< \brief Data bus bit 31 pin. */
  383. #define PC6_A23_A 6 /*!< \brief Address bus bit 23 pin. */
  384. #define PC7_A24_A 7 /*!< \brief Address bus bit 24 pin. */
  385. #define PC13_NCS2_A 13 /*!< \brief Negated chip select 2 pin. */
  386. #define PC14_NCS3_NANDCS_A 14 /*!< \brief Negated chip select 3 pin. */
  387. #define PC15_NWAIT_A 15 /*!< \brief External wait signal pin. */
  388. /*@}*/
  389. /*! \name Advanced Interrupt Controller Peripheral Multiplexing */
  390. /*@{*/
  391. #define PD19_FIQ_B 19 /*!< \brief Fast interrupt input pin. */
  392. #define PC18_IRQ_B 18 /*!< \brief External interrupt input pin. */
  393. /*@}*/
  394. /*! \name LCD Port definition */
  395. /*@{*/
  396. #define LCDC_PIO_BASE PIOE_BASE
  397. #define LCDC_PINS_A 0x6FEFFFDE
  398. #define LCDC_PINS_B 0x10100000
  399. #define LCDC_PINS (LCDC_PINS_A | LCDC_PINS_B)
  400. #define LCDC_PIO_ASR PIOE_ASR
  401. #define LCDC_PIO_BSR PIOE_BSR
  402. #define LCDC_PIO_PDR PIOE_PDR
  403. /*@}*/
  404. /*@} xgNutArchArmAt91Sam9g45 */
  405. #endif /* _ARCH_ARM_SAM9G45_H_ */