spear3xx_evb.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /*
  2. * (C) Copyright 2009
  3. * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __CONFIG_H
  24. #define __CONFIG_H
  25. /*
  26. * High Level Configuration Options
  27. * (easy to change)
  28. */
  29. #if defined(CONFIG_spear300)
  30. #define CONFIG_SPEAR3XX 1
  31. #define CONFIG_SPEAR300 1
  32. #elif defined(CONFIG_spear310)
  33. #define CONFIG_SPEAR3XX 1
  34. #define CONFIG_SPEAR310 1
  35. #elif defined(CONFIG_spear320)
  36. #define CONFIG_SPEAR3XX 1
  37. #define CONFIG_SPEAR320 1
  38. #endif
  39. #if defined(CONFIG_usbtty)
  40. #define CONFIG_SPEAR_USBTTY
  41. #endif
  42. #if defined(CONFIG_nand)
  43. #define CONFIG_ENV_IS_IN_NAND
  44. #else
  45. #define CONFIG_ENV_IS_IN_FLASH
  46. #endif
  47. #include <configs/spear-common.h>
  48. /* Ethernet driver configuration */
  49. #define CONFIG_DW_ALTDESCRIPTOR 1
  50. #if defined(CONFIG_SPEAR310)
  51. #define CONFIG_MACB 1
  52. #define CONFIG_MACB0_PHY 0x01
  53. #define CONFIG_MACB1_PHY 0x03
  54. #define CONFIG_MACB2_PHY 0x05
  55. #define CONFIG_MACB3_PHY 0x07
  56. #elif defined(CONFIG_SPEAR320)
  57. #define CONFIG_MACB 1
  58. #define CONFIG_MACB0_PHY 0x01
  59. #endif
  60. /* Serial Configuration (PL011) */
  61. #define CONFIG_SYS_SERIAL0 0xD0000000
  62. #if defined(CONFIG_SPEAR300)
  63. #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
  64. #elif defined(CONFIG_SPEAR310)
  65. #if (CONFIG_CONS_INDEX)
  66. #undef CONFIG_PL011_CLOCK
  67. #define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
  68. #endif
  69. #define CONFIG_SYS_SERIAL1 0xB2000000
  70. #define CONFIG_SYS_SERIAL2 0xB2080000
  71. #define CONFIG_SYS_SERIAL3 0xB2100000
  72. #define CONFIG_SYS_SERIAL4 0xB2180000
  73. #define CONFIG_SYS_SERIAL5 0xB2200000
  74. #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
  75. (void *)CONFIG_SYS_SERIAL1, \
  76. (void *)CONFIG_SYS_SERIAL2, \
  77. (void *)CONFIG_SYS_SERIAL3, \
  78. (void *)CONFIG_SYS_SERIAL4, \
  79. (void *)CONFIG_SYS_SERIAL5 }
  80. #elif defined(CONFIG_SPEAR320)
  81. #if (CONFIG_CONS_INDEX)
  82. #undef CONFIG_PL011_CLOCK
  83. #define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
  84. #endif
  85. #define CONFIG_SYS_SERIAL1 0xA3000000
  86. #define CONFIG_SYS_SERIAL2 0xA4000000
  87. #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
  88. (void *)CONFIG_SYS_SERIAL1, \
  89. (void *)CONFIG_SYS_SERIAL2 }
  90. #endif
  91. #if defined(CONFIG_SPEAR_EMI)
  92. #define CONFIG_SYS_FLASH_CFI
  93. #define CONFIG_FLASH_CFI_DRIVER
  94. #if defined(CONFIG_SPEAR310)
  95. #define CONFIG_SYS_FLASH_BASE 0x50000000
  96. #define CONFIG_SYS_CS1_FLASH_BASE 0x60000000
  97. #define CONFIG_SYS_CS2_FLASH_BASE 0x70000000
  98. #define CONFIG_SYS_CS3_FLASH_BASE 0x80000000
  99. #define CONFIG_SYS_CS4_FLASH_BASE 0x90000000
  100. #define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000
  101. #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
  102. CONFIG_SYS_CS1_FLASH_BASE, \
  103. CONFIG_SYS_CS2_FLASH_BASE, \
  104. CONFIG_SYS_CS3_FLASH_BASE, \
  105. CONFIG_SYS_CS4_FLASH_BASE, \
  106. CONFIG_SYS_CS5_FLASH_BASE }
  107. #define CONFIG_SYS_MAX_FLASH_BANKS 6
  108. #elif defined(CONFIG_SPEAR320)
  109. #define CONFIG_SYS_FLASH_BASE 0x44000000
  110. #define CONFIG_SYS_CS1_FLASH_BASE 0x45000000
  111. #define CONFIG_SYS_CS2_FLASH_BASE 0x46000000
  112. #define CONFIG_SYS_CS3_FLASH_BASE 0x47000000
  113. #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
  114. CONFIG_SYS_CS1_FLASH_BASE, \
  115. CONFIG_SYS_CS2_FLASH_BASE, \
  116. CONFIG_SYS_CS3_FLASH_BASE }
  117. #define CONFIG_SYS_MAX_FLASH_BANKS 4
  118. #endif
  119. #define CONFIG_SYS_MAX_FLASH_SECT (127 + 8)
  120. #define CONFIG_SYS_FLASH_QUIET_TEST 1
  121. #endif
  122. /* NAND flash configuration */
  123. #define CONFIG_SYS_FSMC_NAND_SP
  124. #define CONFIG_SYS_FSMC_NAND_8BIT
  125. #if defined(CONFIG_SPEAR300)
  126. #define CONFIG_SYS_NAND_BASE (0x80000000)
  127. #elif defined(CONFIG_SPEAR310)
  128. #define CONFIG_SYS_NAND_BASE (0x40000000)
  129. #elif defined(CONFIG_SPEAR320)
  130. #define CONFIG_SYS_NAND_BASE (0x50000000)
  131. #endif
  132. #endif /* __CONFIG_H */