xref: /rk3399_rockchip-uboot/include/configs/sheevaplug.h (revision cb04db155f4e7ccaec1b961d8a84e1a1b9524594)
1 /*
2  * (C) Copyright 2009-2014
3  * Gerald Kerma <dreagle@doukki.net>
4  * Marvell Semiconductor <www.marvell.com>
5  * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
6  *
7  * SPDX-License-Identifier:	GPL-2.0+
8  */
9 
10 #ifndef _CONFIG_SHEEVAPLUG_H
11 #define _CONFIG_SHEEVAPLUG_H
12 
13 /*
14  * Version number information
15  */
16 #define CONFIG_IDENT_STRING	"\nMarvell-Sheevaplug"
17 
18 /*
19  * High Level Configuration Options (easy to change)
20  */
21 #define CONFIG_FEROCEON_88FR131	1	/* CPU Core subversion */
22 #define CONFIG_MACH_SHEEVAPLUG	/* Machine type */
23 
24 /*
25  * Commands configuration
26  */
27 #define CONFIG_CMD_MMC
28 
29 /*
30  * Standard filesystems
31  */
32 #define CONFIG_SYS_MVFS
33 
34 /*
35  * mv-plug-common.h should be defined after CMD configs since it used them
36  * to enable certain macros
37  */
38 #include "mv-plug-common.h"
39 
40 /*
41  *  Environment variables configurations
42  */
43 #ifdef CONFIG_CMD_NAND
44 #define CONFIG_ENV_IS_IN_NAND		1
45 #define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K */
46 #else
47 #define CONFIG_ENV_IS_NOWHERE		1	/* if env in SDRAM */
48 #endif
49 /*
50  * max 4k env size is enough, but in case of nand
51  * it has to be rounded to sector size
52  */
53 #define CONFIG_ENV_SIZE			0x20000	/* 128k */
54 #define CONFIG_ENV_ADDR			0x80000
55 #define CONFIG_ENV_OFFSET		0x80000	/* env starts here */
56 
57 /*
58  * Default environment variables
59  */
60 #define CONFIG_BOOTCOMMAND		"${x_bootcmd_kernel}; "	\
61 	"setenv bootargs ${x_bootargs} ${x_bootargs_root}; "	\
62 	"bootm 0x6400000;"
63 
64 #define CONFIG_MTDPARTS		\
65 	"orion_nand:512K(uboot),"				\
66 	"512K(env),4M(kernel),"					\
67 	"-(rootfs)\0"
68 
69 #define CONFIG_EXTRA_ENV_SETTINGS	"x_bootargs=console"	\
70 	"=ttyS0,115200 mtdparts="CONFIG_MTDPARTS	\
71 	"x_bootcmd_kernel=nand read 0x6400000 0x100000 0x400000\0" \
72 	"x_bootcmd_usb=usb start\0" \
73 	"x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2\0"
74 
75 #define MTDIDS_DEFAULT	"nand0=orion_nand"
76 
77 #define MTDPARTS_DEFAULT	\
78 	"mtdparts="CONFIG_MTDPARTS
79 
80 /*
81  * Ethernet Driver configuration
82  */
83 #ifdef CONFIG_CMD_NET
84 #define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
85 #define CONFIG_PHY_BASE_ADR	0
86 #endif /* CONFIG_CMD_NET */
87 
88 /*
89  * SDIO/MMC Card Configuration
90  */
91 #ifdef CONFIG_CMD_MMC
92 #define CONFIG_MMC
93 #define CONFIG_GENERIC_MMC
94 #define CONFIG_MVEBU_MMC
95 #define CONFIG_SYS_MMC_BASE KW_SDIO_BASE
96 #endif /* CONFIG_CMD_MMC */
97 
98 /*
99  * SATA driver configuration
100  */
101 #ifdef CONFIG_CMD_IDE
102 #define __io
103 #define CONFIG_IDE_PREINIT
104 #define CONFIG_DOS_PARTITION
105 #define CONFIG_MVSATA_IDE_USE_PORT0
106 #define CONFIG_MVSATA_IDE_USE_PORT1
107 #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
108 #define CONFIG_SYS_ATA_IDE1_OFFSET	MV_SATA_PORT1_OFFSET
109 #endif /* CONFIG_CMD_IDE */
110 
111 #endif /* _CONFIG_SHEEVAPLUG_H */
112