133b1d3f4SDaniel Gorsulowski /* 233b1d3f4SDaniel Gorsulowski * (C) Copyright 2007-2008 3c9e798d3SStelian Pop * Stelian Pop <stelian@popies.net> 433b1d3f4SDaniel Gorsulowski * Lead Tech Design <www.leadtechdesign.com> 533b1d3f4SDaniel Gorsulowski * 6*83bf0057SDaniel Gorsulowski * (C) Copyright 2009-2015 733b1d3f4SDaniel Gorsulowski * Daniel Gorsulowski <daniel.gorsulowski@esd.eu> 833b1d3f4SDaniel Gorsulowski * esd electronic system design gmbh <www.esd.eu> 933b1d3f4SDaniel Gorsulowski * 1033b1d3f4SDaniel Gorsulowski * Configuation settings for the esd MEESC board. 1133b1d3f4SDaniel Gorsulowski * 121a459660SWolfgang Denk * SPDX-License-Identifier: GPL-2.0+ 1333b1d3f4SDaniel Gorsulowski */ 1433b1d3f4SDaniel Gorsulowski 1533b1d3f4SDaniel Gorsulowski #ifndef __CONFIG_H 1633b1d3f4SDaniel Gorsulowski #define __CONFIG_H 1733b1d3f4SDaniel Gorsulowski 180cb77bfaSMatthias Fuchs /* 190cb77bfaSMatthias Fuchs * SoC must be defined first, before hardware.h is included. 200cb77bfaSMatthias Fuchs * In this case SoC is defined in boards.cfg. 210cb77bfaSMatthias Fuchs */ 220cb77bfaSMatthias Fuchs #include <asm/hardware.h> 230cb77bfaSMatthias Fuchs 240cb77bfaSMatthias Fuchs /* 250cb77bfaSMatthias Fuchs * Warning: changing CONFIG_SYS_TEXT_BASE requires 260cb77bfaSMatthias Fuchs * adapting the initial boot program. 270cb77bfaSMatthias Fuchs * Since the linker has to swallow that define, we must use a pure 280cb77bfaSMatthias Fuchs * hex number here! 290cb77bfaSMatthias Fuchs */ 30*83bf0057SDaniel Gorsulowski #define CONFIG_SYS_TEXT_BASE 0x21F00000 310cb77bfaSMatthias Fuchs 3218b6ddfdSDaniel Gorsulowski /* 3318b6ddfdSDaniel Gorsulowski * since a number of boards are not being listed in linux 3418b6ddfdSDaniel Gorsulowski * arch/arm/tools/mach-types any more, the mach-types have to be 3518b6ddfdSDaniel Gorsulowski * defined here 3618b6ddfdSDaniel Gorsulowski */ 3718b6ddfdSDaniel Gorsulowski #define MACH_TYPE_MEESC 2165 3818b6ddfdSDaniel Gorsulowski #define MACH_TYPE_ETHERCAN2 2407 3918b6ddfdSDaniel Gorsulowski 400cb77bfaSMatthias Fuchs /* ARM asynchronous clock */ 410cb77bfaSMatthias Fuchs #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* 32.768 kHz crystal */ 429f07dedeSDaniel Gorsulowski #define CONFIG_SYS_AT91_MAIN_CLOCK 16000000/* 16.0 MHz crystal */ 430cb77bfaSMatthias Fuchs 440cb77bfaSMatthias Fuchs /* Misc CPU related */ 450cb77bfaSMatthias Fuchs #define CONFIG_SKIP_LOWLEVEL_INIT 460cb77bfaSMatthias Fuchs #define CONFIG_ARCH_CPU_INIT 470cb77bfaSMatthias Fuchs #define CONFIG_BOARD_EARLY_INIT_F /* call board_early_init_f() */ 480cb77bfaSMatthias Fuchs #define CONFIG_SETUP_MEMORY_TAGS 490cb77bfaSMatthias Fuchs #define CONFIG_INITRD_TAG 500cb77bfaSMatthias Fuchs #define CONFIG_SERIAL_TAG 510cb77bfaSMatthias Fuchs #define CONFIG_REVISION_TAG 520cb77bfaSMatthias Fuchs #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 530cb77bfaSMatthias Fuchs #define CONFIG_MISC_INIT_R /* Call misc_init_r */ 5433b1d3f4SDaniel Gorsulowski 550cb77bfaSMatthias Fuchs #define CONFIG_DISPLAY_BOARDINFO /* call checkboard() */ 560cb77bfaSMatthias Fuchs #define CONFIG_DISPLAY_CPUINFO /* display cpu info and speed */ 570cb77bfaSMatthias Fuchs #define CONFIG_PREBOOT /* enable preboot variable */ 5833b1d3f4SDaniel Gorsulowski 59*83bf0057SDaniel Gorsulowski #define CONFIG_CMD_BOOTZ 60*83bf0057SDaniel Gorsulowski #define CONFIG_OF_LIBFDT 61ab892a10SDaniel Gorsulowski 6233b1d3f4SDaniel Gorsulowski /* 6333b1d3f4SDaniel Gorsulowski * Hardware drivers 6433b1d3f4SDaniel Gorsulowski */ 6533b1d3f4SDaniel Gorsulowski 660cb77bfaSMatthias Fuchs /* general purpose I/O */ 670cb77bfaSMatthias Fuchs #define CONFIG_AT91_GPIO 680cb77bfaSMatthias Fuchs 6933b1d3f4SDaniel Gorsulowski /* Console output */ 700cb77bfaSMatthias Fuchs #define CONFIG_ATMEL_USART 710cb77bfaSMatthias Fuchs #define CONFIG_USART_BASE ATMEL_BASE_DBGU 720cb77bfaSMatthias Fuchs #define CONFIG_USART_ID ATMEL_ID_SYS 730cb77bfaSMatthias Fuchs #define CONFIG_BAUDRATE 115200 7433b1d3f4SDaniel Gorsulowski 7533b1d3f4SDaniel Gorsulowski #define CONFIG_BOOTDELAY 3 760cb77bfaSMatthias Fuchs #define CONFIG_ZERO_BOOTDELAY_CHECK 7733b1d3f4SDaniel Gorsulowski 7833b1d3f4SDaniel Gorsulowski /* 7933b1d3f4SDaniel Gorsulowski * BOOTP options 8033b1d3f4SDaniel Gorsulowski */ 810cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_BOOTFILESIZE 820cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_BOOTPATH 830cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_GATEWAY 840cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_HOSTNAME 8533b1d3f4SDaniel Gorsulowski 8633b1d3f4SDaniel Gorsulowski /* 8733b1d3f4SDaniel Gorsulowski * Command line configuration. 8833b1d3f4SDaniel Gorsulowski */ 89*83bf0057SDaniel Gorsulowski #undef CONFIG_CMD_BDI 90*83bf0057SDaniel Gorsulowski #undef CONFIG_CMD_FPGA 91*83bf0057SDaniel Gorsulowski #undef CONFIG_CMD_LOADS 92*83bf0057SDaniel Gorsulowski #undef CONFIG_CMD_IMLS 93*83bf0057SDaniel Gorsulowski 940cb77bfaSMatthias Fuchs #define CONFIG_CMD_PING 950cb77bfaSMatthias Fuchs #define CONFIG_CMD_DHCP 96*83bf0057SDaniel Gorsulowski 97*83bf0057SDaniel Gorsulowski #ifdef CONFIG_SYS_USE_NANDFLASH 980cb77bfaSMatthias Fuchs #define CONFIG_CMD_NAND 99*83bf0057SDaniel Gorsulowski #endif 10033b1d3f4SDaniel Gorsulowski 10133b1d3f4SDaniel Gorsulowski /* LED */ 1020cb77bfaSMatthias Fuchs #define CONFIG_AT91_LED 10333b1d3f4SDaniel Gorsulowski 1040cb77bfaSMatthias Fuchs /* 1050cb77bfaSMatthias Fuchs * SDRAM: 1 bank, min 32, max 128 MB 1060cb77bfaSMatthias Fuchs * Initialized before u-boot gets started. 1070cb77bfaSMatthias Fuchs */ 108*83bf0057SDaniel Gorsulowski #define PHYS_SDRAM ATMEL_BASE_CS1 /* 0x20000000 */ 109*83bf0057SDaniel Gorsulowski #define PHYS_SDRAM_SIZE 0x02000000 /* 32 MByte */ 110*83bf0057SDaniel Gorsulowski 11133b1d3f4SDaniel Gorsulowski #define CONFIG_NR_DRAM_BANKS 1 112*83bf0057SDaniel Gorsulowski #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 113*83bf0057SDaniel Gorsulowski #define CONFIG_SYS_SDRAM_SIZE PHYS_SDRAM_SIZE 1140cb77bfaSMatthias Fuchs 1150cb77bfaSMatthias Fuchs #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x00100000) 1160cb77bfaSMatthias Fuchs #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x01E00000) 1170cb77bfaSMatthias Fuchs #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x00100000) 1180cb77bfaSMatthias Fuchs 1190cb77bfaSMatthias Fuchs /* 1200cb77bfaSMatthias Fuchs * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM, 1210cb77bfaSMatthias Fuchs * leaving the correct space for initial global data structure above 1220cb77bfaSMatthias Fuchs * that address while providing maximum stack area below. 1230cb77bfaSMatthias Fuchs */ 1240cb77bfaSMatthias Fuchs #define CONFIG_SYS_INIT_SP_ADDR \ 1250cb77bfaSMatthias Fuchs (ATMEL_BASE_SRAM0 + 0x1000 - GENERATED_GBL_DATA_SIZE) 12633b1d3f4SDaniel Gorsulowski 12733b1d3f4SDaniel Gorsulowski /* DataFlash */ 1280cb77bfaSMatthias Fuchs #ifdef CONFIG_SYS_USE_DATAFLASH 12933b1d3f4SDaniel Gorsulowski # define CONFIG_ATMEL_DATAFLASH_SPI 1300cb77bfaSMatthias Fuchs # define CONFIG_HAS_DATAFLASH 13133b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MAX_DATAFLASH_BANKS 1 13233b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 /* CS0 */ 13333b1d3f4SDaniel Gorsulowski # define AT91_SPI_CLK 15000000 13433b1d3f4SDaniel Gorsulowski # define DATAFLASH_TCSS (0x1a << 16) 13533b1d3f4SDaniel Gorsulowski # define DATAFLASH_TCHS (0x1 << 24) 1360cb77bfaSMatthias Fuchs #endif 13733b1d3f4SDaniel Gorsulowski 13833b1d3f4SDaniel Gorsulowski /* NOR flash is not populated, disable it */ 1390cb77bfaSMatthias Fuchs #define CONFIG_SYS_NO_FLASH 14033b1d3f4SDaniel Gorsulowski 14133b1d3f4SDaniel Gorsulowski /* NAND flash */ 14233b1d3f4SDaniel Gorsulowski #ifdef CONFIG_CMD_NAND 14333b1d3f4SDaniel Gorsulowski # define CONFIG_NAND_ATMEL 14433b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MAX_NAND_DEVICE 1 145*83bf0057SDaniel Gorsulowski # define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3 /* 0x40000000 */ 1460cb77bfaSMatthias Fuchs # define CONFIG_SYS_NAND_DBW_8 14733b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_NAND_MASK_ALE (1 << 21) 14833b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_NAND_MASK_CLE (1 << 22) 149ac45bb16SAndreas Bießmann # define CONFIG_SYS_NAND_ENABLE_PIN GPIO_PIN_PD(15) 150ac45bb16SAndreas Bießmann # define CONFIG_SYS_NAND_READY_PIN GPIO_PIN_PA(22) 15133b1d3f4SDaniel Gorsulowski #endif 15233b1d3f4SDaniel Gorsulowski 15333b1d3f4SDaniel Gorsulowski /* Ethernet */ 1540cb77bfaSMatthias Fuchs #define CONFIG_MACB 1550cb77bfaSMatthias Fuchs #define CONFIG_RMII 1560cb77bfaSMatthias Fuchs #define CONFIG_FIT 15733b1d3f4SDaniel Gorsulowski #define CONFIG_NET_RETRY_COUNT 20 15833b1d3f4SDaniel Gorsulowski #undef CONFIG_RESET_PHY_R 15933b1d3f4SDaniel Gorsulowski 160a380279bSDaniel Gorsulowski /* hw-controller addresses */ 161a380279bSDaniel Gorsulowski #define CONFIG_ET1100_BASE 0x70000000 162a380279bSDaniel Gorsulowski 1630cb77bfaSMatthias Fuchs #ifdef CONFIG_SYS_USE_DATAFLASH 1640cb77bfaSMatthias Fuchs 165a380279bSDaniel Gorsulowski /* bootstrap + u-boot + env in dataflash on CS0 */ 1660cb77bfaSMatthias Fuchs # define CONFIG_ENV_IS_IN_DATAFLASH 16733b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + \ 16833b1d3f4SDaniel Gorsulowski 0x8400) 16933b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_OFFSET 0x4200 17033b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + \ 17133b1d3f4SDaniel Gorsulowski CONFIG_ENV_OFFSET) 17233b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_SIZE 0x4200 17333b1d3f4SDaniel Gorsulowski 1740cb77bfaSMatthias Fuchs #elif CONFIG_SYS_USE_NANDFLASH 1750cb77bfaSMatthias Fuchs 1760cb77bfaSMatthias Fuchs /* bootstrap + u-boot + env + linux in nandflash */ 1770cb77bfaSMatthias Fuchs # define CONFIG_ENV_IS_IN_NAND 1 1780cb77bfaSMatthias Fuchs # define CONFIG_ENV_OFFSET 0xC0000 1790cb77bfaSMatthias Fuchs # define CONFIG_ENV_SIZE 0x20000 1800cb77bfaSMatthias Fuchs 1810cb77bfaSMatthias Fuchs #endif 18233b1d3f4SDaniel Gorsulowski 1830cb77bfaSMatthias Fuchs #define CONFIG_SYS_CBSIZE 512 18433b1d3f4SDaniel Gorsulowski #define CONFIG_SYS_MAXARGS 16 18533b1d3f4SDaniel Gorsulowski #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 18633b1d3f4SDaniel Gorsulowski sizeof(CONFIG_SYS_PROMPT) + 16) 1870cb77bfaSMatthias Fuchs #define CONFIG_SYS_LONGHELP 1880cb77bfaSMatthias Fuchs #define CONFIG_CMDLINE_EDITING 189*83bf0057SDaniel Gorsulowski #define CONFIG_AUTO_COMPLETE 190*83bf0057SDaniel Gorsulowski #define CONFIG_SYS_HUSH_PARSER 19133b1d3f4SDaniel Gorsulowski 19233b1d3f4SDaniel Gorsulowski /* 19333b1d3f4SDaniel Gorsulowski * Size of malloc() pool 19433b1d3f4SDaniel Gorsulowski */ 195a380279bSDaniel Gorsulowski #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + \ 196a380279bSDaniel Gorsulowski 128*1024, 0x1000) 19733b1d3f4SDaniel Gorsulowski 19833b1d3f4SDaniel Gorsulowski #endif 199