ethernut3.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /*
  2. * Copyright 2011 by egnite GmbH
  3. *
  4. * 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/board/ethernut3.h
  36. * \brief Ethernut 3 board specific settings.
  37. *
  38. * \verbatim
  39. * $Id$
  40. * \endverbatim
  41. */
  42. #ifndef _DEV_BOARD_H_
  43. #error "Do not include this file directly. Use dev/board.h instead!"
  44. #endif
  45. /*
  46. * Determine old board version
  47. */
  48. #include <cfg/eeprom.h>
  49. #if defined(NUT_CONFIG_X12RTC)
  50. #define ETHERNUT3_0
  51. #endif
  52. /*
  53. * Console devices
  54. */
  55. #ifndef DEV_CONSOLE
  56. #ifdef NUT_DEV_DEBUG_READ
  57. #define DEV_CONSOLE DEV_DEBUG
  58. #endif
  59. #endif
  60. #ifndef DEV_CONSOLE_NAME
  61. /* Removed in dev/board.h, but added here again for backward compatibility. */
  62. #define DEV_CONSOLE_NAME "uart0"
  63. #endif
  64. /*
  65. * Ethernet devices
  66. */
  67. #ifndef NIC_BASE_ADDR
  68. #define NIC_BASE_ADDR 0x20000000
  69. #endif
  70. #ifndef NIC_SIGNAL_IRQ
  71. #define NIC_SIGNAL_IRQ INT1
  72. #endif
  73. #ifndef NIC_SIGNAL_PDR
  74. #define NIC_SIGNAL_PDR PIO_PDR
  75. #endif
  76. #ifndef NIC_SIGNAL_BIT
  77. #define NIC_SIGNAL_BIT 10
  78. #endif
  79. #include <dev/dm9000e.h>
  80. /*
  81. * SPI bus controller devices
  82. */
  83. #include <dev/spibus_npl.h>
  84. #ifndef DEV_SPIBUS0
  85. #define DEV_SPIBUS0 spiBusNpl
  86. #endif
  87. /*
  88. * RTC chips
  89. */
  90. #ifdef ETHERNUT3_0
  91. #include <dev/x12rtc.h>
  92. #else
  93. #include <dev/pcf8563.h>
  94. #endif
  95. #ifndef RTC_CHIP0
  96. #ifdef ETHERNUT3_0
  97. #define RTC_CHIP0 rtcX12x6
  98. #else
  99. #define RTC_CHIP0 rtcPcf8563
  100. #endif
  101. #endif
  102. /*
  103. * MultiMedia Card devices
  104. */
  105. #include <dev/nplmmc.h>
  106. #ifndef DEV_MMCARD0
  107. #define DEV_MMCARD0 devNplMmc0
  108. #endif
  109. /*
  110. * We do not have any config settings right now. So I add my
  111. * Ethernut 3 settings here, which I used for testing the code.
  112. *
  113. * - P16 TMS output.
  114. * - P18 TCK output.
  115. * - P19 TDO input.
  116. * - P20 RST output.
  117. * - P23 TDI output.
  118. */
  119. #if !defined(JTAG0_TDO_PIO_ID) && defined(PIO_ID)
  120. #define JTAG0_TDO_PIO_ID PIO_ID
  121. #endif
  122. #if !defined(JTAG0_TDO_PIO_BIT)
  123. #define JTAG0_TDO_PIO_BIT 19
  124. #endif
  125. #if !defined(JTAG0_TDI_PIO_ID) && defined(PIO_ID)
  126. #define JTAG0_TDI_PIO_ID PIO_ID
  127. #endif
  128. #if !defined(JTAG0_TDI_PIO_BIT)
  129. #define JTAG0_TDI_PIO_BIT 23
  130. #endif
  131. #if !defined(JTAG0_TMS_PIO_ID) && defined(PIO_ID)
  132. #define JTAG0_TMS_PIO_ID PIO_ID
  133. #endif
  134. #if !defined(JTAG0_TMS_PIO_BIT)
  135. #define JTAG0_TMS_PIO_BIT 16
  136. #endif
  137. #if !defined(JTAG0_TCK_PIO_ID) && defined(PIO_ID)
  138. #define JTAG0_TCK_PIO_ID PIO_ID
  139. #endif
  140. #if !defined(JTAG0_TCK_PIO_BIT)
  141. #define JTAG0_TCK_PIO_BIT 18
  142. #endif
  143. #if !defined(JTAG0_CLOCK_RATE)
  144. #define JTAG0_CLOCK_RATE 100000
  145. #endif