xref: /openbmc/u-boot/include/configs/lsxl.h (revision 7ca6f363)
1 /*
2  * Copyright (c) 2012 Michael Walle
3  * Michael Walle <michael@walle.cc>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #ifndef _CONFIG_LSXL_H
9 #define _CONFIG_LSXL_H
10 
11 /*
12  * Version number information
13  */
14 #if defined(CONFIG_LSCHLV2)
15 #define CONFIG_IDENT_STRING " LS-CHLv2"
16 #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-lschl.cfg
17 #define CONFIG_MACH_TYPE 3006
18 #define CONFIG_SYS_TCLK 166666667 /* 166 MHz */
19 #elif defined(CONFIG_LSXHL)
20 #define CONFIG_IDENT_STRING " LS-XHL"
21 #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-lsxhl.cfg
22 #define CONFIG_MACH_TYPE 2663
23 /* CONFIG_SYS_TCLK is 200000000 by default */
24 #else
25 #error "unknown board"
26 #endif
27 
28 /*
29  * General configuration options
30  */
31 #define CONFIG_FEROCEON_88FR131		/* CPU Core subversion */
32 #define CONFIG_KIRKWOOD			/* SOC Family Name */
33 #define CONFIG_KW88F6281		/* SOC Name */
34 
35 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
36 #define CONFIG_MISC_INIT_R
37 #define CONFIG_SHOW_BOOT_PROGRESS
38 
39 #define CONFIG_RANDOM_MACADDR
40 #define CONFIG_KIRKWOOD_GPIO
41 #define CONFIG_OF_LIBFDT
42 
43 #define CONFIG_SYS_NO_FLASH
44 #define CONFIG_SYS_HUSH_PARSER
45 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
46 #define CONFIG_SYS_CONSOLE_INFO_QUIET
47 
48 /*
49  * Enable u-boot API for standalone programs.
50  */
51 #define CONFIG_API
52 
53 /*
54  * Commands configuration
55  */
56 #include <config_cmd_default.h>
57 #define CONFIG_CMD_DHCP
58 #define CONFIG_CMD_ELF
59 #define CONFIG_CMD_ENV
60 #define CONFIG_CMD_EXT2
61 #define CONFIG_CMD_FAT
62 #define CONFIG_CMD_IDE
63 #define CONFIG_CMD_PING
64 #define CONFIG_CMD_PING
65 #define CONFIG_CMD_SF
66 #define CONFIG_CMD_SPI
67 #define CONFIG_CMD_USB
68 
69 #define CONFIG_DOS_PARTITION
70 #define CONFIG_EFI_PARTITION
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 /* ST M25P40 */
79 #undef CONFIG_SPI_FLASH_MACRONIX
80 #define CONFIG_SPI_FLASH_STMICRO
81 #undef CONFIG_ENV_SPI_MAX_HZ
82 #define CONFIG_ENV_SPI_MAX_HZ		25000000
83 #undef CONFIG_SF_DEFAULT_SPEED
84 #define CONFIG_SF_DEFAULT_SPEED		25000000
85 
86 
87 #undef CONFIG_SYS_PROMPT
88 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
89 
90 /*
91  *  Environment variables configurations
92  */
93 #ifdef CONFIG_SPI_FLASH
94 #define CONFIG_SYS_MAX_FLASH_BANKS	1
95 #define CONFIG_SYS_MAX_FLASH_SECT	8
96 #define CONFIG_ENV_IS_IN_SPI_FLASH	1
97 #define CONFIG_ENV_SECT_SIZE		0x10000 /* 64K */
98 #else
99 #define CONFIG_ENV_IS_NOWHERE
100 #endif
101 
102 #define CONFIG_ENV_SIZE			0x10000 /* 64k */
103 #define CONFIG_ENV_OFFSET		0x70000 /* env starts here */
104 
105 /*
106  * Default environment variables
107  */
108 #define CONFIG_LOADADDR		0x00800000
109 #define CONFIG_BOOTCOMMAND	"run bootcmd_${bootsource}"
110 #define CONFIG_BOOTARGS		"console=ttyS0,115200 root=/dev/sda2"
111 #define CONFIG_EXTRA_ENV_SETTINGS					\
112 	"bootsource=hdd\0"						\
113 	"hdpart=0:1\0"							\
114 	"bootcmd_net=bootp 0x00100000 uImage "				\
115 		"&& tftpboot 0x00800000 uInitrd "			\
116 		"&& bootm 0x00100000 0x00800000\0"			\
117 	"bootcmd_hdd=ide reset "					\
118 		"&& ext2load ide ${hdpart} 0x00100000 /uImage "		\
119 		"&& ext2load ide ${hdpart} 0x00800000 /uInitrd "	\
120 		"&& bootm 0x00100000 0x00800000\0"			\
121 	"bootcmd_usb=usb start "					\
122 		"&& fatload usb 0:1 0x00100000 /uImage "		\
123 		"&& fatload usb 0:1 0x00800000 /uInitrd "		\
124 		"&& bootm 0x00100000 0x00800000\0"			\
125 	"bootcmd_rescue=run config_nc_dhcp; run nc\0"			\
126 	"eraseenv=sf probe 0 "						\
127 		"&& sf erase " __stringify(CONFIG_ENV_OFFSET)		\
128 			" +" __stringify(CONFIG_ENV_SIZE) "\0"		\
129 	"config_nc_dhcp=setenv autoload_old ${autoload}; "		\
130 		"setenv autoload no "					\
131 		"&& bootp "						\
132 		"&& setenv ncip "					\
133 		"&& setenv autoload ${autoload_old}; "			\
134 		"setenv autoload_old\0"					\
135 	"standard_env=setenv ipaddr; setenv netmask; setenv serverip; "	\
136 		"setenv ncip; setenv gatewayip; setenv ethact; "	\
137 		"setenv bootfile; setenv dnsip; "			\
138 		"setenv bootsource hdd; run ser\0"			\
139 	"restore_env=run standard_env; saveenv; reset\0"		\
140 	"ser=setenv stdin serial; setenv stdout serial; "		\
141 		"setenv stderr serial\0"				\
142 	"nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0"	\
143 	"stdin=serial\0"						\
144 	"stdout=serial\0"						\
145 	"stderr=serial\0"
146 
147 /*
148  * Ethernet Driver configuration
149  */
150 #ifdef CONFIG_CMD_NET
151 #define CONFIG_MVGBE_PORTS		{0, 1} /* enable port 1 only */
152 #define CONFIG_PHY_BASE_ADR		7
153 #undef CONFIG_RESET_PHY_R
154 #endif /* CONFIG_CMD_NET */
155 
156 #ifdef CONFIG_CMD_IDE
157 #undef CONFIG_IDE_LED
158 #undef CONFIG_SYS_IDE_MAXBUS
159 #define CONFIG_SYS_IDE_MAXBUS		1
160 #undef CONFIG_SYS_IDE_MAXDEVICE
161 #define CONFIG_SYS_IDE_MAXDEVICE	1
162 #define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
163 #endif
164 
165 #endif /* _CONFIG_LSXL_H */
166