Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * Copyright (C) 2011 Matrix Vision GmbH |
| 5 | * Andre Schwarz <andre.schwarz@matrix-vision.de> |
| 6 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __CONFIG_H |
| 11 | #define __CONFIG_H |
| 12 | |
| 13 | #include <version.h> |
| 14 | |
| 15 | /* |
| 16 | * High Level Configuration Options |
| 17 | */ |
| 18 | #define CONFIG_E300 1 |
| 19 | #define CONFIG_MPC83xx 1 |
| 20 | #define CONFIG_MPC837x 1 |
| 21 | #define CONFIG_MPC8377 1 |
| 22 | |
| 23 | #define CONFIG_SYS_TEXT_BASE 0xFC000000 |
| 24 | |
| 25 | #define CONFIG_PCI 1 |
Gabor Juhos | 842033e | 2013-05-30 07:06:12 +0000 | [diff] [blame] | 26 | #define CONFIG_PCI_INDIRECT_BRIDGE 1 |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 27 | |
| 28 | #define CONFIG_MASK_AER_AO |
| 29 | #define CONFIG_DISPLAY_AER_FULL |
| 30 | |
| 31 | #define CONFIG_MISC_INIT_R |
| 32 | |
| 33 | /* |
| 34 | * On-board devices |
| 35 | */ |
| 36 | #define CONFIG_TSEC_ENET |
| 37 | |
| 38 | /* |
| 39 | * System Clock Setup |
| 40 | */ |
| 41 | #define CONFIG_83XX_CLKIN 66666667 /* in Hz */ |
| 42 | #define CONFIG_PCIE |
| 43 | #define CONFIG_83XX_GENERIC_PCIE_REGISTER_HOSES |
| 44 | #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN |
| 45 | |
| 46 | /* |
| 47 | * Hardware Reset Configuration Word stored in EEPROM. |
| 48 | */ |
| 49 | #define CONFIG_SYS_HRCW_LOW 0 |
| 50 | #define CONFIG_SYS_HRCW_HIGH 0 |
| 51 | |
| 52 | /* Arbiter Configuration Register */ |
| 53 | #define CONFIG_SYS_ACR_PIPE_DEP 3 |
| 54 | #define CONFIG_SYS_ACR_RPTCNT 3 |
| 55 | |
| 56 | /* System Priority Control Regsiter */ |
| 57 | #define CONFIG_SYS_SPCR_TSECEP 3 |
| 58 | |
| 59 | /* System Clock Configuration Register */ |
| 60 | #define CONFIG_SYS_SCCR_TSEC1CM 3 |
| 61 | #define CONFIG_SYS_SCCR_TSEC2CM 0 |
| 62 | #define CONFIG_SYS_SCCR_SDHCCM 3 |
| 63 | #define CONFIG_SYS_SCCR_ENCCM 3 /* also clock for I2C-1 */ |
| 64 | #define CONFIG_SYS_SCCR_USBDRCM CONFIG_SYS_SCCR_ENCCM /* must match */ |
| 65 | #define CONFIG_SYS_SCCR_PCIEXP1CM 3 |
| 66 | #define CONFIG_SYS_SCCR_PCIEXP2CM 3 |
| 67 | #define CONFIG_SYS_SCCR_PCICM 1 |
| 68 | #define CONFIG_SYS_SCCR_SATACM 0xFF |
| 69 | |
| 70 | /* |
| 71 | * System IO Config |
| 72 | */ |
| 73 | #define CONFIG_SYS_SICRH 0x087c0000 |
| 74 | #define CONFIG_SYS_SICRL 0x40000000 |
| 75 | |
| 76 | /* |
| 77 | * Output Buffer Impedance |
| 78 | */ |
| 79 | #define CONFIG_SYS_OBIR 0x30000000 |
| 80 | |
| 81 | /* |
| 82 | * IMMR new address |
| 83 | */ |
| 84 | #define CONFIG_SYS_IMMR 0xE0000000 |
| 85 | |
| 86 | /* |
| 87 | * DDR Setup |
| 88 | */ |
| 89 | #define CONFIG_SYS_DDR_BASE 0x00000000 |
| 90 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
| 91 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
| 92 | #define CONFIG_SYS_83XX_DDR_USES_CS0 |
| 93 | |
| 94 | #define CONFIG_SYS_DDRCDR_VALUE (DDRCDR_EN | DDRCDR_PZ_HIZ |\ |
| 95 | DDRCDR_NZ_HIZ | DDRCDR_ODT |\ |
| 96 | DDRCDR_Q_DRN) |
| 97 | |
| 98 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 |
| 99 | |
| 100 | #define CONFIG_SYS_DDR_MODE_WEAK |
| 101 | #define CONFIG_SYS_DDR_WRITE_DATA_DELAY 2 |
| 102 | #define CONFIG_SYS_DDR_CPO 0x1f |
| 103 | |
| 104 | /* SPD table located at offset 0x20 in extended adressing ROM |
| 105 | * used for HRCW fetch after power-on reset |
| 106 | */ |
| 107 | #define CONFIG_SPD_EEPROM |
| 108 | #define SPD_EEPROM_ADDRESS 0x50 |
| 109 | #define SPD_EEPROM_OFFSET 0x20 |
| 110 | #define SPD_EEPROM_ADDR_LEN 2 |
| 111 | |
| 112 | /* |
| 113 | * The reserved memory |
| 114 | */ |
| 115 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
| 116 | #define CONFIG_SYS_MONITOR_LEN (512*1024) |
| 117 | #define CONFIG_SYS_MALLOC_LEN (512*1024) |
| 118 | |
| 119 | /* |
| 120 | * Initial RAM Base Address Setup |
| 121 | */ |
| 122 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
| 123 | #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */ |
| 124 | #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* End of used area in RAM */ |
| 125 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
| 126 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE -\ |
| 127 | CONFIG_SYS_GBL_DATA_SIZE) |
| 128 | |
| 129 | /* |
| 130 | * Local Bus Configuration & Clock Setup |
| 131 | */ |
| 132 | #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP |
| 133 | #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_8 |
| 134 | #define CONFIG_SYS_LBC_LBCR 0x00000000 |
| 135 | #define CONFIG_FSL_ELBC 1 |
| 136 | |
| 137 | /* |
| 138 | * FLASH on the Local Bus |
| 139 | */ |
| 140 | #define CONFIG_SYS_FLASH_CFI |
| 141 | #define CONFIG_FLASH_CFI_DRIVER |
| 142 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT |
| 143 | |
| 144 | #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE |
| 145 | #define CONFIG_SYS_FLASH_SIZE 64 |
| 146 | |
| 147 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE |
| 148 | #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_64MB) |
| 149 | |
Joe Hershberger | 7d6a098 | 2011-10-11 23:57:30 -0500 | [diff] [blame] | 150 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 |\ |
| 151 | BR_MS_GPCM | BR_V) |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 152 | #define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_FLASH_BASE | OR_UPM_XAM |\ |
| 153 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 |\ |
Joe Hershberger | 7d6a098 | 2011-10-11 23:57:30 -0500 | [diff] [blame] | 154 | OR_GPCM_XACS | OR_GPCM_SCY_15 |\ |
| 155 | OR_GPCM_TRLX_SET | OR_GPCM_EHTR_SET |\ |
| 156 | OR_GPCM_EAD) |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 157 | |
| 158 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 |
| 159 | #define CONFIG_SYS_MAX_FLASH_SECT 512 |
| 160 | |
| 161 | #undef CONFIG_SYS_FLASH_CHECKSUM |
| 162 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Flash Erase Timeout (ms) */ |
| 163 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
| 164 | |
| 165 | /* |
| 166 | * NAND Flash on the Local Bus |
| 167 | */ |
| 168 | #define CONFIG_MTD_NAND_VERIFY_WRITE 1 |
| 169 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
Joe Hershberger | 7c3a4f9 | 2011-10-11 23:57:08 -0500 | [diff] [blame] | 170 | #define CONFIG_NAND_FSL_ELBC 1 |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 171 | |
| 172 | #define CONFIG_SYS_NAND_BASE 0xE0600000 |
Joe Hershberger | 7d6a098 | 2011-10-11 23:57:30 -0500 | [diff] [blame] | 173 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_NAND_BASE | BR_DECC_CHK_GEN |\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 174 | BR_PS_8 | BR_MS_FCM | BR_V) |
Joe Hershberger | 7d6a098 | 2011-10-11 23:57:30 -0500 | [diff] [blame] | 175 | #define CONFIG_SYS_OR1_PRELIM (OR_AM_32KB | OR_FCM_BCTLD | OR_FCM_CST |\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 176 | OR_FCM_CHT | OR_FCM_SCY_1 | OR_FCM_RST |\ |
| 177 | OR_FCM_TRLX | OR_FCM_EHTR) |
| 178 | |
| 179 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE |
Joe Hershberger | 7d6a098 | 2011-10-11 23:57:30 -0500 | [diff] [blame] | 180 | #define CONFIG_SYS_LBLAWAR1_PRELIM (LBLAWAR_EN | LBLAWAR_32KB) |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 181 | |
| 182 | /* |
| 183 | * Serial Port |
| 184 | */ |
| 185 | #define CONFIG_CONS_INDEX 1 |
| 186 | #define CONFIG_SYS_NS16550 |
| 187 | #define CONFIG_SYS_NS16550_SERIAL |
| 188 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
| 189 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
| 190 | |
| 191 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
| 192 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} |
| 193 | |
| 194 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) |
| 195 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) |
| 196 | |
| 197 | #define CONFIG_CONSOLE ttyS0 |
| 198 | #define CONFIG_BAUDRATE 115200 |
| 199 | |
| 200 | /* SERDES */ |
| 201 | #define CONFIG_FSL_SERDES |
| 202 | #define CONFIG_FSL_SERDES1 0xe3000 |
| 203 | #define CONFIG_FSL_SERDES2 0xe3100 |
| 204 | |
| 205 | /* Use the HUSH parser */ |
| 206 | #define CONFIG_SYS_HUSH_PARSER |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 207 | |
| 208 | /* Pass open firmware flat tree */ |
| 209 | #define CONFIG_OF_LIBFDT 1 |
| 210 | #define CONFIG_OF_BOARD_SETUP 1 |
| 211 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
| 212 | |
| 213 | /* I2C */ |
Heiko Schocher | 00f792e | 2012-10-24 13:48:22 +0200 | [diff] [blame] | 214 | #define CONFIG_SYS_I2C |
| 215 | #define CONFIG_SYS_I2C_FSL |
| 216 | #define CONFIG_SYS_FSL_I2C_SPEED 400000 |
| 217 | #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F |
| 218 | #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 |
| 219 | #define CONFIG_SYS_FSL_I2C2_SPEED 400000 |
| 220 | #define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F |
| 221 | #define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 222 | |
| 223 | /* |
| 224 | * General PCI |
| 225 | * Addresses are mapped 1-1. |
| 226 | */ |
| 227 | #define CONFIG_SYS_PCI_MEM_BASE 0x80000000 |
| 228 | #define CONFIG_SYS_PCI_MEM_PHYS CONFIG_SYS_PCI_MEM_BASE |
| 229 | #define CONFIG_SYS_PCI_MEM_SIZE (256 << 20) |
| 230 | #define CONFIG_SYS_PCI_MMIO_BASE 0x90000000 |
| 231 | #define CONFIG_SYS_PCI_MMIO_PHYS CONFIG_SYS_PCI_MMIO_BASE |
| 232 | #define CONFIG_SYS_PCI_MMIO_SIZE (256 << 20) |
| 233 | #define CONFIG_SYS_PCI_IO_BASE 0x00000000 |
| 234 | #define CONFIG_SYS_PCI_IO_PHYS 0xE0300000 |
| 235 | #define CONFIG_SYS_PCI_IO_SIZE (1 << 20) |
| 236 | |
| 237 | #ifdef CONFIG_PCIE |
| 238 | #define CONFIG_SYS_PCIE1_BASE 0xA0000000 |
| 239 | #define CONFIG_SYS_PCIE1_CFG_BASE 0xA0000000 |
| 240 | #define CONFIG_SYS_PCIE1_CFG_SIZE (128 << 20) |
| 241 | #define CONFIG_SYS_PCIE1_MEM_BASE 0xA8000000 |
| 242 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xA8000000 |
| 243 | #define CONFIG_SYS_PCIE1_MEM_SIZE (256 << 20) |
| 244 | #define CONFIG_SYS_PCIE1_IO_BASE 0x00000000 |
| 245 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xB8000000 |
| 246 | #define CONFIG_SYS_PCIE1_IO_SIZE (8 << 20) |
| 247 | |
| 248 | #define CONFIG_SYS_PCIE2_BASE 0xC0000000 |
| 249 | #define CONFIG_SYS_PCIE2_CFG_BASE 0xC0000000 |
| 250 | #define CONFIG_SYS_PCIE2_CFG_SIZE (128 << 20) |
| 251 | #define CONFIG_SYS_PCIE2_MEM_BASE 0xC8000000 |
| 252 | #define CONFIG_SYS_PCIE2_MEM_PHYS 0xC8000000 |
| 253 | #define CONFIG_SYS_PCIE2_MEM_SIZE (256 << 20) |
| 254 | #define CONFIG_SYS_PCIE2_IO_BASE 0x00000000 |
| 255 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xD8000000 |
| 256 | #define CONFIG_SYS_PCIE2_IO_SIZE (8 << 20) |
| 257 | #endif |
| 258 | |
| 259 | #define CONFIG_PCI_PNP |
| 260 | #define CONFIG_PCI_SCAN_SHOW |
| 261 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */ |
| 262 | |
| 263 | /* |
| 264 | * TSEC |
| 265 | */ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 266 | #define CONFIG_GMII /* MII PHY management */ |
| 267 | #define CONFIG_SYS_VSC8601_SKEWFIX |
| 268 | #define CONFIG_SYS_VSC8601_SKEW_TX 3 |
| 269 | #define CONFIG_SYS_VSC8601_SKEW_RX 3 |
| 270 | |
| 271 | #define CONFIG_TSEC1 |
| 272 | #define CONFIG_HAS_ETH0 |
| 273 | #define CONFIG_TSEC1_NAME "TSEC0" |
| 274 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 |
| 275 | #define TSEC1_PHY_ADDR 0x10 |
| 276 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
| 277 | #define TSEC1_PHYIDX 0 |
| 278 | |
| 279 | #define CONFIG_ETHPRIME "TSEC0" |
| 280 | #define CONFIG_HAS_ETH0 |
| 281 | |
| 282 | /* |
| 283 | * SATA |
| 284 | */ |
| 285 | #define CONFIG_LIBATA |
| 286 | #define CONFIG_FSL_SATA |
| 287 | |
| 288 | #define CONFIG_SYS_SATA_MAX_DEVICE 2 |
| 289 | #define CONFIG_SATA1 |
| 290 | #define CONFIG_SYS_SATA1_OFFSET 0x18000 |
| 291 | #define CONFIG_SYS_SATA1 (CONFIG_SYS_IMMR + CONFIG_SYS_SATA1_OFFSET) |
| 292 | #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA |
| 293 | #define CONFIG_SATA2 |
| 294 | #define CONFIG_SYS_SATA2_OFFSET 0x19000 |
| 295 | #define CONFIG_SYS_SATA2 (CONFIG_SYS_IMMR + CONFIG_SYS_SATA2_OFFSET) |
| 296 | #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA |
| 297 | |
| 298 | #define CONFIG_LBA48 |
| 299 | #define CONFIG_CMD_SATA |
| 300 | #define CONFIG_DOS_PARTITION |
| 301 | #define CONFIG_CMD_EXT2 |
| 302 | |
| 303 | /* |
| 304 | * BOOTP options |
| 305 | */ |
| 306 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 307 | #define CONFIG_BOOTP_BOOTPATH |
| 308 | #define CONFIG_BOOTP_GATEWAY |
| 309 | #define CONFIG_BOOTP_HOSTNAME |
| 310 | #define CONFIG_BOOTP_VENDOREX |
| 311 | #define CONFIG_BOOTP_SUBNETMASK |
| 312 | #define CONFIG_BOOTP_DNS |
| 313 | #define CONFIG_BOOTP_DNS2 |
| 314 | #define CONFIG_BOOTP_NTPSERVER |
| 315 | #define CONFIG_BOOTP_RANDOM_DELAY |
| 316 | #define CONFIG_BOOTP_SEND_HOSTNAME |
| 317 | |
| 318 | /* |
| 319 | * Command line configuration. |
| 320 | */ |
| 321 | #include <config_cmd_default.h> |
| 322 | |
| 323 | #define CONFIG_CMD_ASKENV |
| 324 | #define CONFIG_CMD_NAND |
| 325 | #define CONFIG_CMD_PING |
| 326 | #define CONFIG_CMD_EEPROM |
| 327 | #define CONFIG_CMD_I2C |
| 328 | #define CONFIG_CMD_MII |
| 329 | #define CONFIG_CMD_PCI |
| 330 | #define CONFIG_CMD_USB |
| 331 | #define CONFIG_CMD_SPI |
| 332 | #define CONFIG_CMD_DHCP |
| 333 | #define CONFIG_CMD_UBI |
| 334 | #define CONFIG_CMD_UBIFS |
| 335 | #define CONFIG_CMD_MTDPARTS |
| 336 | #define CONFIG_CMD_SATA |
| 337 | |
| 338 | #define CONFIG_CMD_EXT2 |
| 339 | #define CONFIG_CMD_FAT |
| 340 | #define CONFIG_CMD_JFFS2 |
| 341 | |
| 342 | #define CONFIG_RBTREE |
| 343 | #define CONFIG_LZO |
| 344 | |
| 345 | #define CONFIG_MTD_DEVICE |
| 346 | #define CONFIG_MTD_PARTITIONS |
| 347 | |
| 348 | #define CONFIG_FLASH_CFI_MTD |
| 349 | #define MTDIDS_DEFAULT "nor0=NOR,nand0=NAND" |
| 350 | #define MTDPARTS_DEFAULT "mtdparts=NOR:1M(u-boot),2M(FPGA);NAND:-(root)" |
| 351 | |
| 352 | #define CONFIG_FIT |
| 353 | #define CONFIG_FIT_VERBOSE 1 |
| 354 | |
| 355 | #define CONFIG_CMDLINE_EDITING 1 |
| 356 | #define CONFIG_AUTO_COMPLETE |
| 357 | |
| 358 | /* |
| 359 | * Miscellaneous configurable options |
| 360 | */ |
| 361 | #define CONFIG_SYS_LONGHELP |
| 362 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 |
| 363 | #define CONFIG_LOADADDR 0x4000000 |
| 364 | #define CONFIG_SYS_PROMPT "=> " |
| 365 | #define CONFIG_SYS_CBSIZE 256 |
| 366 | |
| 367 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) |
| 368 | #define CONFIG_SYS_MAXARGS 16 |
| 369 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 370 | #define CONFIG_SYS_HZ 1000 |
| 371 | |
| 372 | #define CONFIG_LOADS_ECHO 1 |
| 373 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 |
| 374 | |
| 375 | #define CONFIG_SYS_MEMTEST_START (60<<20) |
| 376 | #define CONFIG_SYS_MEMTEST_END (70<<20) |
| 377 | |
| 378 | /* |
| 379 | * For booting Linux, the board info and command line data |
| 380 | * have to be in the first 256 MB of memory, since this is |
| 381 | * the maximum mapped by the Linux kernel during initialization. |
| 382 | */ |
| 383 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux */ |
| 384 | |
| 385 | /* |
| 386 | * Core HID Setup |
| 387 | */ |
| 388 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
| 389 | #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \ |
| 390 | HID0_ENABLE_INSTRUCTION_CACHE) |
| 391 | #define CONFIG_SYS_HID2 HID2_HBE |
| 392 | |
| 393 | /* |
| 394 | * MMU Setup |
| 395 | */ |
| 396 | #define CONFIG_HIGH_BATS 1 |
| 397 | |
| 398 | /* DDR: cache cacheable */ |
| 399 | #define CONFIG_SYS_SDRAM CONFIG_SYS_SDRAM_BASE |
| 400 | |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 401 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM | BATL_PP_RW |\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 402 | BATL_MEMCOHERENCE) |
| 403 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM | BATU_BL_256M | BATU_VS |\ |
| 404 | BATU_VP) |
| 405 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
| 406 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
| 407 | |
| 408 | /* unused */ |
| 409 | #define CONFIG_SYS_IBAT1L (0) |
| 410 | #define CONFIG_SYS_IBAT1U (0) |
| 411 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
| 412 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
| 413 | |
| 414 | /* IMMRBAR, PCI IO and NAND: cache-inhibit and guarded */ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 415 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_IMMR | BATL_PP_RW |\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 416 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
| 417 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_IMMR | BATU_BL_8M | BATU_VS |\ |
| 418 | BATU_VP) |
| 419 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
| 420 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
| 421 | |
| 422 | /* unused */ |
| 423 | #define CONFIG_SYS_IBAT3L (0) |
| 424 | #define CONFIG_SYS_IBAT3U (0) |
| 425 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L |
| 426 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
| 427 | |
| 428 | /* FLASH: icache cacheable, but dcache-inhibit and guarded */ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 429 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_FLASH_BASE | BATL_PP_RW |\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 430 | BATL_MEMCOHERENCE) |
| 431 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_FLASH_BASE | BATU_BL_64M |\ |
| 432 | BATU_VS | BATU_VP) |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 433 | #define CONFIG_SYS_DBAT4L (CONFIG_SYS_FLASH_BASE | BATL_PP_RW | \ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 434 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
| 435 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
| 436 | |
| 437 | /* Stack in dcache: cacheable, no memory coherence */ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 438 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_RW) |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 439 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_INIT_RAM_ADDR | BATU_BL_128K |\ |
| 440 | BATU_VS | BATU_VP) |
| 441 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L |
| 442 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
| 443 | |
| 444 | /* PCI MEM space: cacheable */ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 445 | #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PCI_MEM_PHYS | BATL_PP_RW |\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 446 | BATL_MEMCOHERENCE) |
| 447 | #define CONFIG_SYS_IBAT6U (CONFIG_SYS_PCI_MEM_PHYS | BATU_BL_256M |\ |
| 448 | BATU_VS | BATU_VP) |
| 449 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
| 450 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
| 451 | |
| 452 | /* PCI MMIO space: cache-inhibit and guarded */ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 453 | #define CONFIG_SYS_IBAT7L (CONFIG_SYS_PCI_MMIO_PHYS | BATL_PP_RW | \ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 454 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
| 455 | #define CONFIG_SYS_IBAT7U (CONFIG_SYS_PCI_MMIO_PHYS | BATU_BL_256M |\ |
| 456 | BATU_VS | BATU_VP) |
| 457 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
| 458 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
| 459 | |
| 460 | /* |
| 461 | * I2C EEPROM settings |
| 462 | */ |
| 463 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 464 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 |
| 465 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 |
Joe Hershberger | 7c3a4f9 | 2011-10-11 23:57:08 -0500 | [diff] [blame] | 466 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 467 | #define CONFIG_SYS_EEPROM_SIZE 0x4000 |
| 468 | |
| 469 | /* |
| 470 | * Environment Configuration |
| 471 | */ |
| 472 | #define CONFIG_SYS_FLASH_PROTECTION |
| 473 | #define CONFIG_ENV_OVERWRITE |
| 474 | #define CONFIG_ENV_IS_IN_FLASH 1 |
| 475 | #define CONFIG_ENV_ADDR 0xFFD00000 |
| 476 | #define CONFIG_ENV_SECT_SIZE 0x20000 |
| 477 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE |
| 478 | |
| 479 | /* |
| 480 | * Video |
| 481 | */ |
| 482 | #define CONFIG_VIDEO |
| 483 | #define CONFIG_VIDEO_SM501_PCI |
| 484 | #define VIDEO_FB_LITTLE_ENDIAN |
| 485 | #define CONFIG_CMD_BMP |
| 486 | #define CONFIG_VIDEO_SM501 |
| 487 | #define CONFIG_VIDEO_SM501_32BPP |
| 488 | #define CONFIG_VIDEO_SM501_FBMEM_OFFSET 0x10000 |
| 489 | #define CONFIG_CFB_CONSOLE |
| 490 | #define CONFIG_VIDEO_LOGO |
| 491 | #define CONFIG_VIDEO_BMP_LOGO |
| 492 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
| 493 | #define CONFIG_SPLASH_SCREEN |
| 494 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 495 | #define CONFIG_VIDEO_BMP_GZIP |
| 496 | #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20) |
| 497 | |
| 498 | /* |
| 499 | * SPI |
| 500 | */ |
| 501 | #define CONFIG_MPC8XXX_SPI |
| 502 | |
| 503 | /* |
| 504 | * USB |
| 505 | */ |
| 506 | #define CONFIG_SYS_USB_HOST |
| 507 | #define CONFIG_USB_EHCI |
| 508 | #define CONFIG_USB_EHCI_FSL |
| 509 | #define CONFIG_HAS_FSL_DR_USB |
| 510 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 511 | |
| 512 | #define CONFIG_USB_STORAGE |
| 513 | #define CONFIG_USB_KEYBOARD |
| 514 | /* |
| 515 | * |
| 516 | */ |
| 517 | #define CONFIG_BOOTDELAY 5 |
| 518 | #define CONFIG_AUTOBOOT_KEYED |
| 519 | #define CONFIG_AUTOBOOT_STOP_STR "s" |
| 520 | #define CONFIG_ZERO_BOOTDELAY_CHECK |
| 521 | #define CONFIG_RESET_TO_RETRY 1000 |
| 522 | |
Joe Hershberger | 7c3a4f9 | 2011-10-11 23:57:08 -0500 | [diff] [blame] | 523 | #define MV_CI "MergerBox" |
| 524 | #define MV_VCI "MergerBox" |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 525 | #define MV_FPGA_DATA 0xfc100000 |
| 526 | #define MV_FPGA_SIZE 0x00200000 |
| 527 | |
| 528 | #define CONFIG_SHOW_BOOT_PROGRESS 1 |
| 529 | |
| 530 | #define MV_KERNEL_ADDR_RAM 0x02800000 |
| 531 | #define MV_DTB_ADDR_RAM 0x00600000 |
| 532 | #define MV_INITRD_ADDR_RAM 0x01000000 |
| 533 | #define MV_FITADDR 0xfc300000 |
| 534 | #define MV_SPLAH_ADDR 0xffe00000 |
| 535 | |
| 536 | #define CONFIG_BOOTCOMMAND "run i2c_init;if test ${boot_sqfs} -eq 1;"\ |
| 537 | "then; run fitboot;else;run ubiboot;fi;" |
| 538 | #define CONFIG_BOOTARGS "console=ttyS0,115200n8" |
| 539 | |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 540 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 541 | "console_nr=0\0"\ |
| 542 | "stdin=serial\0"\ |
| 543 | "stdout=serial\0"\ |
| 544 | "stderr=serial\0"\ |
| 545 | "boot_sqfs=1\0"\ |
| 546 | "usb_dr_mode=host\0"\ |
| 547 | "bootfile=MergerBox.fit\0"\ |
Marek Vasut | 5368c55 | 2012-09-23 17:41:24 +0200 | [diff] [blame] | 548 | "baudrate=" __stringify(CONFIG_BAUDRATE) "\0"\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 549 | "fpga=0\0"\ |
Marek Vasut | 5368c55 | 2012-09-23 17:41:24 +0200 | [diff] [blame] | 550 | "fpgadata=" __stringify(MV_FPGA_DATA) "\0"\ |
| 551 | "fpgadatasize=" __stringify(MV_FPGA_SIZE) "\0"\ |
| 552 | "mv_kernel_ram=" __stringify(MV_KERNEL_ADDR_RAM) "\0"\ |
| 553 | "mv_initrd_ram=" __stringify(MV_INITRD_ADDR_RAM) "\0"\ |
| 554 | "mv_dtb_ram=" __stringify(MV_DTB_ADDR_RAM) "\0"\ |
| 555 | "uboota=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"\ |
| 556 | "fitaddr=" __stringify(MV_FITADDR) "\0"\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 557 | "mv_version=" U_BOOT_VERSION "\0"\ |
| 558 | "mtdids=" MTDIDS_DEFAULT "\0"\ |
| 559 | "mtdparts=" MTDPARTS_DEFAULT "\0"\ |
Joe Hershberger | 7c3a4f9 | 2011-10-11 23:57:08 -0500 | [diff] [blame] | 560 | "dhcp_client_id=" MV_CI "\0"\ |
| 561 | "dhcp_vendor-class-identifier=" MV_VCI "\0"\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 562 | "upd_uboot=dhcp;tftp bdi2000/u-boot-mergerbox-xp.bin;"\ |
| 563 | "protect off all;erase $uboota +0xC0000;"\ |
| 564 | "cp.b $loadaddr $uboota $filesize\0"\ |
| 565 | "upd_fpga=dhcp;tftp MergerBox.rbf;erase $fpgadata +$fpgadatasize;"\ |
| 566 | "cp.b $loadaddr $fpgadata $filesize\0"\ |
| 567 | "upd_fit=dhcp;tftp MergerBox.fit;erase $fitaddr +0x1000000;"\ |
| 568 | "cp.b $loadaddr $fitaddr $filesize\0"\ |
| 569 | "addsqshrfs=set bootargs $bootargs root=/dev/ram ro "\ |
| 570 | "rootfstype=squashfs\0"\ |
| 571 | "addubirfs=set bootargs $bootargs ubi.mtd=9 root=ubi0:rootfs rw "\ |
| 572 | "rootfstype=ubifs\0"\ |
| 573 | "addusbrfs=set bootargs $bootargs root=/dev/sda1 rw "\ |
| 574 | "rootfstype=ext3 usb-storage.delay_use=1 rootdelay=3\0"\ |
| 575 | "netusbboot=bootp;run fpganetload fitnetload addusbrfs doboot\0"\ |
| 576 | "netubiboot= bootp;run fpganetload fitnetload addubirfs doboot\0"\ |
| 577 | "ubiboot=run fitprep addubirfs;set mv_initrd_ram -;run doboot\0"\ |
| 578 | "doboot=bootm $mv_kernel_ram $mv_initrd_ram $mv_dtb_ram\0"\ |
| 579 | "fitprep=imxtract $fitaddr kernel $mv_kernel_ram;"\ |
| 580 | "imxtract $fitaddr ramdisk $mv_initrd_ram;"\ |
| 581 | "imxtract $fitaddr fdt $mv_dtb_ram\0"\ |
| 582 | "fdtprep=fdt addr $mv_dtb_ram;fdt boardsetup\0"\ |
| 583 | "fitboot=run fitprep fdtprep addsqshrfs doboot\0"\ |
| 584 | "i2c_init=run i2c_speed init_sdi_tx i2c_init_pll\0"\ |
| 585 | "i2c_init_pll=i2c mw 65 9 2;i2c mw 65 9 0;i2c mw 65 5 2b;"\ |
| 586 | "i2c mw 65 7 f;i2c mw 65 8 f;i2c mw 65 11 40;i2c mw 65 12 40;"\ |
| 587 | "i2c mw 65 13 40; i2c mw 65 14 40; i2c mw 65 a 0\0"\ |
| 588 | "i2c_speed=i2c dev 0;i2c speed 300000;i2c dev 1;i2c speed 120000\0"\ |
| 589 | "init_sdi_tx=i2c mw 21 6 0;i2c mw 21 2 0;i2c mw 21 3 0;sleep 1;"\ |
| 590 | "i2c mw 21 2 ff;i2c mw 21 3 3c\0"\ |
Marek Vasut | 5368c55 | 2012-09-23 17:41:24 +0200 | [diff] [blame] | 591 | "splashimage=" __stringify(MV_SPLAH_ADDR) "\0"\ |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 592 | "" |
| 593 | |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 594 | /* |
| 595 | * FPGA |
| 596 | */ |
| 597 | #define CONFIG_FPGA_COUNT 1 |
Michal Simek | b03b25c | 2013-05-01 18:05:56 +0200 | [diff] [blame] | 598 | #define CONFIG_FPGA |
Andre Schwarz | 7fb3e7a | 2011-04-14 15:11:44 +0200 | [diff] [blame] | 599 | #define CONFIG_FPGA_ALTERA |
| 600 | #define CONFIG_FPGA_CYCLON2 |
| 601 | |
| 602 | #endif |