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