smdkc100.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. /*
  2. * (C) Copyright 2009 Samsung Electronics
  3. * Minkyu Kang <mk7.kang@samsung.com>
  4. * HeungJun Kim <riverful.kim@samsung.com>
  5. * Inki Dae <inki.dae@samsung.com>
  6. *
  7. * Configuation settings for the SAMSUNG SMDKC100 board.
  8. *
  9. * See file CREDITS for list of people who contributed to this
  10. * project.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of
  15. * the License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  25. * MA 02111-1307 USA
  26. */
  27. #ifndef __CONFIG_H
  28. #define __CONFIG_H
  29. /*
  30. * High Level Configuration Options
  31. * (easy to change)
  32. */
  33. #define CONFIG_ARMCORTEXA8 1 /* This is an ARM V7 CPU core */
  34. #define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
  35. #define CONFIG_S5PC1XX 1 /* which is in a S5PC1XX Family */
  36. #define CONFIG_S5PC100 1 /* which is in a S5PC100 */
  37. #define CONFIG_SMDKC100 1 /* working with SMDKC100 */
  38. #include <asm/arch/cpu.h> /* get chip and board defs */
  39. #define CONFIG_ARCH_CPU_INIT
  40. #define CONFIG_DISPLAY_CPUINFO
  41. #define CONFIG_DISPLAY_BOARDINFO
  42. #undef CONFIG_SKIP_RELOCATE_UBOOT
  43. #define CONFIG_L2_OFF
  44. /* input clock of PLL: SMDKC100 has 12MHz input clock */
  45. #define CONFIG_SYS_CLK_FREQ 12000000
  46. /* DRAM Base */
  47. #define CONFIG_SYS_SDRAM_BASE 0x30000000
  48. #define CONFIG_SETUP_MEMORY_TAGS
  49. #define CONFIG_CMDLINE_TAG
  50. #define CONFIG_INITRD_TAG
  51. #define CONFIG_CMDLINE_EDITING
  52. /*
  53. * Size of malloc() pool
  54. * 1MB = 0x100000, 0x100000 = 1024 * 1024
  55. */
  56. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (1 << 20))
  57. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes for */
  58. /* initial data */
  59. /*
  60. * select serial console configuration
  61. */
  62. #define CONFIG_SERIAL0 1 /* use SERIAL 0 on SMDKC100 */
  63. #define CONFIG_SERIAL_MULTI 1
  64. /* allow to overwrite serial and ethaddr */
  65. #define CONFIG_ENV_OVERWRITE
  66. #define CONFIG_BAUDRATE 115200
  67. /***********************************************************
  68. * Command definition
  69. ***********************************************************/
  70. #include <config_cmd_default.h>
  71. #undef CONFIG_CMD_FLASH
  72. #undef CONFIG_CMD_IMLS
  73. #undef CONFIG_CMD_NAND
  74. #undef CONFIG_CMD_NET
  75. #define CONFIG_CMD_CACHE
  76. #define CONFIG_CMD_REGINFO
  77. #define CONFIG_CMD_ONENAND
  78. #define CONFIG_CMD_ELF
  79. #define CONFIG_CMD_FAT
  80. #define CONFIG_CMD_MTDPARTS
  81. #define CONFIG_BOOTDELAY 3
  82. #define CONFIG_ZERO_BOOTDELAY_CHECK
  83. #define CONFIG_MTD_DEVICE
  84. #define CONFIG_MTD_PARTITIONS
  85. #define MTDIDS_DEFAULT "onenand0=s3c-onenand"
  86. #define MTDPARTS_DEFAULT "mtdparts=s3c-onenand:256k(bootloader)"\
  87. ",128k@0x40000(params)"\
  88. ",3m@0x60000(kernel)"\
  89. ",16m@0x360000(test)"\
  90. ",-(UBI)"
  91. #define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
  92. #define CONFIG_BOOTCOMMAND "run ubifsboot"
  93. #define CONFIG_RAMDISK_BOOT "root=/dev/ram0 rw rootfstype=ext2" \
  94. " console=ttySAC0,115200n8" \
  95. " mem=128M"
  96. #define CONFIG_COMMON_BOOT "console=ttySAC0,115200n8" \
  97. " mem=128M " \
  98. " " MTDPARTS_DEFAULT
  99. #define CONFIG_BOOTARGS "root=/dev/mtdblock5 ubi.mtd=4" \
  100. " rootfstype=cramfs " CONFIG_COMMON_BOOT
  101. #define CONFIG_UPDATEB "updateb=onenand erase 0x0 0x40000;" \
  102. " onenand write 0x32008000 0x0 0x40000\0"
  103. #define CONFIG_ENV_OVERWRITE
  104. #define CONFIG_EXTRA_ENV_SETTINGS \
  105. CONFIG_UPDATEB \
  106. "updatek=" \
  107. "onenand erase 0x60000 0x300000;" \
  108. "onenand write 0x31008000 0x60000 0x300000\0" \
  109. "updateu=" \
  110. "onenand erase block 147-4095;" \
  111. "onenand write 0x32000000 0x1260000 0x8C0000\0" \
  112. "bootk=" \
  113. "onenand read 0x30007FC0 0x60000 0x300000;" \
  114. "bootm 0x30007FC0\0" \
  115. "flashboot=" \
  116. "set bootargs root=/dev/mtdblock${bootblock} " \
  117. "rootfstype=${rootfstype} " \
  118. "ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT ";" \
  119. "run bootk\0" \
  120. "ubifsboot=" \
  121. "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
  122. " ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; " \
  123. "run bootk\0" \
  124. "boottrace=setenv opts initcall_debug; run bootcmd\0" \
  125. "android=" \
  126. "set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock} " \
  127. "rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; " \
  128. "run bootk\0" \
  129. "nfsboot=" \
  130. "set bootargs root=/dev/nfs ubi.mtd=${ubiblock} " \
  131. "nfsroot=${nfsroot},nolock " \
  132. "ip=${ipaddr}:${serverip}:${gatewayip}:" \
  133. "${netmask}:nowplus:usb0:off " CONFIG_COMMON_BOOT "; " \
  134. "run bootk\0" \
  135. "ramboot=" \
  136. "set bootargs " CONFIG_RAMDISK_BOOT \
  137. " initrd=0x33000000,8M ramdisk=8192\0" \
  138. "rootfstype=cramfs\0" \
  139. "mtdparts=" MTDPARTS_DEFAULT "\0" \
  140. "meminfo=mem=128M\0" \
  141. "nfsroot=/nfsroot/arm\0" \
  142. "bootblock=5\0" \
  143. "ubiblock=4\0" \
  144. "ubi=enabled"
  145. /*
  146. * Miscellaneous configurable options
  147. */
  148. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  149. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  150. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  151. #define CONFIG_SYS_PROMPT "SMDKC100 # "
  152. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  153. #define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
  154. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  155. /* Boot Argument Buffer Size */
  156. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  157. /* memtest works on */
  158. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
  159. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5e00000)
  160. #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
  161. #define CONFIG_SYS_HZ 1000
  162. /* valid baudrates */
  163. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  164. /*-----------------------------------------------------------------------
  165. * Stack sizes
  166. *
  167. * The stack sizes are set up in start.S using the settings below
  168. */
  169. #define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
  170. /* SMDKC100 has 1 banks of DRAM, we use only one in U-Boot */
  171. #define CONFIG_NR_DRAM_BANKS 1
  172. #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* SDRAM Bank #1 */
  173. #define PHYS_SDRAM_1_SIZE (128 << 20) /* 0x8000000, 128 MB Bank #1 */
  174. #define CONFIG_SYS_MONITOR_BASE 0x00000000
  175. /*-----------------------------------------------------------------------
  176. * FLASH and environment organization
  177. */
  178. #define CONFIG_SYS_NO_FLASH 1
  179. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 KiB */
  180. #define CONFIG_IDENT_STRING " for SMDKC100"
  181. #if !defined(CONFIG_NAND_SPL) && (TEXT_BASE >= 0xc0000000)
  182. #define CONFIG_ENABLE_MMU
  183. #endif
  184. #ifdef CONFIG_ENABLE_MMU
  185. #define CONFIG_SYS_MAPPED_RAM_BASE 0xc0000000
  186. #else
  187. #define CONFIG_SYS_MAPPED_RAM_BASE CONFIG_SYS_SDRAM_BASE
  188. #endif
  189. /*-----------------------------------------------------------------------
  190. * Boot configuration
  191. */
  192. #define CONFIG_ENV_IS_IN_ONENAND 1
  193. #define CONFIG_ENV_SIZE (128 << 10) /* 128KiB, 0x20000 */
  194. #define CONFIG_ENV_ADDR (256 << 10) /* 256KiB, 0x40000 */
  195. #define CONFIG_ENV_OFFSET (256 << 10) /* 256KiB, 0x40000 */
  196. #define CONFIG_USE_ONENAND_BOARD_INIT
  197. #define CONFIG_SAMSUNG_ONENAND 1
  198. #define CONFIG_SYS_ONENAND_BASE 0xE7100000
  199. #define CONFIG_DOS_PARTITION 1
  200. #endif /* __CONFIG_H */