1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 233b1d3f4SDaniel Gorsulowski /* 333b1d3f4SDaniel Gorsulowski * (C) Copyright 2007-2008 4c9e798d3SStelian Pop * Stelian Pop <stelian@popies.net> 533b1d3f4SDaniel Gorsulowski * Lead Tech Design <www.leadtechdesign.com> 633b1d3f4SDaniel Gorsulowski * 783bf0057SDaniel Gorsulowski * (C) Copyright 2009-2015 833b1d3f4SDaniel Gorsulowski * Daniel Gorsulowski <daniel.gorsulowski@esd.eu> 933b1d3f4SDaniel Gorsulowski * esd electronic system design gmbh <www.esd.eu> 1033b1d3f4SDaniel Gorsulowski * 1133b1d3f4SDaniel Gorsulowski * Configuation settings for the esd MEESC board. 1233b1d3f4SDaniel Gorsulowski */ 1333b1d3f4SDaniel Gorsulowski 1433b1d3f4SDaniel Gorsulowski #ifndef __CONFIG_H 1533b1d3f4SDaniel Gorsulowski #define __CONFIG_H 1633b1d3f4SDaniel Gorsulowski 170cb77bfaSMatthias Fuchs /* 180cb77bfaSMatthias Fuchs * SoC must be defined first, before hardware.h is included. 190cb77bfaSMatthias Fuchs * In this case SoC is defined in boards.cfg. 200cb77bfaSMatthias Fuchs */ 210cb77bfaSMatthias Fuchs #include <asm/hardware.h> 220cb77bfaSMatthias Fuchs 230cb77bfaSMatthias Fuchs /* 240cb77bfaSMatthias Fuchs * Warning: changing CONFIG_SYS_TEXT_BASE requires 250cb77bfaSMatthias Fuchs * adapting the initial boot program. 260cb77bfaSMatthias Fuchs * Since the linker has to swallow that define, we must use a pure 270cb77bfaSMatthias Fuchs * hex number here! 280cb77bfaSMatthias Fuchs */ 290cb77bfaSMatthias Fuchs 300cb77bfaSMatthias Fuchs /* ARM asynchronous clock */ 310cb77bfaSMatthias Fuchs #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* 32.768 kHz crystal */ 329f07dedeSDaniel Gorsulowski #define CONFIG_SYS_AT91_MAIN_CLOCK 16000000/* 16.0 MHz crystal */ 330cb77bfaSMatthias Fuchs 340cb77bfaSMatthias Fuchs /* Misc CPU related */ 350cb77bfaSMatthias Fuchs #define CONFIG_SKIP_LOWLEVEL_INIT 360cb77bfaSMatthias Fuchs #define CONFIG_ARCH_CPU_INIT 370cb77bfaSMatthias Fuchs #define CONFIG_SETUP_MEMORY_TAGS 380cb77bfaSMatthias Fuchs #define CONFIG_INITRD_TAG 390cb77bfaSMatthias Fuchs #define CONFIG_SERIAL_TAG 400cb77bfaSMatthias Fuchs #define CONFIG_REVISION_TAG 410cb77bfaSMatthias Fuchs #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 4233b1d3f4SDaniel Gorsulowski 430cb77bfaSMatthias Fuchs #define CONFIG_PREBOOT /* enable preboot variable */ 4433b1d3f4SDaniel Gorsulowski 4533b1d3f4SDaniel Gorsulowski /* 4633b1d3f4SDaniel Gorsulowski * Hardware drivers 4733b1d3f4SDaniel Gorsulowski */ 4833b1d3f4SDaniel Gorsulowski 4933b1d3f4SDaniel Gorsulowski /* 5033b1d3f4SDaniel Gorsulowski * BOOTP options 5133b1d3f4SDaniel Gorsulowski */ 520cb77bfaSMatthias Fuchs #define CONFIG_BOOTP_BOOTFILESIZE 5333b1d3f4SDaniel Gorsulowski 540cb77bfaSMatthias Fuchs /* 550cb77bfaSMatthias Fuchs * SDRAM: 1 bank, min 32, max 128 MB 560cb77bfaSMatthias Fuchs * Initialized before u-boot gets started. 570cb77bfaSMatthias Fuchs */ 5883bf0057SDaniel Gorsulowski #define PHYS_SDRAM ATMEL_BASE_CS1 /* 0x20000000 */ 5983bf0057SDaniel Gorsulowski #define PHYS_SDRAM_SIZE 0x02000000 /* 32 MByte */ 6083bf0057SDaniel Gorsulowski 6183bf0057SDaniel Gorsulowski #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 6283bf0057SDaniel Gorsulowski #define CONFIG_SYS_SDRAM_SIZE PHYS_SDRAM_SIZE 630cb77bfaSMatthias Fuchs 640cb77bfaSMatthias Fuchs #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x00100000) 650cb77bfaSMatthias Fuchs #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x01E00000) 660cb77bfaSMatthias Fuchs #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x00100000) 670cb77bfaSMatthias Fuchs 680cb77bfaSMatthias Fuchs /* 690cb77bfaSMatthias Fuchs * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM, 700cb77bfaSMatthias Fuchs * leaving the correct space for initial global data structure above 710cb77bfaSMatthias Fuchs * that address while providing maximum stack area below. 720cb77bfaSMatthias Fuchs */ 730cb77bfaSMatthias Fuchs #define CONFIG_SYS_INIT_SP_ADDR \ 74a818704bSWenyou.Yang@microchip.com (ATMEL_BASE_SRAM0 + 16 * 1024 - GENERATED_GBL_DATA_SIZE) 7533b1d3f4SDaniel Gorsulowski 7633b1d3f4SDaniel Gorsulowski /* NAND flash */ 7733b1d3f4SDaniel Gorsulowski #ifdef CONFIG_CMD_NAND 7833b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_MAX_NAND_DEVICE 1 7983bf0057SDaniel Gorsulowski # define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3 /* 0x40000000 */ 800cb77bfaSMatthias Fuchs # define CONFIG_SYS_NAND_DBW_8 8133b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_NAND_MASK_ALE (1 << 21) 8233b1d3f4SDaniel Gorsulowski # define CONFIG_SYS_NAND_MASK_CLE (1 << 22) 83ac45bb16SAndreas Bießmann # define CONFIG_SYS_NAND_ENABLE_PIN GPIO_PIN_PD(15) 84ac45bb16SAndreas Bießmann # define CONFIG_SYS_NAND_READY_PIN GPIO_PIN_PA(22) 8533b1d3f4SDaniel Gorsulowski #endif 8633b1d3f4SDaniel Gorsulowski 8733b1d3f4SDaniel Gorsulowski /* Ethernet */ 880cb77bfaSMatthias Fuchs #define CONFIG_MACB 890cb77bfaSMatthias Fuchs #define CONFIG_RMII 9033b1d3f4SDaniel Gorsulowski #define CONFIG_NET_RETRY_COUNT 20 9133b1d3f4SDaniel Gorsulowski #undef CONFIG_RESET_PHY_R 9233b1d3f4SDaniel Gorsulowski 93a380279bSDaniel Gorsulowski /* hw-controller addresses */ 94a380279bSDaniel Gorsulowski #define CONFIG_ET1100_BASE 0x70000000 95a380279bSDaniel Gorsulowski 960cb77bfaSMatthias Fuchs #ifdef CONFIG_SYS_USE_DATAFLASH 970cb77bfaSMatthias Fuchs 98a380279bSDaniel Gorsulowski /* bootstrap + u-boot + env in dataflash on CS0 */ 9933b1d3f4SDaniel Gorsulowski #define CONFIG_ENV_OFFSET 0x4200 10033b1d3f4SDaniel Gorsulowski #define CONFIG_ENV_SIZE 0x4200 101a818704bSWenyou.Yang@microchip.com #define CONFIG_ENV_SECT_SIZE 0x210 10233b1d3f4SDaniel Gorsulowski 1030cb77bfaSMatthias Fuchs #elif CONFIG_SYS_USE_NANDFLASH 1040cb77bfaSMatthias Fuchs 1050cb77bfaSMatthias Fuchs /* bootstrap + u-boot + env + linux in nandflash */ 1060cb77bfaSMatthias Fuchs # define CONFIG_ENV_OFFSET 0xC0000 1070cb77bfaSMatthias Fuchs # define CONFIG_ENV_SIZE 0x20000 1080cb77bfaSMatthias Fuchs 1090cb77bfaSMatthias Fuchs #endif 11033b1d3f4SDaniel Gorsulowski 1110cb77bfaSMatthias Fuchs #define CONFIG_SYS_CBSIZE 512 11233b1d3f4SDaniel Gorsulowski 11333b1d3f4SDaniel Gorsulowski /* 11433b1d3f4SDaniel Gorsulowski * Size of malloc() pool 11533b1d3f4SDaniel Gorsulowski */ 116a380279bSDaniel Gorsulowski #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + \ 117a380279bSDaniel Gorsulowski 128*1024, 0x1000) 11833b1d3f4SDaniel Gorsulowski 11933b1d3f4SDaniel Gorsulowski #endif 120