blob: a0d38696607034162e5434020dbf0ac3180779a7 [file] [log] [blame]
wdenkacea76a2002-09-20 09:17:33 +00001/*
2 * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com>
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23/************************************************************************
Wolfgang Denk0ee70772005-09-23 11:05:55 +020024 * board/config_EBONY.h - configuration for AMCC 440GP Ref (Ebony)
wdenkacea76a2002-09-20 09:17:33 +000025 ***********************************************************************/
26
27#ifndef __CONFIG_H
28#define __CONFIG_H
29
30/*-----------------------------------------------------------------------
31 * High Level Configuration Options
32 *----------------------------------------------------------------------*/
33#define CONFIG_EBONY 1 /* Board is ebony */
Stefan Roese74309032005-09-07 16:21:12 +020034#define CONFIG_440GP 1 /* Specifc GP support */
Grzegorz Bernacki837bc5b2007-06-15 11:19:28 +020035#define CONFIG_440 1 /* ... PPC440 family */
wdenkacea76a2002-09-20 09:17:33 +000036#define CONFIG_4xx 1 /* ... PPC4xx family */
wdenkda55c6e2004-01-20 23:12:12 +000037#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
wdenkacea76a2002-09-20 09:17:33 +000038#define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */
39
Wolfgang Denk291ba1b2010-10-06 09:05:45 +020040#define CONFIG_SYS_TEXT_BASE 0xFFFC0000
41
Stefan Roese3e1f1b32005-08-01 16:49:12 +020042/*
Stefan Roesed4c0b702008-06-06 15:55:03 +020043 * Include common defines/options for all AMCC eval boards
44 */
45#define CONFIG_HOSTNAME ebony
46#include "amcc-common.h"
47
48/*
Stefan Roese3e1f1b32005-08-01 16:49:12 +020049 * Define here the location of the environment variables (FLASH or NVRAM).
50 * Note: DENX encourages to use redundant environment in FLASH. NVRAM is only
51 * supported for backward compatibility.
52 */
53#if 1
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +020054#define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
Stefan Roese3e1f1b32005-08-01 16:49:12 +020055#else
Jean-Christophe PLAGNIOL-VILLARDfdb79c32008-09-10 22:47:59 +020056#define CONFIG_ENV_IS_IN_NVRAM 1 /* use NVRAM for environment vars */
Stefan Roese3e1f1b32005-08-01 16:49:12 +020057#endif
58
wdenkacea76a2002-09-20 09:17:33 +000059/*-----------------------------------------------------------------------
60 * Base addresses -- Note these are effective addresses where the
61 * actual resources get mapped (not physical addresses)
62 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020063#define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */
64#define CONFIG_SYS_FLASH_BASE 0xff800000 /* start of FLASH */
65#define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020066#define CONFIG_SYS_ISRAM_BASE 0xc0000000 /* internal SRAM */
67#define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */
wdenkacea76a2002-09-20 09:17:33 +000068
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020069#define CONFIG_SYS_NVRAM_BASE_ADDR (CONFIG_SYS_PERIPHERAL_BASE + 0x08000000)
70#define CONFIG_SYS_FPGA_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x08300000)
wdenkacea76a2002-09-20 09:17:33 +000071
72/*-----------------------------------------------------------------------
73 * Initial RAM & stack pointer (placed in internal SRAM)
74 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020075#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE /* Initial RAM address */
76#define CONFIG_SYS_INIT_RAM_END 0x2000 /* End of used area in RAM */
77#define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */
wdenkacea76a2002-09-20 09:17:33 +000078
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020079#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
80#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
wdenkacea76a2002-09-20 09:17:33 +000081
wdenkacea76a2002-09-20 09:17:33 +000082/*-----------------------------------------------------------------------
83 * Serial Port
84 *----------------------------------------------------------------------*/
Stefan Roese3ddce572010-09-20 16:05:31 +020085#define CONFIG_CONS_INDEX 1 /* Use UART0 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020086#define CONFIG_SYS_EXT_SERIAL_CLOCK (1843200 * 6) /* Ext clk @ 11.059 MHz */
wdenkacea76a2002-09-20 09:17:33 +000087
88/*-----------------------------------------------------------------------
89 * NVRAM/RTC
90 *
91 * NOTE: Upper 8 bytes of NVRAM is where the RTC registers are located.
92 * The DS1743 code assumes this condition (i.e. -- it assumes the base
93 * address for the RTC registers is:
94 *
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020095 * CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE
wdenkacea76a2002-09-20 09:17:33 +000096 *
97 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020098#define CONFIG_SYS_NVRAM_SIZE (0x2000 - 8) /* NVRAM size(8k)- RTC regs */
wdenkacea76a2002-09-20 09:17:33 +000099#define CONFIG_RTC_DS174x 1 /* DS1743 RTC */
100
Jean-Christophe PLAGNIOL-VILLARDfdb79c32008-09-10 22:47:59 +0200101#ifdef CONFIG_ENV_IS_IN_NVRAM
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200102#define CONFIG_ENV_SIZE 0x1000 /* Size of Environment vars */
103#define CONFIG_ENV_ADDR \
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200104 (CONFIG_SYS_NVRAM_BASE_ADDR+CONFIG_SYS_NVRAM_SIZE-CONFIG_ENV_SIZE)
Jean-Christophe PLAGNIOL-VILLARDfdb79c32008-09-10 22:47:59 +0200105#endif /* CONFIG_ENV_IS_IN_NVRAM */
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200106
wdenkacea76a2002-09-20 09:17:33 +0000107/*-----------------------------------------------------------------------
108 * FLASH related
109 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200110#define CONFIG_SYS_MAX_FLASH_BANKS 3 /* number of banks */
111#define CONFIG_SYS_MAX_FLASH_SECT 32 /* sectors per device */
wdenkacea76a2002-09-20 09:17:33 +0000112
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200113#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
114#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
wdenkacea76a2002-09-20 09:17:33 +0000115
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200116#define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200117
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200118#define CONFIG_SYS_FLASH_ADDR0 0x5555
119#define CONFIG_SYS_FLASH_ADDR1 0x2aaa
120#define CONFIG_SYS_FLASH_WORD_SIZE unsigned char
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200121
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200122#ifdef CONFIG_ENV_IS_IN_FLASH
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200123#define CONFIG_ENV_SECT_SIZE 0x10000 /* size of one complete sector */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200124#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE)
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200125#define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200126
127/* Address and size of Redundant Environment Sector */
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200128#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
129#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200130#endif /* CONFIG_ENV_IS_IN_FLASH */
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200131
wdenkacea76a2002-09-20 09:17:33 +0000132/*-----------------------------------------------------------------------
133 * DDR SDRAM
134 *----------------------------------------------------------------------*/
Stefan Roese76e53082007-03-16 21:11:42 +0100135#define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */
136#define SPD_EEPROM_ADDRESS {0x53,0x52} /* SPD i2c spd addresses */
137#define CONFIG_PROG_SDRAM_TLB 1 /* setup SDRAM TLB's dynamically*/
wdenkacea76a2002-09-20 09:17:33 +0000138
139/*-----------------------------------------------------------------------
140 * I2C
141 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200142#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
Stefan Roeseb0ff2142006-08-07 14:33:32 +0200143
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200144#define CONFIG_SYS_I2C_MULTI_EEPROMS
145#define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)
146#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
147#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
148#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
wdenkacea76a2002-09-20 09:17:33 +0000149
Stefan Roesed4c0b702008-06-06 15:55:03 +0200150/*
151 * Default environment variables
152 */
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200153#define CONFIG_EXTRA_ENV_SETTINGS \
Stefan Roesed4c0b702008-06-06 15:55:03 +0200154 CONFIG_AMCC_DEF_ENV \
155 CONFIG_AMCC_DEF_ENV_POWERPC \
156 CONFIG_AMCC_DEF_ENV_PPC_OLD \
157 CONFIG_AMCC_DEF_ENV_NOR_UPD \
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200158 "kernel_addr=ff800000\0" \
159 "ramdisk_addr=ff810000\0" \
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200160 ""
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200161
wdenkacea76a2002-09-20 09:17:33 +0000162#define CONFIG_PHY_ADDR 8 /* PHY address */
Stefan Roesea98dfe62008-05-08 11:05:15 +0200163#define CONFIG_HAS_ETH0
Stefan Roese74309032005-09-07 16:21:12 +0200164#define CONFIG_HAS_ETH1
165#define CONFIG_PHY1_ADDR 9 /* EMAC1 PHY address */
wdenkacea76a2002-09-20 09:17:33 +0000166
Jon Loeliger51372692007-07-04 22:32:10 -0500167/*
Stefan Roesed4c0b702008-06-06 15:55:03 +0200168 * Commands additional to the ones defined in amcc-common.h
Jon Loeligere54e77a2007-07-10 09:29:01 -0500169 */
Jon Loeliger51372692007-07-04 22:32:10 -0500170#define CONFIG_CMD_DATE
Jon Loeliger51372692007-07-04 22:32:10 -0500171#define CONFIG_CMD_PCI
Jon Loeliger51372692007-07-04 22:32:10 -0500172#define CONFIG_CMD_SDRAM
173#define CONFIG_CMD_SNTP
174
wdenkacea76a2002-09-20 09:17:33 +0000175/*-----------------------------------------------------------------------
176 * PCI stuff
177 *-----------------------------------------------------------------------
178 */
179/* General PCI */
180#define CONFIG_PCI /* include pci support */
181#define CONFIG_PCI_PNP /* do pci plug-and-play */
182#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200183#define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */
wdenkacea76a2002-09-20 09:17:33 +0000184
185/* Board-specific PCI */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200186#define CONFIG_SYS_PCI_TARGET_INIT /* let board init pci target */
wdenkacea76a2002-09-20 09:17:33 +0000187
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200188#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */
189#define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe /* Whatever */
wdenkacea76a2002-09-20 09:17:33 +0000190
wdenkacea76a2002-09-20 09:17:33 +0000191#endif /* __CONFIG_H */