Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Configuration for AMCC 460SX Ref (redwood) |
| 3 | * |
| 4 | * (C) Copyright 2008 |
| 5 | * Feng Kan, Applied Micro Circuits Corp., fkan@amcc.com |
| 6 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 8 | */ |
| 9 | #ifndef __CONFIG_H |
| 10 | #define __CONFIG_H |
| 11 | |
| 12 | /*----------------------------------------------------------------------- |
| 13 | * High Level Configuration Options |
| 14 | *----------------------------------------------------------------------*/ |
| 15 | #define CONFIG_4xx 1 /* ... PPC4xx family */ |
| 16 | #define CONFIG_440 1 /* ... PPC460 family */ |
| 17 | #define CONFIG_460SX 1 /* ... PPC460 family */ |
| 18 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ |
| 19 | |
Wolfgang Denk | 2ae1824 | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 20 | #define CONFIG_SYS_TEXT_BASE 0xfffb0000 |
| 21 | |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 22 | /*----------------------------------------------------------------------- |
| 23 | * Include common defines/options for all AMCC boards |
| 24 | *----------------------------------------------------------------------*/ |
| 25 | #define CONFIG_HOSTNAME redwood |
| 26 | |
| 27 | #include "amcc-common.h" |
| 28 | |
| 29 | #define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */ |
| 30 | |
| 31 | /*----------------------------------------------------------------------- |
| 32 | * Base addresses -- Note these are effective addresses where the |
| 33 | * actual resources get mapped (not physical addresses) |
| 34 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 35 | #define CONFIG_SYS_FLASH_BASE 0xfff00000 /* start of FLASH */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 36 | #define CONFIG_SYS_ISRAM_BASE 0x90000000 /* internal SRAM */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 37 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 38 | #define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 39 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 40 | #define CONFIG_SYS_PCIE_MEMBASE 0x90000000 /* mapped PCIe memory */ |
| 41 | #define CONFIG_SYS_PCIE0_MEMBASE 0x90000000 /* mapped PCIe memory */ |
| 42 | #define CONFIG_SYS_PCIE1_MEMBASE 0xa0000000 /* mapped PCIe memory */ |
| 43 | #define CONFIG_SYS_PCIE_MEMSIZE 0x01000000 |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 44 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 45 | #define CONFIG_SYS_PCIE0_XCFGBASE 0xb0000000 |
| 46 | #define CONFIG_SYS_PCIE1_XCFGBASE 0xb2000000 |
| 47 | #define CONFIG_SYS_PCIE2_XCFGBASE 0xb4000000 |
| 48 | #define CONFIG_SYS_PCIE0_CFGBASE 0xb6000000 |
| 49 | #define CONFIG_SYS_PCIE1_CFGBASE 0xb8000000 |
| 50 | #define CONFIG_SYS_PCIE2_CFGBASE 0xba000000 |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 51 | |
| 52 | /* PCIe mapped UTL registers */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 53 | #define CONFIG_SYS_PCIE0_REGBASE 0xd0000000 |
| 54 | #define CONFIG_SYS_PCIE1_REGBASE 0xd0010000 |
| 55 | #define CONFIG_SYS_PCIE2_REGBASE 0xd0020000 |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 56 | |
| 57 | /* System RAM mapped to PCI space */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 58 | #define CONFIG_PCI_SYS_MEM_BUS CONFIG_SYS_SDRAM_BASE |
| 59 | #define CONFIG_PCI_SYS_MEM_PHYS CONFIG_SYS_SDRAM_BASE |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 60 | #define CONFIG_PCI_SYS_MEM_SIZE (1024 * 1024 * 1024) |
| 61 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 62 | #define CONFIG_SYS_FPGA_BASE 0xe2000000 /* epld */ |
| 63 | #define CONFIG_SYS_OPER_FLASH 0xe7000000 /* SRAM - OPER Flash */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 64 | |
Stefan Roese | 550650d | 2010-09-20 16:05:31 +0200 | [diff] [blame] | 65 | /* |
| 66 | * Serial Port |
| 67 | */ |
| 68 | #define CONFIG_CONS_INDEX 1 /* Use UART0 */ |
| 69 | |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 70 | /*----------------------------------------------------------------------- |
| 71 | * Initial RAM & stack pointer (placed in internal SRAM) |
| 72 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 73 | #define CONFIG_SYS_TEMP_STACK_OCM 1 |
| 74 | #define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_ISRAM_BASE |
| 75 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE /* Initial RAM address */ |
Wolfgang Denk | 553f098 | 2010-10-26 13:32:32 +0200 | [diff] [blame] | 76 | #define CONFIG_SYS_INIT_RAM_SIZE 0x2000 /* Size of used area in RAM */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 77 | |
Wolfgang Denk | 25ddd1f | 2010-10-26 14:34:52 +0200 | [diff] [blame] | 78 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
Michael Zaidman | 800eb09 | 2010-09-20 08:51:53 +0200 | [diff] [blame] | 79 | #define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_GBL_DATA_OFFSET - 0x4) |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 80 | |
| 81 | /*----------------------------------------------------------------------- |
| 82 | * DDR SDRAM |
| 83 | *----------------------------------------------------------------------*/ |
| 84 | #define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */ |
| 85 | #define CONFIG_DDR_ECC 1 /* with ECC support */ |
| 86 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 87 | #define CONFIG_SYS_SPD_MAX_DIMMS 2 |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 88 | |
| 89 | /* SPD i2c spd addresses */ |
| 90 | #define SPD_EEPROM_ADDRESS {IIC0_DIMM0_ADDR, IIC0_DIMM1_ADDR} |
Heiko Schocher | 8f2b457 | 2008-08-19 09:57:41 +0200 | [diff] [blame] | 91 | #define IIC0_DIMM0_ADDR 0x53 |
| 92 | #define IIC0_DIMM1_ADDR 0x52 |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 93 | |
| 94 | /*----------------------------------------------------------------------- |
| 95 | * I2C |
| 96 | *----------------------------------------------------------------------*/ |
Dirk Eibach | 880540d | 2013-04-25 02:40:01 +0000 | [diff] [blame] | 97 | #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 98 | |
| 99 | #define IIC0_BOOTPROM_ADDR 0x50 |
| 100 | #define IIC0_ALT_BOOTPROM_ADDR 0x54 |
| 101 | |
| 102 | /* Don't probe these addrs */ |
Dirk Eibach | 880540d | 2013-04-25 02:40:01 +0000 | [diff] [blame] | 103 | #define CONFIG_SYS_I2C_NOPROBES { {0, 0x50}, {0, 0x52}, {0, 0x53}, {0, 0x54} } |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 104 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 105 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 106 | |
| 107 | /*----------------------------------------------------------------------- |
| 108 | * Environment |
| 109 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 9314cee | 2008-09-10 22:47:59 +0200 | [diff] [blame] | 110 | #undef CONFIG_ENV_IS_IN_NVRAM /* ... not in NVRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 111 | #define CONFIG_ENV_IS_IN_FLASH 1 /* Environment uses flash */ |
Jean-Christophe PLAGNIOL-VILLARD | bb1f8b4 | 2008-09-05 09:19:30 +0200 | [diff] [blame] | 112 | #undef CONFIG_ENV_IS_IN_EEPROM /* ... not in EEPROM */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 113 | |
| 114 | #define CONFIG_PREBOOT "echo;" \ |
| 115 | "echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \ |
| 116 | "echo" |
| 117 | |
| 118 | #undef CONFIG_BOOTARGS |
| 119 | |
| 120 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Heiko Schocher | 8f2b457 | 2008-08-19 09:57:41 +0200 | [diff] [blame] | 121 | CONFIG_AMCC_DEF_ENV \ |
| 122 | CONFIG_AMCC_DEF_ENV_POWERPC \ |
| 123 | CONFIG_AMCC_DEF_ENV_NOR_UPD \ |
| 124 | CONFIG_AMCC_DEF_ENV_NAND_UPD \ |
| 125 | "kernel_addr=fc000000\0" \ |
| 126 | "fdt_addr=fc1e0000\0" \ |
| 127 | "ramdisk_addr=fc200000\0" \ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 128 | "" |
| 129 | |
| 130 | /*----------------------------------------------------------------------------+ |
| 131 | | Commands in addition to amcc-common.h |
| 132 | +----------------------------------------------------------------------------*/ |
| 133 | #define CONFIG_CMD_SDRAM |
| 134 | |
| 135 | #define CONFIG_BOOTCOMMAND "run flash_self" |
| 136 | |
| 137 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ |
| 138 | |
| 139 | #define CONFIG_IBM_EMAC4_V4 1 |
Heiko Schocher | 8f2b457 | 2008-08-19 09:57:41 +0200 | [diff] [blame] | 140 | #define CONFIG_PHY_RESET 1 /* reset phy upon startup */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 141 | #define CONFIG_PHY_RESET_DELAY 1000 |
| 142 | #define CONFIG_M88E1141_PHY 1 /* Enable phy */ |
| 143 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
| 144 | |
| 145 | #define CONFIG_HAS_ETH0 |
| 146 | #define CONFIG_HAS_ETH1 |
| 147 | #define CONFIG_PHY_ADDR 0 /* PHY address, See schematics */ |
| 148 | #define CONFIG_PHY1_ADDR 1 /* PHY address, See schematics */ |
| 149 | |
| 150 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
| 151 | |
| 152 | /*----------------------------------------------------------------------- |
| 153 | * FLASH related |
| 154 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 155 | #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ |
Heiko Schocher | 8f2b457 | 2008-08-19 09:57:41 +0200 | [diff] [blame] | 156 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 157 | #define CONFIG_SYS_FLASH_CFI_AMD_RESET 1 /* Use AMD (Spansion) reset cmd */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 158 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 159 | #define CONFIG_SYS_MAX_FLASH_BANKS 3 /* number of banks */ |
| 160 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* sectors per device */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 161 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 162 | #undef CONFIG_SYS_FLASH_CHECKSUM |
| 163 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
| 164 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 165 | |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 166 | #ifdef CONFIG_ENV_IS_IN_FLASH |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 167 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* size of one complete sector */ |
| 168 | #define CONFIG_ENV_ADDR 0xfffa0000 |
| 169 | #define CONFIG_ENV_SIZE 0x10000 /* Size of Environment vars */ |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 170 | #endif /* CONFIG_ENV_IS_IN_FLASH */ |
Feng Kan | 96e5fc0 | 2008-07-08 22:48:07 -0700 | [diff] [blame] | 171 | |
| 172 | /*---------------------------------------------------------------------------*/ |
| 173 | |
| 174 | #endif /* __CONFIG_H */ |