1 /* 2 * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com> 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #ifndef _CONFIG_LACIE_KW_H 8 #define _CONFIG_LACIE_KW_H 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" 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" 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" 30 #elif defined(CONFIG_D2NET_V2) 31 #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 32 #define CONFIG_IDENT_STRING " D2 v2" 33 #elif defined(CONFIG_NET2BIG_V2) 34 #define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 35 #define CONFIG_IDENT_STRING " 2Big v2" 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 /* 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 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) */ 56 #include <config_cmd_default.h> 57 #define CONFIG_CMD_ENV 58 #define CONFIG_CMD_DHCP 59 #define CONFIG_CMD_PING 60 #define CONFIG_CMD_SF 61 #define CONFIG_CMD_I2C 62 #define CONFIG_CMD_IDE 63 #ifndef CONFIG_NETSPACE_MINI_V2 /* No USB ports on Network Space v2 Mini */ 64 #define CONFIG_CMD_USB 65 #endif 66 67 /* 68 * Core clock definition 69 */ 70 #define CONFIG_SYS_TCLK 166000000 /* 166MHz */ 71 72 /* 73 * SDRAM configuration 74 */ 75 #define CONFIG_NR_DRAM_BANKS 1 76 77 /* 78 * Different SDRAM configuration and size for some of the boards derived 79 * from the Network Space v2 80 */ 81 #if defined(CONFIG_INETSPACE_V2) 82 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg 83 #elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) 84 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg 85 #endif 86 87 /* 88 * mv-common.h should be defined after CMD configs since it used them 89 * to enable certain macros 90 */ 91 #include "mv-common.h" 92 93 /* Remove or override few declarations from mv-common.h */ 94 #undef CONFIG_RBTREE 95 #undef CONFIG_ENV_SPI_MAX_HZ 96 #undef CONFIG_SYS_IDE_MAXBUS 97 #undef CONFIG_SYS_IDE_MAXDEVICE 98 #undef CONFIG_SYS_PROMPT 99 #define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */ 100 #define CONFIG_SYS_IDE_MAXBUS 1 101 #define CONFIG_SYS_IDE_MAXDEVICE 1 102 #if defined(CONFIG_D2NET_V2) 103 #define CONFIG_SYS_PROMPT "d2v2> " 104 #elif defined(CONFIG_NET2BIG_V2) 105 #define CONFIG_SYS_PROMPT "2big2> " 106 #else 107 #define CONFIG_SYS_PROMPT "ns2> " 108 #endif 109 110 /* 111 * Enable platform initialisation via misc_init_r() function 112 */ 113 #define CONFIG_MISC_INIT_R 114 115 /* 116 * Ethernet Driver configuration 117 */ 118 #ifdef CONFIG_CMD_NET 119 #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ 120 #define CONFIG_NETCONSOLE 121 #endif 122 123 /* 124 * SATA Driver configuration 125 */ 126 #ifdef CONFIG_MVSATA_IDE 127 #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET 128 #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \ 129 defined(CONFIG_NET2BIG_V2) 130 #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET 131 #endif 132 #endif /* CONFIG_MVSATA_IDE */ 133 134 /* 135 * Enable GPI0 support 136 */ 137 #define CONFIG_KIRKWOOD_GPIO 138 139 /* 140 * Enable I2C support 141 */ 142 #ifdef CONFIG_CMD_I2C 143 /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */ 144 #define CONFIG_CMD_EEPROM 145 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 146 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */ 147 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */ 148 #if defined(CONFIG_NET2BIG_V2) 149 #define CONFIG_SYS_I2C_G762_ADDR 0x3e 150 #endif 151 #endif /* CONFIG_CMD_I2C */ 152 153 /* 154 * Partition support 155 */ 156 #define CONFIG_DOS_PARTITION 157 #define CONFIG_EFI_PARTITION 158 159 /* 160 * File systems support 161 */ 162 #define CONFIG_CMD_EXT2 163 #define CONFIG_CMD_FAT 164 165 /* 166 * Use the HUSH parser 167 */ 168 #define CONFIG_SYS_HUSH_PARSER 169 170 /* 171 * Console configuration 172 */ 173 #define CONFIG_CONSOLE_MUX 174 #define CONFIG_SYS_CONSOLE_IS_IN_ENV 175 176 /* 177 * Enable device tree support 178 */ 179 #define CONFIG_OF_LIBFDT 180 181 /* 182 * Environment variables configurations 183 */ 184 #define CONFIG_ENV_IS_IN_SPI_FLASH 185 #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */ 186 #define CONFIG_ENV_SIZE 0x1000 /* 4KB */ 187 #define CONFIG_ENV_ADDR 0x70000 188 #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */ 189 190 /* 191 * Default environment variables 192 */ 193 #define CONFIG_BOOTARGS "console=ttyS0,115200" 194 195 #define CONFIG_BOOTCOMMAND \ 196 "dhcp && run netconsole; " \ 197 "if run usbload || run diskload; then bootm; fi" 198 199 #define CONFIG_EXTRA_ENV_SETTINGS \ 200 "stdin=serial\0" \ 201 "stdout=serial\0" \ 202 "stderr=serial\0" \ 203 "bootfile=uImage\0" \ 204 "loadaddr=0x800000\0" \ 205 "autoload=no\0" \ 206 "netconsole=" \ 207 "set stdin $stdin,nc; " \ 208 "set stdout $stdout,nc; " \ 209 "set stderr $stderr,nc;\0" \ 210 "diskload=ide reset && " \ 211 "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \ 212 "usbload=usb start && " \ 213 "fatload usb 0:1 $loadaddr /boot/$bootfile\0" 214 215 #endif /* _CONFIG_LACIE_KW_H */ 216