xref: /rk3399_rockchip-uboot/include/configs/guruplug.h (revision d44265ad783f1896685db04faec148e32e918cda)
116b76705SSiddarth Gore /*
216b76705SSiddarth Gore  * (C) Copyright 2009
316b76705SSiddarth Gore  * Marvell Semiconductor <www.marvell.com>
416b76705SSiddarth Gore  * Written-by: Siddarth Gore <gores@marvell.com>
516b76705SSiddarth Gore  *
616b76705SSiddarth Gore  * See file CREDITS for list of people who contributed to this
716b76705SSiddarth Gore  * project.
816b76705SSiddarth Gore  *
916b76705SSiddarth Gore  * This program is free software; you can redistribute it and/or
1016b76705SSiddarth Gore  * modify it under the terms of the GNU General Public License as
1116b76705SSiddarth Gore  * published by the Free Software Foundation; either version 2 of
1216b76705SSiddarth Gore  * the License, or (at your option) any later version.
1316b76705SSiddarth Gore  *
1416b76705SSiddarth Gore  * This program is distributed in the hope that it will be useful,
1516b76705SSiddarth Gore  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1616b76705SSiddarth Gore  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1716b76705SSiddarth Gore  * GNU General Public License for more details.
1816b76705SSiddarth Gore  *
1916b76705SSiddarth Gore  * You should have received a copy of the GNU General Public License
2016b76705SSiddarth Gore  * along with this program; if not, write to the Free Software
2116b76705SSiddarth Gore  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2216b76705SSiddarth Gore  * MA 02110-1301 USA
2316b76705SSiddarth Gore  */
2416b76705SSiddarth Gore 
2516b76705SSiddarth Gore #ifndef _CONFIG_GURUPLUG_H
2616b76705SSiddarth Gore #define _CONFIG_GURUPLUG_H
2716b76705SSiddarth Gore 
2816b76705SSiddarth Gore /*
2916b76705SSiddarth Gore  * Version number information
3016b76705SSiddarth Gore  */
3116b76705SSiddarth Gore #define CONFIG_IDENT_STRING	"\nMarvell-GuruPlug"
3216b76705SSiddarth Gore 
3316b76705SSiddarth Gore /*
3416b76705SSiddarth Gore  * High Level Configuration Options (easy to change)
3516b76705SSiddarth Gore  */
3616b76705SSiddarth Gore #define CONFIG_MARVELL		1
3716b76705SSiddarth Gore #define CONFIG_ARM926EJS	1	/* Basic Architecture */
3816b76705SSiddarth Gore #define CONFIG_SHEEVA_88SV131	1	/* CPU Core subversion */
3916b76705SSiddarth Gore #define CONFIG_KIRKWOOD		1	/* SOC Family Name */
4016b76705SSiddarth Gore #define CONFIG_KW88F6281	1	/* SOC Name */
4116b76705SSiddarth Gore #define CONFIG_MACH_GURUPLUG	/* Machine type */
4216b76705SSiddarth Gore 
4316b76705SSiddarth Gore #define CONFIG_MD5	/* get_random_hex on krikwood needs MD5 support */
4416b76705SSiddarth Gore #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
4516b76705SSiddarth Gore #define CONFIG_KIRKWOOD_EGIGA_INIT	/* Enable GbePort0/1 for kernel */
4616b76705SSiddarth Gore #define CONFIG_KIRKWOOD_RGMII_PAD_1V8	/* Set RGMII Pad voltage to 1.8V */
4716b76705SSiddarth Gore 
4816b76705SSiddarth Gore /*
4916b76705SSiddarth Gore  * CLKs configurations
5016b76705SSiddarth Gore  */
5116b76705SSiddarth Gore #define CONFIG_SYS_HZ		1000
5216b76705SSiddarth Gore 
5316b76705SSiddarth Gore /*
5416b76705SSiddarth Gore  * NS16550 Configuration
5516b76705SSiddarth Gore  */
5616b76705SSiddarth Gore #define CONFIG_SYS_NS16550
5716b76705SSiddarth Gore #define CONFIG_SYS_NS16550_SERIAL
5816b76705SSiddarth Gore #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
5916b76705SSiddarth Gore #define CONFIG_SYS_NS16550_CLK		CONFIG_SYS_TCLK
6016b76705SSiddarth Gore #define CONFIG_SYS_NS16550_COM1		KW_UART0_BASE
6116b76705SSiddarth Gore 
6216b76705SSiddarth Gore /*
6316b76705SSiddarth Gore  * Serial Port configuration
6416b76705SSiddarth Gore  * The following definitions let you select what serial you want to use
6516b76705SSiddarth Gore  * for your console driver.
6616b76705SSiddarth Gore  */
6716b76705SSiddarth Gore 
6816b76705SSiddarth Gore #define CONFIG_CONS_INDEX	1	/*Console on UART0 */
6916b76705SSiddarth Gore #define CONFIG_BAUDRATE			115200
7016b76705SSiddarth Gore #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
7116b76705SSiddarth Gore 					  115200,230400, 460800, 921600 }
7216b76705SSiddarth Gore /* auto boot */
7316b76705SSiddarth Gore #define CONFIG_BOOTDELAY	3	/* default enable autoboot */
7416b76705SSiddarth Gore 
7516b76705SSiddarth Gore /*
7616b76705SSiddarth Gore  * For booting Linux, the board info and command line data
7716b76705SSiddarth Gore  * have to be in the first 8 MB of memory, since this is
7816b76705SSiddarth Gore  * the maximum mapped by the Linux kernel during initialization.
7916b76705SSiddarth Gore  */
8016b76705SSiddarth Gore #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs  */
8116b76705SSiddarth Gore #define CONFIG_INITRD_TAG	1	/* enable INITRD tag */
8216b76705SSiddarth Gore #define CONFIG_SETUP_MEMORY_TAGS 1	/* enable memory tag */
8316b76705SSiddarth Gore 
8416b76705SSiddarth Gore #define	CONFIG_SYS_PROMPT	"Marvell>> "	/* Command Prompt */
8516b76705SSiddarth Gore #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
8616b76705SSiddarth Gore #define	CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE \
8716b76705SSiddarth Gore 		+sizeof(CONFIG_SYS_PROMPT) + 16)	/* Print Buff */
8816b76705SSiddarth Gore /*
8916b76705SSiddarth Gore  * Commands configuration
9016b76705SSiddarth Gore  */
9116b76705SSiddarth Gore #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
9216b76705SSiddarth Gore #include <config_cmd_default.h>
9316b76705SSiddarth Gore #define CONFIG_CMD_DHCP
9416b76705SSiddarth Gore #define CONFIG_CMD_ENV
9516b76705SSiddarth Gore #define CONFIG_CMD_FAT
9616b76705SSiddarth Gore #define CONFIG_CMD_NAND
9716b76705SSiddarth Gore #define CONFIG_CMD_PING
9816b76705SSiddarth Gore #define CONFIG_CMD_USB
9916b76705SSiddarth Gore 
10016b76705SSiddarth Gore /*
10116b76705SSiddarth Gore  * NAND configuration
10216b76705SSiddarth Gore  */
10316b76705SSiddarth Gore #ifdef CONFIG_CMD_NAND
10416b76705SSiddarth Gore #define CONFIG_NAND_KIRKWOOD
10516b76705SSiddarth Gore #define CONFIG_SYS_MAX_NAND_DEVICE	1
10616b76705SSiddarth Gore #define NAND_MAX_CHIPS			1
10716b76705SSiddarth Gore #define CONFIG_SYS_NAND_BASE		0xD8000000	/* KW_DEFADR_NANDF */
10816b76705SSiddarth Gore #define NAND_ALLOW_ERASE_ALL		1
10916b76705SSiddarth Gore #define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */
11016b76705SSiddarth Gore #endif
11116b76705SSiddarth Gore 
11216b76705SSiddarth Gore /*
11316b76705SSiddarth Gore  *  Environment variables configurations
11416b76705SSiddarth Gore  */
11516b76705SSiddarth Gore #ifdef CONFIG_CMD_NAND
11616b76705SSiddarth Gore #define CONFIG_ENV_IS_IN_NAND		1
11716b76705SSiddarth Gore #define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K */
11816b76705SSiddarth Gore #else
11916b76705SSiddarth Gore #define CONFIG_ENV_IS_NOWHERE		1	/* if env in SDRAM */
12016b76705SSiddarth Gore #endif
12116b76705SSiddarth Gore /*
12216b76705SSiddarth Gore  * max 4k env size is enough, but in case of nand
12316b76705SSiddarth Gore  * it has to be rounded to sector size
12416b76705SSiddarth Gore  */
12516b76705SSiddarth Gore #define CONFIG_ENV_SIZE			0x20000	/* 128k */
12616b76705SSiddarth Gore #define CONFIG_ENV_ADDR			0x40000
12716b76705SSiddarth Gore #define CONFIG_ENV_OFFSET		0x40000	/* env starts here */
12816b76705SSiddarth Gore 
12916b76705SSiddarth Gore /*
13016b76705SSiddarth Gore  * Default environment variables
13116b76705SSiddarth Gore  */
13216b76705SSiddarth Gore #define CONFIG_BOOTCOMMAND		"setenv ethact egiga0; " \
13316b76705SSiddarth Gore 	"${x_bootcmd_ethernet}; setenv ethact egiga1; " \
13416b76705SSiddarth Gore 	"${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; "\
13516b76705SSiddarth Gore 	"setenv bootargs ${x_bootargs} ${x_bootargs_root}; "	\
13616b76705SSiddarth Gore 	"bootm 0x6400000;"
13716b76705SSiddarth Gore 
13816b76705SSiddarth Gore #define CONFIG_EXTRA_ENV_SETTINGS	\
13916b76705SSiddarth Gore 	"x_bootcmd_ethernet=ping 192.168.2.1\0"	\
14016b76705SSiddarth Gore 	"x_bootcmd_usb=usb start\0"	\
14116b76705SSiddarth Gore 	"x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000\0" \
14216b76705SSiddarth Gore 	"x_bootargs=console=ttyS0,115200\0"	\
14316b76705SSiddarth Gore 	"x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0"
14416b76705SSiddarth Gore 
14516b76705SSiddarth Gore /*
14616b76705SSiddarth Gore  * Size of malloc() pool
14716b76705SSiddarth Gore  */
14816b76705SSiddarth Gore #define CONFIG_SYS_MALLOC_LEN	(1024 * 128) /* 128kB for malloc() */
14916b76705SSiddarth Gore /* size in bytes reserved for initial data */
15016b76705SSiddarth Gore #define CONFIG_SYS_GBL_DATA_SIZE	128
15116b76705SSiddarth Gore 
15216b76705SSiddarth Gore /*
15316b76705SSiddarth Gore  * Other required configurations
15416b76705SSiddarth Gore  */
15516b76705SSiddarth Gore #define CONFIG_CONSOLE_INFO_QUIET	/* some code reduction */
15616b76705SSiddarth Gore #define CONFIG_ARCH_CPU_INIT	/* call arch_cpu_init() */
15716b76705SSiddarth Gore #define CONFIG_ARCH_MISC_INIT	/* call arch_misc_init() */
15816b76705SSiddarth Gore #define CONFIG_DISPLAY_CPUINFO	/* Display cpu info */
15916b76705SSiddarth Gore #define CONFIG_NR_DRAM_BANKS	4
16016b76705SSiddarth Gore #define CONFIG_STACKSIZE	0x00100000	/* regular stack- 1M */
16116b76705SSiddarth Gore #define CONFIG_SYS_LOAD_ADDR	0x00800000	/* default load adr- 8M */
16216b76705SSiddarth Gore #define CONFIG_SYS_MEMTEST_START 0x00800000	/* 8M */
16316b76705SSiddarth Gore #define CONFIG_SYS_MEMTEST_END	0x1fffffff	/*(_512M -1) */
16416b76705SSiddarth Gore #define CONFIG_SYS_RESET_ADDRESS 0xffff0000	/* Rst Vector Adr */
16516b76705SSiddarth Gore #define CONFIG_SYS_MAXARGS	16	/* max number of command args */
16616b76705SSiddarth Gore 
16716b76705SSiddarth Gore /*
16816b76705SSiddarth Gore  * Ethernet Driver configuration
16916b76705SSiddarth Gore  */
17016b76705SSiddarth Gore #ifdef CONFIG_CMD_NET
17116b76705SSiddarth Gore #define CONFIG_NETCONSOLE	/* include NetConsole support   */
17216b76705SSiddarth Gore #define CONFIG_NET_MULTI	/* specify more that one ports available */
17316b76705SSiddarth Gore #define CONFIG_MII		/* expose smi ove miiphy interface */
17416b76705SSiddarth Gore #define CONFIG_CMD_MII
175*d44265adSAlbert Aribaud #define CONFIG_MVGBE		/* Enable Marvell Gbe Controller Driver */
17616b76705SSiddarth Gore #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
177*d44265adSAlbert Aribaud #define CONFIG_MVGBE_PORTS	{1, 1}	/* enable both ports */
17816b76705SSiddarth Gore #define CONFIG_PHY_BASE_ADR	0
17916b76705SSiddarth Gore #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
18016b76705SSiddarth Gore #define CONFIG_RESET_PHY_R	/* use reset_phy() to init mv88e1121 PHY */
18116b76705SSiddarth Gore #endif /* CONFIG_CMD_NET */
18216b76705SSiddarth Gore 
18316b76705SSiddarth Gore /*
18416b76705SSiddarth Gore  * USB/EHCI
18516b76705SSiddarth Gore  */
18616b76705SSiddarth Gore #ifdef CONFIG_CMD_USB
18716b76705SSiddarth Gore #define CONFIG_USB_EHCI			/* Enable EHCI USB support */
18816b76705SSiddarth Gore #define CONFIG_USB_EHCI_KIRKWOOD	/* on Kirkwood platform	*/
18916b76705SSiddarth Gore #define CONFIG_EHCI_IS_TDI
19016b76705SSiddarth Gore #define CONFIG_USB_STORAGE
19116b76705SSiddarth Gore #define CONFIG_DOS_PARTITION
19216b76705SSiddarth Gore #define CONFIG_ISO_PARTITION
19316b76705SSiddarth Gore #define CONFIG_SUPPORT_VFAT
19416b76705SSiddarth Gore #endif /* CONFIG_CMD_USB */
19516b76705SSiddarth Gore 
19616b76705SSiddarth Gore #define CONFIG_SYS_ALT_MEMTEST
19716b76705SSiddarth Gore 
19816b76705SSiddarth Gore #endif /* _CONFIG_GURUPLUG_H */
199