Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com> |
| 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 5 | */ |
| 6 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 7 | #ifndef _CONFIG_LACIE_KW_H |
| 8 | #define _CONFIG_LACIE_KW_H |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 9 | |
| 10 | /* |
| 11 | * Machine number definition |
| 12 | */ |
| 13 | #if defined(CONFIG_INETSPACE_V2) |
| 14 | #define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2 |
| 15 | #define CONFIG_IDENT_STRING " IS v2" |
| 16 | #elif defined(CONFIG_NETSPACE_V2) |
| 17 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 |
| 18 | #define CONFIG_IDENT_STRING " NS v2" |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 19 | #elif defined(CONFIG_NETSPACE_LITE_V2) |
| 20 | #define MACH_TYPE_NETSPACE_LITE_V2 2983 /* missing in mach-types.h */ |
| 21 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_LITE_V2 |
| 22 | #define CONFIG_IDENT_STRING " NS v2 Lite" |
| 23 | #elif defined(CONFIG_NETSPACE_MINI_V2) |
| 24 | #define MACH_TYPE_NETSPACE_MINI_V2 2831 /* missing in mach-types.h */ |
| 25 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MINI_V2 |
| 26 | #define CONFIG_IDENT_STRING " NS v2 Mini" |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 27 | #elif defined(CONFIG_NETSPACE_MAX_V2) |
| 28 | #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 |
| 29 | #define CONFIG_IDENT_STRING " NS Max v2" |
Simon Guinot | caf09e2 | 2012-09-06 10:51:43 +0000 | [diff] [blame] | 30 | #elif defined(CONFIG_D2NET_V2) |
| 31 | #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 |
| 32 | #define CONFIG_IDENT_STRING " D2 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 */ |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 44 | /* SoC name */ |
| 45 | #if defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) |
| 46 | #define CONFIG_KW88F6192 |
| 47 | #else |
| 48 | #define CONFIG_KW88F6281 |
| 49 | #endif |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 50 | #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ |
| 51 | |
| 52 | /* |
| 53 | * Commands configuration |
| 54 | */ |
| 55 | #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 56 | #define CONFIG_CMD_ENV |
| 57 | #define CONFIG_CMD_DHCP |
| 58 | #define CONFIG_CMD_PING |
| 59 | #define CONFIG_CMD_SF |
| 60 | #define CONFIG_CMD_I2C |
| 61 | #define CONFIG_CMD_IDE |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 62 | #ifndef CONFIG_NETSPACE_MINI_V2 /* No USB ports on Network Space v2 Mini */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 63 | #define CONFIG_CMD_USB |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 64 | #endif |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 65 | |
| 66 | /* |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 67 | * Core clock definition |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 68 | */ |
| 69 | #define CONFIG_SYS_TCLK 166000000 /* 166MHz */ |
| 70 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 71 | /* |
| 72 | * SDRAM configuration |
| 73 | */ |
Simon Guinot | 65e0517 | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 74 | #define CONFIG_NR_DRAM_BANKS 1 |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 75 | |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 76 | /* |
| 77 | * Different SDRAM configuration and size for some of the boards derived |
| 78 | * from the Network Space v2 |
| 79 | */ |
| 80 | #if defined(CONFIG_INETSPACE_V2) |
Masahiro Yamada | d6acdf2 | 2014-03-11 11:05:17 +0900 | [diff] [blame] | 81 | #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg |
Simon Guinot | 13c5ae6 | 2012-09-06 10:51:42 +0000 | [diff] [blame] | 82 | #elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) |
Masahiro Yamada | d6acdf2 | 2014-03-11 11:05:17 +0900 | [diff] [blame] | 83 | #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg |
Simon Guinot | 65e0517 | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 84 | #endif |
| 85 | |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 86 | /* |
| 87 | * mv-common.h should be defined after CMD configs since it used them |
| 88 | * to enable certain macros |
| 89 | */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 90 | #include "mv-common.h" |
| 91 | |
| 92 | /* Remove or override few declarations from mv-common.h */ |
| 93 | #undef CONFIG_RBTREE |
| 94 | #undef CONFIG_ENV_SPI_MAX_HZ |
| 95 | #undef CONFIG_SYS_IDE_MAXBUS |
| 96 | #undef CONFIG_SYS_IDE_MAXDEVICE |
| 97 | #undef CONFIG_SYS_PROMPT |
| 98 | #define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */ |
Simon Guinot | caf09e2 | 2012-09-06 10:51:43 +0000 | [diff] [blame] | 99 | #if defined(CONFIG_D2NET_V2) |
| 100 | #define CONFIG_SYS_PROMPT "d2v2> " |
| 101 | #elif defined(CONFIG_NET2BIG_V2) |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 102 | #define CONFIG_SYS_PROMPT "2big2> " |
| 103 | #else |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 104 | #define CONFIG_SYS_PROMPT "ns2> " |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 105 | #endif |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 106 | |
| 107 | /* |
Simon Guinot | 1dd67e6 | 2013-06-18 15:14:48 +0200 | [diff] [blame] | 108 | * Enable platform initialisation via misc_init_r() function |
| 109 | */ |
| 110 | #define CONFIG_MISC_INIT_R |
| 111 | |
| 112 | /* |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 113 | * Ethernet Driver configuration |
| 114 | */ |
| 115 | #ifdef CONFIG_CMD_NET |
| 116 | #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ |
| 117 | #define CONFIG_NETCONSOLE |
| 118 | #endif |
| 119 | |
| 120 | /* |
| 121 | * SATA Driver configuration |
| 122 | */ |
| 123 | #ifdef CONFIG_MVSATA_IDE |
| 124 | #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET |
Simon Guinot | caf09e2 | 2012-09-06 10:51:43 +0000 | [diff] [blame] | 125 | #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \ |
| 126 | defined(CONFIG_NET2BIG_V2) |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 127 | #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET |
Simon Guinot | 777baa9 | 2015-09-03 11:12:20 +0200 | [diff] [blame] | 128 | #define CONFIG_SYS_IDE_MAXBUS 2 |
| 129 | #define CONFIG_SYS_IDE_MAXDEVICE 2 |
| 130 | #else |
| 131 | #define CONFIG_SYS_IDE_MAXBUS 1 |
| 132 | #define CONFIG_SYS_IDE_MAXDEVICE 1 |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 133 | #endif |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 134 | #endif /* CONFIG_MVSATA_IDE */ |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 135 | |
| 136 | /* |
| 137 | * Enable GPI0 support |
| 138 | */ |
| 139 | #define CONFIG_KIRKWOOD_GPIO |
| 140 | |
| 141 | /* |
Simon Guinot | 5aaebab | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 142 | * Enable I2C support |
| 143 | */ |
| 144 | #ifdef CONFIG_CMD_I2C |
| 145 | /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */ |
| 146 | #define CONFIG_CMD_EEPROM |
| 147 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 148 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */ |
| 149 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */ |
Simon Guinot | 1dd67e6 | 2013-06-18 15:14:48 +0200 | [diff] [blame] | 150 | #if defined(CONFIG_NET2BIG_V2) |
| 151 | #define CONFIG_SYS_I2C_G762_ADDR 0x3e |
| 152 | #endif |
Simon Guinot | 5aaebab | 2011-11-01 16:44:12 +0530 | [diff] [blame] | 153 | #endif /* CONFIG_CMD_I2C */ |
| 154 | |
| 155 | /* |
Simon Guinot | 707f5d6 | 2012-09-06 10:51:41 +0000 | [diff] [blame] | 156 | * Partition support |
| 157 | */ |
| 158 | #define CONFIG_DOS_PARTITION |
| 159 | #define CONFIG_EFI_PARTITION |
| 160 | |
| 161 | /* |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 162 | * File systems support |
| 163 | */ |
| 164 | #define CONFIG_CMD_EXT2 |
| 165 | #define CONFIG_CMD_FAT |
| 166 | |
| 167 | /* |
| 168 | * Use the HUSH parser |
| 169 | */ |
| 170 | #define CONFIG_SYS_HUSH_PARSER |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 171 | |
| 172 | /* |
| 173 | * Console configuration |
| 174 | */ |
| 175 | #define CONFIG_CONSOLE_MUX |
| 176 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 177 | |
| 178 | /* |
Simon Guinot | 16311a2 | 2011-06-17 19:41:33 +0530 | [diff] [blame] | 179 | * Environment variables configurations |
| 180 | */ |
| 181 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 182 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */ |
| 183 | #define CONFIG_ENV_SIZE 0x1000 /* 4KB */ |
| 184 | #define CONFIG_ENV_ADDR 0x70000 |
| 185 | #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */ |
| 186 | |
| 187 | /* |
| 188 | * Default environment variables |
| 189 | */ |
| 190 | #define CONFIG_BOOTARGS "console=ttyS0,115200" |
| 191 | |
| 192 | #define CONFIG_BOOTCOMMAND \ |
| 193 | "dhcp && run netconsole; " \ |
| 194 | "if run usbload || run diskload; then bootm; fi" |
| 195 | |
| 196 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 197 | "stdin=serial\0" \ |
| 198 | "stdout=serial\0" \ |
| 199 | "stderr=serial\0" \ |
| 200 | "bootfile=uImage\0" \ |
| 201 | "loadaddr=0x800000\0" \ |
| 202 | "autoload=no\0" \ |
| 203 | "netconsole=" \ |
| 204 | "set stdin $stdin,nc; " \ |
| 205 | "set stdout $stdout,nc; " \ |
| 206 | "set stderr $stderr,nc;\0" \ |
| 207 | "diskload=ide reset && " \ |
| 208 | "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \ |
| 209 | "usbload=usb start && " \ |
| 210 | "fatload usb 0:1 $loadaddr /boot/$bootfile\0" |
| 211 | |
Simon Guinot | a35cb4c | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 212 | #endif /* _CONFIG_LACIE_KW_H */ |