1bf9e3b38Swdenk /* 2bf9e3b38Swdenk * Configuation settings for the Motorola MC5282EVB board. 3bf9e3b38Swdenk * 4bf9e3b38Swdenk * (C) Copyright 2003 Josef Baumgartner <josef.baumgartner@telex.de> 5bf9e3b38Swdenk * 6bf9e3b38Swdenk * See file CREDITS for list of people who contributed to this 7bf9e3b38Swdenk * project. 8bf9e3b38Swdenk * 9bf9e3b38Swdenk * This program is free software; you can redistribute it and/or 10bf9e3b38Swdenk * modify it under the terms of the GNU General Public License as 11bf9e3b38Swdenk * published by the Free Software Foundation; either version 2 of 12bf9e3b38Swdenk * the License, or (at your option) any later version. 13bf9e3b38Swdenk * 14bf9e3b38Swdenk * This program is distributed in the hope that it will be useful, 15bf9e3b38Swdenk * but WITHOUT ANY WARRANTY; without even the implied warranty of 16bf9e3b38Swdenk * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17bf9e3b38Swdenk * GNU General Public License for more details. 18bf9e3b38Swdenk * 19bf9e3b38Swdenk * You should have received a copy of the GNU General Public License 20bf9e3b38Swdenk * along with this program; if not, write to the Free Software 21bf9e3b38Swdenk * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22bf9e3b38Swdenk * MA 02111-1307 USA 23bf9e3b38Swdenk */ 24bf9e3b38Swdenk 25bf9e3b38Swdenk /* 26bf9e3b38Swdenk * board/config.h - configuration options, board specific 27bf9e3b38Swdenk */ 28bf9e3b38Swdenk 294e5ca3ebSwdenk #ifndef _CONFIG_M5282EVB_H 304e5ca3ebSwdenk #define _CONFIG_M5282EVB_H 314e5ca3ebSwdenk 32bf9e3b38Swdenk /* 33bf9e3b38Swdenk * High Level Configuration Options 34bf9e3b38Swdenk * (easy to change) 35bf9e3b38Swdenk */ 36bf9e3b38Swdenk #define CONFIG_MCF52x2 /* define processor family */ 37bf9e3b38Swdenk #define CONFIG_M5282 /* define processor type */ 384e5ca3ebSwdenk 39f28e1bd9STsiChungLiew #define CONFIG_MCFTMR 404e5ca3ebSwdenk 41f28e1bd9STsiChungLiew #define CONFIG_MCFUART 426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UART_PORT (0) 4379e0799cSTsiChung Liew #define CONFIG_BAUDRATE 115200 446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BAUDRATE_TABLE { 9600 , 19200 , 38400 , 57600, 115200 } 45bf9e3b38Swdenk 46f28e1bd9STsiChungLiew #undef CONFIG_MONITOR_IS_IN_RAM /* define if monitor is started from a pre-loader */ 47bf9e3b38Swdenk 48bf9e3b38Swdenk /* Configuration for environment 49bf9e3b38Swdenk * Environment is embedded in u-boot in the second sector of the flash 50bf9e3b38Swdenk */ 510e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR 0xffe04000 520e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE 0x2000 535a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH 1 54bf9e3b38Swdenk 558353e139SJon Loeliger /* 56659e2f67SJon Loeliger * BOOTP options 57659e2f67SJon Loeliger */ 58659e2f67SJon Loeliger #define CONFIG_BOOTP_BOOTFILESIZE 59659e2f67SJon Loeliger #define CONFIG_BOOTP_BOOTPATH 60659e2f67SJon Loeliger #define CONFIG_BOOTP_GATEWAY 61659e2f67SJon Loeliger #define CONFIG_BOOTP_HOSTNAME 62659e2f67SJon Loeliger 63659e2f67SJon Loeliger /* 648353e139SJon Loeliger * Command line configuration. 658353e139SJon Loeliger */ 668353e139SJon Loeliger #include <config_cmd_default.h> 67*dd9f054eSTsiChung Liew #define CONFIG_CMD_CACHE 68f28e1bd9STsiChungLiew #define CONFIG_CMD_NET 69f28e1bd9STsiChungLiew #define CONFIG_CMD_PING 70f28e1bd9STsiChungLiew #define CONFIG_CMD_MII 71bf9e3b38Swdenk 728353e139SJon Loeliger #undef CONFIG_CMD_LOADS 738353e139SJon Loeliger #undef CONFIG_CMD_LOADB 748353e139SJon Loeliger 75f28e1bd9STsiChungLiew #define CONFIG_MCFFEC 76f28e1bd9STsiChungLiew #ifdef CONFIG_MCFFEC 77f28e1bd9STsiChungLiew # define CONFIG_NET_MULTI 1 78f28e1bd9STsiChungLiew # define CONFIG_MII 1 790f3ba7e9STsiChung Liew # define CONFIG_MII_INIT 1 806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_DISCOVER_PHY 816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_RX_ETH_BUFFER 8 826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 83f28e1bd9STsiChungLiew 846d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FEC0_PINMUX 0 856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FEC0_MIIBASE CONFIG_SYS_FEC0_IOBASE 86f28e1bd9STsiChungLiew # define MCFFEC_TOUT_LOOP 50000 876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ 886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # ifndef CONFIG_SYS_DISCOVER_PHY 89f28e1bd9STsiChungLiew # define FECDUPLEX FULL 90f28e1bd9STsiChungLiew # define FECSPEED _100BASET 91f28e1bd9STsiChungLiew # else 926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # ifndef CONFIG_SYS_FAULT_ECHO_LINK_DOWN 936d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 94f28e1bd9STsiChungLiew # endif 956d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # endif /* CONFIG_SYS_DISCOVER_PHY */ 96f28e1bd9STsiChungLiew #endif 978353e139SJon Loeliger 98bf9e3b38Swdenk #define CONFIG_BOOTDELAY 5 99f28e1bd9STsiChungLiew #ifdef CONFIG_MCFFEC 100f28e1bd9STsiChungLiew # define CONFIG_ETHADDR 00:e0:0c:bc:e5:60 101f28e1bd9STsiChungLiew # define CONFIG_IPADDR 192.162.1.2 102f28e1bd9STsiChungLiew # define CONFIG_NETMASK 255.255.255.0 103f28e1bd9STsiChungLiew # define CONFIG_SERVERIP 192.162.1.1 104f28e1bd9STsiChungLiew # define CONFIG_GATEWAYIP 192.162.1.1 105f28e1bd9STsiChungLiew # define CONFIG_OVERWRITE_ETHADDR_ONCE 106f28e1bd9STsiChungLiew #endif /* CONFIG_MCFFEC */ 107f28e1bd9STsiChungLiew 1084cb4e654STsiChung Liew #define CONFIG_HOSTNAME M5282EVB 109f28e1bd9STsiChungLiew #define CONFIG_EXTRA_ENV_SETTINGS \ 110f28e1bd9STsiChungLiew "netdev=eth0\0" \ 111f28e1bd9STsiChungLiew "loadaddr=10000\0" \ 112f28e1bd9STsiChungLiew "u-boot=u-boot.bin\0" \ 113f28e1bd9STsiChungLiew "load=tftp ${loadaddr) ${u-boot}\0" \ 114f28e1bd9STsiChungLiew "upd=run load; run prog\0" \ 115f28e1bd9STsiChungLiew "prog=prot off ffe00000 ffe3ffff;" \ 116f28e1bd9STsiChungLiew "era ffe00000 ffe3ffff;" \ 117f28e1bd9STsiChungLiew "cp.b ${loadaddr} ffe00000 ${filesize};"\ 118f28e1bd9STsiChungLiew "save\0" \ 119f28e1bd9STsiChungLiew "" 120bf9e3b38Swdenk 1216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT "-> " 1226d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP /* undef to save memory */ 123bf9e3b38Swdenk 1248353e139SJon Loeliger #if defined(CONFIG_CMD_KGDB) 1256d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ 126bf9e3b38Swdenk #else 1276d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ 128bf9e3b38Swdenk #endif 1296d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ 1306d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ 1316d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ 132bf9e3b38Swdenk 1336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR 0x20000 134bf9e3b38Swdenk 1356d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START 0x400 1366d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END 0x380000 137bf9e3b38Swdenk 1386d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HZ 1000 1396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CLK 64000000 140bf9e3b38Swdenk 141f28e1bd9STsiChungLiew /* PLL Configuration: Ext Clock * 6 (see table 9-4 of MCF user manual) */ 142f28e1bd9STsiChungLiew 1436d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MFD 0x02 /* PLL Multiplication Factor Devider */ 1446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RFD 0x00 /* PLL Reduce Frecuency Devider */ 145bf9e3b38Swdenk 146bf9e3b38Swdenk /* 147bf9e3b38Swdenk * Low Level Configuration Settings 148bf9e3b38Swdenk * (address mappings, register initial values, etc.) 149bf9e3b38Swdenk * You should know what you are doing if you make changes here. 150bf9e3b38Swdenk */ 1516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MBAR 0x40000000 152bf9e3b38Swdenk 153bf9e3b38Swdenk /*----------------------------------------------------------------------- 154bf9e3b38Swdenk * Definitions for initial stack pointer and data area (in DPRAM) 155bf9e3b38Swdenk */ 1566d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_ADDR 0x20000000 1576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_END 0x10000 /* End of used area in internal SRAM */ 1586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */ 1596d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) 1606d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET 161bf9e3b38Swdenk 162bf9e3b38Swdenk /*----------------------------------------------------------------------- 163bf9e3b38Swdenk * Start addresses for the final memory configuration 164bf9e3b38Swdenk * (Set up by the startup code) 1656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 166bf9e3b38Swdenk */ 1676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE 0x00000000 1686d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_SIZE 16 /* SDRAM size in MB */ 169012522feSTsiChung Liew #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_CS0_BASE 1706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INT_FLASH_BASE 0xf0000000 1716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INT_FLASH_ENABLE 0x21 172bf9e3b38Swdenk 173bf9e3b38Swdenk /* If M5282 port is fully implemented the monitor base will be behind 174bf9e3b38Swdenk * the vector table. */ 1756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #if (TEXT_BASE != CONFIG_SYS_INT_FLASH_BASE) 1766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE + 0x400) 177f28e1bd9STsiChungLiew #else 1786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_BASE (TEXT_BASE + 0x418) /* 24 Byte for CFM-Config */ 179f28e1bd9STsiChungLiew #endif 180bf9e3b38Swdenk 1816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN 0x20000 1826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN (256 << 10) 1836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTPARAMS_LEN 64*1024 184bf9e3b38Swdenk 185bf9e3b38Swdenk /* 186bf9e3b38Swdenk * For booting Linux, the board info and command line data 187bf9e3b38Swdenk * have to be in the first 8 MB of memory, since this is 188bf9e3b38Swdenk * the maximum mapped by the Linux kernel during initialization ?? 189bf9e3b38Swdenk */ 1906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTMAPSZ (CONFIG_SYS_SDRAM_BASE + (CONFIG_SYS_SDRAM_SIZE << 20)) 191bf9e3b38Swdenk 192bf9e3b38Swdenk /*----------------------------------------------------------------------- 193bf9e3b38Swdenk * FLASH organization 194bf9e3b38Swdenk */ 1956d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI 1966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef CONFIG_SYS_FLASH_CFI 197f28e1bd9STsiChungLiew 19800b1883aSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_FLASH_CFI_DRIVER 1 1996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_SIZE 0x1000000 /* Max size that the board might have */ 2006d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT 2016d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ 2026d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_SECT 137 /* max number of sectors on one chip */ 2036d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_PROTECTION /* "Real" (hardware) sectors protection */ 2046d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_CHECKSUM 2056d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } 206f28e1bd9STsiChungLiew #endif 207bf9e3b38Swdenk 208bf9e3b38Swdenk /*----------------------------------------------------------------------- 209bf9e3b38Swdenk * Cache Configuration 210bf9e3b38Swdenk */ 2116d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CACHELINE_SIZE 16 212bf9e3b38Swdenk 213*dd9f054eSTsiChung Liew #define ICACHE_STATUS (CONFIG_SYS_INIT_RAM_ADDR + \ 214*dd9f054eSTsiChung Liew CONFIG_SYS_INIT_RAM_END - 8) 215*dd9f054eSTsiChung Liew #define DCACHE_STATUS (CONFIG_SYS_INIT_RAM_ADDR + \ 216*dd9f054eSTsiChung Liew CONFIG_SYS_INIT_RAM_END - 4) 217*dd9f054eSTsiChung Liew #define CONFIG_SYS_ICACHE_INV (CF_CACR_CINV + CF_CACR_DCM) 218*dd9f054eSTsiChung Liew #define CONFIG_SYS_CACHE_ACR0 (CONFIG_SYS_SDRAM_BASE | \ 219*dd9f054eSTsiChung Liew CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \ 220*dd9f054eSTsiChung Liew CF_ACR_EN | CF_ACR_SM_ALL) 221*dd9f054eSTsiChung Liew #define CONFIG_SYS_CACHE_ICACR (CF_CACR_CENB | CF_CACR_DISD | \ 222*dd9f054eSTsiChung Liew CF_CACR_CEIB | CF_CACR_DBWE | \ 223*dd9f054eSTsiChung Liew CF_CACR_EUSP) 224*dd9f054eSTsiChung Liew 225bf9e3b38Swdenk /*----------------------------------------------------------------------- 226bf9e3b38Swdenk * Memory bank definitions 227bf9e3b38Swdenk */ 228012522feSTsiChung Liew #define CONFIG_SYS_CS0_BASE 0xFFE00000 229012522feSTsiChung Liew #define CONFIG_SYS_CS0_CTRL 0x00001980 230012522feSTsiChung Liew #define CONFIG_SYS_CS0_MASK 0x001F0001 231012522feSTsiChung Liew 232bf9e3b38Swdenk /*----------------------------------------------------------------------- 233bf9e3b38Swdenk * Port configuration 234bf9e3b38Swdenk */ 2356d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PACNT 0x0000000 /* Port A D[31:24] */ 2366d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PADDR 0x0000000 2376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PADAT 0x0000000 238bf9e3b38Swdenk 2396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBCNT 0x0000000 /* Port B D[23:16] */ 2406d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBDDR 0x0000000 2416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBDAT 0x0000000 242f28e1bd9STsiChungLiew 2436d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCCNT 0x0000000 /* Port C D[15:08] */ 2446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCDDR 0x0000000 2456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCDAT 0x0000000 246f28e1bd9STsiChungLiew 2476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PDCNT 0x0000000 /* Port D D[07:00] */ 2486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCDDR 0x0000000 2496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCDAT 0x0000000 250f28e1bd9STsiChungLiew 2516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PEHLPAR 0xC0 2526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PUAPAR 0x0F /* UA0..UA3 = Uart 0 +1 */ 2536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDRUA 0x05 2546d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PJPAR 0xFF 2554e5ca3ebSwdenk 2564e5ca3ebSwdenk #endif /* _CONFIG_M5282EVB_H */ 257