2 * Copyright (C) 2009 Samsung Electronics
3 * Minkyu Kang <mk7.kang@samsung.com>
5 * Configuation settings for the SAMSUNG Universal (s5pc100) board.
7 * See file CREDITS for list of people who contributed to this
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 #include <asm/sizes.h>
31 * High Level Configuration Options
34 #define CONFIG_ARMCORTEXA8 1 /* This is an ARM V7 CPU core */
35 #define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
36 #define CONFIG_S5PC1XX 1 /* which is in a S5PC1XX Family */
37 #define CONFIG_S5PC100 1 /* which is in a S5PC100 */
38 #define CONFIG_S5PC110 1 /* which is in a S5PC110 */
39 #define CONFIG_UNIVERSAL 1 /* working with Universal */
41 #include <asm/arch/cpu.h> /* get chip and board defs */
43 #define CONFIG_ARCH_CPU_INIT
45 #define CONFIG_SYS_SDRAM_BASE 0x30000000
47 /* input clock of PLL: Universal has 12MHz/24MHz input clock at S5PC100/C110 */
48 #define CONFIG_SYS_CLK_FREQ_C100 12000000
49 #define CONFIG_SYS_CLK_FREQ_C110 24000000
51 #define CONFIG_MEMORY_UPPER_CODE
53 #define CONFIG_SETUP_MEMORY_TAGS
54 #define CONFIG_CMDLINE_TAG
55 #define CONFIG_INITRD_TAG
56 #define CONFIG_REVISION_TAG
59 #define V_OSCK 26000000 /* Clock output from T2 */
60 #define V_SCLK (V_OSCK >> 1)
63 * Architecture magic and machine type
65 #define MACH_TYPE 3000
67 #define CONFIG_DISPLAY_CPUINFO
69 #undef CONFIG_SKIP_RELOCATE_UBOOT
72 * Size of malloc() pool
74 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 1024 * 1024)
75 #define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes for initial data */
78 * select serial console configuration
80 #define CONFIG_SERIAL_MULTI 1
81 #define CONFIG_SERIAL2 1 /* we use SERIAL 2 on S5PC100 */
84 #define CONFIG_GENERIC_MMC 1
86 #define CONFIG_S5PC1XX_MMC 1
87 #define CONFIG_MMC_INDEX 0
89 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
90 #ifdef CONFIG_SYS_HUSH_PARSER
91 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
94 #define CONFIG_CMDLINE_EDITING
96 /* allow to overwrite serial and ethaddr */
97 #define CONFIG_ENV_OVERWRITE
99 #define CONFIG_BAUDRATE 115200
101 /* It should define before config_cmd_default.h */
102 #define CONFIG_SYS_NO_FLASH 1
103 /***********************************************************
105 ***********************************************************/
106 #include <config_cmd_default.h>
108 #undef CONFIG_CMD_LOADB
109 #undef CONFIG_CMD_LOADS
110 #undef CONFIG_CMD_BOOTD
111 #undef CONFIG_CMD_FPGA
112 #undef CONFIG_CMD_XIMG
113 #undef CONFIG_CMD_NAND
114 #undef CONFIG_CMD_IMLS
115 #undef CONFIG_CMD_FLASH
116 #undef CONFIG_CMD_IMLS
117 #undef CONFIG_CMD_NET
118 #define CONFIG_CMD_CACHE
119 #define CONFIG_CMD_REGINFO
120 #define CONFIG_CMD_ONENAND
121 #define CONFIG_CMD_MTDPARTS
122 #define CONFIG_CMD_I2C
123 #define CONFIG_CMD_MMC
124 #define CONFIG_CMD_FAT
126 #define CONFIG_SYS_64BIT_VSPRINTF 1
128 #define CONFIG_BOOTDELAY 1
130 #define CONFIG_ZERO_BOOTDELAY_CHECK
132 #define CONFIG_NETMASK 255.255.255.0
133 #define CONFIG_IPADDR 192.168.129.3
134 #define CONFIG_SERVERIP 192.168.129.1
135 #define CONFIG_GATEWAY 192.168.129.1
136 #define CONFIG_ETHADDR 00:0E:99:34:10:00
138 #define CONFIG_MTD_DEVICE
139 #define CONFIG_MTD_PARTITIONS
141 /* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */
142 #define MTDIDS_DEFAULT "onenand0=samsung-onenand"
143 #define MTDPARTS_DEFAULT "mtdparts=samsung-onenand:256k(bootloader)"\
149 #define MTDPARTS_DEFAULT_4KB "mtdparts=samsung-onenand:256k(bootloader)"\
155 #define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
157 #define CONFIG_BOOTCOMMAND "run ubifsboot"
159 #define CONFIG_RAMDISK_BOOT "root=/dev/ram0 rw rootfstype=ext2" \
160 " console=ttySAC2,115200n8" \
163 #define CONFIG_COMMON_BOOT "console=ttySAC2,115200n8" \
167 #define CONFIG_BOOTARGS "root=/dev/mtdblock5 ubi.mtd=4" \
168 " rootfstype=cramfs " CONFIG_COMMON_BOOT
170 #define CONFIG_UPDATEB "updateb=onenand erase 0x0 0x40000;" \
171 " onenand write 0x32008000 0x0 0x40000\0"
173 #define CONFIG_ENV_OVERWRITE
174 #define CONFIG_EXTRA_ENV_SETTINGS \
176 "updatek=onenand erase 0x80000 0x300000;" \
177 " onenand write 0x31008000 0x80000 0x300000\0" \
178 "updateu=onenand erase 0x01560000 0x1eaa0000;" \
179 " onenand write 0x32000000 0x1260000 0x8C0000\0" \
180 "bootk=onenand read 0x30007FC0 0x80000 0x300000;" \
181 " bootm 0x30007FC0\0" \
182 "flashboot=set bootargs root=/dev/mtdblock${bootblock}" \
183 " rootfstype=${rootfstype}" \
184 " ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; run bootk\0" \
185 "ubifsboot=set bootargs root=ubi0!rootfs rootfstype=ubifs" \
186 " ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; run bootk\0" \
187 "boottrace=setenv opts initcall_debug; run bootcmd\0" \
188 "android=set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock}" \
189 " rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; run bootk\0" \
190 "nfsboot=set bootargs root=/dev/nfs ubi.mtd=${ubiblock}" \
191 " nfsroot=${nfsroot},nolock ip=${ipaddr}:${serverip}:${gatewayip}:" \
192 "${netmask}:generic:usb0:off " CONFIG_COMMON_BOOT "; run bootk\0" \
193 "ramboot=set bootargs " CONFIG_RAMDISK_BOOT \
194 " initrd=0x33000000,8M ramdisk=8192\0" \
196 "rootfstype=cramfs\0" \
197 "mtdparts=" MTDPARTS_DEFAULT "\0" \
198 "meminfo=mem=80M mem=128M@0x40000000\0" \
199 "nfsroot=/nfsroot/arm\0" \
205 * Miscellaneous configurable options
207 #define CONFIG_SYS_LONGHELP /* undef to save memory */
208 #define CONFIG_SYS_PROMPT "Universal # " /* Monitor Command Prompt */
209 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
210 #define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
211 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
212 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
214 #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE /* memtest works on */
215 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5000000)
217 #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x4800000)
219 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
220 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
221 #define CONFIG_SYS_HZ 1000
223 /* valid baudrates */
224 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
226 /*-----------------------------------------------------------------------
229 * The stack sizes are set up in start.S using the settings below
231 #define CONFIG_STACKSIZE 0x40000 /* regular stack 256KB */
233 /*******************************
234 Support Clock Settings(APLL)
235 *******************************
237 -------------------------------
244 *******************************/
246 #define CONFIG_CLK_667_166_83
247 /*#define CONFIG_CLK_666_166_66*/
248 /*#define CONFIG_CLK_600_150_75*/
249 /*#define CONFIG_CLK_533_133_66*/
250 /*#define CONFIG_CLK_500_166_66*/
251 /*#define CONFIG_CLK_467_117_59*/
252 /*#define CONFIG_CLK_400_100_50*/
254 /* Universal has 2 banks of DRAM, but swap the bank */
255 #define CONFIG_NR_DRAM_BANKS 2
256 #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* OneDRAM Bank #0 */
257 #define PHYS_SDRAM_1_SIZE 0x05000000 /* 80 MB in Bank #0 */
258 #define S5PC100_PHYS_SDRAM_2 0x38000000 /* mDDR DMC0 Bank #1 */
259 #define S5PC110_PHYS_SDRAM_2 0x40000000 /* mDDR DMC1 Bank #0 */
260 #define PHYS_SDRAM_2_SIZE 0x08000000 /* 128 MB in Bank #1 */
263 #define CONFIG_SYS_MONITOR_BASE 0x00000000
265 /*-----------------------------------------------------------------------
266 * FLASH and environment organization
269 #define CONFIG_SYS_MONITOR_LEN SZ_256K /* Reserve 2 sectors */
271 /* OneNAND IPL uses 8KiB */
272 #define CONFIG_ONENAND_START_PAGE 4
274 #define CONFIG_ENV_IS_IN_ONENAND 1
275 #define CONFIG_ENV_SIZE 0x20000
276 #define CONFIG_ENV_ADDR 0x40000
277 #define CONFIG_ENV_OFFSET 0x40000
279 #define CONFIG_USE_ONENAND_BOARD_INIT
280 #define CONFIG_SAMSUNG_ONENAND 1
281 #define CONFIG_SYS_ONENAND_BASE 0xB0000000
283 #define CONFIG_DOS_PARTITION 1
285 #define CONFIG_MISC_INIT_R
289 #define CONFIG_DRIVER_S5PC1XX_I2C
290 #define CONFIG_HARD_I2C 1
291 #define CONFIG_SYS_I2C_SPEED 50000
292 #define CONFIG_SYS_I2C_SLAVE 0xFE
293 #define CONFIG_SYS_I2C_0 1
295 #include <i2c-gpio.h>
296 #define CONFIG_SOFT_I2C 1
297 #define CONFIG_SYS_I2C_INIT_BOARD
298 #define CONFIG_SYS_I2C_SPEED 50000
302 #define CONFIG_CMD_USBDOWN
303 #define CONFIG_SAMSUNG_USB
304 #define CONFIG_OTG_CLK_OSCC
305 #define CONFIG_SYS_DOWN_ADDR CONFIG_SYS_SDRAM_BASE
306 #define CONFIG_RAMDISK_ADDR (CONFIG_SYS_SDRAM_BASE + 0x03000000)
309 #if 1 /* For LCD test */
311 #define CONFIG_S5PC1XXFB 1
314 #endif /* __CONFIG_H */