Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2009 Wolfgang Denk <wd@denx.de> |
| 3 | * (C) Copyright 2009, DAVE Srl <www.dave.eu> |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | * |
| 23 | * modifications for the MECP5123 by reinhard.arlt@esd-electronics.com |
| 24 | * |
| 25 | */ |
| 26 | |
| 27 | /* |
| 28 | * MECP5123 board configuration file |
| 29 | */ |
| 30 | |
| 31 | #ifndef __CONFIG_H |
| 32 | #define __CONFIG_H |
| 33 | |
| 34 | #define CONFIG_MECP5123 1 |
| 35 | /* |
| 36 | * Memory map for the MECP5123 board: |
| 37 | * |
| 38 | * 0x0000_0000 - 0x1FFF_FFFF DDR RAM (512 MB) |
| 39 | * 0x3000_0000 - 0x3001_FFFF SRAM (128 KB) |
| 40 | * 0x8000_0000 - 0x803F_FFFF IMMR (4 MB) |
| 41 | * 0x8200_0000 - 0x8200_FFFF VPC-3 (64 KB) |
| 42 | * 0xFFC0_0000 - 0xFFFF_FFFF NOR Boot FLASH (64 MB) |
| 43 | */ |
| 44 | |
| 45 | /* |
| 46 | * High Level Configuration Options |
| 47 | */ |
| 48 | #define CONFIG_E300 1 /* E300 Family */ |
| 49 | #define CONFIG_MPC512X 1 /* MPC512X family */ |
| 50 | |
Wolfgang Denk | 291ba1b | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 51 | #define CONFIG_SYS_TEXT_BASE 0xFFF00000 |
| 52 | |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 53 | #define CONFIG_SYS_MPC512X_CLKIN 33333333 /* in Hz */ |
| 54 | |
| 55 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_early_init_f() */ |
| 56 | #define CONFIG_MISC_INIT_R |
| 57 | |
| 58 | #define CONFIG_SYS_IMMR 0x80000000 |
| 59 | #define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_IMMR+0x2100) |
| 60 | |
| 61 | #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest region */ |
| 62 | #define CONFIG_SYS_MEMTEST_END 0x00400000 |
| 63 | |
| 64 | /* |
| 65 | * DDR Setup - manually set all parameters as there's no SPD etc. |
| 66 | */ |
| 67 | #define CONFIG_SYS_DDR_SIZE 512 /* MB */ |
| 68 | |
| 69 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is sys memory*/ |
| 70 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
Anatolij Gustschin | 4c6d349 | 2010-04-24 19:27:08 +0200 | [diff] [blame] | 71 | #define CONFIG_SYS_MAX_RAM_SIZE 0x20000000 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 72 | |
Anatolij Gustschin | 007a817 | 2010-04-24 19:27:07 +0200 | [diff] [blame] | 73 | #define CONFIG_SYS_IOCTRL_MUX_DDR 0x00000036 |
| 74 | |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 75 | /* DDR Controller Configuration |
| 76 | * |
| 77 | * SYS_CFG: |
| 78 | * [31:31] MDDRC Soft Reset: Diabled |
| 79 | * [30:30] DRAM CKE pin: Enabled |
| 80 | * [29:29] DRAM CLK: Enabled |
| 81 | * [28:28] Command Mode: Enabled (For initialization only) |
| 82 | * [27:25] DRAM Row Select: dram_row[15:0] = magenta_address[25:10] |
| 83 | * [24:21] DRAM Bank Select: dram_bank[1:0] = magenta_address[11:10] |
| 84 | * [20:19] Read Test: DON'T USE |
| 85 | * [18:18] Self Refresh: Enabled |
| 86 | * [17:17] 16bit Mode: Disabled |
| 87 | * [16:13] Ready Delay: 2 |
| 88 | * [12:12] Half DQS Delay: Disabled |
| 89 | * [11:11] Quarter DQS Delay: Disabled |
| 90 | * [10:08] Write Delay: 2 |
| 91 | * [07:07] Early ODT: Disabled |
| 92 | * [06:06] On DIE Termination: Disabled |
| 93 | * [05:05] FIFO Overflow Clear: DON'T USE here |
| 94 | * [04:04] FIFO Underflow Clear: DON'T USE here |
| 95 | * [03:03] FIFO Overflow Pending: DON'T USE here |
| 96 | * [02:02] FIFO Underlfow Pending: DON'T USE here |
| 97 | * [01:01] FIFO Overlfow Enabled: Enabled |
| 98 | * [00:00] FIFO Underflow Enabled: Enabled |
| 99 | * TIME_CFG0 |
| 100 | * [31:16] DRAM Refresh Time: 0 CSB clocks |
| 101 | * [15:8] DRAM Command Time: 0 CSB clocks |
| 102 | * [07:00] DRAM Precharge Time: 0 CSB clocks |
| 103 | * TIME_CFG1 |
| 104 | * [31:26] DRAM tRFC: |
| 105 | * [25:21] DRAM tWR1: |
| 106 | * [20:17] DRAM tWRT1: |
| 107 | * [16:11] DRAM tDRR: |
| 108 | * [10:05] DRAM tRC: |
| 109 | * [04:00] DRAM tRAS: |
| 110 | * TIME_CFG2 |
| 111 | * [31:28] DRAM tRCD: |
| 112 | * [27:23] DRAM tFAW: |
| 113 | * [22:19] DRAM tRTW1: |
| 114 | * [18:15] DRAM tCCD: |
| 115 | * [14:10] DRAM tRTP: |
| 116 | * [09:05] DRAM tRP: |
| 117 | * [04:00] DRAM tRPA |
| 118 | */ |
Martha M Stan | c12ecae | 2009-09-21 14:07:14 -0400 | [diff] [blame] | 119 | #define CONFIG_SYS_MDDRC_SYS_CFG 0xEA804A00 |
| 120 | #define CONFIG_SYS_MDDRC_TIME_CFG0 0x06183D2E |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 121 | #define CONFIG_SYS_MDDRC_TIME_CFG1 0x68EC1168 |
| 122 | #define CONFIG_SYS_MDDRC_TIME_CFG2 0x34310864 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 123 | |
Martha M Stan | c12ecae | 2009-09-21 14:07:14 -0400 | [diff] [blame] | 124 | #define CONFIG_SYS_DDRCMD_NOP 0x01380000 |
| 125 | #define CONFIG_SYS_DDRCMD_PCHG_ALL 0x01100400 |
| 126 | #define CONFIG_SYS_DDRCMD_EM2 0x01020000 |
| 127 | #define CONFIG_SYS_DDRCMD_EM3 0x01030000 |
| 128 | #define CONFIG_SYS_DDRCMD_EN_DLL 0x01010000 |
| 129 | #define CONFIG_SYS_DDRCMD_RFSH 0x01080000 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 130 | #define CONFIG_SYS_MICRON_INIT_DEV_OP 0x01000432 |
Martha M Stan | c12ecae | 2009-09-21 14:07:14 -0400 | [diff] [blame] | 131 | #define CONFIG_SYS_DDRCMD_OCD_DEFAULT 0x01010780 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 132 | |
| 133 | /* DDR Priority Manager Configuration */ |
| 134 | #define CONFIG_SYS_MDDRCGRP_PM_CFG1 0x00077777 |
| 135 | #define CONFIG_SYS_MDDRCGRP_PM_CFG2 0x00000000 |
| 136 | #define CONFIG_SYS_MDDRCGRP_HIPRIO_CFG 0x00000001 |
| 137 | #define CONFIG_SYS_MDDRCGRP_LUT0_MU 0xFFEEDDCC |
| 138 | #define CONFIG_SYS_MDDRCGRP_LUT0_ML 0xBBAAAAAA |
| 139 | #define CONFIG_SYS_MDDRCGRP_LUT1_MU 0x66666666 |
| 140 | #define CONFIG_SYS_MDDRCGRP_LUT1_ML 0x55555555 |
| 141 | #define CONFIG_SYS_MDDRCGRP_LUT2_MU 0x44444444 |
| 142 | #define CONFIG_SYS_MDDRCGRP_LUT2_ML 0x44444444 |
| 143 | #define CONFIG_SYS_MDDRCGRP_LUT3_MU 0x55555555 |
| 144 | #define CONFIG_SYS_MDDRCGRP_LUT3_ML 0x55555558 |
| 145 | #define CONFIG_SYS_MDDRCGRP_LUT4_MU 0x11111111 |
| 146 | #define CONFIG_SYS_MDDRCGRP_LUT4_ML 0x11111122 |
| 147 | #define CONFIG_SYS_MDDRCGRP_LUT0_AU 0xaaaaaaaa |
| 148 | #define CONFIG_SYS_MDDRCGRP_LUT0_AL 0xaaaaaaaa |
| 149 | #define CONFIG_SYS_MDDRCGRP_LUT1_AU 0x66666666 |
| 150 | #define CONFIG_SYS_MDDRCGRP_LUT1_AL 0x66666666 |
| 151 | #define CONFIG_SYS_MDDRCGRP_LUT2_AU 0x11111111 |
| 152 | #define CONFIG_SYS_MDDRCGRP_LUT2_AL 0x11111111 |
| 153 | #define CONFIG_SYS_MDDRCGRP_LUT3_AU 0x11111111 |
| 154 | #define CONFIG_SYS_MDDRCGRP_LUT3_AL 0x11111111 |
| 155 | #define CONFIG_SYS_MDDRCGRP_LUT4_AU 0x11111111 |
| 156 | #define CONFIG_SYS_MDDRCGRP_LUT4_AL 0x11111111 |
| 157 | |
| 158 | /* |
| 159 | * NOR FLASH on the Local Bus |
| 160 | */ |
| 161 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ |
| 162 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ |
| 163 | |
| 164 | #define CONFIG_SYS_FLASH_BASE 0xFFC00000 /* start of FLASH */ |
| 165 | #define CONFIG_SYS_FLASH_SIZE 0x00400000 /* max flash size */ |
| 166 | |
| 167 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE |
| 168 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
| 169 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE} |
| 170 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */ |
| 171 | |
| 172 | #undef CONFIG_SYS_FLASH_CHECKSUM |
| 173 | |
| 174 | /* |
| 175 | * NAND FLASH |
Wolfgang Denk | b6e99b4 | 2009-06-14 20:58:50 +0200 | [diff] [blame] | 176 | * drivers/mtd/nand/mpc5121_nfc.c (rev 2 silicon only) |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 177 | */ |
| 178 | #define CONFIG_CMD_NAND |
| 179 | #define CONFIG_NAND_MPC5121_NFC |
| 180 | #define CONFIG_SYS_NAND_BASE 0x40000000 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 181 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 182 | |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 183 | /* |
| 184 | * Configuration parameters for MPC5121 NAND driver |
| 185 | */ |
| 186 | #define CONFIG_FSL_NFC_WIDTH 1 |
| 187 | #define CONFIG_FSL_NFC_WRITE_SIZE 2048 |
| 188 | #define CONFIG_FSL_NFC_SPARE_SIZE 64 |
| 189 | #define CONFIG_FSL_NFC_CHIPS 1 |
| 190 | |
| 191 | #define CONFIG_SYS_SRAM_BASE 0x30000000 |
| 192 | #define CONFIG_SYS_SRAM_SIZE 0x00020000 /* 128 KB */ |
| 193 | |
Anatolij Gustschin | ca625ee | 2013-02-08 00:03:44 +0000 | [diff] [blame^] | 194 | /* Initialize Local Window for NOR FLASH access */ |
| 195 | #define CONFIG_SYS_CS0_START CONFIG_SYS_FLASH_BASE |
| 196 | #define CONFIG_SYS_CS0_SIZE CONFIG_SYS_FLASH_SIZE |
| 197 | |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 198 | /* ALE active low, data size 4bytes */ |
| 199 | #define CONFIG_SYS_CS0_CFG 0x05051150 |
| 200 | |
| 201 | /* Use not alternative CS timing */ |
| 202 | #define CONFIG_SYS_CS_ALETIMING 0x00000000 |
| 203 | |
| 204 | /* ALE active low, data size 4bytes */ |
| 205 | #define CONFIG_SYS_CS1_CFG 0x1f1f3090 |
| 206 | #define CONFIG_SYS_VPC3_BASE 0x82000000 /* start of VPC3 space */ |
| 207 | #define CONFIG_SYS_VPC3_SIZE 0x00010000 /* max VPC3 size */ |
Anatolij Gustschin | ca625ee | 2013-02-08 00:03:44 +0000 | [diff] [blame^] | 208 | /* Initialize Local Window for VPC3 access */ |
| 209 | #define CONFIG_SYS_CS1_START CONFIG_SYS_VPC3_BASE |
| 210 | #define CONFIG_SYS_CS1_SIZE CONFIG_SYS_VPC3_SIZE |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 211 | |
| 212 | /* Use SRAM for initial stack */ |
| 213 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_SRAM_BASE /* Init RAM addr */ |
Wolfgang Denk | 1c2e98e | 2010-10-26 13:32:32 +0200 | [diff] [blame] | 214 | #define CONFIG_SYS_INIT_RAM_SIZE CONFIG_SYS_SRAM_SIZE |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 215 | |
Wolfgang Denk | 0191e47 | 2010-10-26 14:34:52 +0200 | [diff] [blame] | 216 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 217 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
| 218 | |
Wolfgang Denk | 0708bc6 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 219 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* Start of monitor */ |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 220 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Monitor length */ |
| 221 | #define CONFIG_SYS_MALLOC_LEN (6 * 1024 * 1024) /* Malloc size */ |
| 222 | |
| 223 | /* |
| 224 | * Serial Port |
| 225 | */ |
| 226 | #define CONFIG_CONS_INDEX 1 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 227 | |
| 228 | /* |
| 229 | * Serial console configuration |
| 230 | */ |
| 231 | #define CONFIG_PSC_CONSOLE 3 /* console is on PSC3 */ |
Marek Vasut | e79aa90 | 2012-09-16 16:07:24 +0200 | [diff] [blame] | 232 | #define CONFIG_SYS_PSC3 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 233 | #if CONFIG_PSC_CONSOLE != 3 |
| 234 | #error CONFIG_PSC_CONSOLE must be 3 |
| 235 | #endif |
| 236 | #define CONFIG_BAUDRATE 9600 /* ... at 9600 bps */ |
| 237 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
| 238 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
| 239 | |
| 240 | #define CONSOLE_FIFO_TX_SIZE FIFOC_PSC3_TX_SIZE |
| 241 | #define CONSOLE_FIFO_TX_ADDR FIFOC_PSC3_TX_ADDR |
| 242 | #define CONSOLE_FIFO_RX_SIZE FIFOC_PSC3_RX_SIZE |
| 243 | #define CONSOLE_FIFO_RX_ADDR FIFOC_PSC3_RX_ADDR |
| 244 | |
| 245 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
| 246 | /* Use the HUSH parser */ |
| 247 | #define CONFIG_SYS_HUSH_PARSER |
| 248 | #ifdef CONFIG_SYS_HUSH_PARSER |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 249 | #endif |
| 250 | |
| 251 | /* I2C */ |
| 252 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
| 253 | #undef CONFIG_SOFT_I2C /* so disable bit-banged I2C */ |
| 254 | #define CONFIG_I2C_MULTI_BUS |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 255 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */ |
| 256 | #define CONFIG_SYS_I2C_SLAVE 0x7F /* slave address */ |
| 257 | |
| 258 | /* |
| 259 | * IIM - IC Identification Module |
| 260 | */ |
| 261 | #undef CONFIG_IIM |
| 262 | |
| 263 | /* |
| 264 | * EEPROM configuration |
| 265 | */ |
| 266 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* 16-bit EEPROM address */ |
| 267 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Atmel: AT24C32A-10TQ-2.7 */ |
| 268 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* 10ms of delay */ |
| 269 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 /* 32-Byte Page Write Mode */ |
| 270 | #define CONFIG_SYS_EEPROM_WREN /* Use EEPROM write protect */ |
| 271 | |
| 272 | /* |
| 273 | * Ethernet configuration |
| 274 | */ |
| 275 | #define CONFIG_MPC512x_FEC 1 |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 276 | #define CONFIG_PHY_ADDR 0x1 |
| 277 | #define CONFIG_MII 1 /* MII PHY management */ |
| 278 | #define CONFIG_FEC_AN_TIMEOUT 1 |
| 279 | #define CONFIG_HAS_ETH0 |
| 280 | |
| 281 | /* |
| 282 | * Configure on-board RTC |
| 283 | */ |
| 284 | #define CONFIG_SYS_RTC_BUS_NUM 0x01 |
| 285 | #define CONFIG_SYS_I2C_RTC_ADDR 0x32 |
| 286 | #define CONFIG_RTC_RX8025 |
| 287 | |
| 288 | /* |
| 289 | * Environment |
| 290 | */ |
| 291 | #define CONFIG_ENV_IS_IN_EEPROM /* Store env in I2C EEPROM */ |
| 292 | #define CONFIG_ENV_SIZE 0x1000 |
| 293 | #define CONFIG_ENV_OFFSET 0x0000 /* environment starts here */ |
| 294 | |
| 295 | #define CONFIG_LOADS_ECHO /* echo on for serial download */ |
| 296 | #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ |
| 297 | |
| 298 | #include <config_cmd_default.h> |
| 299 | |
| 300 | #define CONFIG_CMD_ASKENV |
| 301 | #define CONFIG_CMD_DHCP |
| 302 | #define CONFIG_CMD_I2C |
| 303 | #define CONFIG_CMD_MII |
| 304 | #define CONFIG_CMD_NFS |
| 305 | #define CONFIG_CMD_PING |
| 306 | #define CONFIG_CMD_REGINFO |
| 307 | #define CONFIG_CMD_EEPROM |
| 308 | #define CONFIG_CMD_DATE |
| 309 | #undef CONFIG_CMD_FUSE |
| 310 | #undef CONFIG_CMD_IDE |
| 311 | #undef CONFIG_CMD_EXT2 |
| 312 | #define CONFIG_CMD_FAT |
| 313 | #define CONFIG_CMD_JFFS2 |
| 314 | #define CONFIG_CMD_ELF |
| 315 | #define CONFIG_DOS_PARTITION |
| 316 | |
| 317 | /* |
| 318 | * Watchdog timeout = CONFIG_SYS_WATCHDOG_VALUE * 65536 / IPS clock. |
| 319 | * For example, when IPS is set to 66MHz and CONFIG_SYS_WATCHDOG_VALUE is set |
| 320 | * to 0xFFFF, watchdog timeouts after about 64s. For details refer |
| 321 | * to chapter 36 of the MPC5121e Reference Manual. |
| 322 | */ |
| 323 | /* #define CONFIG_WATCHDOG */ /* enable watchdog */ |
| 324 | #define CONFIG_SYS_WATCHDOG_VALUE 0xFFFF |
| 325 | |
| 326 | /* |
| 327 | * Miscellaneous configurable options |
| 328 | */ |
| 329 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 330 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
| 331 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
| 332 | |
| 333 | #ifdef CONFIG_CMD_KGDB |
| 334 | # define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
| 335 | #else |
| 336 | # define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 337 | #endif |
| 338 | |
| 339 | /* Print Buffer Size */ |
| 340 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ |
| 341 | sizeof(CONFIG_SYS_PROMPT) + 16) |
| 342 | /* max number of command args */ |
| 343 | #define CONFIG_SYS_MAXARGS 32 |
| 344 | /* Boot Argument Buffer Size */ |
| 345 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 346 | |
| 347 | #define CONFIG_SYS_HZ 1000 |
| 348 | |
| 349 | /* |
| 350 | * For booting Linux, the board info and command line data |
Ira W. Snyder | c5a22d0 | 2010-09-10 15:42:32 -0700 | [diff] [blame] | 351 | * have to be in the first 256 MB of memory, since this is |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 352 | * the maximum mapped by the Linux kernel during initialization. |
| 353 | */ |
Ira W. Snyder | c5a22d0 | 2010-09-10 15:42:32 -0700 | [diff] [blame] | 354 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Linux initial memory map */ |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 355 | |
| 356 | /* Cache Configuration */ |
| 357 | #define CONFIG_SYS_DCACHE_SIZE 32768 |
| 358 | #define CONFIG_SYS_CACHELINE_SIZE 32 |
| 359 | #ifdef CONFIG_CMD_KGDB |
| 360 | #define CONFIG_SYS_CACHELINE_SHIFT 5 |
| 361 | #endif |
| 362 | |
| 363 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
| 364 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK |
| 365 | #define CONFIG_SYS_HID2 HID2_HBE |
| 366 | |
| 367 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
| 368 | |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 369 | #ifdef CONFIG_CMD_KGDB |
| 370 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ |
| 371 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
| 372 | #endif |
| 373 | |
| 374 | /* |
| 375 | * Environment Configuration |
| 376 | */ |
| 377 | #define CONFIG_TIMESTAMP |
| 378 | |
| 379 | #define CONFIG_HOSTNAME mecp512x |
Joe Hershberger | e4da248 | 2011-10-13 13:03:48 +0000 | [diff] [blame] | 380 | #define CONFIG_BOOTFILE "/tftpboot/mecp512x/uImage" |
Joe Hershberger | 257ff78 | 2011-10-13 13:03:47 +0000 | [diff] [blame] | 381 | #define CONFIG_ROOTPATH "/tftpboot/mecp512x/target_root" |
Stefan Roese | abbd0da | 2009-06-09 11:50:40 +0200 | [diff] [blame] | 382 | |
| 383 | #define CONFIG_LOADADDR 400000 /* def. location for tftp and bootm */ |
| 384 | |
| 385 | #define CONFIG_BOOTDELAY 5 /* -1 disables auto-boot */ |
| 386 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs*/ |
| 387 | |
| 388 | #define CONFIG_PREBOOT "echo;" \ |
| 389 | "echo Welcome to MECP5123" \ |
| 390 | "echo" |
| 391 | |
| 392 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 393 | "u-boot_addr_r=200000\0" \ |
| 394 | "kernel_addr_r=600000\0" \ |
| 395 | "fdt_addr_r=880000\0" \ |
| 396 | "ramdisk_addr_r=900000\0" \ |
| 397 | "u-boot_addr=FFF00000\0" \ |
| 398 | "kernel_addr=FFC40000\0" \ |
| 399 | "fdt_addr=FFEC0000\0" \ |
| 400 | "ramdisk_addr=FC040000\0" \ |
| 401 | "ramdiskfile=/tftpboot/mecp512x/uRamdisk\0" \ |
| 402 | "u-boot=/tftpboot/mecp512x/u-boot.bin\0" \ |
| 403 | "bootfile=/tftpboot/mecp512x/uImage\0" \ |
| 404 | "fdtfile=/tftpboot/mecp512x/mecp512x.dtb\0" \ |
| 405 | "rootpath=/tftpboot/mecp512x/target_root\n" \ |
| 406 | "netdev=eth0\0" \ |
| 407 | "consdev=ttyPSC0\0" \ |
| 408 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
| 409 | "nfsroot=${serverip}:${rootpath}\0" \ |
| 410 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
| 411 | "addip=setenv bootargs ${bootargs} " \ |
| 412 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
| 413 | ":${hostname}:${netdev}:off panic=1\0" \ |
| 414 | "addtty=setenv bootargs ${bootargs} " \ |
| 415 | "console=${consdev},${baudrate}\0" \ |
| 416 | "flash_nfs=run nfsargs addip addtty;" \ |
| 417 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ |
| 418 | "flash_self=run ramargs addip addtty;" \ |
| 419 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ |
| 420 | "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \ |
| 421 | "tftp ${fdt_addr_r} ${fdtfile};" \ |
| 422 | "run nfsargs addip addtty;" \ |
| 423 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ |
| 424 | "net_self=tftp ${kernel_addr_r} ${bootfile};" \ |
| 425 | "tftp ${ramdisk_addr_r} ${ramdiskfile};" \ |
| 426 | "tftp ${fdt_addr_r} ${fdtfile};" \ |
| 427 | "run ramargs addip addtty;" \ |
| 428 | "bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0"\ |
| 429 | "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ |
| 430 | "update=protect off ${u-boot_addr} +${filesize};" \ |
| 431 | "era ${u-boot_addr} +${filesize};" \ |
| 432 | "cp.b ${u-boot_addr_r} ${u-boot_addr} ${filesize}\0" \ |
| 433 | "upd=run load update\0" \ |
| 434 | "" |
| 435 | |
| 436 | #define CONFIG_BOOTCOMMAND "run flash_self" |
| 437 | |
| 438 | #define CONFIG_OF_LIBFDT |
| 439 | #define CONFIG_OF_BOARD_SETUP |
| 440 | |
| 441 | #define OF_CPU "PowerPC,5121@0" |
| 442 | #define OF_SOC_COMPAT "fsl,mpc5121-immr" |
| 443 | #define OF_TBCLK (bd->bi_busfreq / 4) |
| 444 | #define OF_STDOUT_PATH "/soc@80000000/serial@11300" |
| 445 | |
| 446 | #endif /* __CONFIG_H */ |