Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com> |
| 3 | * |
| 4 | * See file CREDITS for list of people who contributed to this |
| 5 | * project. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of |
| 10 | * the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | */ |
| 17 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 18 | #ifndef _CONFIG_LACIE_KW_H |
| 19 | #define _CONFIG_LACIE_KW_H |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 20 | |
| 21 | /* |
| 22 | * Machine number definition |
| 23 | */ |
| 24 | #if defined(CONFIG_INETSPACE_V2) |
| 25 | #define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2 |
| 26 | #define CONFIG_IDENT_STRING " IS v2" |
| 27 | #elif defined(CONFIG_NETSPACE_V2) |
| 28 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 |
| 29 | #define CONFIG_IDENT_STRING " NS v2" |
| 30 | #elif defined(CONFIG_NETSPACE_MAX_V2) |
| 31 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 |
| 32 | #define CONFIG_IDENT_STRING " NS Max v2" |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 33 | #elif defined(CONFIG_NET2BIG_V2) |
| 34 | #define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 |
| 35 | #define CONFIG_IDENT_STRING " 2Big v2" |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 36 | #else |
| 37 | #error "Unknown board" |
| 38 | #endif |
| 39 | |
| 40 | /* |
| 41 | * High Level Configuration Options (easy to change) |
| 42 | */ |
| 43 | #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ |
| 44 | #define CONFIG_KIRKWOOD /* SOC Family Name */ |
| 45 | #define CONFIG_KW88F6281 /* SOC Name */ |
| 46 | #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ |
| 47 | |
| 48 | /* |
| 49 | * Commands configuration |
| 50 | */ |
| 51 | #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ |
| 52 | #include <config_cmd_default.h> |
| 53 | #define CONFIG_CMD_ENV |
| 54 | #define CONFIG_CMD_DHCP |
| 55 | #define CONFIG_CMD_PING |
| 56 | #define CONFIG_CMD_SF |
| 57 | #define CONFIG_CMD_I2C |
| 58 | #define CONFIG_CMD_IDE |
| 59 | #define CONFIG_CMD_USB |
| 60 | |
| 61 | /* |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 62 | * Core clock definition |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 63 | */ |
| 64 | #define CONFIG_SYS_TCLK 166000000 /* 166MHz */ |
| 65 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 66 | /* |
| 67 | * SDRAM configuration |
| 68 | */ |
Simon Guinot | 65e0517 | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 69 | #define CONFIG_NR_DRAM_BANKS 1 |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 70 | |
Simon Guinot | 65e0517 | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 71 | #ifdef CONFIG_INETSPACE_V2 |
| 72 | /* Different SDRAM configuration and size for Internet Space v2 */ |
Simon Guinot | 95ae366 | 2012-06-05 13:15:59 +0000 | [diff] [blame] | 73 | #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-is2.cfg |
Simon Guinot | 65e0517 | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 74 | #endif |
| 75 | |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 76 | /* |
| 77 | * mv-common.h should be defined after CMD configs since it used them |
| 78 | * to enable certain macros |
| 79 | */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 80 | #include "mv-common.h" |
| 81 | |
| 82 | /* Remove or override few declarations from mv-common.h */ |
| 83 | #undef CONFIG_RBTREE |
| 84 | #undef CONFIG_ENV_SPI_MAX_HZ |
| 85 | #undef CONFIG_SYS_IDE_MAXBUS |
| 86 | #undef CONFIG_SYS_IDE_MAXDEVICE |
| 87 | #undef CONFIG_SYS_PROMPT |
| 88 | #define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */ |
| 89 | #define CONFIG_SYS_IDE_MAXBUS 1 |
| 90 | #define CONFIG_SYS_IDE_MAXDEVICE 1 |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 91 | #if defined(CONFIG_NET2BIG_V2) |
| 92 | #define CONFIG_SYS_PROMPT "2big2> " |
| 93 | #else |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 94 | #define CONFIG_SYS_PROMPT "ns2> " |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 95 | #endif |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 96 | |
| 97 | /* |
| 98 | * Ethernet Driver configuration |
| 99 | */ |
| 100 | #ifdef CONFIG_CMD_NET |
Simon Guinot | 6e23891 | 2011-11-08 11:31:14 +0000 | [diff] [blame] | 101 | #define CONFIG_MISC_INIT_R /* Call misc_init_r() to initialize MAC address */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 102 | #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ |
| 103 | #define CONFIG_NETCONSOLE |
| 104 | #endif |
| 105 | |
| 106 | /* |
| 107 | * SATA Driver configuration |
| 108 | */ |
| 109 | #ifdef CONFIG_MVSATA_IDE |
| 110 | #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 111 | #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_NET2BIG_V2) |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 112 | #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET |
| 113 | #endif |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 114 | #endif /* CONFIG_MVSATA_IDE */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 115 | |
| 116 | /* |
| 117 | * Enable GPI0 support |
| 118 | */ |
| 119 | #define CONFIG_KIRKWOOD_GPIO |
| 120 | |
| 121 | /* |
Simon Guinot | 5aaebab | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 122 | * Enable I2C support |
| 123 | */ |
| 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 | #endif /* CONFIG_CMD_I2C */ |
| 131 | |
| 132 | /* |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 133 | * File systems support |
| 134 | */ |
| 135 | #define CONFIG_CMD_EXT2 |
| 136 | #define CONFIG_CMD_FAT |
| 137 | |
| 138 | /* |
| 139 | * Use the HUSH parser |
| 140 | */ |
| 141 | #define CONFIG_SYS_HUSH_PARSER |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 142 | |
| 143 | /* |
| 144 | * Console configuration |
| 145 | */ |
| 146 | #define CONFIG_CONSOLE_MUX |
| 147 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 148 | |
| 149 | /* |
| 150 | * Enable device tree support |
| 151 | */ |
| 152 | #define CONFIG_OF_LIBFDT |
| 153 | |
| 154 | /* |
| 155 | * Environment variables configurations |
| 156 | */ |
| 157 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 158 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */ |
| 159 | #define CONFIG_ENV_SIZE 0x1000 /* 4KB */ |
| 160 | #define CONFIG_ENV_ADDR 0x70000 |
| 161 | #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */ |
| 162 | |
| 163 | /* |
| 164 | * Default environment variables |
| 165 | */ |
| 166 | #define CONFIG_BOOTARGS "console=ttyS0,115200" |
| 167 | |
| 168 | #define CONFIG_BOOTCOMMAND \ |
| 169 | "dhcp && run netconsole; " \ |
| 170 | "if run usbload || run diskload; then bootm; fi" |
| 171 | |
| 172 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 173 | "stdin=serial\0" \ |
| 174 | "stdout=serial\0" \ |
| 175 | "stderr=serial\0" \ |
| 176 | "bootfile=uImage\0" \ |
| 177 | "loadaddr=0x800000\0" \ |
| 178 | "autoload=no\0" \ |
| 179 | "netconsole=" \ |
| 180 | "set stdin $stdin,nc; " \ |
| 181 | "set stdout $stdout,nc; " \ |
| 182 | "set stderr $stderr,nc;\0" \ |
| 183 | "diskload=ide reset && " \ |
| 184 | "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \ |
| 185 | "usbload=usb start && " \ |
| 186 | "fatload usb 0:1 $loadaddr /boot/$bootfile\0" |
| 187 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 188 | #endif /* _CONFIG_LACIE_KW_H */ |