1f214a20eSMichael Walle /* 2f214a20eSMichael Walle * Copyright (c) 2012 Michael Walle 3f214a20eSMichael Walle * Michael Walle <michael@walle.cc> 4f214a20eSMichael Walle * 5f214a20eSMichael Walle * See file CREDITS for list of people who contributed to this 6f214a20eSMichael Walle * project. 7f214a20eSMichael Walle * 8f214a20eSMichael Walle * This program is free software; you can redistribute it and/or 9f214a20eSMichael Walle * modify it under the terms of the GNU General Public License as 10f214a20eSMichael Walle * published by the Free Software Foundation; either version 2 of 11f214a20eSMichael Walle * the License, or (at your option) any later version. 12f214a20eSMichael Walle * 13f214a20eSMichael Walle * This program is distributed in the hope that it will be useful, 14f214a20eSMichael Walle * but WITHOUT ANY WARRANTY; without even the implied warranty of 15f214a20eSMichael Walle * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16f214a20eSMichael Walle * GNU General Public License for more details. 17f214a20eSMichael Walle * 18f214a20eSMichael Walle * You should have received a copy of the GNU General Public License 19f214a20eSMichael Walle * along with this program; if not, write to the Free Software 20f214a20eSMichael Walle * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 21f214a20eSMichael Walle * MA 02110-1301 USA 22f214a20eSMichael Walle */ 23f214a20eSMichael Walle 24f214a20eSMichael Walle #ifndef _CONFIG_LSXL_H 25f214a20eSMichael Walle #define _CONFIG_LSXL_H 26f214a20eSMichael Walle 27f214a20eSMichael Walle /* 28f214a20eSMichael Walle * Version number information 29f214a20eSMichael Walle */ 30f214a20eSMichael Walle #if defined(CONFIG_LSCHLV2) 31f214a20eSMichael Walle #define CONFIG_IDENT_STRING " LS-CHLv2" 32f214a20eSMichael Walle #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-lschl.cfg 33f214a20eSMichael Walle #define CONFIG_MACH_TYPE 3006 34f214a20eSMichael Walle #define CONFIG_SYS_TCLK 166666667 /* 166 MHz */ 35f214a20eSMichael Walle #elif defined(CONFIG_LSXHL) 36f214a20eSMichael Walle #define CONFIG_IDENT_STRING " LS-XHL" 37f214a20eSMichael Walle #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-lsxhl.cfg 38f214a20eSMichael Walle #define CONFIG_MACH_TYPE 2663 39f214a20eSMichael Walle /* CONFIG_SYS_TCLK is 200000000 by default */ 40f214a20eSMichael Walle #else 41f214a20eSMichael Walle #error "unknown board" 42f214a20eSMichael Walle #endif 43f214a20eSMichael Walle 44f214a20eSMichael Walle /* 45f214a20eSMichael Walle * General configuration options 46f214a20eSMichael Walle */ 47f214a20eSMichael Walle #define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ 48f214a20eSMichael Walle #define CONFIG_KIRKWOOD /* SOC Family Name */ 49f214a20eSMichael Walle #define CONFIG_KW88F6281 /* SOC Name */ 50f214a20eSMichael Walle 51f214a20eSMichael Walle #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ 52f214a20eSMichael Walle #define CONFIG_MISC_INIT_R 53f214a20eSMichael Walle #define CONFIG_SHOW_BOOT_PROGRESS 54f214a20eSMichael Walle 55f214a20eSMichael Walle #define CONFIG_RANDOM_MACADDR 56f214a20eSMichael Walle #define CONFIG_KIRKWOOD_GPIO 57f214a20eSMichael Walle #define CONFIG_OF_LIBFDT 58f214a20eSMichael Walle 59f214a20eSMichael Walle #define CONFIG_SYS_NO_FLASH 60f214a20eSMichael Walle #define CONFIG_SYS_HUSH_PARSER 61f214a20eSMichael Walle #define CONFIG_SYS_CONSOLE_IS_IN_ENV 62f214a20eSMichael Walle #define CONFIG_SYS_CONSOLE_INFO_QUIET 63f214a20eSMichael Walle 64f214a20eSMichael Walle /* 65f214a20eSMichael Walle * Enable u-boot API for standalone programs. 66f214a20eSMichael Walle */ 67f214a20eSMichael Walle #define CONFIG_API 68f214a20eSMichael Walle 69f214a20eSMichael Walle /* 70f214a20eSMichael Walle * Commands configuration 71f214a20eSMichael Walle */ 72f214a20eSMichael Walle #include <config_cmd_default.h> 73f214a20eSMichael Walle #define CONFIG_CMD_DHCP 74f214a20eSMichael Walle #define CONFIG_CMD_ELF 75f214a20eSMichael Walle #define CONFIG_CMD_ENV 76f214a20eSMichael Walle #define CONFIG_CMD_EXT2 77f214a20eSMichael Walle #define CONFIG_CMD_FAT 78f214a20eSMichael Walle #define CONFIG_CMD_IDE 79f214a20eSMichael Walle #define CONFIG_CMD_PING 80f214a20eSMichael Walle #define CONFIG_CMD_PING 81f214a20eSMichael Walle #define CONFIG_CMD_SF 82f214a20eSMichael Walle #define CONFIG_CMD_SPI 83f214a20eSMichael Walle #define CONFIG_CMD_USB 84f214a20eSMichael Walle 85f214a20eSMichael Walle #define CONFIG_DOS_PARTITION 86f214a20eSMichael Walle #define CONFIG_EFI_PARTITION 87f214a20eSMichael Walle 88f214a20eSMichael Walle /* 89f214a20eSMichael Walle * mv-common.h should be defined after CMD configs since it used them 90f214a20eSMichael Walle * to enable certain macros 91f214a20eSMichael Walle */ 92f214a20eSMichael Walle #include "mv-common.h" 93f214a20eSMichael Walle 94f214a20eSMichael Walle /* ST M25P40 */ 95f214a20eSMichael Walle #undef CONFIG_SPI_FLASH_MACRONIX 96f214a20eSMichael Walle #define CONFIG_SPI_FLASH_STMICRO 97f214a20eSMichael Walle #undef CONFIG_ENV_SPI_MAX_HZ 98f214a20eSMichael Walle #define CONFIG_ENV_SPI_MAX_HZ 25000000 99f214a20eSMichael Walle #undef CONFIG_SF_DEFAULT_SPEED 100f214a20eSMichael Walle #define CONFIG_SF_DEFAULT_SPEED 25000000 101f214a20eSMichael Walle 102f214a20eSMichael Walle 103f214a20eSMichael Walle #undef CONFIG_SYS_PROMPT 104f214a20eSMichael Walle #define CONFIG_SYS_PROMPT "=> " 105f214a20eSMichael Walle #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " 106f214a20eSMichael Walle 107f214a20eSMichael Walle /* 108f214a20eSMichael Walle * Environment variables configurations 109f214a20eSMichael Walle */ 110f214a20eSMichael Walle #ifdef CONFIG_SPI_FLASH 111f214a20eSMichael Walle #define CONFIG_SYS_MAX_FLASH_BANKS 1 112f214a20eSMichael Walle #define CONFIG_SYS_MAX_FLASH_SECT 8 113f214a20eSMichael Walle #define CONFIG_ENV_IS_IN_SPI_FLASH 1 114f214a20eSMichael Walle #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K */ 115f214a20eSMichael Walle #else 116f214a20eSMichael Walle #define CONFIG_ENV_IS_NOWHERE 117f214a20eSMichael Walle #endif 118f214a20eSMichael Walle 119f214a20eSMichael Walle #define CONFIG_ENV_SIZE 0x10000 /* 64k */ 120f214a20eSMichael Walle #define CONFIG_ENV_OFFSET 0x70000 /* env starts here */ 121f214a20eSMichael Walle 122f214a20eSMichael Walle /* 123f214a20eSMichael Walle * Default environment variables 124f214a20eSMichael Walle */ 125f214a20eSMichael Walle #define CONFIG_LOADADDR 0x00800000 126f214a20eSMichael Walle #define CONFIG_BOOTCOMMAND "run bootcmd_${bootsource}" 127f214a20eSMichael Walle #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/sda2" 128f214a20eSMichael Walle #define CONFIG_EXTRA_ENV_SETTINGS \ 129f214a20eSMichael Walle "bootsource=hdd\0" \ 130f214a20eSMichael Walle "hdpart=0:1\0" \ 131f214a20eSMichael Walle "bootcmd_net=bootp 0x00100000 uImage " \ 132f214a20eSMichael Walle "&& tftpboot 0x00800000 uInitrd " \ 133f214a20eSMichael Walle "&& bootm 0x00100000 0x00800000\0" \ 134f214a20eSMichael Walle "bootcmd_hdd=ide reset " \ 135f214a20eSMichael Walle "&& ext2load ide ${hdpart} 0x00100000 /uImage " \ 136f214a20eSMichael Walle "&& ext2load ide ${hdpart} 0x00800000 /uInitrd " \ 137f214a20eSMichael Walle "&& bootm 0x00100000 0x00800000\0" \ 138f214a20eSMichael Walle "bootcmd_usb=usb start " \ 139f214a20eSMichael Walle "&& fatload usb 0:1 0x00100000 /uImage " \ 140f214a20eSMichael Walle "&& fatload usb 0:1 0x00800000 /uInitrd " \ 141f214a20eSMichael Walle "&& bootm 0x00100000 0x00800000\0" \ 142f214a20eSMichael Walle "bootcmd_rescue=run config_nc_dhcp; run nc\0" \ 143f214a20eSMichael Walle "eraseenv=sf probe 0 " \ 1445368c55dSMarek Vasut "&& sf erase " __stringify(CONFIG_ENV_OFFSET) \ 1455368c55dSMarek Vasut " +" __stringify(CONFIG_ENV_SIZE) "\0" \ 146f214a20eSMichael Walle "config_nc_dhcp=setenv autoload_old ${autoload}; " \ 147f214a20eSMichael Walle "setenv autoload no " \ 148f214a20eSMichael Walle "&& bootp " \ 149*23c9946aSMichael Walle "&& setenv ncip " \ 150f214a20eSMichael Walle "&& setenv autoload ${autoload_old}; " \ 151f214a20eSMichael Walle "setenv autoload_old\0" \ 152f214a20eSMichael Walle "standard_env=setenv ipaddr; setenv netmask; setenv serverip; " \ 153f214a20eSMichael Walle "setenv ncip; setenv gatewayip; setenv ethact; " \ 154f214a20eSMichael Walle "setenv bootfile; setenv dnsip; " \ 155f214a20eSMichael Walle "setenv bootsource hdd; run ser\0" \ 156f214a20eSMichael Walle "restore_env=run standard_env; saveenv; reset\0" \ 157f214a20eSMichael Walle "ser=setenv stdin serial; setenv stdout serial; " \ 158f214a20eSMichael Walle "setenv stderr serial\0" \ 159f214a20eSMichael Walle "nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0" \ 160f214a20eSMichael Walle "stdin=serial\0" \ 161f214a20eSMichael Walle "stdout=serial\0" \ 162f214a20eSMichael Walle "stderr=serial\0" 163f214a20eSMichael Walle 164f214a20eSMichael Walle /* 165f214a20eSMichael Walle * Ethernet Driver configuration 166f214a20eSMichael Walle */ 167f214a20eSMichael Walle #ifdef CONFIG_CMD_NET 168f214a20eSMichael Walle #define CONFIG_MVGBE_PORTS {0, 1} /* enable port 1 only */ 169f214a20eSMichael Walle #define CONFIG_PHY_BASE_ADR 7 170f214a20eSMichael Walle #undef CONFIG_RESET_PHY_R 171f214a20eSMichael Walle #endif /* CONFIG_CMD_NET */ 172f214a20eSMichael Walle 173f214a20eSMichael Walle #ifdef CONFIG_CMD_IDE 174f214a20eSMichael Walle #undef CONFIG_IDE_LED 175f214a20eSMichael Walle #undef CONFIG_SYS_IDE_MAXBUS 176f214a20eSMichael Walle #define CONFIG_SYS_IDE_MAXBUS 1 177f214a20eSMichael Walle #undef CONFIG_SYS_IDE_MAXDEVICE 178f214a20eSMichael Walle #define CONFIG_SYS_IDE_MAXDEVICE 1 179f214a20eSMichael Walle #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET 180f214a20eSMichael Walle #endif 181f214a20eSMichael Walle 182f214a20eSMichael Walle #endif /* _CONFIG_LSXL_H */ 183