133b1d3f4SDaniel Gorsulowski /* 233b1d3f4SDaniel Gorsulowski * (C) Copyright 2007-2008 333b1d3f4SDaniel Gorsulowski * Stelian Pop <stelian.pop@leadtechdesign.com> 433b1d3f4SDaniel Gorsulowski * Lead Tech Design <www.leadtechdesign.com> 533b1d3f4SDaniel Gorsulowski * 60cb77bfaSMatthias Fuchs * (C) Copyright 2009-2011 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 * 1233b1d3f4SDaniel Gorsulowski * See file CREDITS for list of people who contributed to this 1333b1d3f4SDaniel Gorsulowski * project. 1433b1d3f4SDaniel Gorsulowski * 1533b1d3f4SDaniel Gorsulowski * This program is free software; you can redistribute it and/or 1633b1d3f4SDaniel Gorsulowski * modify it under the terms of the GNU General Public License as 1733b1d3f4SDaniel Gorsulowski * published by the Free Software Foundation; either version 2 of 1833b1d3f4SDaniel Gorsulowski * the License, or (at your option) any later version. 1933b1d3f4SDaniel Gorsulowski * 2033b1d3f4SDaniel Gorsulowski * This program is distributed in the hope that it will be useful, 2133b1d3f4SDaniel Gorsulowski * but WITHOUT ANY WARRANTY; without even the implied warranty of 2233b1d3f4SDaniel Gorsulowski * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2333b1d3f4SDaniel Gorsulowski * GNU General Public License for more details. 2433b1d3f4SDaniel Gorsulowski * 2533b1d3f4SDaniel Gorsulowski * You should have received a copy of the GNU General Public License 2633b1d3f4SDaniel Gorsulowski * along with this program; if not, write to the Free Software 2733b1d3f4SDaniel Gorsulowski * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 2833b1d3f4SDaniel Gorsulowski * MA 02111-1307 USA 2933b1d3f4SDaniel Gorsulowski */ 3033b1d3f4SDaniel Gorsulowski 3133b1d3f4SDaniel Gorsulowski #ifndef __CONFIG_H 3233b1d3f4SDaniel Gorsulowski #define __CONFIG_H 3333b1d3f4SDaniel Gorsulowski 340cb77bfaSMatthias Fuchs /* 350cb77bfaSMatthias Fuchs * SoC must be defined first, before hardware.h is included. 360cb77bfaSMatthias Fuchs * In this case SoC is defined in boards.cfg. 370cb77bfaSMatthias Fuchs */ 380cb77bfaSMatthias Fuchs #include <asm/hardware.h> 390cb77bfaSMatthias Fuchs 400cb77bfaSMatthias Fuchs /* 410cb77bfaSMatthias Fuchs * Warning: changing CONFIG_SYS_TEXT_BASE requires 420cb77bfaSMatthias Fuchs * adapting the initial boot program. 430cb77bfaSMatthias Fuchs * Since the linker has to swallow that define, we must use a pure 440cb77bfaSMatthias Fuchs * hex number here! 450cb77bfaSMatthias Fuchs */ 460cb77bfaSMatthias Fuchs #define CONFIG_SYS_TEXT_BASE 0x20002000 470cb77bfaSMatthias Fuchs 48*18b6ddfdSDaniel Gorsulowski /* 49*18b6ddfdSDaniel Gorsulowski * since a number of boards are not being listed in linux 50*18b6ddfdSDaniel Gorsulowski * arch/arm/tools/mach-types any more, the mach-types have to be 51*18b6ddfdSDaniel Gorsulowski * defined here 52*18b6ddfdSDaniel Gorsulowski */ 53*18b6ddfdSDaniel Gorsulowski #define MACH_TYPE_MEESC 2165 54*18b6ddfdSDaniel Gorsulowski #define MACH_TYPE_ETHERCAN2 2407 55*18b6ddfdSDaniel Gorsulowski 560cb77bfaSMatthias Fuchs /* ARM asynchronous clock */ 570cb77bfaSMatthias Fuchs #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* 32.768 kHz crystal */ 589f07dedeSDaniel Gorsulowski #define CONFIG_SYS_AT91_MAIN_CLOCK 16000000/* 16.0 MHz crystal */ 59d4562e09SDaniel Gorsulowski #define CONFIG_SYS_HZ 1000 /* decrementer freq */ 600cb77bfaSMatthias Fuchs 610cb77bfaSMatthias Fuchs /* Misc CPU related */ 620cb77bfaSMatthias Fuchs #define CONFIG_SKIP_LOWLEVEL_INIT 630cb77bfaSMatthias Fuchs #define CONFIG_ARCH_CPU_INIT 640cb77bfaSMatthias Fuchs #define CONFIG_BOARD_EARLY_INIT_F /* call board_early_init_f() */ 650cb77bfaSMatthias Fuchs #define CONFIG_SETUP_MEMORY_TAGS 660cb77bfaSMatthias Fuchs #define CONFIG_INITRD_TAG 670cb77bfaSMatthias Fuchs #define CONFIG_SERIAL_TAG 680cb77bfaSMatthias Fuchs #define CONFIG_REVISION_TAG 690cb77bfaSMatthias Fuchs #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 700cb77bfaSMatthias Fuchs #define CONFIG_MISC_INIT_R /* Call misc_init_r */ 7133b1d3f4SDaniel Gorsulowski #undef CONFIG_USE_IRQ /* don't need IRQ/FIQ stuff */ 7233b1d3f4SDaniel Gorsulowski 730cb77bfaSMatthias Fuchs #define CONFIG_DISPLAY_BOARDINFO /* call checkboard() */ 740cb77bfaSMatthias Fuchs #define CONFIG_DISPLAY_CPUINFO /* display cpu info and speed */ 750cb77bfaSMatthias Fuchs #define CONFIG_PREBOOT /* enable preboot variable */ 7633b1d3f4SDaniel Gorsulowski 7733b1d3f4SDaniel Gorsulowski /* 7833b1d3f4SDaniel Gorsulowski * Hardware drivers 7933b1d3f4SDaniel Gorsulowski */ 8033b1d3f4SDaniel Gorsulowski 810cb77bfaSMatthias Fuchs /* required until arch/arm/include/asm/arch-at91/at91sam9263.h is reworked */ 820cb77bfaSMatthias Fuchs #define ATMEL_PMC_UHP AT91SAM926x_PMC_UHP 830cb77bfaSMatthias Fuchs 840cb77bfaSMatthias Fuchs /* general purpose I/O */ 850cb77bfaSMatthias Fuchs #define CONFIG_AT91_GPIO 860cb77bfaSMatthias Fuchs 8733b1d3f4SDaniel Gorsulowski /* Console output */ 880cb77bfaSMatthias Fuchs #define CONFIG_ATMEL_USART 890cb77bfaSMatthias Fuchs #define CONFIG_USART_BASE ATMEL_BASE_DBGU 900cb77bfaSMatthias Fuchs #define CONFIG_USART_ID ATMEL_ID_SYS 910cb77bfaSMatthias Fuchs #define CONFIG_BAUDRATE 115200 920cb77bfaSMatthias Fuchs #define CONFIG_SYS_BAUDRATE_TABLE {115200, 19200, 38400, 57600, 9600} 9333b1d3f4SDaniel Gorsulowski 9433b1d3f4SDaniel Gorsulowski #define CONFIG_BOOTDELAY 3 950cb77bfaSMatthias Fuchs #define CONFIG_ZERO_BOOTDELAY_CHECK 9633b1d3f4SDaniel Gorsulowski 9733b1d3f4SDaniel Gorsulowski /* 9833b1d3f4SDaniel Gorsulowski * BOOTP options 9933b1d3f4SDaniel Gorsulowski */ 1000cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_BOOTFILESIZE 1010cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_BOOTPATH 1020cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_GATEWAY 1030cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_HOSTNAME 10433b1d3f4SDaniel Gorsulowski 10533b1d3f4SDaniel Gorsulowski /* 10633b1d3f4SDaniel Gorsulowski * Command line configuration. 10733b1d3f4SDaniel Gorsulowski */ 10833b1d3f4SDaniel Gorsulowski #include <config_cmd_default.h> 10933b1d3f4SDaniel Gorsulowski #undef CONFIG_CMD_BDI 11033b1d3f4SDaniel Gorsulowski #undef CONFIG_CMD_FPGA 11133b1d3f4SDaniel Gorsulowski #undef CONFIG_CMD_LOADS 11233b1d3f4SDaniel Gorsulowski #undef CONFIG_CMD_IMLS 11333b1d3f4SDaniel Gorsulowski 1140cb77bfaSMatthias Fuchs #define CONFIG_CMD_PING 1150cb77bfaSMatthias Fuchs #define CONFIG_CMD_DHCP 1160cb77bfaSMatthias Fuchs #define CONFIG_CMD_NAND 1170cb77bfaSMatthias Fuchs #define CONFIG_CMD_USB 11833b1d3f4SDaniel Gorsulowski 11933b1d3f4SDaniel Gorsulowski /* LED */ 1200cb77bfaSMatthias Fuchs #define CONFIG_AT91_LED 12133b1d3f4SDaniel Gorsulowski 1220cb77bfaSMatthias Fuchs /* 1230cb77bfaSMatthias Fuchs * SDRAM: 1 bank, min 32, max 128 MB 1240cb77bfaSMatthias Fuchs * Initialized before u-boot gets started. 1250cb77bfaSMatthias Fuchs */ 12633b1d3f4SDaniel Gorsulowski #define CONFIG_NR_DRAM_BANKS 1 1270cb77bfaSMatthias Fuchs #define CONFIG_SYS_SDRAM_BASE 0x20000000 /* ATMEL_BASE_CS1 */ 1280cb77bfaSMatthias Fuchs #define CONFIG_SYS_SDRAM_SIZE 0x02000000 1290cb77bfaSMatthias Fuchs 1300cb77bfaSMatthias Fuchs #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x00100000) 1310cb77bfaSMatthias Fuchs #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x01E00000) 1320cb77bfaSMatthias Fuchs #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x00100000) 1330cb77bfaSMatthias Fuchs 1340cb77bfaSMatthias Fuchs /* 1350cb77bfaSMatthias Fuchs * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM, 1360cb77bfaSMatthias Fuchs * leaving the correct space for initial global data structure above 1370cb77bfaSMatthias Fuchs * that address while providing maximum stack area below. 1380cb77bfaSMatthias Fuchs */ 1390cb77bfaSMatthias Fuchs #define CONFIG_SYS_INIT_SP_ADDR \ 1400cb77bfaSMatthias Fuchs (ATMEL_BASE_SRAM0 + 0x1000 - GENERATED_GBL_DATA_SIZE) 14133b1d3f4SDaniel Gorsulowski 14233b1d3f4SDaniel Gorsulowski /* DataFlash */ 1430cb77bfaSMatthias Fuchs #ifdef CONFIG_SYS_USE_DATAFLASH 14433b1d3f4SDaniel Gorsulowski # define CONFIG_ATMEL_DATAFLASH_SPI 1450cb77bfaSMatthias Fuchs # define CONFIG_HAS_DATAFLASH 14633b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_SPI_WRITE_TOUT (5 * CONFIG_SYS_HZ) 14733b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MAX_DATAFLASH_BANKS 1 14833b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 /* CS0 */ 14933b1d3f4SDaniel Gorsulowski # define AT91_SPI_CLK 15000000 15033b1d3f4SDaniel Gorsulowski # define DATAFLASH_TCSS (0x1a << 16) 15133b1d3f4SDaniel Gorsulowski # define DATAFLASH_TCHS (0x1 << 24) 1520cb77bfaSMatthias Fuchs #endif 15333b1d3f4SDaniel Gorsulowski 15433b1d3f4SDaniel Gorsulowski /* NOR flash is not populated, disable it */ 1550cb77bfaSMatthias Fuchs #define CONFIG_SYS_NO_FLASH 15633b1d3f4SDaniel Gorsulowski 15733b1d3f4SDaniel Gorsulowski /* NAND flash */ 15833b1d3f4SDaniel Gorsulowski #ifdef CONFIG_CMD_NAND 15933b1d3f4SDaniel Gorsulowski # define CONFIG_NAND_ATMEL 16033b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MAX_NAND_DEVICE 1 1610cb77bfaSMatthias Fuchs # define CONFIG_SYS_NAND_BASE 0x40000000 /* ATMEL_BASE_CS3 */ 1620cb77bfaSMatthias Fuchs # define CONFIG_SYS_NAND_DBW_8 16333b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_NAND_MASK_ALE (1 << 21) 16433b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_NAND_MASK_CLE (1 << 22) 165d4562e09SDaniel Gorsulowski # define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIO_PORTD, 15 166d4562e09SDaniel Gorsulowski # define CONFIG_SYS_NAND_READY_PIN AT91_PIO_PORTA, 22 167d4562e09SDaniel Gorsulowski # define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */ 16833b1d3f4SDaniel Gorsulowski #endif 16933b1d3f4SDaniel Gorsulowski 17033b1d3f4SDaniel Gorsulowski /* Ethernet */ 1710cb77bfaSMatthias Fuchs #define CONFIG_MACB 1720cb77bfaSMatthias Fuchs #define CONFIG_RMII 1730cb77bfaSMatthias Fuchs #define CONFIG_FIT 17433b1d3f4SDaniel Gorsulowski #define CONFIG_NET_RETRY_COUNT 20 17533b1d3f4SDaniel Gorsulowski #undef CONFIG_RESET_PHY_R 17633b1d3f4SDaniel Gorsulowski 17764037fb4SDaniel Gorsulowski /* USB */ 17864037fb4SDaniel Gorsulowski #define CONFIG_USB_ATMEL 1790cb77bfaSMatthias Fuchs #define CONFIG_USB_OHCI_NEW 1800cb77bfaSMatthias Fuchs #define CONFIG_DOS_PARTITION 1810cb77bfaSMatthias Fuchs #define CONFIG_SYS_USB_OHCI_CPU_INIT 18264037fb4SDaniel Gorsulowski #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000 18364037fb4SDaniel Gorsulowski #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263" 18464037fb4SDaniel Gorsulowski #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 18533b1d3f4SDaniel Gorsulowski 18633b1d3f4SDaniel Gorsulowski /* CAN */ 1870cb77bfaSMatthias Fuchs #define CONFIG_AT91_CAN 18833b1d3f4SDaniel Gorsulowski 189a380279bSDaniel Gorsulowski /* hw-controller addresses */ 190a380279bSDaniel Gorsulowski #define CONFIG_ET1100_BASE 0x70000000 191a380279bSDaniel Gorsulowski 1920cb77bfaSMatthias Fuchs #ifdef CONFIG_SYS_USE_DATAFLASH 1930cb77bfaSMatthias Fuchs 194a380279bSDaniel Gorsulowski /* bootstrap + u-boot + env in dataflash on CS0 */ 1950cb77bfaSMatthias Fuchs # define CONFIG_ENV_IS_IN_DATAFLASH 19633b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + \ 19733b1d3f4SDaniel Gorsulowski 0x8400) 19833b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_OFFSET 0x4200 19933b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + \ 20033b1d3f4SDaniel Gorsulowski CONFIG_ENV_OFFSET) 20133b1d3f4SDaniel Gorsulowski # define CONFIG_ENV_SIZE 0x4200 20233b1d3f4SDaniel Gorsulowski 2030cb77bfaSMatthias Fuchs #elif CONFIG_SYS_USE_NANDFLASH 2040cb77bfaSMatthias Fuchs 2050cb77bfaSMatthias Fuchs /* bootstrap + u-boot + env + linux in nandflash */ 2060cb77bfaSMatthias Fuchs # define CONFIG_ENV_IS_IN_NAND 1 2070cb77bfaSMatthias Fuchs # define CONFIG_ENV_OFFSET 0xC0000 2080cb77bfaSMatthias Fuchs # define CONFIG_ENV_SIZE 0x20000 2090cb77bfaSMatthias Fuchs 2100cb77bfaSMatthias Fuchs #endif 21133b1d3f4SDaniel Gorsulowski 21233b1d3f4SDaniel Gorsulowski #define CONFIG_SYS_PROMPT "=> " 2130cb77bfaSMatthias Fuchs #define CONFIG_SYS_CBSIZE 512 21433b1d3f4SDaniel Gorsulowski #define CONFIG_SYS_MAXARGS 16 21533b1d3f4SDaniel Gorsulowski #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 21633b1d3f4SDaniel Gorsulowski sizeof(CONFIG_SYS_PROMPT) + 16) 2170cb77bfaSMatthias Fuchs #define CONFIG_SYS_LONGHELP 2180cb77bfaSMatthias Fuchs #define CONFIG_CMDLINE_EDITING 21933b1d3f4SDaniel Gorsulowski 22033b1d3f4SDaniel Gorsulowski /* 22133b1d3f4SDaniel Gorsulowski * Size of malloc() pool 22233b1d3f4SDaniel Gorsulowski */ 223a380279bSDaniel Gorsulowski #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + \ 224a380279bSDaniel Gorsulowski 128*1024, 0x1000) 22533b1d3f4SDaniel Gorsulowski 22633b1d3f4SDaniel Gorsulowski #define CONFIG_STACKSIZE (32 * 1024) /* regular stack */ 22733b1d3f4SDaniel Gorsulowski 22833b1d3f4SDaniel Gorsulowski #ifdef CONFIG_USE_IRQ 22933b1d3f4SDaniel Gorsulowski # error CONFIG_USE_IRQ not supported 23033b1d3f4SDaniel Gorsulowski #endif 23133b1d3f4SDaniel Gorsulowski 23233b1d3f4SDaniel Gorsulowski #endif 233