xref: /openbmc/u-boot/include/configs/lacie_kw.h (revision 66c433ed)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
277ea071fSSimon Guinot /*
377ea071fSSimon Guinot  * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com>
477ea071fSSimon Guinot  */
577ea071fSSimon Guinot 
677ea071fSSimon Guinot #ifndef _CONFIG_LACIE_KW_H
777ea071fSSimon Guinot #define _CONFIG_LACIE_KW_H
877ea071fSSimon Guinot 
977ea071fSSimon Guinot /*
1077ea071fSSimon Guinot  * Machine number definition
1177ea071fSSimon Guinot  */
1277ea071fSSimon Guinot #if defined(CONFIG_INETSPACE_V2)
1377ea071fSSimon Guinot #define CONFIG_MACH_TYPE		MACH_TYPE_INETSPACE_V2
1477ea071fSSimon Guinot #elif defined(CONFIG_NETSPACE_V2)
1577ea071fSSimon Guinot #define CONFIG_MACH_TYPE		MACH_TYPE_NETSPACE_V2
1637235496SSimon Guinot #elif defined(CONFIG_NETSPACE_LITE_V2)
1737235496SSimon Guinot #define CONFIG_MACH_TYPE		MACH_TYPE_NETSPACE_LITE_V2
1837235496SSimon Guinot #elif defined(CONFIG_NETSPACE_MINI_V2)
1937235496SSimon Guinot #define CONFIG_MACH_TYPE		MACH_TYPE_NETSPACE_MINI_V2
2077ea071fSSimon Guinot #elif defined(CONFIG_NETSPACE_MAX_V2)
2177ea071fSSimon Guinot #define CONFIG_MACH_TYPE		MACH_TYPE_NETSPACE_MAX_V2
22ee8f6d23SSimon Guinot #elif defined(CONFIG_D2NET_V2)
23ee8f6d23SSimon Guinot #define CONFIG_MACH_TYPE		MACH_TYPE_D2NET_V2
2477ea071fSSimon Guinot #elif defined(CONFIG_NET2BIG_V2)
2577ea071fSSimon Guinot #define CONFIG_MACH_TYPE		MACH_TYPE_NET2BIG_V2
2677ea071fSSimon Guinot #else
2777ea071fSSimon Guinot #error "Unknown board"
2877ea071fSSimon Guinot #endif
2977ea071fSSimon Guinot 
3077ea071fSSimon Guinot /*
3177ea071fSSimon Guinot  * High Level Configuration Options (easy to change)
3277ea071fSSimon Guinot  */
3377ea071fSSimon Guinot #define CONFIG_FEROCEON_88FR131		/* CPU Core subversion */
3437235496SSimon Guinot /* SoC name */
3537235496SSimon Guinot #if defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2)
3637235496SSimon Guinot #define CONFIG_KW88F6192
3737235496SSimon Guinot #else
3837235496SSimon Guinot #define CONFIG_KW88F6281
3937235496SSimon Guinot #endif
4077ea071fSSimon Guinot #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
4177ea071fSSimon Guinot 
4277ea071fSSimon Guinot /*
4377ea071fSSimon Guinot  * Core clock definition
4477ea071fSSimon Guinot  */
4577ea071fSSimon Guinot #define CONFIG_SYS_TCLK			166000000 /* 166MHz */
4677ea071fSSimon Guinot 
4777ea071fSSimon Guinot /*
4877ea071fSSimon Guinot  * SDRAM configuration
4977ea071fSSimon Guinot  */
5077ea071fSSimon Guinot 
5137235496SSimon Guinot /*
5237235496SSimon Guinot  * Different SDRAM configuration and size for some of the boards derived
5337235496SSimon Guinot  * from the Network Space v2
5437235496SSimon Guinot  */
5537235496SSimon Guinot #if defined(CONFIG_INETSPACE_V2)
564ab3fc5eSMasahiro Yamada #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg
5737235496SSimon Guinot #elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2)
584ab3fc5eSMasahiro Yamada #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg
5977ea071fSSimon Guinot #endif
6077ea071fSSimon Guinot 
6177ea071fSSimon Guinot /*
6277ea071fSSimon Guinot  * mv-common.h should be defined after CMD configs since it used them
6377ea071fSSimon Guinot  * to enable certain macros
6477ea071fSSimon Guinot  */
6577ea071fSSimon Guinot #include "mv-common.h"
6677ea071fSSimon Guinot 
6777ea071fSSimon Guinot /* Remove or override few declarations from mv-common.h */
6877ea071fSSimon Guinot #undef CONFIG_SYS_IDE_MAXBUS
6977ea071fSSimon Guinot #undef CONFIG_SYS_IDE_MAXDEVICE
7077ea071fSSimon Guinot 
7177ea071fSSimon Guinot /*
722af4d0f4SSimon Guinot  * Enable platform initialisation via misc_init_r() function
732af4d0f4SSimon Guinot  */
742af4d0f4SSimon Guinot 
752af4d0f4SSimon Guinot /*
7677ea071fSSimon Guinot  * Ethernet Driver configuration
7777ea071fSSimon Guinot  */
7877ea071fSSimon Guinot #ifdef CONFIG_CMD_NET
7977ea071fSSimon Guinot #define CONFIG_MVGBE_PORTS		{1, 0} /* enable port 0 only */
8077ea071fSSimon Guinot #define CONFIG_NETCONSOLE
8177ea071fSSimon Guinot #endif
8277ea071fSSimon Guinot 
8377ea071fSSimon Guinot /*
8477ea071fSSimon Guinot  * SATA Driver configuration
8577ea071fSSimon Guinot  */
8677ea071fSSimon Guinot #ifdef CONFIG_MVSATA_IDE
8777ea071fSSimon Guinot #define CONFIG_SYS_ATA_IDE0_OFFSET      MV_SATA_PORT0_OFFSET
88ee8f6d23SSimon Guinot #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \
89ee8f6d23SSimon Guinot 	defined(CONFIG_NET2BIG_V2)
9077ea071fSSimon Guinot #define CONFIG_SYS_ATA_IDE1_OFFSET      MV_SATA_PORT1_OFFSET
914c669e2dSSimon Guinot #define CONFIG_SYS_IDE_MAXBUS           2
924c669e2dSSimon Guinot #define CONFIG_SYS_IDE_MAXDEVICE        2
934c669e2dSSimon Guinot #else
944c669e2dSSimon Guinot #define CONFIG_SYS_IDE_MAXBUS           1
954c669e2dSSimon Guinot #define CONFIG_SYS_IDE_MAXDEVICE        1
9677ea071fSSimon Guinot #endif
9777ea071fSSimon Guinot #endif /* CONFIG_MVSATA_IDE */
9877ea071fSSimon Guinot 
9977ea071fSSimon Guinot /*
10077ea071fSSimon Guinot  * Enable GPI0 support
10177ea071fSSimon Guinot  */
10277ea071fSSimon Guinot #define CONFIG_KIRKWOOD_GPIO
10377ea071fSSimon Guinot 
10477ea071fSSimon Guinot /*
10577ea071fSSimon Guinot  * Enable I2C support
10677ea071fSSimon Guinot  */
10777ea071fSSimon Guinot #ifdef CONFIG_CMD_I2C
10877ea071fSSimon Guinot /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
10977ea071fSSimon Guinot #define CONFIG_SYS_I2C_EEPROM_ADDR		0x50
11077ea071fSSimon Guinot #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	4 /* 16-byte page size */
11177ea071fSSimon Guinot #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1 /* 8-bit device address */
1122af4d0f4SSimon Guinot #if defined(CONFIG_NET2BIG_V2)
1132af4d0f4SSimon Guinot #define CONFIG_SYS_I2C_G762_ADDR		0x3e
1142af4d0f4SSimon Guinot #endif
11577ea071fSSimon Guinot #endif /* CONFIG_CMD_I2C */
11677ea071fSSimon Guinot 
11777ea071fSSimon Guinot /*
1188e622436SSimon Guinot  * Partition support
1198e622436SSimon Guinot  */
1208e622436SSimon Guinot 
1218e622436SSimon Guinot /*
12277ea071fSSimon Guinot  * File systems support
12377ea071fSSimon Guinot  */
12477ea071fSSimon Guinot 
12577ea071fSSimon Guinot /*
12677ea071fSSimon Guinot  * Environment variables configurations
12777ea071fSSimon Guinot  */
12877ea071fSSimon Guinot #define CONFIG_ENV_SECT_SIZE		0x10000	/* 64KB */
12977ea071fSSimon Guinot #define CONFIG_ENV_SIZE			0x1000	/* 4KB */
13077ea071fSSimon Guinot #define CONFIG_ENV_ADDR			0x70000
13177ea071fSSimon Guinot #define CONFIG_ENV_OFFSET		0x70000	/* env starts here */
13277ea071fSSimon Guinot 
13377ea071fSSimon Guinot /*
13477ea071fSSimon Guinot  * Default environment variables
13577ea071fSSimon Guinot  */
13677ea071fSSimon Guinot #define CONFIG_BOOTCOMMAND					\
13777ea071fSSimon Guinot 	"dhcp && run netconsole; "				\
13877ea071fSSimon Guinot 	"if run usbload || run diskload; then bootm; fi"
13977ea071fSSimon Guinot 
14077ea071fSSimon Guinot #define CONFIG_EXTRA_ENV_SETTINGS				\
14177ea071fSSimon Guinot 	"stdin=serial\0"					\
14277ea071fSSimon Guinot 	"stdout=serial\0"					\
14377ea071fSSimon Guinot 	"stderr=serial\0"					\
14477ea071fSSimon Guinot 	"bootfile=uImage\0"					\
14577ea071fSSimon Guinot 	"loadaddr=0x800000\0"					\
14677ea071fSSimon Guinot 	"autoload=no\0"						\
14777ea071fSSimon Guinot 	"netconsole="						\
14877ea071fSSimon Guinot 		"set stdin $stdin,nc; "				\
14977ea071fSSimon Guinot 		"set stdout $stdout,nc; "			\
15077ea071fSSimon Guinot 		"set stderr $stderr,nc;\0"			\
15177ea071fSSimon Guinot 	"diskload=ide reset && "				\
15277ea071fSSimon Guinot 		"ext2load ide 0:1 $loadaddr /boot/$bootfile\0"	\
15377ea071fSSimon Guinot 	"usbload=usb start && "					\
15477ea071fSSimon Guinot 		"fatload usb 0:1 $loadaddr /boot/$bootfile\0"
15577ea071fSSimon Guinot 
15677ea071fSSimon Guinot #endif /* _CONFIG_LACIE_KW_H */
157