blob: fd9f96d462fd753aa032f660958b870e60f25ff7 [file] [log] [blame]
Minkyu Kang29325572009-10-01 17:20:40 +09001/*
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
28#ifndef __CONFIG_H
29#define __CONFIG_H
30
31/*
32 * High Level Configuration Options
33 * (easy to change)
34 */
Minkyu Kang29325572009-10-01 17:20:40 +090035#define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
Minkyu Kang485feb62010-08-23 19:52:03 +090036#define CONFIG_S5P 1 /* which is in a S5P Family */
Minkyu Kang29325572009-10-01 17:20:40 +090037#define CONFIG_S5PC100 1 /* which is in a S5PC100 */
38#define CONFIG_SMDKC100 1 /* working with SMDKC100 */
39
40#include <asm/arch/cpu.h> /* get chip and board defs */
41
42#define CONFIG_ARCH_CPU_INIT
43
44#define CONFIG_DISPLAY_CPUINFO
45#define CONFIG_DISPLAY_BOARDINFO
46
Minkyu Kang29325572009-10-01 17:20:40 +090047/* input clock of PLL: SMDKC100 has 12MHz input clock */
48#define CONFIG_SYS_CLK_FREQ 12000000
49
50/* DRAM Base */
51#define CONFIG_SYS_SDRAM_BASE 0x30000000
52
53#define CONFIG_SETUP_MEMORY_TAGS
54#define CONFIG_CMDLINE_TAG
55#define CONFIG_INITRD_TAG
56#define CONFIG_CMDLINE_EDITING
57
58/*
59 * Size of malloc() pool
60 * 1MB = 0x100000, 0x100000 = 1024 * 1024
61 */
62#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (1 << 20))
Minkyu Kang29325572009-10-01 17:20:40 +090063/*
64 * select serial console configuration
65 */
66#define CONFIG_SERIAL0 1 /* use SERIAL 0 on SMDKC100 */
67#define CONFIG_SERIAL_MULTI 1
68
Minkyu Kang852e9b72011-03-10 20:09:43 +090069/* PWM */
70#define CONFIG_PWM 1
71
Minkyu Kang29325572009-10-01 17:20:40 +090072/* allow to overwrite serial and ethaddr */
73#define CONFIG_ENV_OVERWRITE
74#define CONFIG_BAUDRATE 115200
75
76/***********************************************************
77 * Command definition
78 ***********************************************************/
79#include <config_cmd_default.h>
80
81#undef CONFIG_CMD_FLASH
82#undef CONFIG_CMD_IMLS
83#undef CONFIG_CMD_NAND
Minkyu Kang29325572009-10-01 17:20:40 +090084
85#define CONFIG_CMD_CACHE
86#define CONFIG_CMD_REGINFO
87#define CONFIG_CMD_ONENAND
88#define CONFIG_CMD_ELF
89#define CONFIG_CMD_FAT
90#define CONFIG_CMD_MTDPARTS
91
92#define CONFIG_BOOTDELAY 3
93
94#define CONFIG_ZERO_BOOTDELAY_CHECK
95
96#define CONFIG_MTD_DEVICE
97#define CONFIG_MTD_PARTITIONS
98
99#define MTDIDS_DEFAULT "onenand0=s3c-onenand"
100#define MTDPARTS_DEFAULT "mtdparts=s3c-onenand:256k(bootloader)"\
101 ",128k@0x40000(params)"\
102 ",3m@0x60000(kernel)"\
103 ",16m@0x360000(test)"\
104 ",-(UBI)"
105
106#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
107
108#define CONFIG_BOOTCOMMAND "run ubifsboot"
109
110#define CONFIG_RAMDISK_BOOT "root=/dev/ram0 rw rootfstype=ext2" \
111 " console=ttySAC0,115200n8" \
112 " mem=128M"
113
114#define CONFIG_COMMON_BOOT "console=ttySAC0,115200n8" \
115 " mem=128M " \
116 " " MTDPARTS_DEFAULT
117
118#define CONFIG_BOOTARGS "root=/dev/mtdblock5 ubi.mtd=4" \
119 " rootfstype=cramfs " CONFIG_COMMON_BOOT
120
121#define CONFIG_UPDATEB "updateb=onenand erase 0x0 0x40000;" \
122 " onenand write 0x32008000 0x0 0x40000\0"
123
124#define CONFIG_ENV_OVERWRITE
125#define CONFIG_EXTRA_ENV_SETTINGS \
126 CONFIG_UPDATEB \
127 "updatek=" \
128 "onenand erase 0x60000 0x300000;" \
129 "onenand write 0x31008000 0x60000 0x300000\0" \
130 "updateu=" \
131 "onenand erase block 147-4095;" \
132 "onenand write 0x32000000 0x1260000 0x8C0000\0" \
133 "bootk=" \
134 "onenand read 0x30007FC0 0x60000 0x300000;" \
135 "bootm 0x30007FC0\0" \
136 "flashboot=" \
137 "set bootargs root=/dev/mtdblock${bootblock} " \
138 "rootfstype=${rootfstype} " \
139 "ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT ";" \
140 "run bootk\0" \
141 "ubifsboot=" \
142 "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
143 " ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; " \
144 "run bootk\0" \
145 "boottrace=setenv opts initcall_debug; run bootcmd\0" \
146 "android=" \
147 "set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock} " \
148 "rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; " \
149 "run bootk\0" \
150 "nfsboot=" \
151 "set bootargs root=/dev/nfs ubi.mtd=${ubiblock} " \
152 "nfsroot=${nfsroot},nolock " \
153 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
154 "${netmask}:nowplus:usb0:off " CONFIG_COMMON_BOOT "; " \
155 "run bootk\0" \
156 "ramboot=" \
157 "set bootargs " CONFIG_RAMDISK_BOOT \
158 " initrd=0x33000000,8M ramdisk=8192\0" \
159 "rootfstype=cramfs\0" \
160 "mtdparts=" MTDPARTS_DEFAULT "\0" \
161 "meminfo=mem=128M\0" \
162 "nfsroot=/nfsroot/arm\0" \
163 "bootblock=5\0" \
164 "ubiblock=4\0" \
165 "ubi=enabled"
166
167/*
168 * Miscellaneous configurable options
169 */
170#define CONFIG_SYS_LONGHELP /* undef to save memory */
171#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
Minkyu Kang29325572009-10-01 17:20:40 +0900172#define CONFIG_SYS_PROMPT "SMDKC100 # "
173#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
174#define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
175#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
176/* Boot Argument Buffer Size */
177#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
178/* memtest works on */
179#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
180#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5e00000)
181#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
182
183#define CONFIG_SYS_HZ 1000
184
Minkyu Kang29325572009-10-01 17:20:40 +0900185/*-----------------------------------------------------------------------
186 * Stack sizes
187 *
188 * The stack sizes are set up in start.S using the settings below
189 */
190#define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
191
192/* SMDKC100 has 1 banks of DRAM, we use only one in U-Boot */
193#define CONFIG_NR_DRAM_BANKS 1
194#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* SDRAM Bank #1 */
195#define PHYS_SDRAM_1_SIZE (128 << 20) /* 0x8000000, 128 MB Bank #1 */
196
197#define CONFIG_SYS_MONITOR_BASE 0x00000000
198
199/*-----------------------------------------------------------------------
200 * FLASH and environment organization
201 */
202#define CONFIG_SYS_NO_FLASH 1
203
204#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 KiB */
205#define CONFIG_IDENT_STRING " for SMDKC100"
206
Wolfgang Denk0708bc62010-10-07 21:51:12 +0200207#if !defined(CONFIG_NAND_SPL) && (CONFIG_SYS_TEXT_BASE >= 0xc0000000)
Minkyu Kang29325572009-10-01 17:20:40 +0900208#define CONFIG_ENABLE_MMU
209#endif
210
211#ifdef CONFIG_ENABLE_MMU
212#define CONFIG_SYS_MAPPED_RAM_BASE 0xc0000000
213#else
214#define CONFIG_SYS_MAPPED_RAM_BASE CONFIG_SYS_SDRAM_BASE
215#endif
216
217/*-----------------------------------------------------------------------
218 * Boot configuration
219 */
220#define CONFIG_ENV_IS_IN_ONENAND 1
221#define CONFIG_ENV_SIZE (128 << 10) /* 128KiB, 0x20000 */
222#define CONFIG_ENV_ADDR (256 << 10) /* 256KiB, 0x40000 */
223#define CONFIG_ENV_OFFSET (256 << 10) /* 256KiB, 0x40000 */
224
225#define CONFIG_USE_ONENAND_BOARD_INIT
226#define CONFIG_SAMSUNG_ONENAND 1
227#define CONFIG_SYS_ONENAND_BASE 0xE7100000
228
229#define CONFIG_DOS_PARTITION 1
230
Minkyu Kang5dd10542010-11-22 20:26:46 +0900231#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
232
Naveen Krishna CH45101ce2010-03-05 17:16:05 +0900233/*
234 * Ethernet Contoller driver
235 */
236#ifdef CONFIG_CMD_NET
Naveen Krishna CH45101ce2010-03-05 17:16:05 +0900237#define CONFIG_SMC911X 1 /* we have a SMC9115 on-board */
238#define CONFIG_SMC911X_16_BIT 1 /* SMC911X_16_BIT Mode */
239#define CONFIG_SMC911X_BASE 0x98800300 /* SMC911X Drive Base */
240#define CONFIG_ENV_SROM_BANK 3 /* Select SROM Bank-3 for Ethernet*/
241#endif /* CONFIG_CMD_NET */
242
Minkyu Kang29325572009-10-01 17:20:40 +0900243#endif /* __CONFIG_H */