xref: /rk3399_rockchip-uboot/include/configs/guruplug.h (revision 64561639080a30aad055e6024612ffe9b2a38baa)
1 /*
2  * (C) Copyright 2009-2014
3  * Gerald Kerma <dreagle@doukki.net>
4  * Marvell Semiconductor <www.marvell.com>
5  * Written-by: Siddarth Gore <gores@marvell.com>
6  *
7  * SPDX-License-Identifier:	GPL-2.0+
8  */
9 
10 #ifndef _CONFIG_GURUPLUG_H
11 #define _CONFIG_GURUPLUG_H
12 
13 
14 /*
15  * Version number information
16  */
17 #define CONFIG_IDENT_STRING	"\nMarvell-GuruPlug"
18 
19 /*
20  * High Level Configuration Options (easy to change)
21  */
22 #define CONFIG_SHEEVA_88SV131	1	/* CPU Core subversion */
23 #define CONFIG_KW88F6281	1	/* SOC Name */
24 #define CONFIG_MACH_GURUPLUG	/* Machine type */
25 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
26 
27 /* Add target to build it automatically upon "make" */
28 #define CONFIG_BUILD_TARGET     "u-boot.kwb"
29 
30 /*
31  * Compression configuration
32  */
33 #define CONFIG_BZIP2
34 #define CONFIG_LZMA
35 #define CONFIG_LZO
36 
37 /*
38  * Enable device tree support
39  */
40 #define CONFIG_OF_LIBFDT
41 
42 /*
43  * Miscellaneous configurable options
44  */
45 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
46 
47 /*
48  * Commands configuration
49  */
50 #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
51 #define CONFIG_CMD_BOOTZ
52 #define CONFIG_CMD_DATE
53 #define CONFIG_CMD_DHCP
54 #define CONFIG_CMD_ENV
55 #define CONFIG_CMD_IDE
56 #define CONFIG_CMD_MII
57 #define CONFIG_CMD_NAND
58 #define CONFIG_CMD_PING
59 #define CONFIG_CMD_USB
60 #define CONFIG_CMD_FAT
61 
62 /*
63  * mv-common.h should be defined after CMD configs since it used them
64  * to enable certain macros
65  */
66 #include "mv-common.h"
67 
68 /*
69  *  Environment variables configurations
70  */
71 #ifdef CONFIG_CMD_NAND
72 #define CONFIG_ENV_IS_IN_NAND		1
73 #define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K */
74 #else
75 #define CONFIG_ENV_IS_NOWHERE		1	/* if env in SDRAM */
76 #endif
77 /*
78  * max 4k env size is enough, but in case of nand
79  * it has to be rounded to sector size
80  */
81 #define CONFIG_ENV_SIZE			0x20000	/* 128k */
82 #define CONFIG_ENV_OFFSET		0xE0000	/* env starts here */
83 
84 /*
85  * Default environment variables
86  */
87 #define CONFIG_BOOTCOMMAND \
88 	"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; "	\
89 	"ubi part root; "						\
90 	"ubifsmount ubi:rootfs; "					\
91 	"ubifsload 0x800000 ${kernel}; "				\
92 	"ubifsload 0x700000 ${fdt}; "					\
93 	"ubifsumount; "							\
94 	"fdt addr 0x700000; fdt resize; fdt chosen; "			\
95 	"bootz 0x800000 - 0x700000"
96 
97 #define CONFIG_MTDPARTS	\
98 	"mtdparts=orion_nand:"						\
99 	"896K(uboot),128K(uboot_env),"					\
100 	"-@1M(root)\0"
101 
102 #define CONFIG_EXTRA_ENV_SETTINGS \
103 	"console=console=ttyS0,115200\0"				\
104 	"mtdids=nand0=orion_nand\0"					\
105 	"mtdparts="CONFIG_MTDPARTS					\
106 	"kernel=/boot/zImage\0"						\
107 	"fdt=/boot/guruplug-server-plus.dtb\0"				\
108 	"bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
109 
110 #define MTDIDS_DEFAULT	"nand0=orion_nand"
111 
112 #define MTDPARTS_DEFAULT	\
113 	"mtdparts="CONFIG_MTDPARTS
114 
115 /*
116  * Ethernet Driver configuration
117  */
118 #ifdef CONFIG_CMD_NET
119 #define CONFIG_MVGBE_PORTS	{1, 1}	/* enable both ports */
120 #define CONFIG_PHY_BASE_ADR	0
121 #endif /* CONFIG_CMD_NET */
122 
123 /*
124  * SATA Driver configuration
125  */
126 #ifdef CONFIG_MVSATA_IDE
127 #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
128 #endif /*CONFIG_MVSATA_IDE*/
129 
130 /*
131  * RTC driver configuration
132  */
133 #ifdef CONFIG_CMD_DATE
134 #define CONFIG_RTC_MV
135 #endif /* CONFIG_CMD_DATE */
136 
137 /*
138  * File system
139  */
140 #define CONFIG_CMD_EXT2
141 #define CONFIG_CMD_EXT4
142 #define CONFIG_CMD_FAT
143 #define CONFIG_CMD_JFFS2
144 #define CONFIG_CMD_UBI
145 #define CONFIG_CMD_UBIFS
146 #define CONFIG_RBTREE
147 #define CONFIG_MTD_DEVICE
148 #define CONFIG_MTD_PARTITIONS
149 #define CONFIG_CMD_MTDPARTS
150 
151 #define CONFIG_SYS_ALT_MEMTEST
152 
153 #endif /* _CONFIG_GURUPLUG_H */
154