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 #elif defined(CONFIG_NETSPACE_V2) 16 #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 17 #elif defined(CONFIG_NETSPACE_LITE_V2) 18 #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_LITE_V2 19 #elif defined(CONFIG_NETSPACE_MINI_V2) 20 #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MINI_V2 21 #elif defined(CONFIG_NETSPACE_MAX_V2) 22 #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 23 #elif defined(CONFIG_D2NET_V2) 24 #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 25 #elif defined(CONFIG_NET2BIG_V2) 26 #define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 27 #else 28 #error "Unknown board" 29 #endif 30 31 /* 32 * High Level Configuration Options (easy to change) 33 */ 34 #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ 35 /* SoC name */ 36 #if defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) 37 #define CONFIG_KW88F6192 38 #else 39 #define CONFIG_KW88F6281 40 #endif 41 #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ 42 43 /* 44 * Commands configuration 45 */ 46 #ifndef CONFIG_NETSPACE_MINI_V2 /* No USB ports on Network Space v2 Mini */ 47 #endif 48 49 /* 50 * Core clock definition 51 */ 52 #define CONFIG_SYS_TCLK 166000000 /* 166MHz */ 53 54 /* 55 * SDRAM configuration 56 */ 57 #define CONFIG_NR_DRAM_BANKS 1 58 59 /* 60 * Different SDRAM configuration and size for some of the boards derived 61 * from the Network Space v2 62 */ 63 #if defined(CONFIG_INETSPACE_V2) 64 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg 65 #elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) 66 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg 67 #endif 68 69 /* 70 * mv-common.h should be defined after CMD configs since it used them 71 * to enable certain macros 72 */ 73 #include "mv-common.h" 74 75 /* Remove or override few declarations from mv-common.h */ 76 #undef CONFIG_ENV_SPI_MAX_HZ 77 #undef CONFIG_SYS_IDE_MAXBUS 78 #undef CONFIG_SYS_IDE_MAXDEVICE 79 #define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */ 80 81 /* 82 * Enable platform initialisation via misc_init_r() function 83 */ 84 #define CONFIG_MISC_INIT_R 85 86 /* 87 * Ethernet Driver configuration 88 */ 89 #ifdef CONFIG_CMD_NET 90 #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ 91 #define CONFIG_NETCONSOLE 92 #endif 93 94 /* 95 * SATA Driver configuration 96 */ 97 #ifdef CONFIG_MVSATA_IDE 98 #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET 99 #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \ 100 defined(CONFIG_NET2BIG_V2) 101 #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET 102 #define CONFIG_SYS_IDE_MAXBUS 2 103 #define CONFIG_SYS_IDE_MAXDEVICE 2 104 #else 105 #define CONFIG_SYS_IDE_MAXBUS 1 106 #define CONFIG_SYS_IDE_MAXDEVICE 1 107 #endif 108 #endif /* CONFIG_MVSATA_IDE */ 109 110 /* 111 * Enable GPI0 support 112 */ 113 #define CONFIG_KIRKWOOD_GPIO 114 115 /* 116 * Enable I2C support 117 */ 118 #ifdef CONFIG_CMD_I2C 119 /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */ 120 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 121 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */ 122 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */ 123 #if defined(CONFIG_NET2BIG_V2) 124 #define CONFIG_SYS_I2C_G762_ADDR 0x3e 125 #endif 126 #endif /* CONFIG_CMD_I2C */ 127 128 /* 129 * Partition support 130 */ 131 132 /* 133 * File systems support 134 */ 135 136 /* 137 * Environment variables configurations 138 */ 139 #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */ 140 #define CONFIG_ENV_SIZE 0x1000 /* 4KB */ 141 #define CONFIG_ENV_ADDR 0x70000 142 #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */ 143 144 /* 145 * Default environment variables 146 */ 147 #define CONFIG_BOOTCOMMAND \ 148 "dhcp && run netconsole; " \ 149 "if run usbload || run diskload; then bootm; fi" 150 151 #define CONFIG_EXTRA_ENV_SETTINGS \ 152 "stdin=serial\0" \ 153 "stdout=serial\0" \ 154 "stderr=serial\0" \ 155 "bootfile=uImage\0" \ 156 "loadaddr=0x800000\0" \ 157 "autoload=no\0" \ 158 "netconsole=" \ 159 "set stdin $stdin,nc; " \ 160 "set stdout $stdout,nc; " \ 161 "set stderr $stderr,nc;\0" \ 162 "diskload=ide reset && " \ 163 "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \ 164 "usbload=usb start && " \ 165 "fatload usb 0:1 $loadaddr /boot/$bootfile\0" 166 167 #endif /* _CONFIG_LACIE_KW_H */ 168