blob: 4ff2f05c884fc67088ee16cda7df4bf4e2d11bbb [file] [log] [blame]
wdenk0e6d7982004-03-14 00:07:33 +00001/*
2 * (C) Copyright 2004 Paul Reynolds <PaulReynolds@lhsolutions.com>
3 *
Stefan Roese8a316c92005-08-01 16:49:12 +02004 * (C) Copyright 2005
5 * Stefan Roese, DENX Software Engineering, sr@denx.de.
6 *
Wolfgang Denk3765b3e2013-10-07 13:07:26 +02007 * SPDX-License-Identifier: GPL-2.0+
wdenk0e6d7982004-03-14 00:07:33 +00008 */
9
10/************************************************************************
wdenk42dfe7a2004-03-14 22:25:36 +000011 * 1 March 2004 Travis B. Sawyer <tsawyer@sandburst.com>
wdenk0e6d7982004-03-14 00:07:33 +000012 * Adapted to current Das U-Boot source
13 ***********************************************************************/
14
15
16/************************************************************************
Wolfgang Denk0c8721a2005-09-23 11:05:55 +020017 * OCOTEA.h - configuration for AMCC 440GX Ref (Ocotea)
wdenk0e6d7982004-03-14 00:07:33 +000018 ***********************************************************************/
19
20#ifndef __CONFIG_H
21#define __CONFIG_H
22
23/*-----------------------------------------------------------------------
24 * High Level Configuration Options
25 *----------------------------------------------------------------------*/
26#define CONFIG_OCOTEA 1 /* Board is ebony */
Stefan Roese846b0dd2005-08-08 12:42:22 +020027#define CONFIG_440GX 1 /* Specifc GX support */
Grzegorz Bernackiefa35cf2007-06-15 11:19:28 +020028#define CONFIG_440 1 /* ... PPC440 family */
wdenk0e6d7982004-03-14 00:07:33 +000029#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */
wdenk0e6d7982004-03-14 00:07:33 +000030#define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */
31
Wolfgang Denk2ae18242010-10-06 09:05:45 +020032#define CONFIG_SYS_TEXT_BASE 0xFFFC0000
33
Stefan Roese72675dc2008-06-06 15:55:21 +020034/*
35 * Include common defines/options for all AMCC eval boards
36 */
37#define CONFIG_HOSTNAME ocotea
38#include "amcc-common.h"
39
wdenk0e6d7982004-03-14 00:07:33 +000040/*-----------------------------------------------------------------------
41 * Base addresses -- Note these are effective addresses where the
42 * actual resources get mapped (not physical addresses)
43 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020044#define CONFIG_SYS_FLASH_BASE 0xff800000 /* start of FLASH */
45#define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020046#define CONFIG_SYS_ISRAM_BASE 0xc0000000 /* internal SRAM */
47#define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */
wdenk0e6d7982004-03-14 00:07:33 +000048
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020049#define CONFIG_SYS_FPGA_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x08300000)
50#define CONFIG_SYS_NVRAM_BASE_ADDR (CONFIG_SYS_PERIPHERAL_BASE + 0x08000000)
wdenk0e6d7982004-03-14 00:07:33 +000051
52/*-----------------------------------------------------------------------
53 * Initial RAM & stack pointer (placed in internal SRAM)
54 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020055#define CONFIG_SYS_TEMP_STACK_OCM 1
56#define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_ISRAM_BASE
57#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE /* Initial RAM address */
Wolfgang Denk553f0982010-10-26 13:32:32 +020058#define CONFIG_SYS_INIT_RAM_SIZE 0x2000 /* Size of used area in RAM */
wdenk0e6d7982004-03-14 00:07:33 +000059
Wolfgang Denk25ddd1f2010-10-26 14:34:52 +020060#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Michael Zaidman800eb092010-09-20 08:51:53 +020061#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
wdenk0e6d7982004-03-14 00:07:33 +000062
wdenk0e6d7982004-03-14 00:07:33 +000063/*-----------------------------------------------------------------------
64 * Serial Port
65 *----------------------------------------------------------------------*/
Stefan Roese550650d2010-09-20 16:05:31 +020066#define CONFIG_CONS_INDEX 1 /* Use UART0 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020067#define CONFIG_SYS_EXT_SERIAL_CLOCK (1843200 * 6) /* Ext clk @ 11.059 MHz */
wdenk0e6d7982004-03-14 00:07:33 +000068
69/*-----------------------------------------------------------------------
Stefan Roese8a316c92005-08-01 16:49:12 +020070 * Environment
71 *----------------------------------------------------------------------*/
72/*
73 * Define here the location of the environment variables (FLASH or NVRAM).
74 * Note: DENX encourages to use redundant environment in FLASH. NVRAM is only
75 * supported for backward compatibility.
76 */
77#if 1
Jean-Christophe PLAGNIOL-VILLARD5a1aceb2008-09-10 22:48:04 +020078#define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
Stefan Roese8a316c92005-08-01 16:49:12 +020079#else
Jean-Christophe PLAGNIOL-VILLARD9314cee2008-09-10 22:47:59 +020080#define CONFIG_ENV_IS_IN_NVRAM 1 /* use NVRAM for environment vars */
Stefan Roese8a316c92005-08-01 16:49:12 +020081#endif
82
83
84/*-----------------------------------------------------------------------
wdenk0e6d7982004-03-14 00:07:33 +000085 * NVRAM/RTC
86 *
87 * NOTE: Upper 8 bytes of NVRAM is where the RTC registers are located.
88 * The DS1743 code assumes this condition (i.e. -- it assumes the base
89 * address for the RTC registers is:
90 *
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020091 * CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE
wdenk0e6d7982004-03-14 00:07:33 +000092 *
93 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020094#define CONFIG_SYS_NVRAM_SIZE (0x2000 - 8) /* NVRAM size(8k)- RTC regs */
wdenk0e6d7982004-03-14 00:07:33 +000095#define CONFIG_RTC_DS174x 1 /* DS1743 RTC */
96
Jean-Christophe PLAGNIOL-VILLARD9314cee2008-09-10 22:47:59 +020097#ifdef CONFIG_ENV_IS_IN_NVRAM
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +020098#define CONFIG_ENV_SIZE 0x1000 /* Size of Environment vars */
99#define CONFIG_ENV_ADDR \
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200100 (CONFIG_SYS_NVRAM_BASE_ADDR+CONFIG_SYS_NVRAM_SIZE-CONFIG_ENV_SIZE)
Jean-Christophe PLAGNIOL-VILLARD9314cee2008-09-10 22:47:59 +0200101#endif /* CONFIG_ENV_IS_IN_NVRAM */
Stefan Roese8a316c92005-08-01 16:49:12 +0200102
wdenk0e6d7982004-03-14 00:07:33 +0000103/*-----------------------------------------------------------------------
104 * FLASH related
105 *----------------------------------------------------------------------*/
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200106#define CONFIG_SYS_MAX_FLASH_BANKS 3 /* number of banks */
107#define CONFIG_SYS_MAX_FLASH_SECT 64 /* sectors per device */
wdenk0e6d7982004-03-14 00:07:33 +0000108
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200109#undef CONFIG_SYS_FLASH_CHECKSUM
110#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
111#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
wdenk0e6d7982004-03-14 00:07:33 +0000112
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200113#define CONFIG_SYS_FLASH_ADDR0 0x5555
114#define CONFIG_SYS_FLASH_ADDR1 0x2aaa
115#define CONFIG_SYS_FLASH_WORD_SIZE unsigned char
Stefan Roese8a316c92005-08-01 16:49:12 +0200116
Jean-Christophe PLAGNIOL-VILLARD5a1aceb2008-09-10 22:48:04 +0200117#ifdef CONFIG_ENV_IS_IN_FLASH
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200118#define CONFIG_ENV_SECT_SIZE 0x10000 /* size of one complete sector */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200119#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE)
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200120#define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
Stefan Roese8a316c92005-08-01 16:49:12 +0200121
122/* Address and size of Redundant Environment Sector */
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200123#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
124#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
Jean-Christophe PLAGNIOL-VILLARD5a1aceb2008-09-10 22:48:04 +0200125#endif /* CONFIG_ENV_IS_IN_FLASH */
Stefan Roese8a316c92005-08-01 16:49:12 +0200126
wdenk0e6d7982004-03-14 00:07:33 +0000127/*-----------------------------------------------------------------------
128 * DDR SDRAM
129 *----------------------------------------------------------------------*/
Stefan Roesefa1aef12007-03-07 16:43:00 +0100130#define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */
wdenk42dfe7a2004-03-14 22:25:36 +0000131#define SPD_EEPROM_ADDRESS {0x53,0x52} /* SPD i2c spd addresses */
Stefan Roesefa1aef12007-03-07 16:43:00 +0100132#define CONFIG_PROG_SDRAM_TLB 1 /* setup SDRAM TLB's dynamically*/
wdenk0e6d7982004-03-14 00:07:33 +0000133
134/*-----------------------------------------------------------------------
135 * I2C
136 *----------------------------------------------------------------------*/
Dirk Eibach880540d2013-04-25 02:40:01 +0000137#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000
Stefan Roese4f92ed52006-08-07 14:33:32 +0200138
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200139#define CONFIG_SYS_I2C_MULTI_EEPROMS
140#define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)
141#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
142#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
143#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
wdenk0e6d7982004-03-14 00:07:33 +0000144
Stefan Roese72675dc2008-06-06 15:55:21 +0200145/*
146 * Default environment variables
147 */
Stefan Roese8a316c92005-08-01 16:49:12 +0200148#define CONFIG_EXTRA_ENV_SETTINGS \
Stefan Roese72675dc2008-06-06 15:55:21 +0200149 CONFIG_AMCC_DEF_ENV \
150 CONFIG_AMCC_DEF_ENV_PPC \
151 CONFIG_AMCC_DEF_ENV_NOR_UPD \
Stefan Roese8a316c92005-08-01 16:49:12 +0200152 "kernel_addr=fff00000\0" \
153 "ramdisk_addr=fff10000\0" \
Stefan Roese8a316c92005-08-01 16:49:12 +0200154 ""
wdenk0e6d7982004-03-14 00:07:33 +0000155
wdenk0e6d7982004-03-14 00:07:33 +0000156#define CONFIG_PHY_ADDR 1 /* PHY address, See schematics */
wdenk42dfe7a2004-03-14 22:25:36 +0000157#define CONFIG_PHY1_ADDR 2
158#define CONFIG_PHY2_ADDR 0x10
159#define CONFIG_PHY3_ADDR 0x18
Stefan Roesed6c61aa2005-08-16 18:18:00 +0200160#define CONFIG_HAS_ETH0
161#define CONFIG_HAS_ETH1
162#define CONFIG_HAS_ETH2
163#define CONFIG_HAS_ETH3
wdenk42dfe7a2004-03-14 22:25:36 +0000164#define CONFIG_CIS8201_PHY 1 /* Enable 'special' RGMII mode for Cicada phy */
wdenk6fb6af62004-03-23 23:20:24 +0000165#define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
Stefan Roesed6c61aa2005-08-16 18:18:00 +0200166#define CONFIG_PHY_RESET 1 /* reset phy upon startup */
167#define CONFIG_PHY_RESET_DELAY 1000
wdenk0e6d7982004-03-14 00:07:33 +0000168
Jon Loeligera5cb2302007-07-04 22:33:13 -0500169/*
Stefan Roese72675dc2008-06-06 15:55:21 +0200170 * Commands additional to the ones defined in amcc-common.h
Jon Loeliger7f5c0152007-07-10 09:38:02 -0500171 */
Jon Loeligera5cb2302007-07-04 22:33:13 -0500172#define CONFIG_CMD_DATE
Jon Loeligera5cb2302007-07-04 22:33:13 -0500173#define CONFIG_CMD_PCI
Jon Loeligera5cb2302007-07-04 22:33:13 -0500174#define CONFIG_CMD_SDRAM
175#define CONFIG_CMD_SNTP
176
wdenk0e6d7982004-03-14 00:07:33 +0000177/*-----------------------------------------------------------------------
178 * PCI stuff
179 *-----------------------------------------------------------------------
180 */
181/* General PCI */
Stefan Roese8a316c92005-08-01 16:49:12 +0200182#define CONFIG_PCI /* include pci support */
Gabor Juhos842033e2013-05-30 07:06:12 +0000183#define CONFIG_PCI_INDIRECT_BRIDGE /* indirect PCI bridge support */
Stefan Roese8a316c92005-08-01 16:49:12 +0200184#define CONFIG_PCI_PNP /* do pci plug-and-play */
wdenk42dfe7a2004-03-14 22:25:36 +0000185#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200186#define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */
wdenk0e6d7982004-03-14 00:07:33 +0000187
188/* Board-specific PCI */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200189#define CONFIG_SYS_PCI_TARGET_INIT /* let board init pci target */
wdenk0e6d7982004-03-14 00:07:33 +0000190
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200191#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */
192#define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe /* Whatever */
wdenk0e6d7982004-03-14 00:07:33 +0000193
wdenk0e6d7982004-03-14 00:07:33 +0000194#endif /* __CONFIG_H */