Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2009-2010 eXMeritus, A Boeing Company |
| 3 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | /* |
| 8 | * HardwareWall HWW-1U-1A airborne unit configuration file |
| 9 | */ |
| 10 | #ifndef __CONFIG_H |
| 11 | #define __CONFIG_H |
| 12 | |
| 13 | /* High-level system configuration options */ |
| 14 | #define CONFIG_BOOKE /* Power/PowerPC Book-E */ |
| 15 | #define CONFIG_E500 /* e500 (Power ISA v2.03 with SPE) */ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 16 | #define CONFIG_FSL_ELBC /* FreeScale Enhanced LocalBus Cntlr */ |
| 17 | #define CONFIG_FSL_LAW /* FreeScale Local Access Window */ |
| 18 | #define CONFIG_P2020 /* FreeScale P2020 */ |
| 19 | #define CONFIG_HWW1U1A /* eXMeritus HardwareWall HWW-1U-1A */ |
| 20 | #define CONFIG_MP /* Multiprocessing support */ |
| 21 | #define CONFIG_HWCONFIG /* Use hwconfig from environment */ |
| 22 | |
| 23 | #define CONFIG_L2_CACHE /* L2 cache enabled */ |
| 24 | #define CONFIG_BTB /* Branch predition enabled */ |
| 25 | |
| 26 | #define CONFIG_PANIC_HANG /* No board reset on panic */ |
| 27 | #define CONFIG_BOARD_EARLY_INIT_R /* Call board_early_init_r() */ |
| 28 | #define CONFIG_CMD_REGINFO /* Dump various CPU regs */ |
| 29 | |
| 30 | /* |
| 31 | * Allow the use of 36-bit physical addresses. Device-trees with 64-bit |
| 32 | * addresses have known compatibility issues with some existing kernels. |
| 33 | */ |
| 34 | #define CONFIG_ENABLE_36BIT_PHYS |
| 35 | #define CONFIG_PHYS_64BIT |
| 36 | #define CONFIG_ADDR_MAP |
| 37 | #define CONFIG_SYS_NUM_ADDR_MAP 16 /* Number of entries in TLB1 */ |
| 38 | |
| 39 | /* Reserve plenty of RAM for malloc (we have 2GB+) */ |
| 40 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) |
| 41 | |
| 42 | /* How much L2 cache do we map so we can use it as RAM */ |
| 43 | #define CONFIG_SYS_INIT_RAM_LOCK |
| 44 | #define CONFIG_SYS_INIT_RAM_SIZE 0x00004000 |
| 45 | |
| 46 | /* This is our temporary global data area just above the stack */ |
| 47 | #define CONFIG_SYS_GBL_DATA_OFFSET \ |
| 48 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 49 | |
| 50 | /* The stack grows down from the global data area */ |
| 51 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
| 52 | |
| 53 | /* Enable IRQs and watchdog with a 1000Hz system decrementer */ |
| 54 | #define CONFIG_CMD_IRQ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 55 | |
| 56 | /* -------------------------------------------------------------------- */ |
| 57 | |
| 58 | /* |
| 59 | * Clock crystal configuration: |
| 60 | * (1) SYS: 66.666MHz +/- 50ppm (drives CPU/PCI/DDR) |
| 61 | * (2) CCB: Multiplier from SYS_CLK |
| 62 | * (3) RTC: 25.000MHz +/- 50ppm (sampled against CCB clock) |
| 63 | */ |
| 64 | #define CONFIG_SYS_CLK_FREQ 66666000/*Hz*/ |
| 65 | #define CONFIG_DDR_CLK_FREQ 66666000/*Hz*/ |
| 66 | |
| 67 | |
| 68 | /* -------------------------------------------------------------------- */ |
| 69 | |
| 70 | /* |
| 71 | * Memory map |
| 72 | * |
| 73 | * 0x0000_0000 0x7fff_ffff 2G DDR2 ECC SDRAM |
| 74 | * 0x8000_0000 0x9fff_ffff 512M PCI-E Bus 1 |
| 75 | * 0xa000_0000 0xbfff_ffff 512M PCI-E Bus 2 (unused) |
| 76 | * 0xc000_0000 0xdfff_ffff 512M PCI-E Bus 3 |
| 77 | * 0xe000_0000 0xe7ff_ffff 128M Spansion FLASH |
| 78 | * 0xe800_0000 0xefff_ffff 128M Spansion FLASH |
| 79 | * 0xffd0_0000 0xffd0_3fff 16K L1 boot stack (TLB0) |
| 80 | * 0xffe0_0000 0xffef_ffff 1M CCSR |
| 81 | * 0xffe0_5000 0xffe0_5fff 4K Enhanced LocalBus Controller |
| 82 | */ |
| 83 | |
| 84 | /* Virtual Memory Map */ |
| 85 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 |
| 86 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 87 | #define CONFIG_SYS_PCIE3_MEM_VIRT 0x80000000 |
| 88 | #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000 |
| 89 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0xc0000000 |
| 90 | #define CONFIG_SYS_FLASH_BASE 0xe0000000 |
| 91 | #define CONFIG_SYS_PCIE3_IO_VIRT 0xffc00000 |
| 92 | #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc10000 |
| 93 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc20000 |
| 94 | #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 |
| 95 | #define CONFIG_SYS_CCSRBAR 0xffe00000 /* CCSRBAR @ runtime */ |
| 96 | |
| 97 | #define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */ |
| 98 | #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */ |
| 99 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ |
| 100 | #define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */ |
| 101 | #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */ |
| 102 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */ |
| 103 | |
| 104 | /* Physical Memory Map */ |
| 105 | #define CONFIG_SYS_PCIE3_MEM_PHYS 0xc00000000ull |
| 106 | #define CONFIG_SYS_PCIE2_MEM_PHYS 0xc20000000ull |
| 107 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc40000000ull |
| 108 | #define CONFIG_SYS_FLASH_BASE_PHYS 0xfe0000000ull |
| 109 | #define CONFIG_SYS_PCIE3_IO_PHYS 0xfffc00000ull |
| 110 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xfffc10000ull |
| 111 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xfffc20000ull |
| 112 | #define CONFIG_SYS_INIT_RAM_ADDR_PHYS 0xfffd00000ull |
| 113 | #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0xf /* for ASM code */ |
| 114 | #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW 0xffd00000 /* for ASM code */ |
| 115 | #define CONFIG_SYS_CCSRBAR_PHYS_HIGH 0xf /* for ASM code */ |
| 116 | #define CONFIG_SYS_CCSRBAR_PHYS_LOW 0xffe00000 /* for ASM code */ |
| 117 | |
| 118 | |
| 119 | /* -------------------------------------------------------------------- */ |
| 120 | |
| 121 | /* U-Boot image (MONITOR_BASE == TEXT_BASE) */ |
| 122 | #define CONFIG_RESET_VECTOR_ADDRESS 0xeffffffc /* Top address in flash */ |
| 123 | #define CONFIG_SYS_TEXT_BASE 0xeff80000 /* Start of U-Boot image */ |
| 124 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
| 125 | #define CONFIG_SYS_MONITOR_LEN 0x80000 /* 512kB (4 flash sectors) */ |
| 126 | |
| 127 | /* |
| 128 | * U-Boot Environment Image: The two sectors immediately below U-Boot |
| 129 | * form the U-Boot environment (regular and redundant). |
| 130 | */ |
| 131 | #define CONFIG_ENV_IS_IN_FLASH /* The environment image is stored in FLASH */ |
| 132 | #define CONFIG_ENV_OVERWRITE /* Allow "protected" variables to be erased */ |
| 133 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128kB (1 flash sector) */ |
| 134 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) |
| 135 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE) |
| 136 | |
| 137 | /* Only use 8kB of each environment sector for data */ |
| 138 | #define CONFIG_ENV_SIZE 0x2000 /* 8kB */ |
| 139 | #define CONFIG_ENV_SIZE_REDUND 0x2000 /* 8kB */ |
| 140 | |
| 141 | |
| 142 | /* -------------------------------------------------------------------- */ |
| 143 | |
| 144 | /* Serial Console Configuration */ |
| 145 | #define CONFIG_CONS_INDEX 1 |
| 146 | #define CONFIG_SYS_NS16550 |
| 147 | #define CONFIG_SYS_NS16550_SERIAL |
| 148 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
| 149 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
| 150 | |
| 151 | #define CONFIG_BAUDRATE 115200 |
| 152 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
| 153 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
| 154 | |
| 155 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) |
| 156 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) |
| 157 | |
| 158 | /* Echo back characters received during a serial download */ |
| 159 | #define CONFIG_LOADS_ECHO |
| 160 | |
| 161 | /* Allow a serial-download to temporarily change baud */ |
| 162 | #define CONFIG_SYS_LOADS_BAUD_CHANGE |
| 163 | |
| 164 | |
| 165 | /* -------------------------------------------------------------------- */ |
| 166 | |
| 167 | /* PCI and PCI-Express Support */ |
| 168 | #define CONFIG_PCI /* Enable PCI/PCIE */ |
| 169 | #define CONFIG_PCI_PNP /* Scan PCI busses */ |
| 170 | #define CONFIG_CMD_PCI /* Enable the "pci" command */ |
| 171 | #define CONFIG_FSL_PCI_INIT /* Common FreeScale PCI initialization */ |
Gabor Juhos | 842033e | 2013-05-30 07:06:12 +0000 | [diff] [blame] | 172 | #define CONFIG_PCI_INDIRECT_BRIDGE /* indirect PCI bridge support */ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 173 | #define CONFIG_FSL_PCIE_RESET /* We have PCI-E reset errata */ |
| 174 | #define CONFIG_SYS_PCI_64BIT /* PCI resources are 64-bit */ |
| 175 | #define CONFIG_PCI_SCAN_SHOW /* Display PCI scan during boot */ |
| 176 | |
| 177 | /* Enable 2 of the 3 PCI-E controllers */ |
| 178 | #define CONFIG_PCIE3 |
| 179 | #undef CONFIG_PCIE2 |
| 180 | #define CONFIG_PCIE1 |
| 181 | |
| 182 | /* Display human-readable names when initializing */ |
| 183 | #define CONFIG_SYS_PCIE3_NAME "Intel 82571EB" |
| 184 | #define CONFIG_SYS_PCIE2_NAME "Unused" |
| 185 | #define CONFIG_SYS_PCIE1_NAME "Silicon Image SIL3531" |
| 186 | |
| 187 | /* |
| 188 | * PCI bus addresses |
| 189 | * Memory space is mapped 1-1, but I/O space must start from 0. |
| 190 | */ |
| 191 | #define CONFIG_SYS_PCIE3_IO_BUS 0x00000000 |
| 192 | #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000 |
| 193 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 |
| 194 | #define CONFIG_SYS_PCIE3_MEM_BUS 0xe0000000 |
| 195 | #define CONFIG_SYS_PCIE2_MEM_BUS 0xe0000000 |
| 196 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xe0000000 |
| 197 | |
| 198 | |
| 199 | /* -------------------------------------------------------------------- */ |
| 200 | |
| 201 | /* Generic FreeScale hardware I2C support */ |
Heiko Schocher | 00f792e | 2012-10-24 13:48:22 +0200 | [diff] [blame] | 202 | #define CONFIG_SYS_I2C |
| 203 | #define CONFIG_SYS_I2C_FSL |
| 204 | #define CONFIG_SYS_FSL_I2C_SPEED 400000 |
| 205 | #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F |
| 206 | #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 |
| 207 | #define CONFIG_SYS_FSL_I2C2_SPEED 400000 |
| 208 | #define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F |
| 209 | #define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 |
| 210 | #define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} } |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 211 | #define CONFIG_CMD_I2C |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 212 | |
| 213 | /* DDR2 SO-RDIMM SPD EEPROM is at I2C0-0x51 */ |
| 214 | #define CONFIG_SYS_SPD_BUS_NUM 0 |
| 215 | #define SPD_EEPROM_ADDRESS 0x51 |
| 216 | |
| 217 | /* DS1339 RTC is at I2C0-0x68 (I know it says "DS1337", it's a DS1339) */ |
| 218 | #define CONFIG_CMD_DATE |
| 219 | #define CONFIG_RTC_DS1337 |
| 220 | #define CONFIG_SYS_RTC_BUS_NUM 0 |
| 221 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 |
| 222 | /* Turn off RTC square-wave output to save battery */ |
| 223 | #define CONFIG_SYS_RTC_DS1337_NOOSC |
| 224 | |
Kyle Moffett | 0ecb551 | 2011-12-15 22:26:52 -0500 | [diff] [blame] | 225 | /* |
| 226 | * AT24C128N EEPROM at I2C0-0x53. |
| 227 | * |
| 228 | * That Atmel EEPROM has 128kbit of memory (16kByte) divided into 256 pages |
| 229 | * of 64 bytes per page. The chip uses 2-byte addresses and has a max write |
| 230 | * cycle time of 20ms according to the datasheet. |
| 231 | * |
| 232 | * NOTE: Our environment is stored on regular direct-attached FLASH, this |
| 233 | * chip is only used as a write-protected backup for certain key settings |
| 234 | * such as the serial# and macaddr values. (EG: "env import") |
| 235 | */ |
| 236 | #define CONFIG_CMD_EEPROM |
| 237 | #define CONFIG_ENV_EEPROM_IS_ON_I2C |
| 238 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x53 |
| 239 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
| 240 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 1 << 6 == 64 byte pages */ |
| 241 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 21 |
| 242 | |
| 243 | /* |
| 244 | * PCA9554 is at I2C1-0x3f (I know it says "PCA953X", it's a PCA9554). You |
| 245 | * must first select the I2C1 bus with "i2c dev 1" or the "pca953x" command |
| 246 | * will not be able to access the chip. |
| 247 | */ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 248 | #define CONFIG_PCA953X |
| 249 | #define CONFIG_CMD_PCA953X |
| 250 | #define CONFIG_CMD_PCA953X_INFO |
| 251 | #define CONFIG_SYS_I2C_PCA953X_ADDR 0x3f |
| 252 | |
| 253 | |
| 254 | /* -------------------------------------------------------------------- */ |
| 255 | |
| 256 | /* FreeScale DDR2/3 SDRAM Controller */ |
York Sun | 5614e71 | 2013-09-30 09:22:09 -0700 | [diff] [blame] | 257 | #define CONFIG_SYS_FSL_DDR2 /* Our SDRAM slot is DDR2 */ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 258 | #define CONFIG_DDR_ECC /* Enable ECC by default */ |
| 259 | #define CONFIG_DDR_SPD /* Detect DDR config from SPD EEPROM */ |
| 260 | #define CONFIG_SPD_EEPROM /* ...why 2 config variables for this? */ |
| 261 | #define CONFIG_VERY_BIG_RAM /* Allow 2GB+ of RAM */ |
| 262 | #define CONFIG_CMD_SDRAM |
| 263 | |
| 264 | /* Standard P2020 DDR controller parameters */ |
| 265 | #define CONFIG_NUM_DDR_CONTROLLERS 1 |
| 266 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
| 267 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 |
| 268 | |
| 269 | /* Make sure to tell the DDR controller to preinitialze all of RAM */ |
| 270 | #define CONFIG_MEM_INIT_VALUE 0xDEADBEEF |
| 271 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER |
| 272 | |
| 273 | |
| 274 | /* -------------------------------------------------------------------- */ |
| 275 | |
| 276 | /* FLASH Memory Configuration (2x 128MB SPANSION FLASH) */ |
| 277 | #define CONFIG_FLASH_CFI_DRIVER |
| 278 | #define CONFIG_SYS_FLASH_CFI |
| 279 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
| 280 | #define CONFIG_SYS_FLASH_AMD_CHECK_DQ7 |
| 281 | |
| 282 | /* Flash banks (2x 128MB) */ |
| 283 | #define FLASH0_PHYS (CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000ull) |
| 284 | #define FLASH1_PHYS (CONFIG_SYS_FLASH_BASE_PHYS + 0x0000000ull) |
| 285 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 |
| 286 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 |
| 287 | #define CONFIG_SYS_FLASH_BANKS_LIST { FLASH0_PHYS, FLASH1_PHYS } |
| 288 | |
| 289 | /* |
| 290 | * Flash access modes and timings (values are the defaults after a RESET). |
| 291 | * |
| 292 | * NOTE: These could probably be optimized but are more than sufficient for |
| 293 | * this particular system for the moment. |
| 294 | */ |
| 295 | #define FLASH_BRx (BR_PS_16 | BR_MS_GPCM | BR_V) |
| 296 | #define FLASH_ORx (OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS \ |
| 297 | | OR_GPCM_SCY_15 | OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD) |
| 298 | |
| 299 | /* Configure both flash banks */ |
| 300 | #define CONFIG_SYS_BR0_PRELIM (FLASH_BRx | BR_PHYS_ADDR(FLASH0_PHYS)) |
| 301 | #define CONFIG_SYS_BR1_PRELIM (FLASH_BRx | BR_PHYS_ADDR(FLASH1_PHYS)) |
| 302 | #define CONFIG_SYS_OR0_PRELIM (FLASH_ORx | OR_AM_128MB) |
| 303 | #define CONFIG_SYS_OR1_PRELIM (FLASH_ORx | OR_AM_128MB) |
| 304 | |
| 305 | /* Flash timeouts (in ms) */ |
| 306 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000UL /* Erase (60s) */ |
| 307 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500UL /* Write (0.5s) */ |
| 308 | |
| 309 | /* Quiet flash testing */ |
| 310 | #define CONFIG_SYS_FLASH_QUIET_TEST |
| 311 | |
| 312 | /* Make program/erase count down from 45/5 (9....8....7....) */ |
| 313 | #define CONFIG_FLASH_SHOW_PROGRESS 45 |
| 314 | |
| 315 | |
| 316 | /* -------------------------------------------------------------------- */ |
| 317 | |
| 318 | /* Ethernet Device Support */ |
| 319 | #define CONFIG_MII /* Enable MII PHY code */ |
| 320 | #define CONFIG_MII_DEFAULT_TSEC /* ??? Copied from P2020DS */ |
| 321 | #define CONFIG_PHY_GIGE /* Support Gigabit PHYs */ |
| 322 | #define CONFIG_ETHPRIME "e1000#0" /* Default to external ports */ |
| 323 | |
| 324 | /* Turn on various helpful networking commands */ |
| 325 | #define CONFIG_CMD_DHCP |
| 326 | #define CONFIG_CMD_MII |
| 327 | #define CONFIG_CMD_NET |
| 328 | #define CONFIG_CMD_PING |
| 329 | |
| 330 | /* On-chip FreeScale P2020 "tsec" Ethernet (oneway fibers and peer) */ |
| 331 | #define CONFIG_TSEC_ENET |
| 332 | #define CONFIG_TSEC1 |
| 333 | #define CONFIG_TSEC2 |
| 334 | #define CONFIG_TSEC3 |
| 335 | #define CONFIG_TSEC1_NAME "owt0" |
| 336 | #define CONFIG_TSEC2_NAME "owt1" |
| 337 | #define CONFIG_TSEC3_NAME "peer" |
| 338 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
| 339 | #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
| 340 | #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
| 341 | #define TSEC1_PHYIDX 0 |
| 342 | #define TSEC2_PHYIDX 0 |
| 343 | #define TSEC3_PHYIDX 0 |
| 344 | #define TSEC1_PHY_ADDR 2 |
| 345 | #define TSEC2_PHY_ADDR 3 |
| 346 | #define TSEC3_PHY_ADDR 4 |
| 347 | #define TSEC3_PHY_ADDR_CPUA 4 |
| 348 | #define TSEC3_PHY_ADDR_CPUB 5 |
| 349 | |
| 350 | /* PCI-E dual-port E1000 (external ethernet ports) */ |
| 351 | #define CONFIG_E1000 |
| 352 | #define CONFIG_E1000_SPI |
| 353 | #define CONFIG_E1000_SPI_GENERIC |
| 354 | #define CONFIG_CMD_E1000 |
| 355 | |
| 356 | /* We need the SPI infrastructure to poke the E1000's EEPROM */ |
| 357 | #define CONFIG_SPI |
| 358 | #define CONFIG_SPI_X |
| 359 | #define CONFIG_CMD_SPI |
| 360 | #define MAX_SPI_BYTES 32 |
| 361 | |
| 362 | |
| 363 | /* -------------------------------------------------------------------- */ |
| 364 | |
| 365 | /* USB Thumbdrive Device Support */ |
| 366 | #define CONFIG_USB_EHCI |
| 367 | #define CONFIG_USB_EHCI_FSL |
| 368 | #define CONFIG_USB_STORAGE |
| 369 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 370 | #define CONFIG_CMD_USB |
| 371 | |
| 372 | /* Partition and Filesystem support */ |
| 373 | #define CONFIG_DOS_PARTITION |
| 374 | #define CONFIG_EFI_PARTITION |
| 375 | #define CONFIG_ISO_PARTITION |
| 376 | #define CONFIG_CMD_EXT2 |
| 377 | #define CONFIG_CMD_FAT |
| 378 | |
| 379 | |
| 380 | /* -------------------------------------------------------------------- */ |
| 381 | |
| 382 | /* Command line configuration. */ |
| 383 | #define CONFIG_CMDLINE_EDITING /* Enable command editing */ |
| 384 | #define CONFIG_COMMAND_HISTORY /* Enable command history */ |
| 385 | #define CONFIG_AUTO_COMPLETE /* Enable command completion */ |
| 386 | #define CONFIG_SYS_LONGHELP /* Enable detailed command help */ |
| 387 | #define CONFIG_SYS_MAXARGS 128 /* Up to 128 command-line args */ |
| 388 | #define CONFIG_SYS_PBSIZE 8192 /* Allow up to 8k printed lines */ |
| 389 | #define CONFIG_SYS_CBSIZE 4096 /* Allow up to 4k command lines */ |
| 390 | #define CONFIG_SYS_BARGSIZE 4096 /* Allow up to 4k boot args */ |
| 391 | #define CONFIG_SYS_HUSH_PARSER /* Enable a fancier shell */ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 392 | |
| 393 | /* A little extra magic here for the prompt */ |
| 394 | #define CONFIG_SYS_PROMPT hww1u1a_get_ps1() |
| 395 | #ifndef __ASSEMBLY__ |
| 396 | const char *hww1u1a_get_ps1(void); |
| 397 | #endif |
| 398 | |
| 399 | /* Include a bunch of default commands we probably want */ |
| 400 | #include <config_cmd_default.h> |
| 401 | |
| 402 | /* Other helpful shell-like commands */ |
| 403 | #define CONFIG_MD5 |
| 404 | #define CONFIG_SHA1 |
| 405 | #define CONFIG_CMD_MD5SUM |
Marek Vasut | ae291b7 | 2012-03-31 07:47:14 +0000 | [diff] [blame] | 406 | #define CONFIG_CMD_SHA1SUM |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 407 | #define CONFIG_CMD_ASKENV |
| 408 | #define CONFIG_CMD_SETEXPR |
| 409 | |
| 410 | |
| 411 | /* -------------------------------------------------------------------- */ |
| 412 | |
| 413 | /* Image manipulation and booting */ |
| 414 | |
| 415 | /* We use the OpenFirmware-esque "Flattened Device Tree" */ |
| 416 | #define CONFIG_OF_LIBFDT |
| 417 | #define CONFIG_OF_BOARD_SETUP |
| 418 | #define CONFIG_OF_STDOUT_VIA_ALIAS |
| 419 | |
| 420 | /* |
| 421 | * For booting Linux, the board info and command line data |
| 422 | * have to be in the first 64 MB of memory, since this is |
| 423 | * the maximum mapped by the Linux kernel during initialization. |
| 424 | */ |
| 425 | #define CONFIG_CMD_ELF |
| 426 | #define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Maximum kernel memory map */ |
| 427 | #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Maximum kernel size of 64MB */ |
| 428 | |
| 429 | /* This is the default address for commands with an optional address arg */ |
| 430 | #define CONFIG_LOADADDR 100000 |
| 431 | #define CONFIG_SYS_LOAD_ADDR 0x100000 |
| 432 | |
| 433 | /* Test memory starting from the default load address to just below 2GB */ |
| 434 | #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_LOAD_ADDR |
| 435 | #define CONFIG_SYS_MEMTEST_END 0x7f000000 |
| 436 | |
| 437 | #define CONFIG_BOOTDELAY 20 |
| 438 | #define CONFIG_BOOTCOMMAND "echo Not yet flashed" |
| 439 | #define CONFIG_BOOTARGS "" |
| 440 | #define CONFIG_BOOTARGS_DYNAMIC "console=ttyS0,${baudrate}n1" |
| 441 | |
| 442 | /* Extra environment parameters */ |
| 443 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Kyle Moffett | 7985f7e | 2011-12-15 22:26:53 -0500 | [diff] [blame] | 444 | "ethprime=e1000#0\0" \ |
| 445 | "ethrotate=no\0" \ |
| 446 | "setbootargs=setenv bootargs " \ |
| 447 | "\"${bootargs} "CONFIG_BOOTARGS_DYNAMIC"\"\0" \ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 448 | "perf_mode=performance\0" \ |
| 449 | "hwconfig=" "fsl_ddr:ctlr_intlv=bank,bank_intlv=cs0_cs1;" \ |
| 450 | "usb1:dr_mode=host,phy_type=ulpi\0" \ |
Kyle Moffett | 7985f7e | 2011-12-15 22:26:53 -0500 | [diff] [blame] | 451 | "flkernel=0xe8000000\0" \ |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 452 | "flinitramfs=0xe8800000\0" \ |
| 453 | "fldevicetree=0xeff20000\0" \ |
| 454 | "flbootm=bootm ${flkernel} ${flinitramfs} ${fldevicetree}\0" \ |
Kyle Moffett | 0ecb551 | 2011-12-15 22:26:52 -0500 | [diff] [blame] | 455 | "flboot=run preboot; run flbootm\0" \ |
| 456 | "restore_eeprom=i2c dev 0 && " \ |
| 457 | "eeprom read $loadaddr 0x0000 0x2000 && " \ |
| 458 | "env import -c $loadaddr 0x2000\0" |
Kyle Moffett | f8bbb4d | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 459 | |
| 460 | #endif /* __CONFIG_H */ |