xref: /rk3399_rockchip-uboot/include/configs/guruplug.h (revision 16b76705d36ac137fa9231cedfe1355561639e47)
1*16b76705SSiddarth Gore /*
2*16b76705SSiddarth Gore  * (C) Copyright 2009
3*16b76705SSiddarth Gore  * Marvell Semiconductor <www.marvell.com>
4*16b76705SSiddarth Gore  * Written-by: Siddarth Gore <gores@marvell.com>
5*16b76705SSiddarth Gore  *
6*16b76705SSiddarth Gore  * See file CREDITS for list of people who contributed to this
7*16b76705SSiddarth Gore  * project.
8*16b76705SSiddarth Gore  *
9*16b76705SSiddarth Gore  * This program is free software; you can redistribute it and/or
10*16b76705SSiddarth Gore  * modify it under the terms of the GNU General Public License as
11*16b76705SSiddarth Gore  * published by the Free Software Foundation; either version 2 of
12*16b76705SSiddarth Gore  * the License, or (at your option) any later version.
13*16b76705SSiddarth Gore  *
14*16b76705SSiddarth Gore  * This program is distributed in the hope that it will be useful,
15*16b76705SSiddarth Gore  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16*16b76705SSiddarth Gore  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17*16b76705SSiddarth Gore  * GNU General Public License for more details.
18*16b76705SSiddarth Gore  *
19*16b76705SSiddarth Gore  * You should have received a copy of the GNU General Public License
20*16b76705SSiddarth Gore  * along with this program; if not, write to the Free Software
21*16b76705SSiddarth Gore  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22*16b76705SSiddarth Gore  * MA 02110-1301 USA
23*16b76705SSiddarth Gore  */
24*16b76705SSiddarth Gore 
25*16b76705SSiddarth Gore #ifndef _CONFIG_GURUPLUG_H
26*16b76705SSiddarth Gore #define _CONFIG_GURUPLUG_H
27*16b76705SSiddarth Gore 
28*16b76705SSiddarth Gore /*
29*16b76705SSiddarth Gore  * Version number information
30*16b76705SSiddarth Gore  */
31*16b76705SSiddarth Gore #define CONFIG_IDENT_STRING	"\nMarvell-GuruPlug"
32*16b76705SSiddarth Gore 
33*16b76705SSiddarth Gore /*
34*16b76705SSiddarth Gore  * High Level Configuration Options (easy to change)
35*16b76705SSiddarth Gore  */
36*16b76705SSiddarth Gore #define CONFIG_MARVELL		1
37*16b76705SSiddarth Gore #define CONFIG_ARM926EJS	1	/* Basic Architecture */
38*16b76705SSiddarth Gore #define CONFIG_SHEEVA_88SV131	1	/* CPU Core subversion */
39*16b76705SSiddarth Gore #define CONFIG_KIRKWOOD		1	/* SOC Family Name */
40*16b76705SSiddarth Gore #define CONFIG_KW88F6281	1	/* SOC Name */
41*16b76705SSiddarth Gore #define CONFIG_MACH_GURUPLUG	/* Machine type */
42*16b76705SSiddarth Gore 
43*16b76705SSiddarth Gore #define CONFIG_MD5	/* get_random_hex on krikwood needs MD5 support */
44*16b76705SSiddarth Gore #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
45*16b76705SSiddarth Gore #define CONFIG_KIRKWOOD_EGIGA_INIT	/* Enable GbePort0/1 for kernel */
46*16b76705SSiddarth Gore #define CONFIG_KIRKWOOD_RGMII_PAD_1V8	/* Set RGMII Pad voltage to 1.8V */
47*16b76705SSiddarth Gore 
48*16b76705SSiddarth Gore /*
49*16b76705SSiddarth Gore  * CLKs configurations
50*16b76705SSiddarth Gore  */
51*16b76705SSiddarth Gore #define CONFIG_SYS_HZ		1000
52*16b76705SSiddarth Gore 
53*16b76705SSiddarth Gore /*
54*16b76705SSiddarth Gore  * NS16550 Configuration
55*16b76705SSiddarth Gore  */
56*16b76705SSiddarth Gore #define CONFIG_SYS_NS16550
57*16b76705SSiddarth Gore #define CONFIG_SYS_NS16550_SERIAL
58*16b76705SSiddarth Gore #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
59*16b76705SSiddarth Gore #define CONFIG_SYS_NS16550_CLK		CONFIG_SYS_TCLK
60*16b76705SSiddarth Gore #define CONFIG_SYS_NS16550_COM1		KW_UART0_BASE
61*16b76705SSiddarth Gore 
62*16b76705SSiddarth Gore /*
63*16b76705SSiddarth Gore  * Serial Port configuration
64*16b76705SSiddarth Gore  * The following definitions let you select what serial you want to use
65*16b76705SSiddarth Gore  * for your console driver.
66*16b76705SSiddarth Gore  */
67*16b76705SSiddarth Gore 
68*16b76705SSiddarth Gore #define CONFIG_CONS_INDEX	1	/*Console on UART0 */
69*16b76705SSiddarth Gore #define CONFIG_BAUDRATE			115200
70*16b76705SSiddarth Gore #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
71*16b76705SSiddarth Gore 					  115200,230400, 460800, 921600 }
72*16b76705SSiddarth Gore /* auto boot */
73*16b76705SSiddarth Gore #define CONFIG_BOOTDELAY	3	/* default enable autoboot */
74*16b76705SSiddarth Gore 
75*16b76705SSiddarth Gore /*
76*16b76705SSiddarth Gore  * For booting Linux, the board info and command line data
77*16b76705SSiddarth Gore  * have to be in the first 8 MB of memory, since this is
78*16b76705SSiddarth Gore  * the maximum mapped by the Linux kernel during initialization.
79*16b76705SSiddarth Gore  */
80*16b76705SSiddarth Gore #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs  */
81*16b76705SSiddarth Gore #define CONFIG_INITRD_TAG	1	/* enable INITRD tag */
82*16b76705SSiddarth Gore #define CONFIG_SETUP_MEMORY_TAGS 1	/* enable memory tag */
83*16b76705SSiddarth Gore 
84*16b76705SSiddarth Gore #define	CONFIG_SYS_PROMPT	"Marvell>> "	/* Command Prompt */
85*16b76705SSiddarth Gore #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
86*16b76705SSiddarth Gore #define	CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE \
87*16b76705SSiddarth Gore 		+sizeof(CONFIG_SYS_PROMPT) + 16)	/* Print Buff */
88*16b76705SSiddarth Gore /*
89*16b76705SSiddarth Gore  * Commands configuration
90*16b76705SSiddarth Gore  */
91*16b76705SSiddarth Gore #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
92*16b76705SSiddarth Gore #include <config_cmd_default.h>
93*16b76705SSiddarth Gore #define CONFIG_CMD_DHCP
94*16b76705SSiddarth Gore #define CONFIG_CMD_ENV
95*16b76705SSiddarth Gore #define CONFIG_CMD_FAT
96*16b76705SSiddarth Gore #define CONFIG_CMD_NAND
97*16b76705SSiddarth Gore #define CONFIG_CMD_PING
98*16b76705SSiddarth Gore #define CONFIG_CMD_USB
99*16b76705SSiddarth Gore 
100*16b76705SSiddarth Gore /*
101*16b76705SSiddarth Gore  * NAND configuration
102*16b76705SSiddarth Gore  */
103*16b76705SSiddarth Gore #ifdef CONFIG_CMD_NAND
104*16b76705SSiddarth Gore #define CONFIG_NAND_KIRKWOOD
105*16b76705SSiddarth Gore #define CONFIG_SYS_MAX_NAND_DEVICE	1
106*16b76705SSiddarth Gore #define NAND_MAX_CHIPS			1
107*16b76705SSiddarth Gore #define CONFIG_SYS_NAND_BASE		0xD8000000	/* KW_DEFADR_NANDF */
108*16b76705SSiddarth Gore #define NAND_ALLOW_ERASE_ALL		1
109*16b76705SSiddarth Gore #define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */
110*16b76705SSiddarth Gore #endif
111*16b76705SSiddarth Gore 
112*16b76705SSiddarth Gore /*
113*16b76705SSiddarth Gore  *  Environment variables configurations
114*16b76705SSiddarth Gore  */
115*16b76705SSiddarth Gore #ifdef CONFIG_CMD_NAND
116*16b76705SSiddarth Gore #define CONFIG_ENV_IS_IN_NAND		1
117*16b76705SSiddarth Gore #define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K */
118*16b76705SSiddarth Gore #else
119*16b76705SSiddarth Gore #define CONFIG_ENV_IS_NOWHERE		1	/* if env in SDRAM */
120*16b76705SSiddarth Gore #endif
121*16b76705SSiddarth Gore /*
122*16b76705SSiddarth Gore  * max 4k env size is enough, but in case of nand
123*16b76705SSiddarth Gore  * it has to be rounded to sector size
124*16b76705SSiddarth Gore  */
125*16b76705SSiddarth Gore #define CONFIG_ENV_SIZE			0x20000	/* 128k */
126*16b76705SSiddarth Gore #define CONFIG_ENV_ADDR			0x40000
127*16b76705SSiddarth Gore #define CONFIG_ENV_OFFSET		0x40000	/* env starts here */
128*16b76705SSiddarth Gore 
129*16b76705SSiddarth Gore /*
130*16b76705SSiddarth Gore  * Default environment variables
131*16b76705SSiddarth Gore  */
132*16b76705SSiddarth Gore #define CONFIG_BOOTCOMMAND		"setenv ethact egiga0; " \
133*16b76705SSiddarth Gore 	"${x_bootcmd_ethernet}; setenv ethact egiga1; " \
134*16b76705SSiddarth Gore 	"${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; "\
135*16b76705SSiddarth Gore 	"setenv bootargs ${x_bootargs} ${x_bootargs_root}; "	\
136*16b76705SSiddarth Gore 	"bootm 0x6400000;"
137*16b76705SSiddarth Gore 
138*16b76705SSiddarth Gore #define CONFIG_EXTRA_ENV_SETTINGS	\
139*16b76705SSiddarth Gore 	"x_bootcmd_ethernet=ping 192.168.2.1\0"	\
140*16b76705SSiddarth Gore 	"x_bootcmd_usb=usb start\0"	\
141*16b76705SSiddarth Gore 	"x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000\0" \
142*16b76705SSiddarth Gore 	"x_bootargs=console=ttyS0,115200\0"	\
143*16b76705SSiddarth Gore 	"x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0"
144*16b76705SSiddarth Gore 
145*16b76705SSiddarth Gore /*
146*16b76705SSiddarth Gore  * Size of malloc() pool
147*16b76705SSiddarth Gore  */
148*16b76705SSiddarth Gore #define CONFIG_SYS_MALLOC_LEN	(1024 * 128) /* 128kB for malloc() */
149*16b76705SSiddarth Gore /* size in bytes reserved for initial data */
150*16b76705SSiddarth Gore #define CONFIG_SYS_GBL_DATA_SIZE	128
151*16b76705SSiddarth Gore 
152*16b76705SSiddarth Gore /*
153*16b76705SSiddarth Gore  * Other required configurations
154*16b76705SSiddarth Gore  */
155*16b76705SSiddarth Gore #define CONFIG_CONSOLE_INFO_QUIET	/* some code reduction */
156*16b76705SSiddarth Gore #define CONFIG_ARCH_CPU_INIT	/* call arch_cpu_init() */
157*16b76705SSiddarth Gore #define CONFIG_ARCH_MISC_INIT	/* call arch_misc_init() */
158*16b76705SSiddarth Gore #define CONFIG_DISPLAY_CPUINFO	/* Display cpu info */
159*16b76705SSiddarth Gore #define CONFIG_NR_DRAM_BANKS	4
160*16b76705SSiddarth Gore #define CONFIG_STACKSIZE	0x00100000	/* regular stack- 1M */
161*16b76705SSiddarth Gore #define CONFIG_SYS_LOAD_ADDR	0x00800000	/* default load adr- 8M */
162*16b76705SSiddarth Gore #define CONFIG_SYS_MEMTEST_START 0x00800000	/* 8M */
163*16b76705SSiddarth Gore #define CONFIG_SYS_MEMTEST_END	0x1fffffff	/*(_512M -1) */
164*16b76705SSiddarth Gore #define CONFIG_SYS_RESET_ADDRESS 0xffff0000	/* Rst Vector Adr */
165*16b76705SSiddarth Gore #define CONFIG_SYS_MAXARGS	16	/* max number of command args */
166*16b76705SSiddarth Gore 
167*16b76705SSiddarth Gore /*
168*16b76705SSiddarth Gore  * Ethernet Driver configuration
169*16b76705SSiddarth Gore  */
170*16b76705SSiddarth Gore #ifdef CONFIG_CMD_NET
171*16b76705SSiddarth Gore #define CONFIG_NETCONSOLE	/* include NetConsole support   */
172*16b76705SSiddarth Gore #define CONFIG_NET_MULTI	/* specify more that one ports available */
173*16b76705SSiddarth Gore #define CONFIG_MII		/* expose smi ove miiphy interface */
174*16b76705SSiddarth Gore #define CONFIG_CMD_MII
175*16b76705SSiddarth Gore #define CONFIG_KIRKWOOD_EGIGA	/* Enable kirkwood Gbe Controller Driver */
176*16b76705SSiddarth Gore #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
177*16b76705SSiddarth Gore #define CONFIG_KIRKWOOD_EGIGA_PORTS	{1,1}	/* enable both ports */
178*16b76705SSiddarth Gore #define CONFIG_PHY_BASE_ADR	0
179*16b76705SSiddarth Gore #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
180*16b76705SSiddarth Gore #define CONFIG_RESET_PHY_R	/* use reset_phy() to init mv88e1121 PHY */
181*16b76705SSiddarth Gore #endif /* CONFIG_CMD_NET */
182*16b76705SSiddarth Gore 
183*16b76705SSiddarth Gore /*
184*16b76705SSiddarth Gore  * USB/EHCI
185*16b76705SSiddarth Gore  */
186*16b76705SSiddarth Gore #ifdef CONFIG_CMD_USB
187*16b76705SSiddarth Gore #define CONFIG_USB_EHCI			/* Enable EHCI USB support */
188*16b76705SSiddarth Gore #define CONFIG_USB_EHCI_KIRKWOOD	/* on Kirkwood platform	*/
189*16b76705SSiddarth Gore #define CONFIG_EHCI_IS_TDI
190*16b76705SSiddarth Gore #define CONFIG_USB_STORAGE
191*16b76705SSiddarth Gore #define CONFIG_DOS_PARTITION
192*16b76705SSiddarth Gore #define CONFIG_ISO_PARTITION
193*16b76705SSiddarth Gore #define CONFIG_SUPPORT_VFAT
194*16b76705SSiddarth Gore #endif /* CONFIG_CMD_USB */
195*16b76705SSiddarth Gore 
196*16b76705SSiddarth Gore #define CONFIG_SYS_ALT_MEMTEST
197*16b76705SSiddarth Gore 
198*16b76705SSiddarth Gore #endif /* _CONFIG_GURUPLUG_H */
199