xref: /rk3399_rockchip-uboot/include/configs/guruplug.h (revision ea944003d57e9ac68774742b98bb15ca6a9b6d9c)
116b76705SSiddarth Gore /*
2361b3d86SGerald Kerma  * (C) Copyright 2009-2014
3361b3d86SGerald Kerma  * Gerald Kerma <dreagle@doukki.net>
416b76705SSiddarth Gore  * Marvell Semiconductor <www.marvell.com>
516b76705SSiddarth Gore  * Written-by: Siddarth Gore <gores@marvell.com>
616b76705SSiddarth Gore  *
71a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
816b76705SSiddarth Gore  */
916b76705SSiddarth Gore 
1016b76705SSiddarth Gore #ifndef _CONFIG_GURUPLUG_H
1116b76705SSiddarth Gore #define _CONFIG_GURUPLUG_H
1216b76705SSiddarth Gore 
13361b3d86SGerald Kerma 
1416b76705SSiddarth Gore /*
1516b76705SSiddarth Gore  * Version number information
1616b76705SSiddarth Gore  */
1716b76705SSiddarth Gore #define CONFIG_IDENT_STRING	"\nMarvell-GuruPlug"
1816b76705SSiddarth Gore 
1916b76705SSiddarth Gore /*
2016b76705SSiddarth Gore  * High Level Configuration Options (easy to change)
2116b76705SSiddarth Gore  */
2216b76705SSiddarth Gore #define CONFIG_SHEEVA_88SV131	1	/* CPU Core subversion */
2316b76705SSiddarth Gore #define CONFIG_KW88F6281	1	/* SOC Name */
2416b76705SSiddarth Gore #define CONFIG_MACH_GURUPLUG	/* Machine type */
2516b76705SSiddarth Gore #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
2616b76705SSiddarth Gore 
2764561639SQuentin Armitage /* Add target to build it automatically upon "make" */
2864561639SQuentin Armitage #define CONFIG_BUILD_TARGET     "u-boot.kwb"
2964561639SQuentin Armitage 
3016b76705SSiddarth Gore /*
31361b3d86SGerald Kerma  * Compression configuration
32361b3d86SGerald Kerma  */
33361b3d86SGerald Kerma #define CONFIG_BZIP2
34361b3d86SGerald Kerma #define CONFIG_LZMA
35361b3d86SGerald Kerma 
36361b3d86SGerald Kerma /*
37361b3d86SGerald Kerma  * Enable device tree support
38361b3d86SGerald Kerma  */
39361b3d86SGerald Kerma #define CONFIG_OF_LIBFDT
40361b3d86SGerald Kerma 
41361b3d86SGerald Kerma /*
4216b76705SSiddarth Gore  * Commands configuration
4316b76705SSiddarth Gore  */
4416b76705SSiddarth Gore #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
45361b3d86SGerald Kerma #define CONFIG_CMD_BOOTZ
4664561639SQuentin Armitage #define CONFIG_CMD_DATE
4716b76705SSiddarth Gore #define CONFIG_CMD_ENV
48361b3d86SGerald Kerma #define CONFIG_CMD_IDE
49361b3d86SGerald Kerma #define CONFIG_CMD_MII
5016b76705SSiddarth Gore 
5116b76705SSiddarth Gore /*
52*ea944003SQuentin Armitage  * Standard filesystems
53*ea944003SQuentin Armitage  */
54*ea944003SQuentin Armitage #define CONFIG_SYS_MVFS
55*ea944003SQuentin Armitage 
56*ea944003SQuentin Armitage /*
57*ea944003SQuentin Armitage  * Extra file system
58*ea944003SQuentin Armitage  */
59*ea944003SQuentin Armitage #define CONFIG_CMD_EXT4
60*ea944003SQuentin Armitage 
61*ea944003SQuentin Armitage /*
6254e999a3SPrafulla Wadaskar  * mv-common.h should be defined after CMD configs since it used them
6354e999a3SPrafulla Wadaskar  * to enable certain macros
6416b76705SSiddarth Gore  */
6554e999a3SPrafulla Wadaskar #include "mv-common.h"
6616b76705SSiddarth Gore 
6716b76705SSiddarth Gore /*
6816b76705SSiddarth Gore  *  Environment variables configurations
6916b76705SSiddarth Gore  */
7016b76705SSiddarth Gore #ifdef CONFIG_CMD_NAND
7116b76705SSiddarth Gore #define CONFIG_ENV_IS_IN_NAND		1
7216b76705SSiddarth Gore #define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K */
7316b76705SSiddarth Gore #else
7416b76705SSiddarth Gore #define CONFIG_ENV_IS_NOWHERE		1	/* if env in SDRAM */
7516b76705SSiddarth Gore #endif
7616b76705SSiddarth Gore /*
7716b76705SSiddarth Gore  * max 4k env size is enough, but in case of nand
7816b76705SSiddarth Gore  * it has to be rounded to sector size
7916b76705SSiddarth Gore  */
8016b76705SSiddarth Gore #define CONFIG_ENV_SIZE			0x20000	/* 128k */
81361b3d86SGerald Kerma #define CONFIG_ENV_OFFSET		0xE0000	/* env starts here */
8216b76705SSiddarth Gore 
8316b76705SSiddarth Gore /*
8416b76705SSiddarth Gore  * Default environment variables
8516b76705SSiddarth Gore  */
86361b3d86SGerald Kerma #define CONFIG_BOOTCOMMAND \
87361b3d86SGerald Kerma 	"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; "	\
88361b3d86SGerald Kerma 	"ubi part root; "						\
89361b3d86SGerald Kerma 	"ubifsmount ubi:rootfs; "					\
90361b3d86SGerald Kerma 	"ubifsload 0x800000 ${kernel}; "				\
91361b3d86SGerald Kerma 	"ubifsload 0x700000 ${fdt}; "					\
92361b3d86SGerald Kerma 	"ubifsumount; "							\
93361b3d86SGerald Kerma 	"fdt addr 0x700000; fdt resize; fdt chosen; "			\
94361b3d86SGerald Kerma 	"bootz 0x800000 - 0x700000"
95361b3d86SGerald Kerma 
96361b3d86SGerald Kerma #define CONFIG_MTDPARTS	\
97361b3d86SGerald Kerma 	"mtdparts=orion_nand:"						\
98361b3d86SGerald Kerma 	"896K(uboot),128K(uboot_env),"					\
99361b3d86SGerald Kerma 	"-@1M(root)\0"
10016b76705SSiddarth Gore 
10116b76705SSiddarth Gore #define CONFIG_EXTRA_ENV_SETTINGS \
102361b3d86SGerald Kerma 	"console=console=ttyS0,115200\0"				\
103361b3d86SGerald Kerma 	"mtdids=nand0=orion_nand\0"					\
104361b3d86SGerald Kerma 	"mtdparts="CONFIG_MTDPARTS					\
105361b3d86SGerald Kerma 	"kernel=/boot/zImage\0"						\
106361b3d86SGerald Kerma 	"fdt=/boot/guruplug-server-plus.dtb\0"				\
107361b3d86SGerald Kerma 	"bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
108361b3d86SGerald Kerma 
109361b3d86SGerald Kerma #define MTDIDS_DEFAULT	"nand0=orion_nand"
110361b3d86SGerald Kerma 
111361b3d86SGerald Kerma #define MTDPARTS_DEFAULT	\
112361b3d86SGerald Kerma 	"mtdparts="CONFIG_MTDPARTS
11316b76705SSiddarth Gore 
11416b76705SSiddarth Gore /*
11516b76705SSiddarth Gore  * Ethernet Driver configuration
11616b76705SSiddarth Gore  */
11716b76705SSiddarth Gore #ifdef CONFIG_CMD_NET
118d44265adSAlbert Aribaud #define CONFIG_MVGBE_PORTS	{1, 1}	/* enable both ports */
11916b76705SSiddarth Gore #define CONFIG_PHY_BASE_ADR	0
12016b76705SSiddarth Gore #endif /* CONFIG_CMD_NET */
12116b76705SSiddarth Gore 
12216b76705SSiddarth Gore /*
12354e999a3SPrafulla Wadaskar  * SATA Driver configuration
12416b76705SSiddarth Gore  */
12554e999a3SPrafulla Wadaskar #ifdef CONFIG_MVSATA_IDE
12654e999a3SPrafulla Wadaskar #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
12754e999a3SPrafulla Wadaskar #endif /*CONFIG_MVSATA_IDE*/
12816b76705SSiddarth Gore 
129361b3d86SGerald Kerma /*
13064561639SQuentin Armitage  * RTC driver configuration
13164561639SQuentin Armitage  */
13264561639SQuentin Armitage #ifdef CONFIG_CMD_DATE
13364561639SQuentin Armitage #define CONFIG_RTC_MV
13464561639SQuentin Armitage #endif /* CONFIG_CMD_DATE */
13564561639SQuentin Armitage 
13616b76705SSiddarth Gore #define CONFIG_SYS_ALT_MEMTEST
13716b76705SSiddarth Gore 
13816b76705SSiddarth Gore #endif /* _CONFIG_GURUPLUG_H */
139