xref: /rk3399_rockchip-uboot/include/configs/smdkc100.h (revision 14d0a02a168b36e87665b8d7f42fa3e88263d26d)
18bc4ee9eSMinkyu Kang /*
28bc4ee9eSMinkyu Kang  * (C) Copyright 2009 Samsung Electronics
38bc4ee9eSMinkyu Kang  * Minkyu Kang <mk7.kang@samsung.com>
48bc4ee9eSMinkyu Kang  * HeungJun Kim <riverful.kim@samsung.com>
58bc4ee9eSMinkyu Kang  * Inki Dae <inki.dae@samsung.com>
68bc4ee9eSMinkyu Kang  *
78bc4ee9eSMinkyu Kang  * Configuation settings for the SAMSUNG SMDKC100 board.
88bc4ee9eSMinkyu Kang  *
98bc4ee9eSMinkyu Kang  * See file CREDITS for list of people who contributed to this
108bc4ee9eSMinkyu Kang  * project.
118bc4ee9eSMinkyu Kang  *
128bc4ee9eSMinkyu Kang  * This program is free software; you can redistribute it and/or
138bc4ee9eSMinkyu Kang  * modify it under the terms of the GNU General Public License as
148bc4ee9eSMinkyu Kang  * published by the Free Software Foundation; either version 2 of
158bc4ee9eSMinkyu Kang  * the License, or (at your option) any later version.
168bc4ee9eSMinkyu Kang  *
178bc4ee9eSMinkyu Kang  * This program is distributed in the hope that it will be useful,
188bc4ee9eSMinkyu Kang  * but WITHOUT ANY WARRANTY; without even the implied warranty of
198bc4ee9eSMinkyu Kang  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
208bc4ee9eSMinkyu Kang  * GNU General Public License for more details.
218bc4ee9eSMinkyu Kang  *
228bc4ee9eSMinkyu Kang  * You should have received a copy of the GNU General Public License
238bc4ee9eSMinkyu Kang  * along with this program; if not, write to the Free Software
248bc4ee9eSMinkyu Kang  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
258bc4ee9eSMinkyu Kang  * MA 02111-1307 USA
268bc4ee9eSMinkyu Kang  */
278bc4ee9eSMinkyu Kang 
288bc4ee9eSMinkyu Kang #ifndef __CONFIG_H
298bc4ee9eSMinkyu Kang #define __CONFIG_H
308bc4ee9eSMinkyu Kang 
318bc4ee9eSMinkyu Kang /*
328bc4ee9eSMinkyu Kang  * High Level Configuration Options
338bc4ee9eSMinkyu Kang  * (easy to change)
348bc4ee9eSMinkyu Kang  */
35f56348afSSteve Sakoman #define CONFIG_ARMV7		1	/* This is an ARM V7 CPU core */
368bc4ee9eSMinkyu Kang #define CONFIG_SAMSUNG		1	/* in a SAMSUNG core */
37889a275dSMinkyu Kang #define CONFIG_S5P		1	/* which is in a S5P Family */
388bc4ee9eSMinkyu Kang #define CONFIG_S5PC100		1	/* which is in a S5PC100 */
398bc4ee9eSMinkyu Kang #define CONFIG_SMDKC100		1	/* working with SMDKC100 */
408bc4ee9eSMinkyu Kang 
418bc4ee9eSMinkyu Kang #include <asm/arch/cpu.h>		/* get chip and board defs */
428bc4ee9eSMinkyu Kang 
438bc4ee9eSMinkyu Kang #define CONFIG_ARCH_CPU_INIT
448bc4ee9eSMinkyu Kang 
458bc4ee9eSMinkyu Kang #define CONFIG_DISPLAY_CPUINFO
468bc4ee9eSMinkyu Kang #define CONFIG_DISPLAY_BOARDINFO
478bc4ee9eSMinkyu Kang 
488bc4ee9eSMinkyu Kang #undef CONFIG_SKIP_RELOCATE_UBOOT
498bc4ee9eSMinkyu Kang 
508bc4ee9eSMinkyu Kang /* input clock of PLL: SMDKC100 has 12MHz input clock */
518bc4ee9eSMinkyu Kang #define CONFIG_SYS_CLK_FREQ		12000000
528bc4ee9eSMinkyu Kang 
538bc4ee9eSMinkyu Kang /* DRAM Base */
548bc4ee9eSMinkyu Kang #define CONFIG_SYS_SDRAM_BASE		0x30000000
558bc4ee9eSMinkyu Kang 
568bc4ee9eSMinkyu Kang #define CONFIG_SETUP_MEMORY_TAGS
578bc4ee9eSMinkyu Kang #define CONFIG_CMDLINE_TAG
588bc4ee9eSMinkyu Kang #define CONFIG_INITRD_TAG
598bc4ee9eSMinkyu Kang #define CONFIG_CMDLINE_EDITING
608bc4ee9eSMinkyu Kang 
618bc4ee9eSMinkyu Kang /*
628bc4ee9eSMinkyu Kang  * Size of malloc() pool
638bc4ee9eSMinkyu Kang  * 1MB = 0x100000, 0x100000 = 1024 * 1024
648bc4ee9eSMinkyu Kang  */
658bc4ee9eSMinkyu Kang #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (1 << 20))
668bc4ee9eSMinkyu Kang #define CONFIG_SYS_GBL_DATA_SIZE	128	/* size in bytes for */
678bc4ee9eSMinkyu Kang 						/* initial data */
688bc4ee9eSMinkyu Kang /*
698bc4ee9eSMinkyu Kang  * select serial console configuration
708bc4ee9eSMinkyu Kang  */
718bc4ee9eSMinkyu Kang #define CONFIG_SERIAL0			1	/* use SERIAL 0 on SMDKC100 */
728bc4ee9eSMinkyu Kang #define CONFIG_SERIAL_MULTI		1
738bc4ee9eSMinkyu Kang 
748bc4ee9eSMinkyu Kang /* allow to overwrite serial and ethaddr */
758bc4ee9eSMinkyu Kang #define CONFIG_ENV_OVERWRITE
768bc4ee9eSMinkyu Kang #define CONFIG_BAUDRATE			115200
778bc4ee9eSMinkyu Kang 
788bc4ee9eSMinkyu Kang /***********************************************************
798bc4ee9eSMinkyu Kang  * Command definition
808bc4ee9eSMinkyu Kang  ***********************************************************/
818bc4ee9eSMinkyu Kang #include <config_cmd_default.h>
828bc4ee9eSMinkyu Kang 
838bc4ee9eSMinkyu Kang #undef CONFIG_CMD_FLASH
848bc4ee9eSMinkyu Kang #undef CONFIG_CMD_IMLS
858bc4ee9eSMinkyu Kang #undef CONFIG_CMD_NAND
868bc4ee9eSMinkyu Kang 
878bc4ee9eSMinkyu Kang #define CONFIG_CMD_CACHE
888bc4ee9eSMinkyu Kang #define CONFIG_CMD_REGINFO
898bc4ee9eSMinkyu Kang #define CONFIG_CMD_ONENAND
908bc4ee9eSMinkyu Kang #define CONFIG_CMD_ELF
918bc4ee9eSMinkyu Kang #define CONFIG_CMD_FAT
928bc4ee9eSMinkyu Kang #define CONFIG_CMD_MTDPARTS
938bc4ee9eSMinkyu Kang 
948bc4ee9eSMinkyu Kang #define CONFIG_BOOTDELAY	3
958bc4ee9eSMinkyu Kang 
968bc4ee9eSMinkyu Kang #define CONFIG_ZERO_BOOTDELAY_CHECK
978bc4ee9eSMinkyu Kang 
988bc4ee9eSMinkyu Kang #define CONFIG_MTD_DEVICE
998bc4ee9eSMinkyu Kang #define CONFIG_MTD_PARTITIONS
1008bc4ee9eSMinkyu Kang 
1018bc4ee9eSMinkyu Kang #define MTDIDS_DEFAULT		"onenand0=s3c-onenand"
1028bc4ee9eSMinkyu Kang #define MTDPARTS_DEFAULT	"mtdparts=s3c-onenand:256k(bootloader)"\
1038bc4ee9eSMinkyu Kang 				",128k@0x40000(params)"\
1048bc4ee9eSMinkyu Kang 				",3m@0x60000(kernel)"\
1058bc4ee9eSMinkyu Kang 				",16m@0x360000(test)"\
1068bc4ee9eSMinkyu Kang 				",-(UBI)"
1078bc4ee9eSMinkyu Kang 
1088bc4ee9eSMinkyu Kang #define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
1098bc4ee9eSMinkyu Kang 
1108bc4ee9eSMinkyu Kang #define CONFIG_BOOTCOMMAND	"run ubifsboot"
1118bc4ee9eSMinkyu Kang 
1128bc4ee9eSMinkyu Kang #define CONFIG_RAMDISK_BOOT	"root=/dev/ram0 rw rootfstype=ext2" \
1138bc4ee9eSMinkyu Kang 				" console=ttySAC0,115200n8" \
1148bc4ee9eSMinkyu Kang 				" mem=128M"
1158bc4ee9eSMinkyu Kang 
1168bc4ee9eSMinkyu Kang #define CONFIG_COMMON_BOOT	"console=ttySAC0,115200n8" \
1178bc4ee9eSMinkyu Kang 				" mem=128M " \
1188bc4ee9eSMinkyu Kang 				" " MTDPARTS_DEFAULT
1198bc4ee9eSMinkyu Kang 
1208bc4ee9eSMinkyu Kang #define CONFIG_BOOTARGS	"root=/dev/mtdblock5 ubi.mtd=4" \
1218bc4ee9eSMinkyu Kang 			" rootfstype=cramfs " CONFIG_COMMON_BOOT
1228bc4ee9eSMinkyu Kang 
1238bc4ee9eSMinkyu Kang #define CONFIG_UPDATEB	"updateb=onenand erase 0x0 0x40000;" \
1248bc4ee9eSMinkyu Kang 			" onenand write 0x32008000 0x0 0x40000\0"
1258bc4ee9eSMinkyu Kang 
1268bc4ee9eSMinkyu Kang #define CONFIG_ENV_OVERWRITE
1278bc4ee9eSMinkyu Kang #define CONFIG_EXTRA_ENV_SETTINGS					\
1288bc4ee9eSMinkyu Kang 	CONFIG_UPDATEB \
1298bc4ee9eSMinkyu Kang 	"updatek=" \
1308bc4ee9eSMinkyu Kang 		"onenand erase 0x60000 0x300000;" \
1318bc4ee9eSMinkyu Kang 		"onenand write 0x31008000 0x60000 0x300000\0" \
1328bc4ee9eSMinkyu Kang 	"updateu=" \
1338bc4ee9eSMinkyu Kang 		"onenand erase block 147-4095;" \
1348bc4ee9eSMinkyu Kang 		"onenand write 0x32000000 0x1260000 0x8C0000\0" \
1358bc4ee9eSMinkyu Kang 	"bootk=" \
1368bc4ee9eSMinkyu Kang 		"onenand read 0x30007FC0 0x60000 0x300000;" \
1378bc4ee9eSMinkyu Kang 		"bootm 0x30007FC0\0" \
1388bc4ee9eSMinkyu Kang 	"flashboot=" \
1398bc4ee9eSMinkyu Kang 		"set bootargs root=/dev/mtdblock${bootblock} " \
1408bc4ee9eSMinkyu Kang 		"rootfstype=${rootfstype} " \
1418bc4ee9eSMinkyu Kang 		"ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT ";" \
1428bc4ee9eSMinkyu Kang 		"run bootk\0" \
1438bc4ee9eSMinkyu Kang 	"ubifsboot=" \
1448bc4ee9eSMinkyu Kang 		"set bootargs root=ubi0!rootfs rootfstype=ubifs " \
1458bc4ee9eSMinkyu Kang 		" ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; " \
1468bc4ee9eSMinkyu Kang 		"run bootk\0" \
1478bc4ee9eSMinkyu Kang 	"boottrace=setenv opts initcall_debug; run bootcmd\0" \
1488bc4ee9eSMinkyu Kang 	"android=" \
1498bc4ee9eSMinkyu Kang 		"set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock} " \
1508bc4ee9eSMinkyu Kang 		"rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; " \
1518bc4ee9eSMinkyu Kang 		"run bootk\0" \
1528bc4ee9eSMinkyu Kang 	"nfsboot=" \
1538bc4ee9eSMinkyu Kang 		"set bootargs root=/dev/nfs ubi.mtd=${ubiblock} " \
1548bc4ee9eSMinkyu Kang 		"nfsroot=${nfsroot},nolock " \
1558bc4ee9eSMinkyu Kang 		"ip=${ipaddr}:${serverip}:${gatewayip}:" \
1568bc4ee9eSMinkyu Kang 		"${netmask}:nowplus:usb0:off " CONFIG_COMMON_BOOT "; " \
1578bc4ee9eSMinkyu Kang 		"run bootk\0" \
1588bc4ee9eSMinkyu Kang 	"ramboot=" \
1598bc4ee9eSMinkyu Kang 		"set bootargs " CONFIG_RAMDISK_BOOT \
1608bc4ee9eSMinkyu Kang 		" initrd=0x33000000,8M ramdisk=8192\0" \
1618bc4ee9eSMinkyu Kang 	"rootfstype=cramfs\0" \
1628bc4ee9eSMinkyu Kang 	"mtdparts=" MTDPARTS_DEFAULT "\0" \
1638bc4ee9eSMinkyu Kang 	"meminfo=mem=128M\0" \
1648bc4ee9eSMinkyu Kang 	"nfsroot=/nfsroot/arm\0" \
1658bc4ee9eSMinkyu Kang 	"bootblock=5\0" \
1668bc4ee9eSMinkyu Kang 	"ubiblock=4\0" \
1678bc4ee9eSMinkyu Kang 	"ubi=enabled"
1688bc4ee9eSMinkyu Kang 
1698bc4ee9eSMinkyu Kang /*
1708bc4ee9eSMinkyu Kang  * Miscellaneous configurable options
1718bc4ee9eSMinkyu Kang  */
1728bc4ee9eSMinkyu Kang #define CONFIG_SYS_LONGHELP		/* undef to save memory */
1738bc4ee9eSMinkyu Kang #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser	*/
1748bc4ee9eSMinkyu Kang #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
1758bc4ee9eSMinkyu Kang #define CONFIG_SYS_PROMPT		"SMDKC100 # "
1768bc4ee9eSMinkyu Kang #define CONFIG_SYS_CBSIZE	256	/* Console I/O Buffer Size */
1778bc4ee9eSMinkyu Kang #define CONFIG_SYS_PBSIZE	384	/* Print Buffer Size */
1788bc4ee9eSMinkyu Kang #define CONFIG_SYS_MAXARGS	16	/* max number of command args */
1798bc4ee9eSMinkyu Kang /* Boot Argument Buffer Size */
1808bc4ee9eSMinkyu Kang #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
1818bc4ee9eSMinkyu Kang /* memtest works on */
1828bc4ee9eSMinkyu Kang #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
1838bc4ee9eSMinkyu Kang #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x5e00000)
1848bc4ee9eSMinkyu Kang #define CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_SDRAM_BASE
1858bc4ee9eSMinkyu Kang 
1868bc4ee9eSMinkyu Kang #define CONFIG_SYS_HZ			1000
1878bc4ee9eSMinkyu Kang 
1888bc4ee9eSMinkyu Kang /* valid baudrates */
1898bc4ee9eSMinkyu Kang #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
1908bc4ee9eSMinkyu Kang 
1918bc4ee9eSMinkyu Kang /*-----------------------------------------------------------------------
1928bc4ee9eSMinkyu Kang  * Stack sizes
1938bc4ee9eSMinkyu Kang  *
1948bc4ee9eSMinkyu Kang  * The stack sizes are set up in start.S using the settings below
1958bc4ee9eSMinkyu Kang  */
1968bc4ee9eSMinkyu Kang #define CONFIG_STACKSIZE	(256 << 10)	/* 256 KiB */
1978bc4ee9eSMinkyu Kang 
1988bc4ee9eSMinkyu Kang /* SMDKC100 has 1 banks of DRAM, we use only one in U-Boot */
1998bc4ee9eSMinkyu Kang #define CONFIG_NR_DRAM_BANKS	1
2008bc4ee9eSMinkyu Kang #define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE	/* SDRAM Bank #1 */
2018bc4ee9eSMinkyu Kang #define PHYS_SDRAM_1_SIZE	(128 << 20)	/* 0x8000000, 128 MB Bank #1 */
2028bc4ee9eSMinkyu Kang 
2038bc4ee9eSMinkyu Kang #define CONFIG_SYS_MONITOR_BASE	0x00000000
2048bc4ee9eSMinkyu Kang 
2058bc4ee9eSMinkyu Kang /*-----------------------------------------------------------------------
2068bc4ee9eSMinkyu Kang  * FLASH and environment organization
2078bc4ee9eSMinkyu Kang  */
2088bc4ee9eSMinkyu Kang #define CONFIG_SYS_NO_FLASH		1
2098bc4ee9eSMinkyu Kang 
2108bc4ee9eSMinkyu Kang #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* 256 KiB */
2118bc4ee9eSMinkyu Kang #define CONFIG_IDENT_STRING		" for SMDKC100"
2128bc4ee9eSMinkyu Kang 
213*14d0a02aSWolfgang Denk #if !defined(CONFIG_NAND_SPL) && (CONFIG_SYS_TEXT_BASE >= 0xc0000000)
2148bc4ee9eSMinkyu Kang #define CONFIG_ENABLE_MMU
2158bc4ee9eSMinkyu Kang #endif
2168bc4ee9eSMinkyu Kang 
2178bc4ee9eSMinkyu Kang #ifdef CONFIG_ENABLE_MMU
2188bc4ee9eSMinkyu Kang #define CONFIG_SYS_MAPPED_RAM_BASE	0xc0000000
2198bc4ee9eSMinkyu Kang #else
2208bc4ee9eSMinkyu Kang #define CONFIG_SYS_MAPPED_RAM_BASE	CONFIG_SYS_SDRAM_BASE
2218bc4ee9eSMinkyu Kang #endif
2228bc4ee9eSMinkyu Kang 
2238bc4ee9eSMinkyu Kang /*-----------------------------------------------------------------------
2248bc4ee9eSMinkyu Kang  * Boot configuration
2258bc4ee9eSMinkyu Kang  */
2268bc4ee9eSMinkyu Kang #define CONFIG_ENV_IS_IN_ONENAND	1
2278bc4ee9eSMinkyu Kang #define CONFIG_ENV_SIZE			(128 << 10)	/* 128KiB, 0x20000 */
2288bc4ee9eSMinkyu Kang #define CONFIG_ENV_ADDR			(256 << 10)	/* 256KiB, 0x40000 */
2298bc4ee9eSMinkyu Kang #define CONFIG_ENV_OFFSET		(256 << 10)	/* 256KiB, 0x40000 */
2308bc4ee9eSMinkyu Kang 
2318bc4ee9eSMinkyu Kang #define CONFIG_USE_ONENAND_BOARD_INIT
2328bc4ee9eSMinkyu Kang #define CONFIG_SAMSUNG_ONENAND		1
2338bc4ee9eSMinkyu Kang #define CONFIG_SYS_ONENAND_BASE		0xE7100000
2348bc4ee9eSMinkyu Kang 
2358bc4ee9eSMinkyu Kang #define CONFIG_DOS_PARTITION		1
2368bc4ee9eSMinkyu Kang 
2372528dc52SNaveen Krishna CH /*
2382528dc52SNaveen Krishna CH  * Ethernet Contoller driver
2392528dc52SNaveen Krishna CH  */
2402528dc52SNaveen Krishna CH #ifdef CONFIG_CMD_NET
2412528dc52SNaveen Krishna CH #define CONFIG_NET_MULTI
2422528dc52SNaveen Krishna CH #define CONFIG_SMC911X         1       /* we have a SMC9115 on-board   */
2432528dc52SNaveen Krishna CH #define CONFIG_SMC911X_16_BIT  1       /* SMC911X_16_BIT Mode          */
2442528dc52SNaveen Krishna CH #define CONFIG_SMC911X_BASE    0x98800300      /* SMC911X Drive Base   */
2452528dc52SNaveen Krishna CH #define CONFIG_ENV_SROM_BANK   3       /* Select SROM Bank-3 for Ethernet*/
2462528dc52SNaveen Krishna CH #endif /* CONFIG_CMD_NET */
2472528dc52SNaveen Krishna CH 
2488bc4ee9eSMinkyu Kang #endif	/* __CONFIG_H */
249