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