177ea071fSSimon Guinot /* 277ea071fSSimon Guinot * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com> 377ea071fSSimon Guinot * 41a459660SWolfgang Denk * SPDX-License-Identifier: GPL-2.0+ 577ea071fSSimon Guinot */ 677ea071fSSimon Guinot 777ea071fSSimon Guinot #ifndef _CONFIG_LACIE_KW_H 877ea071fSSimon Guinot #define _CONFIG_LACIE_KW_H 977ea071fSSimon Guinot 1077ea071fSSimon Guinot /* 1177ea071fSSimon Guinot * Machine number definition 1277ea071fSSimon Guinot */ 1377ea071fSSimon Guinot #if defined(CONFIG_INETSPACE_V2) 1477ea071fSSimon Guinot #define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2 1577ea071fSSimon Guinot #elif defined(CONFIG_NETSPACE_V2) 1677ea071fSSimon Guinot #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 1737235496SSimon Guinot #elif defined(CONFIG_NETSPACE_LITE_V2) 1837235496SSimon Guinot #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_LITE_V2 1937235496SSimon Guinot #elif defined(CONFIG_NETSPACE_MINI_V2) 2037235496SSimon Guinot #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MINI_V2 2177ea071fSSimon Guinot #elif defined(CONFIG_NETSPACE_MAX_V2) 2277ea071fSSimon Guinot #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 23ee8f6d23SSimon Guinot #elif defined(CONFIG_D2NET_V2) 24ee8f6d23SSimon Guinot #define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 2577ea071fSSimon Guinot #elif defined(CONFIG_NET2BIG_V2) 2677ea071fSSimon Guinot #define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 2777ea071fSSimon Guinot #else 2877ea071fSSimon Guinot #error "Unknown board" 2977ea071fSSimon Guinot #endif 3077ea071fSSimon Guinot 3177ea071fSSimon Guinot /* 3277ea071fSSimon Guinot * High Level Configuration Options (easy to change) 3377ea071fSSimon Guinot */ 3477ea071fSSimon Guinot #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ 3537235496SSimon Guinot /* SoC name */ 3637235496SSimon Guinot #if defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) 3737235496SSimon Guinot #define CONFIG_KW88F6192 3837235496SSimon Guinot #else 3937235496SSimon Guinot #define CONFIG_KW88F6281 4037235496SSimon Guinot #endif 4177ea071fSSimon Guinot #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ 4277ea071fSSimon Guinot 4377ea071fSSimon Guinot /* 4477ea071fSSimon Guinot * Commands configuration 4577ea071fSSimon Guinot */ 4637235496SSimon Guinot #ifndef CONFIG_NETSPACE_MINI_V2 /* No USB ports on Network Space v2 Mini */ 4737235496SSimon Guinot #endif 4877ea071fSSimon Guinot 4977ea071fSSimon Guinot /* 5077ea071fSSimon Guinot * Core clock definition 5177ea071fSSimon Guinot */ 5277ea071fSSimon Guinot #define CONFIG_SYS_TCLK 166000000 /* 166MHz */ 5377ea071fSSimon Guinot 5477ea071fSSimon Guinot /* 5577ea071fSSimon Guinot * SDRAM configuration 5677ea071fSSimon Guinot */ 5777ea071fSSimon Guinot #define CONFIG_NR_DRAM_BANKS 1 5877ea071fSSimon Guinot 5937235496SSimon Guinot /* 6037235496SSimon Guinot * Different SDRAM configuration and size for some of the boards derived 6137235496SSimon Guinot * from the Network Space v2 6237235496SSimon Guinot */ 6337235496SSimon Guinot #if defined(CONFIG_INETSPACE_V2) 644ab3fc5eSMasahiro Yamada #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-is2.cfg 6537235496SSimon Guinot #elif defined(CONFIG_NETSPACE_LITE_V2) || defined(CONFIG_NETSPACE_MINI_V2) 664ab3fc5eSMasahiro Yamada #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage-ns2l.cfg 6777ea071fSSimon Guinot #endif 6877ea071fSSimon Guinot 6977ea071fSSimon Guinot /* 7077ea071fSSimon Guinot * mv-common.h should be defined after CMD configs since it used them 7177ea071fSSimon Guinot * to enable certain macros 7277ea071fSSimon Guinot */ 7377ea071fSSimon Guinot #include "mv-common.h" 7477ea071fSSimon Guinot 7577ea071fSSimon Guinot /* Remove or override few declarations from mv-common.h */ 7677ea071fSSimon Guinot #undef CONFIG_ENV_SPI_MAX_HZ 7777ea071fSSimon Guinot #undef CONFIG_SYS_IDE_MAXBUS 7877ea071fSSimon Guinot #undef CONFIG_SYS_IDE_MAXDEVICE 7977ea071fSSimon Guinot #define CONFIG_ENV_SPI_MAX_HZ 20000000 /* 20Mhz */ 8077ea071fSSimon Guinot 8177ea071fSSimon Guinot /* 822af4d0f4SSimon Guinot * Enable platform initialisation via misc_init_r() function 832af4d0f4SSimon Guinot */ 842af4d0f4SSimon Guinot #define CONFIG_MISC_INIT_R 852af4d0f4SSimon Guinot 862af4d0f4SSimon Guinot /* 8777ea071fSSimon Guinot * Ethernet Driver configuration 8877ea071fSSimon Guinot */ 8977ea071fSSimon Guinot #ifdef CONFIG_CMD_NET 9077ea071fSSimon Guinot #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ 9177ea071fSSimon Guinot #define CONFIG_NETCONSOLE 9277ea071fSSimon Guinot #endif 9377ea071fSSimon Guinot 9477ea071fSSimon Guinot /* 9577ea071fSSimon Guinot * SATA Driver configuration 9677ea071fSSimon Guinot */ 9777ea071fSSimon Guinot #ifdef CONFIG_MVSATA_IDE 9877ea071fSSimon Guinot #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET 99ee8f6d23SSimon Guinot #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \ 100ee8f6d23SSimon Guinot defined(CONFIG_NET2BIG_V2) 10177ea071fSSimon Guinot #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET 102*4c669e2dSSimon Guinot #define CONFIG_SYS_IDE_MAXBUS 2 103*4c669e2dSSimon Guinot #define CONFIG_SYS_IDE_MAXDEVICE 2 104*4c669e2dSSimon Guinot #else 105*4c669e2dSSimon Guinot #define CONFIG_SYS_IDE_MAXBUS 1 106*4c669e2dSSimon Guinot #define CONFIG_SYS_IDE_MAXDEVICE 1 10777ea071fSSimon Guinot #endif 10877ea071fSSimon Guinot #endif /* CONFIG_MVSATA_IDE */ 10977ea071fSSimon Guinot 11077ea071fSSimon Guinot /* 11177ea071fSSimon Guinot * Enable GPI0 support 11277ea071fSSimon Guinot */ 11377ea071fSSimon Guinot #define CONFIG_KIRKWOOD_GPIO 11477ea071fSSimon Guinot 11577ea071fSSimon Guinot /* 11677ea071fSSimon Guinot * Enable I2C support 11777ea071fSSimon Guinot */ 11877ea071fSSimon Guinot #ifdef CONFIG_CMD_I2C 11977ea071fSSimon Guinot /* I2C EEPROM HT24LC04 (512B - 32 pages of 16 Bytes) */ 12077ea071fSSimon Guinot #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 12177ea071fSSimon Guinot #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 16-byte page size */ 12277ea071fSSimon Guinot #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* 8-bit device address */ 1232af4d0f4SSimon Guinot #if defined(CONFIG_NET2BIG_V2) 1242af4d0f4SSimon Guinot #define CONFIG_SYS_I2C_G762_ADDR 0x3e 1252af4d0f4SSimon Guinot #endif 12677ea071fSSimon Guinot #endif /* CONFIG_CMD_I2C */ 12777ea071fSSimon Guinot 12877ea071fSSimon Guinot /* 1298e622436SSimon Guinot * Partition support 1308e622436SSimon Guinot */ 1318e622436SSimon Guinot 1328e622436SSimon Guinot /* 13377ea071fSSimon Guinot * File systems support 13477ea071fSSimon Guinot */ 13577ea071fSSimon Guinot 13677ea071fSSimon Guinot /* 13777ea071fSSimon Guinot * Environment variables configurations 13877ea071fSSimon Guinot */ 13977ea071fSSimon Guinot #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64KB */ 14077ea071fSSimon Guinot #define CONFIG_ENV_SIZE 0x1000 /* 4KB */ 14177ea071fSSimon Guinot #define CONFIG_ENV_ADDR 0x70000 14277ea071fSSimon Guinot #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */ 14377ea071fSSimon Guinot 14477ea071fSSimon Guinot /* 14577ea071fSSimon Guinot * Default environment variables 14677ea071fSSimon Guinot */ 14777ea071fSSimon Guinot #define CONFIG_BOOTCOMMAND \ 14877ea071fSSimon Guinot "dhcp && run netconsole; " \ 14977ea071fSSimon Guinot "if run usbload || run diskload; then bootm; fi" 15077ea071fSSimon Guinot 15177ea071fSSimon Guinot #define CONFIG_EXTRA_ENV_SETTINGS \ 15277ea071fSSimon Guinot "stdin=serial\0" \ 15377ea071fSSimon Guinot "stdout=serial\0" \ 15477ea071fSSimon Guinot "stderr=serial\0" \ 15577ea071fSSimon Guinot "bootfile=uImage\0" \ 15677ea071fSSimon Guinot "loadaddr=0x800000\0" \ 15777ea071fSSimon Guinot "autoload=no\0" \ 15877ea071fSSimon Guinot "netconsole=" \ 15977ea071fSSimon Guinot "set stdin $stdin,nc; " \ 16077ea071fSSimon Guinot "set stdout $stdout,nc; " \ 16177ea071fSSimon Guinot "set stderr $stderr,nc;\0" \ 16277ea071fSSimon Guinot "diskload=ide reset && " \ 16377ea071fSSimon Guinot "ext2load ide 0:1 $loadaddr /boot/$bootfile\0" \ 16477ea071fSSimon Guinot "usbload=usb start && " \ 16577ea071fSSimon Guinot "fatload usb 0:1 $loadaddr /boot/$bootfile\0" 16677ea071fSSimon Guinot 16777ea071fSSimon Guinot #endif /* _CONFIG_LACIE_KW_H */ 168