smdk6400.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. /*
  2. * (C) Copyright 2002
  3. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  4. * Marius Groeger <mgroeger@sysgo.de>
  5. * Gary Jennejohn <garyj@denx.de>
  6. * David Mueller <d.mueller@elsoft.ch>
  7. *
  8. * (C) Copyright 2008
  9. * Guennadi Liakhovetki, DENX Software Engineering, <lg@denx.de>
  10. *
  11. * Configuation settings for the SAMSUNG SMDK6400(mDirac-III) board.
  12. *
  13. * See file CREDITS for list of people who contributed to this
  14. * project.
  15. *
  16. * This program is free software; you can redistribute it and/or
  17. * modify it under the terms of the GNU General Public License as
  18. * published by the Free Software Foundation; either version 2 of
  19. * the License, or (at your option) any later version.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with this program; if not, write to the Free Software
  28. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  29. * MA 02111-1307 USA
  30. */
  31. #ifndef __CONFIG_H
  32. #define __CONFIG_H
  33. /*
  34. * High Level Configuration Options
  35. * (easy to change)
  36. */
  37. #define CONFIG_S3C6400 1 /* in a SAMSUNG S3C6400 SoC */
  38. #define CONFIG_S3C64XX 1 /* in a SAMSUNG S3C64XX Family */
  39. #define CONFIG_SMDK6400 1 /* on a SAMSUNG SMDK6400 Board */
  40. #define CONFIG_SYS_SDRAM_BASE 0x50000000
  41. /* input clock of PLL: SMDK6400 has 12MHz input clock */
  42. #define CONFIG_SYS_CLK_FREQ 12000000
  43. #if !defined(CONFIG_NAND_SPL) && (TEXT_BASE >= 0xc0000000)
  44. #define CONFIG_ENABLE_MMU
  45. #endif
  46. #define CONFIG_MEMORY_UPPER_CODE
  47. #define CONFIG_SETUP_MEMORY_TAGS
  48. #define CONFIG_CMDLINE_TAG
  49. #define CONFIG_INITRD_TAG
  50. /*
  51. * Architecture magic and machine type
  52. */
  53. #define MACH_TYPE 1270
  54. #define CONFIG_DISPLAY_CPUINFO
  55. #define CONFIG_DISPLAY_BOARDINFO
  56. #undef CONFIG_SKIP_RELOCATE_UBOOT
  57. /*
  58. * Size of malloc() pool
  59. */
  60. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 1024 * 1024)
  61. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes for initial data */
  62. /*
  63. * Hardware drivers
  64. */
  65. #define CONFIG_NET_MULTI
  66. #define CONFIG_CS8900 /* we have a CS8900 on-board */
  67. #define CONFIG_CS8900_BASE 0x18800300
  68. #define CONFIG_CS8900_BUS16 /* follow the Linux driver */
  69. /*
  70. * select serial console configuration
  71. */
  72. #define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK6400 */
  73. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  74. #ifdef CONFIG_SYS_HUSH_PARSER
  75. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  76. #endif
  77. #define CONFIG_CMDLINE_EDITING
  78. /* allow to overwrite serial and ethaddr */
  79. #define CONFIG_ENV_OVERWRITE
  80. #define CONFIG_BAUDRATE 115200
  81. /***********************************************************
  82. * Command definition
  83. ***********************************************************/
  84. #include <config_cmd_default.h>
  85. #define CONFIG_CMD_CACHE
  86. #define CONFIG_CMD_REGINFO
  87. #define CONFIG_CMD_LOADS
  88. #define CONFIG_CMD_LOADB
  89. #define CONFIG_CMD_SAVEENV
  90. #define CONFIG_CMD_NAND
  91. #if defined(CONFIG_BOOT_ONENAND)
  92. #define CONFIG_CMD_ONENAND
  93. #endif
  94. #define CONFIG_CMD_PING
  95. #define CONFIG_CMD_ELF
  96. #define CONFIG_CMD_FAT
  97. #define CONFIG_CMD_EXT2
  98. #define CONFIG_BOOTDELAY 3
  99. #define CONFIG_ZERO_BOOTDELAY_CHECK
  100. #if (CONFIG_COMMANDS & CONFIG_CMD_KGDB)
  101. #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
  102. #define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */
  103. #endif
  104. /*
  105. * Miscellaneous configurable options
  106. */
  107. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  108. #define CONFIG_SYS_PROMPT "SMDK6400 # " /* Monitor Command Prompt */
  109. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  110. #define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
  111. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  112. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  113. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE /* memtest works on */
  114. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x7e00000) /* 126MB in DRAM */
  115. #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE /* default load address */
  116. #define CONFIG_SYS_HZ 1000
  117. /* valid baudrates */
  118. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  119. /*-----------------------------------------------------------------------
  120. * Stack sizes
  121. *
  122. * The stack sizes are set up in start.S using the settings below
  123. */
  124. #define CONFIG_STACKSIZE 0x40000 /* regular stack 256KB */
  125. /**********************************
  126. Support Clock Settings
  127. **********************************
  128. Setting SYNC ASYNC
  129. ----------------------------------
  130. 667_133_66 X O
  131. 533_133_66 O O
  132. 400_133_66 X O
  133. 400_100_50 O O
  134. **********************************/
  135. /*#define CONFIG_CLK_667_133_66*/
  136. #define CONFIG_CLK_533_133_66
  137. /*
  138. #define CONFIG_CLK_400_100_50
  139. #define CONFIG_CLK_400_133_66
  140. #define CONFIG_SYNC_MODE
  141. */
  142. /* SMDK6400 has 2 banks of DRAM, but we use only one in U-Boot */
  143. #define CONFIG_NR_DRAM_BANKS 1
  144. #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* SDRAM Bank #1 */
  145. #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB in Bank #1 */
  146. #define CONFIG_SYS_FLASH_BASE 0x10000000
  147. #define CONFIG_SYS_MONITOR_BASE 0x00000000
  148. /*-----------------------------------------------------------------------
  149. * FLASH and environment organization
  150. */
  151. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  152. /* AM29LV160B has 35 sectors, AM29LV800B - 19 */
  153. #define CONFIG_SYS_MAX_FLASH_SECT 40
  154. #define CONFIG_AMD_LV800
  155. #define CONFIG_SYS_FLASH_CFI 1 /* Use CFI parameters (needed?) */
  156. /* Use drivers/cfi_flash.c, even though the flash is not CFI-compliant */
  157. #define CONFIG_FLASH_CFI_DRIVER 1
  158. #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
  159. #define CONFIG_FLASH_CFI_LEGACY
  160. #define CONFIG_SYS_FLASH_LEGACY_512Kx16
  161. /* timeout values are in ticks */
  162. #define CONFIG_SYS_FLASH_ERASE_TOUT (5 * CONFIG_SYS_HZ) /* Timeout for Flash Erase */
  163. #define CONFIG_SYS_FLASH_WRITE_TOUT (5 * CONFIG_SYS_HZ) /* Timeout for Flash Write */
  164. #define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
  165. /*
  166. * SMDK6400 board specific data
  167. */
  168. #define CONFIG_IDENT_STRING " for SMDK6400"
  169. /* base address for uboot */
  170. #define CONFIG_SYS_PHY_UBOOT_BASE (CONFIG_SYS_SDRAM_BASE + 0x07e00000)
  171. /* total memory available to uboot */
  172. #define CONFIG_SYS_UBOOT_SIZE (1024 * 1024)
  173. /* Put environment copies after the end of U-Boot owned RAM */
  174. #define CONFIG_NAND_ENV_DST (CONFIG_SYS_UBOOT_BASE + CONFIG_SYS_UBOOT_SIZE)
  175. #ifdef CONFIG_ENABLE_MMU
  176. #define CONFIG_SYS_MAPPED_RAM_BASE 0xc0000000
  177. #define CONFIG_BOOTCOMMAND "nand read 0xc0018000 0x60000 0x1c0000;" \
  178. "bootm 0xc0018000"
  179. #else
  180. #define CONFIG_SYS_MAPPED_RAM_BASE CONFIG_SYS_SDRAM_BASE
  181. #define CONFIG_BOOTCOMMAND "nand read 0x50018000 0x60000 0x1c0000;" \
  182. "bootm 0x50018000"
  183. #endif
  184. /* NAND U-Boot load and start address */
  185. #define CONFIG_SYS_UBOOT_BASE (CONFIG_SYS_MAPPED_RAM_BASE + 0x07e00000)
  186. #define CONFIG_ENV_OFFSET 0x0040000
  187. /* NAND configuration */
  188. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  189. #define CONFIG_SYS_NAND_BASE 0x70200010
  190. #define CONFIG_SYS_S3C_NAND_HWECC
  191. #define CONFIG_SYS_NAND_SKIP_BAD_DOT_I 1 /* ".i" read skips bad blocks */
  192. #define CONFIG_SYS_NAND_WP 1
  193. #define CONFIG_SYS_NAND_YAFFS_WRITE 1 /* support yaffs write */
  194. #define CONFIG_SYS_NAND_BBT_2NDPAGE 1 /* bad-block markers in 1st and 2nd pages */
  195. #define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_PHY_UBOOT_BASE /* NUB load-addr */
  196. #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST /* NUB start-addr */
  197. #define CONFIG_SYS_NAND_U_BOOT_OFFS (4 * 1024) /* Offset to RAM U-Boot image */
  198. #define CONFIG_SYS_NAND_U_BOOT_SIZE (252 * 1024) /* Size of RAM U-Boot image */
  199. /* NAND chip page size */
  200. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  201. /* NAND chip block size */
  202. #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
  203. /* NAND chip page per block count */
  204. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  205. /* Location of the bad-block label */
  206. #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
  207. /* Extra address cycle for > 128MiB */
  208. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  209. /* Size of the block protected by one OOB (Spare Area in Samsung terminology) */
  210. #define CONFIG_SYS_NAND_ECCSIZE CONFIG_SYS_NAND_PAGE_SIZE
  211. /* Number of ECC bytes per OOB - S3C6400 calculates 4 bytes ECC in 1-bit mode */
  212. #define CONFIG_SYS_NAND_ECCBYTES 4
  213. /* Number of ECC-blocks per NAND page */
  214. #define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / CONFIG_SYS_NAND_ECCSIZE)
  215. /* Size of a single OOB region */
  216. #define CONFIG_SYS_NAND_OOBSIZE 64
  217. /* Number of ECC bytes per page */
  218. #define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * CONFIG_SYS_NAND_ECCSTEPS)
  219. /* ECC byte positions */
  220. #define CONFIG_SYS_NAND_ECCPOS {40, 41, 42, 43, 44, 45, 46, 47, \
  221. 48, 49, 50, 51, 52, 53, 54, 55, \
  222. 56, 57, 58, 59, 60, 61, 62, 63}
  223. #define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */
  224. /* Boot configuration (define only one of next 3) */
  225. #define CONFIG_BOOT_NAND
  226. /* None of these are currently implemented. Left from the original Samsung
  227. * version for reference
  228. #define CONFIG_BOOT_NOR
  229. #define CONFIG_BOOT_MOVINAND
  230. #define CONFIG_BOOT_ONENAND
  231. */
  232. #define CONFIG_NAND
  233. #define CONFIG_NAND_S3C64XX
  234. /* Unimplemented or unsupported. See comment above.
  235. #define CONFIG_ONENAND
  236. #define CONFIG_MOVINAND
  237. */
  238. /* Settings as above boot configuration */
  239. #define CONFIG_ENV_IS_IN_NAND
  240. #define CONFIG_BOOTARGS "console=ttySAC,115200"
  241. #if !defined(CONFIG_ENABLE_MMU)
  242. #define CONFIG_CMD_USB 1
  243. #define CONFIG_USB_S3C64XX
  244. #define CONFIG_USB_OHCI_NEW 1
  245. #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x74300000
  246. #define CONFIG_SYS_USB_OHCI_SLOT_NAME "s3c6400"
  247. #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 3
  248. #define CONFIG_SYS_USB_OHCI_CPU_INIT 1
  249. #define CONFIG_USB_STORAGE 1
  250. #endif
  251. #define CONFIG_DOS_PARTITION 1
  252. #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_ENABLE_MMU)
  253. # error "usb_ohci.c is currently broken with MMU enabled."
  254. #endif
  255. #endif /* __CONFIG_H */