blob: 3f0ad69738b8eeaa5afbec9f65ba79786b539ec3 [file] [log] [blame]
wdenkacea76a2002-09-20 09:17:33 +00001/*
2 * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com>
3 *
Wolfgang Denkbd8ec7e2013-10-07 13:07:26 +02004 * SPDX-License-Identifier: GPL-2.0+
wdenkacea76a2002-09-20 09:17:33 +00005 */
6
7/************************************************************************
Wolfgang Denk0ee70772005-09-23 11:05:55 +02008 * board/config_EBONY.h - configuration for AMCC 440GP Ref (Ebony)
wdenkacea76a2002-09-20 09:17:33 +00009 ***********************************************************************/
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
14/*-----------------------------------------------------------------------
15 * High Level Configuration Options
16 *----------------------------------------------------------------------*/
17#define CONFIG_EBONY 1 /* Board is ebony */
Stefan Roese74309032005-09-07 16:21:12 +020018#define CONFIG_440GP 1 /* Specifc GP support */
Grzegorz Bernacki837bc5b2007-06-15 11:19:28 +020019#define CONFIG_440 1 /* ... PPC440 family */
wdenkda55c6e2004-01-20 23:12:12 +000020#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
wdenkacea76a2002-09-20 09:17:33 +000021#define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */
22
Wolfgang Denk291ba1b2010-10-06 09:05:45 +020023#define CONFIG_SYS_TEXT_BASE 0xFFFC0000
24
Stefan Roese3e1f1b32005-08-01 16:49:12 +020025/*
Stefan Roesed4c0b702008-06-06 15:55:03 +020026 * Include common defines/options for all AMCC eval boards
27 */
28#define CONFIG_HOSTNAME ebony
29#include "amcc-common.h"
30
31/*
Stefan Roese3e1f1b32005-08-01 16:49:12 +020032 * Define here the location of the environment variables (FLASH or NVRAM).
33 * Note: DENX encourages to use redundant environment in FLASH. NVRAM is only
34 * supported for backward compatibility.
35 */
36#if 1
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +020037#define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
Stefan Roese3e1f1b32005-08-01 16:49:12 +020038#else
Jean-Christophe PLAGNIOL-VILLARDfdb79c32008-09-10 22:47:59 +020039#define CONFIG_ENV_IS_IN_NVRAM 1 /* use NVRAM for environment vars */
Stefan Roese3e1f1b32005-08-01 16:49:12 +020040#endif
41
wdenkacea76a2002-09-20 09:17:33 +000042/*-----------------------------------------------------------------------
43 * Base addresses -- Note these are effective addresses where the
44 * actual resources get mapped (not physical addresses)
45 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020046#define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */
47#define CONFIG_SYS_FLASH_BASE 0xff800000 /* start of FLASH */
48#define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020049#define CONFIG_SYS_ISRAM_BASE 0xc0000000 /* internal SRAM */
50#define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */
wdenkacea76a2002-09-20 09:17:33 +000051
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020052#define CONFIG_SYS_NVRAM_BASE_ADDR (CONFIG_SYS_PERIPHERAL_BASE + 0x08000000)
53#define CONFIG_SYS_FPGA_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x08300000)
wdenkacea76a2002-09-20 09:17:33 +000054
55/*-----------------------------------------------------------------------
56 * Initial RAM & stack pointer (placed in internal SRAM)
57 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020058#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE /* Initial RAM address */
Wolfgang Denk1c2e98e2010-10-26 13:32:32 +020059#define CONFIG_SYS_INIT_RAM_SIZE 0x2000 /* Size of used area in RAM */
wdenkacea76a2002-09-20 09:17:33 +000060
Wolfgang Denk0191e472010-10-26 14:34:52 +020061#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020062#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
wdenkacea76a2002-09-20 09:17:33 +000063
wdenkacea76a2002-09-20 09:17:33 +000064/*-----------------------------------------------------------------------
65 * Serial Port
66 *----------------------------------------------------------------------*/
Stefan Roese3ddce572010-09-20 16:05:31 +020067#define CONFIG_CONS_INDEX 1 /* Use UART0 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020068#define CONFIG_SYS_EXT_SERIAL_CLOCK (1843200 * 6) /* Ext clk @ 11.059 MHz */
wdenkacea76a2002-09-20 09:17:33 +000069
70/*-----------------------------------------------------------------------
71 * NVRAM/RTC
72 *
73 * NOTE: Upper 8 bytes of NVRAM is where the RTC registers are located.
74 * The DS1743 code assumes this condition (i.e. -- it assumes the base
75 * address for the RTC registers is:
76 *
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020077 * CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE
wdenkacea76a2002-09-20 09:17:33 +000078 *
79 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020080#define CONFIG_SYS_NVRAM_SIZE (0x2000 - 8) /* NVRAM size(8k)- RTC regs */
wdenkacea76a2002-09-20 09:17:33 +000081#define CONFIG_RTC_DS174x 1 /* DS1743 RTC */
82
Jean-Christophe PLAGNIOL-VILLARDfdb79c32008-09-10 22:47:59 +020083#ifdef CONFIG_ENV_IS_IN_NVRAM
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +020084#define CONFIG_ENV_SIZE 0x1000 /* Size of Environment vars */
85#define CONFIG_ENV_ADDR \
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020086 (CONFIG_SYS_NVRAM_BASE_ADDR+CONFIG_SYS_NVRAM_SIZE-CONFIG_ENV_SIZE)
Jean-Christophe PLAGNIOL-VILLARDfdb79c32008-09-10 22:47:59 +020087#endif /* CONFIG_ENV_IS_IN_NVRAM */
Stefan Roese3e1f1b32005-08-01 16:49:12 +020088
wdenkacea76a2002-09-20 09:17:33 +000089/*-----------------------------------------------------------------------
90 * FLASH related
91 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020092#define CONFIG_SYS_MAX_FLASH_BANKS 3 /* number of banks */
93#define CONFIG_SYS_MAX_FLASH_SECT 32 /* sectors per device */
wdenkacea76a2002-09-20 09:17:33 +000094
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020095#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
96#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
wdenkacea76a2002-09-20 09:17:33 +000097
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020098#define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
Stefan Roese3e1f1b32005-08-01 16:49:12 +020099
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200100#define CONFIG_SYS_FLASH_ADDR0 0x5555
101#define CONFIG_SYS_FLASH_ADDR1 0x2aaa
102#define CONFIG_SYS_FLASH_WORD_SIZE unsigned char
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200103
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200104#ifdef CONFIG_ENV_IS_IN_FLASH
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200105#define CONFIG_ENV_SECT_SIZE 0x10000 /* size of one complete sector */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200106#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE)
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200107#define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200108
109/* Address and size of Redundant Environment Sector */
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200110#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
111#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200112#endif /* CONFIG_ENV_IS_IN_FLASH */
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200113
wdenkacea76a2002-09-20 09:17:33 +0000114/*-----------------------------------------------------------------------
115 * DDR SDRAM
116 *----------------------------------------------------------------------*/
Stefan Roese76e53082007-03-16 21:11:42 +0100117#define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */
118#define SPD_EEPROM_ADDRESS {0x53,0x52} /* SPD i2c spd addresses */
119#define CONFIG_PROG_SDRAM_TLB 1 /* setup SDRAM TLB's dynamically*/
wdenkacea76a2002-09-20 09:17:33 +0000120
121/*-----------------------------------------------------------------------
122 * I2C
123 *----------------------------------------------------------------------*/
Dirk Eibach42b204f2013-04-25 02:40:01 +0000124#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000
Stefan Roeseb0ff2142006-08-07 14:33:32 +0200125
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200126#define CONFIG_SYS_I2C_MULTI_EEPROMS
127#define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)
128#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
129#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
130#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
wdenkacea76a2002-09-20 09:17:33 +0000131
Stefan Roesed4c0b702008-06-06 15:55:03 +0200132/*
133 * Default environment variables
134 */
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200135#define CONFIG_EXTRA_ENV_SETTINGS \
Stefan Roesed4c0b702008-06-06 15:55:03 +0200136 CONFIG_AMCC_DEF_ENV \
137 CONFIG_AMCC_DEF_ENV_POWERPC \
138 CONFIG_AMCC_DEF_ENV_PPC_OLD \
139 CONFIG_AMCC_DEF_ENV_NOR_UPD \
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200140 "kernel_addr=ff800000\0" \
141 "ramdisk_addr=ff810000\0" \
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200142 ""
Stefan Roese3e1f1b32005-08-01 16:49:12 +0200143
wdenkacea76a2002-09-20 09:17:33 +0000144#define CONFIG_PHY_ADDR 8 /* PHY address */
Stefan Roesea98dfe62008-05-08 11:05:15 +0200145#define CONFIG_HAS_ETH0
Stefan Roese74309032005-09-07 16:21:12 +0200146#define CONFIG_HAS_ETH1
147#define CONFIG_PHY1_ADDR 9 /* EMAC1 PHY address */
wdenkacea76a2002-09-20 09:17:33 +0000148
Jon Loeliger51372692007-07-04 22:32:10 -0500149/*
Stefan Roesed4c0b702008-06-06 15:55:03 +0200150 * Commands additional to the ones defined in amcc-common.h
Jon Loeligere54e77a2007-07-10 09:29:01 -0500151 */
Jon Loeliger51372692007-07-04 22:32:10 -0500152#define CONFIG_CMD_DATE
Jon Loeliger51372692007-07-04 22:32:10 -0500153#define CONFIG_CMD_PCI
Jon Loeliger51372692007-07-04 22:32:10 -0500154#define CONFIG_CMD_SDRAM
155#define CONFIG_CMD_SNTP
156
wdenkacea76a2002-09-20 09:17:33 +0000157/*-----------------------------------------------------------------------
158 * PCI stuff
159 *-----------------------------------------------------------------------
160 */
161/* General PCI */
162#define CONFIG_PCI /* include pci support */
Gabor Juhosb4458732013-05-30 07:06:12 +0000163#define CONFIG_PCI_INDIRECT_BRIDGE /* indirect PCI bridge support */
wdenkacea76a2002-09-20 09:17:33 +0000164#define CONFIG_PCI_PNP /* do pci plug-and-play */
165#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200166#define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */
wdenkacea76a2002-09-20 09:17:33 +0000167
168/* Board-specific PCI */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200169#define CONFIG_SYS_PCI_TARGET_INIT /* let board init pci target */
wdenkacea76a2002-09-20 09:17:33 +0000170
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200171#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */
172#define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe /* Whatever */
wdenkacea76a2002-09-20 09:17:33 +0000173
wdenkacea76a2002-09-20 09:17:33 +0000174#endif /* __CONFIG_H */