edb93xx.h 8.3 KB

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