xref: /rk3399_rockchip-uboot/include/configs/trats.h (revision 89f95492ec44ef02f7e07406cb3b0d1580634e8f)
1*89f95492SHeungJun, Kim /*
2*89f95492SHeungJun, Kim  * Copyright (C) 2011 Samsung Electronics
3*89f95492SHeungJun, Kim  * Heungjun Kim <riverful.kim@samsung.com>
4*89f95492SHeungJun, Kim  *
5*89f95492SHeungJun, Kim  * Configuation settings for the SAMSUNG TRATS (EXYNOS4210) board.
6*89f95492SHeungJun, Kim  *
7*89f95492SHeungJun, Kim  * See file CREDITS for list of people who contributed to this
8*89f95492SHeungJun, Kim  * project.
9*89f95492SHeungJun, Kim  *
10*89f95492SHeungJun, Kim  * This program is free software; you can redistribute it and/or
11*89f95492SHeungJun, Kim  * modify it under the terms of the GNU General Public License as
12*89f95492SHeungJun, Kim  * published by the Free Software Foundation; either version 2 of
13*89f95492SHeungJun, Kim  * the License, or (at your option) any later version.
14*89f95492SHeungJun, Kim  *
15*89f95492SHeungJun, Kim  * This program is distributed in the hope that it will be useful,
16*89f95492SHeungJun, Kim  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*89f95492SHeungJun, Kim  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*89f95492SHeungJun, Kim  * GNU General Public License for more details.
19*89f95492SHeungJun, Kim  *
20*89f95492SHeungJun, Kim  * You should have received a copy of the GNU General Public License
21*89f95492SHeungJun, Kim  * along with this program; if not, write to the Free Software
22*89f95492SHeungJun, Kim  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23*89f95492SHeungJun, Kim  * MA 02111-1307 USA
24*89f95492SHeungJun, Kim  */
25*89f95492SHeungJun, Kim 
26*89f95492SHeungJun, Kim #ifndef __CONFIG_H
27*89f95492SHeungJun, Kim #define __CONFIG_H
28*89f95492SHeungJun, Kim 
29*89f95492SHeungJun, Kim /*
30*89f95492SHeungJun, Kim  * High Level Configuration Options
31*89f95492SHeungJun, Kim  * (easy to change)
32*89f95492SHeungJun, Kim  */
33*89f95492SHeungJun, Kim #define CONFIG_SAMSUNG		/* in a SAMSUNG core */
34*89f95492SHeungJun, Kim #define CONFIG_S5P		/* which is in a S5P Family */
35*89f95492SHeungJun, Kim #define CONFIG_EXYNOS4210	/* which is in a EXYNOS4210 */
36*89f95492SHeungJun, Kim #define CONFIG_TRATS		/* working with TRATS */
37*89f95492SHeungJun, Kim 
38*89f95492SHeungJun, Kim #include <asm/arch/cpu.h>	/* get chip and board defs */
39*89f95492SHeungJun, Kim 
40*89f95492SHeungJun, Kim #define CONFIG_ARCH_CPU_INIT
41*89f95492SHeungJun, Kim #define CONFIG_DISPLAY_CPUINFO
42*89f95492SHeungJun, Kim #define CONFIG_DISPLAY_BOARDINFO
43*89f95492SHeungJun, Kim 
44*89f95492SHeungJun, Kim /* Keep L2 Cache Disabled */
45*89f95492SHeungJun, Kim #define CONFIG_SYS_L2CACHE_OFF
46*89f95492SHeungJun, Kim 
47*89f95492SHeungJun, Kim #define CONFIG_SYS_SDRAM_BASE		0x40000000
48*89f95492SHeungJun, Kim #define CONFIG_SYS_TEXT_BASE		0x63300000
49*89f95492SHeungJun, Kim 
50*89f95492SHeungJun, Kim /* input clock of PLL: TRATS has 24MHz input clock at EXYNOS4210 */
51*89f95492SHeungJun, Kim #define CONFIG_SYS_CLK_FREQ_C210	24000000
52*89f95492SHeungJun, Kim 
53*89f95492SHeungJun, Kim #define CONFIG_SETUP_MEMORY_TAGS
54*89f95492SHeungJun, Kim #define CONFIG_CMDLINE_TAG
55*89f95492SHeungJun, Kim #define CONFIG_INITRD_TAG
56*89f95492SHeungJun, Kim #define CONFIG_REVISION_TAG
57*89f95492SHeungJun, Kim #define CONFIG_CMDLINE_EDITING
58*89f95492SHeungJun, Kim #define CONFIG_SKIP_LOWLEVEL_INIT
59*89f95492SHeungJun, Kim #define CONFIG_BOARD_EARLY_INIT_F
60*89f95492SHeungJun, Kim 
61*89f95492SHeungJun, Kim /* MACH_TYPE_TRATS macro will be removed once added to mach-types */
62*89f95492SHeungJun, Kim #define MACH_TYPE_TRATS			3928
63*89f95492SHeungJun, Kim #define CONFIG_MACH_TYPE		MACH_TYPE_TRATS
64*89f95492SHeungJun, Kim 
65*89f95492SHeungJun, Kim /* Size of malloc() pool */
66*89f95492SHeungJun, Kim #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (1 << 20))
67*89f95492SHeungJun, Kim 
68*89f95492SHeungJun, Kim /* select serial console configuration */
69*89f95492SHeungJun, Kim #define CONFIG_SERIAL_MULTI
70*89f95492SHeungJun, Kim #define CONFIG_SERIAL2			/* use SERIAL 2 */
71*89f95492SHeungJun, Kim #define CONFIG_BAUDRATE			115200
72*89f95492SHeungJun, Kim 
73*89f95492SHeungJun, Kim /* MMC */
74*89f95492SHeungJun, Kim #define CONFIG_GENERIC_MMC
75*89f95492SHeungJun, Kim #define CONFIG_MMC
76*89f95492SHeungJun, Kim #define CONFIG_S5P_MMC
77*89f95492SHeungJun, Kim 
78*89f95492SHeungJun, Kim /* PWM */
79*89f95492SHeungJun, Kim #define CONFIG_PWM
80*89f95492SHeungJun, Kim 
81*89f95492SHeungJun, Kim /* It should define before config_cmd_default.h */
82*89f95492SHeungJun, Kim #define CONFIG_SYS_NO_FLASH
83*89f95492SHeungJun, Kim 
84*89f95492SHeungJun, Kim /* Command definition */
85*89f95492SHeungJun, Kim #include <config_cmd_default.h>
86*89f95492SHeungJun, Kim 
87*89f95492SHeungJun, Kim #undef CONFIG_CMD_FPGA
88*89f95492SHeungJun, Kim #undef CONFIG_CMD_MISC
89*89f95492SHeungJun, Kim #undef CONFIG_CMD_NET
90*89f95492SHeungJun, Kim #undef CONFIG_CMD_NFS
91*89f95492SHeungJun, Kim #undef CONFIG_CMD_XIMG
92*89f95492SHeungJun, Kim #undef CONFIG_CMD_CACHE
93*89f95492SHeungJun, Kim #undef CONFIG_CMD_ONENAND
94*89f95492SHeungJun, Kim #undef CONFIG_CMD_MTDPARTS
95*89f95492SHeungJun, Kim #define CONFIG_CMD_MMC
96*89f95492SHeungJun, Kim 
97*89f95492SHeungJun, Kim #define CONFIG_BOOTDELAY		1
98*89f95492SHeungJun, Kim #define CONFIG_ZERO_BOOTDELAY_CHECK
99*89f95492SHeungJun, Kim #define CONFIG_BOOTARGS			"Please use defined boot"
100*89f95492SHeungJun, Kim #define CONFIG_BOOTCOMMAND		"run mmcboot"
101*89f95492SHeungJun, Kim 
102*89f95492SHeungJun, Kim #define CONFIG_DEFAULT_CONSOLE		"console=ttySAC2,115200n8\0"
103*89f95492SHeungJun, Kim #define CONFIG_BOOTBLOCK		"10"
104*89f95492SHeungJun, Kim #define CONFIG_ENV_COMMON_BOOT		"${console} ${meminfo}"
105*89f95492SHeungJun, Kim 
106*89f95492SHeungJun, Kim #define CONFIG_ENV_OVERWRITE
107*89f95492SHeungJun, Kim #define CONFIG_SYS_CONSOLE_INFO_QUIET
108*89f95492SHeungJun, Kim #define CONFIG_SYS_CONSOLE_IS_IN_ENV
109*89f95492SHeungJun, Kim 
110*89f95492SHeungJun, Kim #define CONFIG_EXTRA_ENV_SETTINGS \
111*89f95492SHeungJun, Kim 	"bootk=" \
112*89f95492SHeungJun, Kim 		"run loaduimage; bootm 0x40007FC0\0" \
113*89f95492SHeungJun, Kim 	"updatemmc=" \
114*89f95492SHeungJun, Kim 		"mmc boot 0 1 1 1; mmc write 0 0x42008000 0 0x200;" \
115*89f95492SHeungJun, Kim 		"mmc boot 0 1 1 0\0" \
116*89f95492SHeungJun, Kim 	"updatebackup=" \
117*89f95492SHeungJun, Kim 		"mmc boot 0 1 1 2; mmc write 0 0x42100000 0 0x200;" \
118*89f95492SHeungJun, Kim 		"mmc boot 0 1 1 0\0" \
119*89f95492SHeungJun, Kim 	"updatebootb=" \
120*89f95492SHeungJun, Kim 		"mmc read 0 0x42100000 0x80 0x200; run updatebackup\0" \
121*89f95492SHeungJun, Kim 	"lpj=lpj=3981312\0" \
122*89f95492SHeungJun, Kim 	"nfsboot=" \
123*89f95492SHeungJun, Kim 		"set bootargs root=/dev/nfs rw " \
124*89f95492SHeungJun, Kim 		"nfsroot=${nfsroot},nolock,tcp " \
125*89f95492SHeungJun, Kim 		"ip=${ipaddr}:${serverip}:${gatewayip}:" \
126*89f95492SHeungJun, Kim 		"${netmask}:generic:usb0:off " CONFIG_ENV_COMMON_BOOT \
127*89f95492SHeungJun, Kim 		"; run bootk\0" \
128*89f95492SHeungJun, Kim 	"ramfsboot=" \
129*89f95492SHeungJun, Kim 		"set bootargs root=/dev/ram0 rw rootfstype=ext2 " \
130*89f95492SHeungJun, Kim 		"${console} ${meminfo} " \
131*89f95492SHeungJun, Kim 		"initrd=0x43000000,8M ramdisk=8192\0" \
132*89f95492SHeungJun, Kim 	"mmcboot=" \
133*89f95492SHeungJun, Kim 		"set bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
134*89f95492SHeungJun, Kim 		"${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \
135*89f95492SHeungJun, Kim 		"run loaduimage; bootm 0x40007FC0\0" \
136*89f95492SHeungJun, Kim 	"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
137*89f95492SHeungJun, Kim 	"boottrace=setenv opts initcall_debug; run bootcmd\0" \
138*89f95492SHeungJun, Kim 	"mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
139*89f95492SHeungJun, Kim 	"verify=n\0" \
140*89f95492SHeungJun, Kim 	"rootfstype=ext4\0" \
141*89f95492SHeungJun, Kim 	"console=" CONFIG_DEFAULT_CONSOLE \
142*89f95492SHeungJun, Kim 	"meminfo=crashkernel=32M@0x50000000\0" \
143*89f95492SHeungJun, Kim 	"nfsroot=/nfsroot/arm\0" \
144*89f95492SHeungJun, Kim 	"bootblock=" CONFIG_BOOTBLOCK "\0" \
145*89f95492SHeungJun, Kim 	"mmcdev=0\0" \
146*89f95492SHeungJun, Kim 	"mmcbootpart=2\0" \
147*89f95492SHeungJun, Kim 	"mmcrootpart=3\0" \
148*89f95492SHeungJun, Kim 	"opts=always_resume=1"
149*89f95492SHeungJun, Kim 
150*89f95492SHeungJun, Kim /* Miscellaneous configurable options */
151*89f95492SHeungJun, Kim #define CONFIG_SYS_LONGHELP		/* undef to save memory */
152*89f95492SHeungJun, Kim #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
153*89f95492SHeungJun, Kim #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
154*89f95492SHeungJun, Kim #define CONFIG_SYS_PROMPT		"TRATS # "
155*89f95492SHeungJun, Kim #define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
156*89f95492SHeungJun, Kim #define CONFIG_SYS_PBSIZE		384	/* Print Buffer Size */
157*89f95492SHeungJun, Kim #define CONFIG_SYS_MAXARGS		16	/* max number of command args */
158*89f95492SHeungJun, Kim /* Boot Argument Buffer Size */
159*89f95492SHeungJun, Kim #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
160*89f95492SHeungJun, Kim /* memtest works on */
161*89f95492SHeungJun, Kim #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
162*89f95492SHeungJun, Kim #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x5000000)
163*89f95492SHeungJun, Kim #define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x4800000)
164*89f95492SHeungJun, Kim 
165*89f95492SHeungJun, Kim #define CONFIG_SYS_HZ			1000
166*89f95492SHeungJun, Kim 
167*89f95492SHeungJun, Kim /* valid baudrates */
168*89f95492SHeungJun, Kim #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
169*89f95492SHeungJun, Kim 
170*89f95492SHeungJun, Kim /* Stack sizes */
171*89f95492SHeungJun, Kim #define CONFIG_STACKSIZE		(256 << 10) /* regular stack 256KB */
172*89f95492SHeungJun, Kim 
173*89f95492SHeungJun, Kim /* TRATS has 2 banks of DRAM */
174*89f95492SHeungJun, Kim #define CONFIG_NR_DRAM_BANKS	2
175*89f95492SHeungJun, Kim #define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE	/* LDDDR2 DMC 0 */
176*89f95492SHeungJun, Kim #define PHYS_SDRAM_1_SIZE	(256 << 20)		/* 256 MB in CS 0 */
177*89f95492SHeungJun, Kim #define PHYS_SDRAM_2		0x50000000		/* LPDDR2 DMC 1 */
178*89f95492SHeungJun, Kim #define PHYS_SDRAM_2_SIZE	(256 << 20)		/* 256 MB in CS 0 */
179*89f95492SHeungJun, Kim 
180*89f95492SHeungJun, Kim #define CONFIG_SYS_MEM_TOP_HIDE		(1 << 20)	/* ram console */
181*89f95492SHeungJun, Kim 
182*89f95492SHeungJun, Kim #define CONFIG_SYS_MONITOR_BASE		0x00000000
183*89f95492SHeungJun, Kim #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
184*89f95492SHeungJun, Kim 
185*89f95492SHeungJun, Kim #define CONFIG_ENV_IS_IN_MMC
186*89f95492SHeungJun, Kim #define CONFIG_SYS_MMC_ENV_DEV		0
187*89f95492SHeungJun, Kim #define CONFIG_ENV_SIZE			4096
188*89f95492SHeungJun, Kim #define CONFIG_ENV_OFFSET		((32 - 4) << 10) /* 32KiB - 4KiB */
189*89f95492SHeungJun, Kim 
190*89f95492SHeungJun, Kim #define CONFIG_DOS_PARTITION
191*89f95492SHeungJun, Kim 
192*89f95492SHeungJun, Kim #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR - GENERATED_GBL_DATA_SIZE)
193*89f95492SHeungJun, Kim #define CONFIG_SYS_CACHELINE_SIZE       32
194*89f95492SHeungJun, Kim 
195*89f95492SHeungJun, Kim #include <asm/arch/gpio.h>
196*89f95492SHeungJun, Kim /*
197*89f95492SHeungJun, Kim  * I2C Settings
198*89f95492SHeungJun, Kim  */
199*89f95492SHeungJun, Kim #define CONFIG_SOFT_I2C_GPIO_SCL exynos4_gpio_part1_get_nr(b, 7)
200*89f95492SHeungJun, Kim #define CONFIG_SOFT_I2C_GPIO_SDA exynos4_gpio_part1_get_nr(b, 6)
201*89f95492SHeungJun, Kim 
202*89f95492SHeungJun, Kim #define CONFIG_SOFT_I2C
203*89f95492SHeungJun, Kim #define CONFIG_SOFT_I2C_READ_REPEATED_START
204*89f95492SHeungJun, Kim #define CONFIG_SYS_I2C_SPEED	50000
205*89f95492SHeungJun, Kim #define CONFIG_I2C_MULTI_BUS
206*89f95492SHeungJun, Kim #define CONFIG_SYS_MAX_I2C_BUS	7
207*89f95492SHeungJun, Kim 
208*89f95492SHeungJun, Kim #define CONFIG_PMIC
209*89f95492SHeungJun, Kim #define CONFIG_PMIC_I2C
210*89f95492SHeungJun, Kim #define CONFIG_PMIC_MAX8998
211*89f95492SHeungJun, Kim 
212*89f95492SHeungJun, Kim #define CONFIG_USB_GADGET
213*89f95492SHeungJun, Kim #define CONFIG_USB_GADGET_S3C_UDC_OTG
214*89f95492SHeungJun, Kim #define CONFIG_USB_GADGET_DUALSPEED
215*89f95492SHeungJun, Kim 
216*89f95492SHeungJun, Kim #endif	/* __CONFIG_H */
217