2 * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com>
4 * SPDX-License-Identifier: GPL-2.0+
7 #ifndef _CONFIG_LACIE_KW_H
8 #define _CONFIG_LACIE_KW_H
11 * Machine number definition
13 #if defined(CONFIG_INETSPACE_V2)
14 #define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2
15 #elif defined(CONFIG_NETSPACE_V2)
16 #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2
17 #elif defined(CONFIG_NETSPACE_LITE_V2)
18 #define MACH_TYPE_NETSPACE_LITE_V2 2983 /* missing in mach-types.h */
19 #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_LITE_V2
20 #elif defined(CONFIG_NETSPACE_MINI_V2)
21 #define MACH_TYPE_NETSPACE_MINI_V2 2831 /* missing in mach-types.h */
22 #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MINI_V2
23 #elif defined(CONFIG_NETSPACE_MAX_V2)
24 #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2
25 #elif defined(CONFIG_D2NET_V2)
26 #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2
27 #elif defined(CONFIG_NET2BIG_V2)
28 #define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2
30 #error "Unknown board"
34 * High Level Configuration Options (easy to change)
36 #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
38 #if defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2)
39 #define CONFIG_KW88F6192
41 #define CONFIG_KW88F6281
43 #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
46 * Commands configuration
48 #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
49 #define CONFIG_CMD_ENV
50 #define CONFIG_CMD_IDE
51 #ifndef CONFIG_NETSPACE_MINI_V2 /* No USB ports on Network Space v2 Mini */
55 * Core clock definition
57 #define CONFIG_SYS_TCLK 166000000 /* 166MHz */
62 #define CONFIG_NR_DRAM_BANKS 1
65 * Different SDRAM configuration and size for some of the boards derived
66 * from the Network Space v2
68 #if defined(CONFIG_INETSPACE_V2)
69 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg
70 #elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2)
71 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg
75 * mv-common.h should be defined after CMD configs since it used them
76 * to enable certain macros
78 #include "mv-common.h"
80 /* Remove or override few declarations from mv-common.h */
82 #undef CONFIG_ENV_SPI_MAX_HZ
83 #undef CONFIG_SYS_IDE_MAXBUS
84 #undef CONFIG_SYS_IDE_MAXDEVICE
85 #define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */
88 * Enable platform initialisation via misc_init_r() function
90 #define CONFIG_MISC_INIT_R
93 * Ethernet Driver configuration
96 #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
97 #define CONFIG_NETCONSOLE
101 * SATA Driver configuration
103 #ifdef CONFIG_MVSATA_IDE
104 #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
105 #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \
106 defined(CONFIG_NET2BIG_V2)
107 #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
108 #define CONFIG_SYS_IDE_MAXBUS 2
109 #define CONFIG_SYS_IDE_MAXDEVICE 2
111 #define CONFIG_SYS_IDE_MAXBUS 1
112 #define CONFIG_SYS_IDE_MAXDEVICE 1
114 #endif /* CONFIG_MVSATA_IDE */
117 * Enable GPI0 support
119 #define CONFIG_KIRKWOOD_GPIO
124 #ifdef CONFIG_CMD_I2C
125 /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */
126 #define CONFIG_CMD_EEPROM
127 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
128 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */
129 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */
130 #if defined(CONFIG_NET2BIG_V2)
131 #define CONFIG_SYS_I2C_G762_ADDR 0x3e
133 #endif /* CONFIG_CMD_I2C */
138 #define CONFIG_DOS_PARTITION
139 #define CONFIG_EFI_PARTITION
142 * File systems support
146 * Environment variables configurations
148 #define CONFIG_ENV_IS_IN_SPI_FLASH
149 #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */
150 #define CONFIG_ENV_SIZE 0x1000 /* 4KB */
151 #define CONFIG_ENV_ADDR 0x70000
152 #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */
155 * Default environment variables
157 #define CONFIG_BOOTARGS "console=ttyS0,115200"
159 #define CONFIG_BOOTCOMMAND \
160 "dhcp && run netconsole; " \
161 "if run usbload || run diskload; then bootm; fi"
163 #define CONFIG_EXTRA_ENV_SETTINGS \
167 "bootfile=uImage\0" \
168 "loadaddr=0x800000\0" \
171 "set stdin $stdin,nc; " \
172 "set stdout $stdout,nc; " \
173 "set stderr $stderr,nc;\0" \
174 "diskload=ide reset && " \
175 "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \
176 "usbload=usb start && " \
177 "fatload usb 0:1 $loadaddr /boot/$bootfile\0"
179 #endif /* _CONFIG_LACIE_KW_H */