xref: /openbmc/u-boot/include/configs/lsxl.h (revision 713cb680)
1 /*
2  * Copyright (c) 2012 Michael Walle
3  * Michael Walle <michael@walle.cc>
4  *
5  * See file CREDITS for list of people who contributed to this
6  * project.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23 
24 #ifndef _CONFIG_LSXL_H
25 #define _CONFIG_LSXL_H
26 
27 /*
28  * Version number information
29  */
30 #if defined(CONFIG_LSCHLV2)
31 #define CONFIG_IDENT_STRING " LS-CHLv2"
32 #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-lschl.cfg
33 #define CONFIG_MACH_TYPE 3006
34 #define CONFIG_SYS_TCLK 166666667 /* 166 MHz */
35 #elif defined(CONFIG_LSXHL)
36 #define CONFIG_IDENT_STRING " LS-XHL"
37 #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-lsxhl.cfg
38 #define CONFIG_MACH_TYPE 2663
39 /* CONFIG_SYS_TCLK is 200000000 by default */
40 #else
41 #error "unknown board"
42 #endif
43 
44 /*
45  * General configuration options
46  */
47 #define CONFIG_FEROCEON_88FR131		/* CPU Core subversion */
48 #define CONFIG_KIRKWOOD			/* SOC Family Name */
49 #define CONFIG_KW88F6281		/* SOC Name */
50 
51 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
52 #define CONFIG_MISC_INIT_R
53 #define CONFIG_SHOW_BOOT_PROGRESS
54 
55 #define CONFIG_RANDOM_MACADDR
56 #define CONFIG_KIRKWOOD_GPIO
57 #define CONFIG_OF_LIBFDT
58 
59 #define CONFIG_SYS_NO_FLASH
60 #define CONFIG_SYS_HUSH_PARSER
61 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
62 #define CONFIG_SYS_CONSOLE_INFO_QUIET
63 
64 /*
65  * Enable u-boot API for standalone programs.
66  */
67 #define CONFIG_API
68 
69 /*
70  * Commands configuration
71  */
72 #include <config_cmd_default.h>
73 #define CONFIG_CMD_DHCP
74 #define CONFIG_CMD_ELF
75 #define CONFIG_CMD_ENV
76 #define CONFIG_CMD_EXT2
77 #define CONFIG_CMD_FAT
78 #define CONFIG_CMD_IDE
79 #define CONFIG_CMD_PING
80 #define CONFIG_CMD_PING
81 #define CONFIG_CMD_SF
82 #define CONFIG_CMD_SPI
83 #define CONFIG_CMD_USB
84 
85 #define CONFIG_DOS_PARTITION
86 #define CONFIG_EFI_PARTITION
87 
88 /*
89  * mv-common.h should be defined after CMD configs since it used them
90  * to enable certain macros
91  */
92 #include "mv-common.h"
93 
94 /* ST M25P40 */
95 #undef CONFIG_SPI_FLASH_MACRONIX
96 #define CONFIG_SPI_FLASH_STMICRO
97 #undef CONFIG_ENV_SPI_MAX_HZ
98 #define CONFIG_ENV_SPI_MAX_HZ		25000000
99 #undef CONFIG_SF_DEFAULT_SPEED
100 #define CONFIG_SF_DEFAULT_SPEED		25000000
101 
102 
103 #undef CONFIG_SYS_PROMPT
104 #define CONFIG_SYS_PROMPT		"=> "
105 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
106 
107 /*
108  *  Environment variables configurations
109  */
110 #ifdef CONFIG_SPI_FLASH
111 #define CONFIG_SYS_MAX_FLASH_BANKS	1
112 #define CONFIG_SYS_MAX_FLASH_SECT	8
113 #define CONFIG_ENV_IS_IN_SPI_FLASH	1
114 #define CONFIG_ENV_SECT_SIZE		0x10000 /* 64K */
115 #else
116 #define CONFIG_ENV_IS_NOWHERE
117 #endif
118 
119 #define CONFIG_ENV_SIZE			0x10000 /* 64k */
120 #define CONFIG_ENV_OFFSET		0x70000 /* env starts here */
121 
122 /*
123  * Default environment variables
124  */
125 #define CONFIG_LOADADDR		0x00800000
126 #define CONFIG_BOOTCOMMAND	"run bootcmd_${bootsource}"
127 #define CONFIG_BOOTARGS		"console=ttyS0,115200 root=/dev/sda2"
128 #define CONFIG_EXTRA_ENV_SETTINGS					\
129 	"bootsource=hdd\0"						\
130 	"hdpart=0:1\0"							\
131 	"bootcmd_net=bootp 0x00100000 uImage "				\
132 		"&& tftpboot 0x00800000 uInitrd "			\
133 		"&& bootm 0x00100000 0x00800000\0"			\
134 	"bootcmd_hdd=ide reset "					\
135 		"&& ext2load ide ${hdpart} 0x00100000 /uImage "		\
136 		"&& ext2load ide ${hdpart} 0x00800000 /uInitrd "	\
137 		"&& bootm 0x00100000 0x00800000\0"			\
138 	"bootcmd_usb=usb start "					\
139 		"&& fatload usb 0:1 0x00100000 /uImage "		\
140 		"&& fatload usb 0:1 0x00800000 /uInitrd "		\
141 		"&& bootm 0x00100000 0x00800000\0"			\
142 	"bootcmd_rescue=run config_nc_dhcp; run nc\0"			\
143 	"eraseenv=sf probe 0 "						\
144 		"&& sf erase " __stringify(CONFIG_ENV_OFFSET)		\
145 			" +" __stringify(CONFIG_ENV_SIZE) "\0"		\
146 	"config_nc_dhcp=setenv autoload_old ${autoload}; "		\
147 		"setenv autoload no "					\
148 		"&& bootp "						\
149 		"&& setenv ncip "					\
150 		"&& setenv autoload ${autoload_old}; "			\
151 		"setenv autoload_old\0"					\
152 	"standard_env=setenv ipaddr; setenv netmask; setenv serverip; "	\
153 		"setenv ncip; setenv gatewayip; setenv ethact; "	\
154 		"setenv bootfile; setenv dnsip; "			\
155 		"setenv bootsource hdd; run ser\0"			\
156 	"restore_env=run standard_env; saveenv; reset\0"		\
157 	"ser=setenv stdin serial; setenv stdout serial; "		\
158 		"setenv stderr serial\0"				\
159 	"nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0"	\
160 	"stdin=serial\0"						\
161 	"stdout=serial\0"						\
162 	"stderr=serial\0"
163 
164 /*
165  * Ethernet Driver configuration
166  */
167 #ifdef CONFIG_CMD_NET
168 #define CONFIG_MVGBE_PORTS		{0, 1} /* enable port 1 only */
169 #define CONFIG_PHY_BASE_ADR		7
170 #undef CONFIG_RESET_PHY_R
171 #endif /* CONFIG_CMD_NET */
172 
173 #ifdef CONFIG_CMD_IDE
174 #undef CONFIG_IDE_LED
175 #undef CONFIG_SYS_IDE_MAXBUS
176 #define CONFIG_SYS_IDE_MAXBUS		1
177 #undef CONFIG_SYS_IDE_MAXDEVICE
178 #define CONFIG_SYS_IDE_MAXDEVICE	1
179 #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
180 #endif
181 
182 #endif /* _CONFIG_LSXL_H */
183