xref: /openbmc/u-boot/include/configs/dreamplug.h (revision 3f82d89d)
1 /*
2  * (C) Copyright 2011
3  * Jason Cooper <u-boot@lakedaemon.net>
4  *
5  * Based on work by:
6  * Marvell Semiconductor <www.marvell.com>
7  * Written-by: Siddarth Gore <gores@marvell.com>
8  *
9  * See file CREDITS for list of people who contributed to this
10  * project.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License as
14  * published by the Free Software Foundation; either version 2 of
15  * the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
25  * MA 02110-1301 USA
26  */
27 
28 #ifndef _CONFIG_DREAMPLUG_H
29 #define _CONFIG_DREAMPLUG_H
30 
31 /*
32  * FIXME: This belongs in mach-types.h.  However, we only pull mach-types
33  * from Linus' kernel.org tree.  This hasn't been updated primarily due to
34  * the recent arch/arm reshuffling.  So, in the meantime, we'll place it
35  * here.
36  */
37 #include <asm/mach-types.h>
38 #ifdef MACH_TYPE_DREAMPLUG
39 #error "MACH_TYPE_DREAMPLUG has been defined properly, please remove this."
40 #else
41 #define MACH_TYPE_DREAMPLUG            3550
42 #endif
43 
44 /*
45  * Version number information
46  */
47 #define CONFIG_IDENT_STRING	"\nMarvell-DreamPlug"
48 
49 /*
50  * High Level Configuration Options (easy to change)
51  */
52 #define CONFIG_SHEEVA_88SV131	1	/* CPU Core subversion */
53 #define CONFIG_KIRKWOOD		1	/* SOC Family Name */
54 #define CONFIG_KW88F6281	1	/* SOC Name */
55 #define CONFIG_MACH_TYPE	MACH_TYPE_DREAMPLUG
56 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
57 
58 /*
59  * Commands configuration
60  */
61 #define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
62 #include <config_cmd_default.h>
63 #define CONFIG_CMD_DHCP
64 #define CONFIG_CMD_ENV
65 #define CONFIG_CMD_FAT
66 #define CONFIG_CMD_SF
67 #define CONFIG_CMD_PING
68 #define CONFIG_CMD_USB
69 #define CONFIG_CMD_IDE
70 #define CONFIG_CMD_DATE
71 
72 /*
73  * mv-common.h should be defined after CMD configs since it used them
74  * to enable certain macros
75  */
76 #include "mv-common.h"
77 
78 /*
79  *  Environment variables configurations
80  */
81 #ifdef CONFIG_SPI_FLASH
82 #define CONFIG_ENV_IS_IN_SPI_FLASH	1
83 #define CONFIG_ENV_SECT_SIZE		0x10000	/* 64k */
84 #else
85 #define CONFIG_ENV_IS_NOWHERE		1	/* if env in SDRAM */
86 #endif
87 
88 #ifdef CONFIG_CMD_SF
89 #define CONFIG_SPI_FLASH		1
90 #define CONFIG_HARD_SPI			1
91 #define CONFIG_KIRKWOOD_SPI		1
92 #define CONFIG_SPI_FLASH_MACRONIX	1
93 #define CONFIG_ENV_SPI_BUS		0
94 #define CONFIG_ENV_SPI_CS		0
95 #define CONFIG_ENV_SPI_MAX_HZ		50000000 /* 50 MHz */
96 #endif
97 
98 /*
99  * max 4k env size is enough, but in case of nand
100  * it has to be rounded to sector size
101  */
102 #define CONFIG_ENV_SIZE			0x1000  /* 4k */
103 #define CONFIG_ENV_ADDR			0x100000
104 #define CONFIG_ENV_OFFSET		0x100000 /* env starts here */
105 
106 /*
107  * Default environment variables
108  */
109 #define CONFIG_BOOTCOMMAND		"setenv ethact egiga0; " \
110 	"${x_bootcmd_ethernet}; setenv ethact egiga1; " \
111 	"${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; "\
112 	"setenv bootargs ${x_bootargs} ${x_bootargs_root}; "	\
113 	"bootm 0x6400000;"
114 
115 #define CONFIG_EXTRA_ENV_SETTINGS	\
116 	"x_bootcmd_ethernet=ping 192.168.2.1\0"	\
117 	"x_bootcmd_usb=usb start\0"	\
118 	"x_bootcmd_kernel=fatload usb 0 0x6400000 uImage\0" \
119 	"x_bootargs=console=ttyS0,115200\0"	\
120 	"x_bootargs_root=root=/dev/sda2 rootdelay=10\0"
121 
122 /*
123  * Ethernet Driver configuration
124  */
125 #ifdef CONFIG_CMD_NET
126 #define CONFIG_MVGBE_PORTS	{1, 1}	/* enable both ports */
127 #define CONFIG_PHY_BASE_ADR	0
128 #endif /* CONFIG_CMD_NET */
129 
130 /*
131  * SATA Driver configuration
132  */
133 #ifdef CONFIG_MVSATA_IDE
134 #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
135 #endif /*CONFIG_MVSATA_IDE*/
136 
137 /*
138  * RTC driver configuration
139  */
140 #ifdef CONFIG_CMD_DATE
141 #define CONFIG_RTC_MV
142 #endif /* CONFIG_CMD_DATE */
143 
144 #define CONFIG_SYS_ALT_MEMTEST
145 
146 /*
147  * display enhanced info about the cpu at boot.
148  */
149 #define CONFIG_DISPLAY_CPUINFO
150 
151 #define CONFIG_OF_LIBFDT
152 
153 #endif /* _CONFIG_DREAMPLUG_H */
154