edb93xx.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. /*
  2. * U-boot - Configuration file for Cirrus Logic EDB93xx boards
  3. */
  4. #ifndef __CONFIG_H
  5. #define __CONFIG_H
  6. #ifdef CONFIG_edb9301
  7. #define CONFIG_EDB9301
  8. #elif defined(CONFIG_edb9302)
  9. #define CONFIG_EDB9302
  10. #elif defined(CONFIG_edb9302a)
  11. #define CONFIG_EDB9302A
  12. #elif defined(CONFIG_edb9307)
  13. #define CONFIG_EDB9307
  14. #elif defined(CONFIG_edb9307a)
  15. #define CONFIG_EDB9307A
  16. #elif defined(CONFIG_edb9312)
  17. #define CONFIG_EDB9312
  18. #elif defined(CONFIG_edb9315)
  19. #define CONFIG_EDB9315
  20. #elif defined(CONFIG_edb9315a)
  21. #define CONFIG_EDB9315A
  22. #else
  23. #error "no board defined"
  24. #endif
  25. /* Initial environment and monitor configuration options. */
  26. #define CONFIG_BOOTDELAY 2
  27. #define CONFIG_CMDLINE_TAG 1
  28. #define CONFIG_INITRD_TAG 1
  29. #define CONFIG_SETUP_MEMORY_TAGS 1
  30. #define CONFIG_BOOTARGS "root=/dev/nfs console=ttyAM0,115200 ip=dhcp"
  31. #define CONFIG_BOOTFILE "edb93xx.img"
  32. #define CONFIG_SYS_HUSH_PARSER 1
  33. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  34. #ifdef CONFIG_EDB9301
  35. #define CONFIG_EP9301
  36. #define CONFIG_MACH_TYPE MACH_TYPE_EDB9301
  37. #define CONFIG_SYS_PROMPT "EDB9301> "
  38. #define CONFIG_ENV_SECT_SIZE 0x00020000
  39. #elif defined(CONFIG_EDB9302)
  40. #define CONFIG_EP9302
  41. #define CONFIG_MACH_TYPE MACH_TYPE_EDB9302
  42. #define CONFIG_SYS_PROMPT "EDB9302> "
  43. #define CONFIG_ENV_SECT_SIZE 0x00020000
  44. #elif defined(CONFIG_EDB9302A)
  45. #define CONFIG_EP9302
  46. #define CONFIG_MACH_TYPE MACH_TYPE_EDB9302A
  47. #define CONFIG_SYS_PROMPT "EDB9302A> "
  48. #define CONFIG_ENV_SECT_SIZE 0x00020000
  49. #elif defined(CONFIG_EDB9307)
  50. #define CONFIG_EP9307
  51. #define CONFIG_MACH_TYPE MACH_TYPE_EDB9307
  52. #define CONFIG_SYS_PROMPT "EDB9307> "
  53. #define CONFIG_ENV_SECT_SIZE 0x00040000
  54. #elif defined(CONFIG_EDB9307A)
  55. #define CONFIG_EP9307
  56. #define CONFIG_MACH_TYPE MACH_TYPE_EDB9307A
  57. #define CONFIG_SYS_PROMPT "EDB9307A> "
  58. #define CONFIG_ENV_SECT_SIZE 0x00040000
  59. #elif defined(CONFIG_EDB9312)
  60. #define CONFIG_EP9312
  61. #define CONFIG_MACH_TYPE MACH_TYPE_EDB9312
  62. #define CONFIG_SYS_PROMPT "EDB9312> "
  63. #define CONFIG_ENV_SECT_SIZE 0x00040000
  64. #elif defined(CONFIG_EDB9315)
  65. #define CONFIG_EP9315
  66. #define CONFIG_MACH_TYPE MACH_TYPE_EDB9315
  67. #define CONFIG_SYS_PROMPT "EDB9315> "
  68. #define CONFIG_ENV_SECT_SIZE 0x00040000
  69. #elif defined(CONFIG_EDB9315A)
  70. #define CONFIG_EP9315
  71. #define CONFIG_MACH_TYPE MACH_TYPE_EDB9315A
  72. #define CONFIG_SYS_PROMPT "EDB9315A> "
  73. #define CONFIG_ENV_SECT_SIZE 0x00040000
  74. #else
  75. #error "no board defined"
  76. #endif
  77. /* High-level configuration options */
  78. #define CONFIG_ARM920T 1 /* This is an ARM920T core... */
  79. #define CONFIG_EP93XX 1 /* in a Cirrus Logic 93xx SoC */
  80. #define CONFIG_SYS_CLK_FREQ 14745600 /* EP93xx has a 14.7456 clock */
  81. #define CONFIG_SYS_HZ 1000 /* decr freq: 1 ms ticks */
  82. #undef CONFIG_USE_IRQ /* Don't need IRQ/FIQ */
  83. /* Monitor configuration */
  84. #include <config_cmd_default.h>
  85. #undef CONFIG_CMD_FPGA
  86. #undef CONFIG_CMD_SETGETDCR
  87. #undef CONFIG_CMD_XIMG
  88. #undef CONFIG_CMD_DATE
  89. #define CONFIG_CMD_DHCP
  90. #define CONFIG_CMD_FAT
  91. #define CONFIG_CMD_JFFS2
  92. #define CONFIG_SYS_LONGHELP /* Enable "long" help in mon */
  93. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */
  94. /* Print buffer size */
  95. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  96. /* Boot argument buffer size */
  97. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  98. #define CONFIG_SYS_MAXARGS 16 /* Max number of command args */
  99. /* Serial port hardware configuration */
  100. #define CONFIG_PL010_SERIAL
  101. #define CONFIG_CONS_INDEX 0
  102. #define CONFIG_BAUDRATE 115200
  103. #define CONFIG_SYS_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200}
  104. #define CONFIG_SYS_SERIAL0 0x808C0000
  105. #define CONFIG_SYS_SERIAL1 0x808D0000
  106. #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
  107. (void *)CONFIG_SYS_SERIAL1}
  108. /* Status LED */
  109. #define CONFIG_STATUS_LED 1 /* Status LED enabled */
  110. #define CONFIG_BOARD_SPECIFIC_LED 1
  111. #define STATUS_LED_GREEN 0
  112. #define STATUS_LED_RED 1
  113. /* Green */
  114. #define STATUS_LED_BIT STATUS_LED_GREEN
  115. #define STATUS_LED_STATE STATUS_LED_ON
  116. #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
  117. /* Red */
  118. #define STATUS_LED_BIT1 STATUS_LED_RED
  119. #define STATUS_LED_STATE1 STATUS_LED_OFF
  120. #define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2)
  121. /* Optional value */
  122. #define STATUS_LED_BOOT STATUS_LED_BIT
  123. /* Network hardware configuration */
  124. #define CONFIG_DRIVER_EP93XX_MAC
  125. #define CONFIG_MII_SUPPRESS_PREAMBLE
  126. #define CONFIG_MII
  127. #define CONFIG_PHY_ADDR 1
  128. #define CONFIG_NET_MULTI
  129. #undef CONFIG_NETCONSOLE
  130. /* SDRAM configuration */
  131. #if defined(CONFIG_EDB9301) || defined(CONFIG_EDB9302)
  132. /*
  133. * EDB9301/2 has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75
  134. * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set
  135. * the SROMLL bit on the processor, resulting in this non-contiguous memory map.
  136. */
  137. #define CONFIG_NR_DRAM_BANKS 4
  138. #define PHYS_SDRAM_1 0x00000000
  139. #define PHYS_SDRAM_SIZE_1 0x00800000
  140. #define PHYS_SDRAM_2 0x01000000
  141. #define PHYS_SDRAM_SIZE_2 0x00800000
  142. #define PHYS_SDRAM_3 0x04000000
  143. #define PHYS_SDRAM_SIZE_3 0x00800000
  144. #define PHYS_SDRAM_4 0x05000000
  145. #define PHYS_SDRAM_SIZE_4 0x00800000
  146. #define CONFIG_EDB93XX_SDCS3
  147. #define CONFIG_SYS_MEMTEST_START 0x00100000
  148. #define CONFIG_SYS_MEMTEST_END 0x007fffff
  149. #elif defined(CONFIG_EDB9302A)
  150. /*
  151. * EDB9302a has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75
  152. * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set
  153. * the SROMLL bit on the processor, resulting in this non-contiguous memory map.
  154. */
  155. #define CONFIG_NR_DRAM_BANKS 4
  156. #define PHYS_SDRAM_1 0xc0000000
  157. #define PHYS_SDRAM_SIZE_1 0x00800000
  158. #define PHYS_SDRAM_2 0xc1000000
  159. #define PHYS_SDRAM_SIZE_2 0x00800000
  160. #define PHYS_SDRAM_3 0xc4000000
  161. #define PHYS_SDRAM_SIZE_3 0x00800000
  162. #define PHYS_SDRAM_4 0xc5000000
  163. #define PHYS_SDRAM_SIZE_4 0x00800000
  164. #define CONFIG_EDB93XX_SDCS0
  165. #define CONFIG_SYS_MEMTEST_START 0xc0100000
  166. #define CONFIG_SYS_MEMTEST_END 0xc07fffff
  167. #elif defined(CONFIG_EDB9307) || defined CONFIG_EDB9312 || \
  168. defined(CONFIG_EDB9315)
  169. /*
  170. * The EDB9307, EDB9312, and EDB9315 have 2 banks of SDRAM consisting of
  171. * 2x Samsung K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of
  172. * 64 MB of SDRAM.
  173. */
  174. #define CONFIG_NR_DRAM_BANKS 2
  175. #define PHYS_SDRAM_1 0x00000000
  176. #define PHYS_SDRAM_SIZE_1 0x02000000
  177. #define PHYS_SDRAM_2 0x04000000
  178. #define PHYS_SDRAM_SIZE_2 0x02000000
  179. #define CONFIG_EDB93XX_SDCS3
  180. #define CONFIG_SYS_MEMTEST_START 0x00100000
  181. #define CONFIG_SYS_MEMTEST_END 0x01e00000
  182. #elif defined(CONFIG_EDB9307A) || defined(CONFIG_EDB9315A)
  183. /*
  184. * The EDB9307A and EDB9315A have 2 banks of SDRAM consisting of 2x Samsung
  185. * K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of 64 MB of SDRAM.
  186. */
  187. #define CONFIG_NR_DRAM_BANKS 2
  188. #define PHYS_SDRAM_1 0xc0000000
  189. #define PHYS_SDRAM_SIZE_1 0x02000000
  190. #define PHYS_SDRAM_2 0xc4000000
  191. #define PHYS_SDRAM_SIZE_2 0x02000000
  192. #define CONFIG_EDB93XX_SDCS0
  193. #define CONFIG_SYS_MEMTEST_START 0xc0100000
  194. #define CONFIG_SYS_MEMTEST_END 0xc1e00000
  195. #endif
  196. /* Default load address */
  197. #define CONFIG_SYS_LOAD_ADDR (PHYS_SDRAM_1 + 0x01000000)
  198. /* Must match kernel config */
  199. #define LINUX_BOOT_PARAM_ADDR (PHYS_SDRAM_1 + 0x100)
  200. /* Run-time memory allocatons */
  201. #define CONFIG_SYS_GBL_DATA_SIZE 128
  202. #define CONFIG_STACKSIZE (128 * 1024)
  203. #if defined(CONFIG_USE_IRQ)
  204. #define CONFIG_STACKSIZE_IRQ (4 * 1024)
  205. #define CONFIG_STACKSIZE_FIQ (4 * 1024)
  206. #endif
  207. #define CONFIG_SYS_MALLOC_LEN (512 * 1024)
  208. /* -----------------------------------------------------------------------------
  209. * FLASH and environment organization
  210. *
  211. * The EDB9301 and EDB9302(a) have 1 bank of flash memory at 0x60000000
  212. * consisting of 1x Intel TE28F128J3C-150 128 Mbit flash on a 16-bit data bus,
  213. * for a total of 16 MB of CFI-compatible flash.
  214. *
  215. * The EDB9307(a), EDB9312, and EDB9315(a) have 1 bank of flash memory at
  216. * 0x60000000 consisting of 2x Micron MT28F128J3-12 128 Mbit flash on a 32-bit
  217. * data bus, for a total of 32 MB of CFI-compatible flash.
  218. *
  219. * EDB9301/02(a) EDB9307(a)/12/15(a)
  220. * 0x60000000 - 0x0003FFFF u-boot u-boot
  221. * 0x60040000 - 0x0005FFFF environment #1 environment #1
  222. * 0x60060000 - 0x0007FFFF environment #2 environment #1 (continued)
  223. * 0x60080000 - 0x0009FFFF unused environment #2
  224. * 0x600A0000 - 0x000BFFFF unused environment #2 (continued)
  225. * 0x600C0000 - 0x00FFFFFF unused unused
  226. * 0x61000000 - 0x01FFFFFF not present unused
  227. */
  228. #define CONFIG_SYS_FLASH_CFI
  229. #define CONFIG_FLASH_CFI_DRIVER
  230. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  231. #define CONFIG_SYS_MAX_FLASH_SECT 128
  232. #define PHYS_FLASH_1 0x60000000
  233. #define CONFIG_SYS_FLASH_BASE (PHYS_FLASH_1)
  234. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  235. #define CONFIG_SYS_MONITOR_LEN (256 * 1024)
  236. #define CONFIG_ENV_OVERWRITE /* Vendor params unprotected */
  237. #define CONFIG_ENV_IS_IN_FLASH
  238. #define CONFIG_ENV_ADDR 0x60040000
  239. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
  240. #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
  241. #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
  242. #endif /* !defined (__CONFIG_H) */