xref: /openbmc/u-boot/include/configs/dreamplug.h (revision c7b9686d)
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  * SPDX-License-Identifier:	GPL-2.0+
10  */
11 
12 #ifndef _CONFIG_DREAMPLUG_H
13 #define _CONFIG_DREAMPLUG_H
14 
15 /*
16  * FIXME: This belongs in mach-types.h.  However, we only pull mach-types
17  * from Linus' kernel.org tree.  This hasn't been updated primarily due to
18  * the recent arch/arm reshuffling.  So, in the meantime, we'll place it
19  * here.
20  */
21 #include <asm/mach-types.h>
22 #ifdef MACH_TYPE_DREAMPLUG
23 #error "MACH_TYPE_DREAMPLUG has been defined properly, please remove this."
24 #else
25 #define MACH_TYPE_DREAMPLUG            3550
26 #endif
27 
28 /*
29  * Version number information
30  */
31 #define CONFIG_IDENT_STRING	"\nMarvell-DreamPlug"
32 
33 /*
34  * High Level Configuration Options (easy to change)
35  */
36 #define CONFIG_SHEEVA_88SV131	1	/* CPU Core subversion */
37 #define CONFIG_MACH_TYPE	MACH_TYPE_DREAMPLUG
38 
39 /*
40  * Commands configuration
41  */
42 #define CONFIG_CMD_EXT2
43 #define CONFIG_CMD_FAT
44 
45 /*
46  * mv-plug-common.h should be defined after CMD configs since it used them
47  * to enable certain macros
48  */
49 #include "mv-plug-common.h"
50 
51 /*
52  *  Environment variables configurations
53  */
54 #ifdef CONFIG_SPI_FLASH
55 #define CONFIG_ENV_IS_IN_SPI_FLASH	1
56 #define CONFIG_ENV_SECT_SIZE		0x10000	/* 64k */
57 #else
58 #define CONFIG_ENV_IS_NOWHERE		1	/* if env in SDRAM */
59 #endif
60 
61 #ifdef CONFIG_CMD_SF
62 #define CONFIG_HARD_SPI			1
63 #define CONFIG_KIRKWOOD_SPI		1
64 #define CONFIG_SPI_FLASH_MACRONIX	1
65 #define CONFIG_ENV_SPI_BUS		0
66 #define CONFIG_ENV_SPI_CS		0
67 #define CONFIG_ENV_SPI_MAX_HZ		50000000 /* 50 MHz */
68 #endif
69 
70 /*
71  * max 4k env size is enough, but in case of nand
72  * it has to be rounded to sector size
73  */
74 #define CONFIG_ENV_SIZE			0x1000  /* 4k */
75 #define CONFIG_ENV_ADDR			0x100000
76 #define CONFIG_ENV_OFFSET		0x100000 /* env starts here */
77 
78 /*
79  * Default environment variables
80  */
81 #define CONFIG_BOOTCOMMAND		"setenv ethact egiga0; " \
82 	"${x_bootcmd_ethernet}; setenv ethact egiga1; " \
83 	"${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; "\
84 	"setenv bootargs ${x_bootargs} ${x_bootargs_root}; "	\
85 	"bootm 0x6400000;"
86 
87 #define CONFIG_EXTRA_ENV_SETTINGS	\
88 	"x_bootcmd_ethernet=ping 192.168.2.1\0"	\
89 	"x_bootcmd_usb=usb start\0"	\
90 	"x_bootcmd_kernel=fatload usb 0 0x6400000 uImage\0" \
91 	"x_bootargs=console=ttyS0,115200\0"	\
92 	"x_bootargs_root=root=/dev/sda2 rootdelay=10\0"
93 
94 /*
95  * Ethernet Driver configuration
96  */
97 #ifdef CONFIG_CMD_NET
98 #define CONFIG_MVGBE_PORTS	{1, 1}	/* enable both ports */
99 #define CONFIG_PHY_BASE_ADR	0
100 #endif /* CONFIG_CMD_NET */
101 
102 /*
103  * SATA Driver configuration
104  */
105 #ifdef CONFIG_MVSATA_IDE
106 #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
107 #endif /*CONFIG_MVSATA_IDE*/
108 
109 #endif /* _CONFIG_DREAMPLUG_H */
110