167431059SAndy Fleming /* 267431059SAndy Fleming * Copyright 2004-2007 Freescale Semiconductor. 367431059SAndy Fleming * 467431059SAndy Fleming * See file CREDITS for list of people who contributed to this 567431059SAndy Fleming * project. 667431059SAndy Fleming * 767431059SAndy Fleming * This program is free software; you can redistribute it and/or 867431059SAndy Fleming * modify it under the terms of the GNU General Public License as 967431059SAndy Fleming * published by the Free Software Foundation; either version 2 of 1067431059SAndy Fleming * the License, or (at your option) any later version. 1167431059SAndy Fleming * 1267431059SAndy Fleming * This program is distributed in the hope that it will be useful, 1367431059SAndy Fleming * but WITHOUT ANY WARRANTY; without even the implied warranty of 1467431059SAndy Fleming * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1567431059SAndy Fleming * GNU General Public License for more details. 1667431059SAndy Fleming * 1767431059SAndy Fleming * You should have received a copy of the GNU General Public License 1867431059SAndy Fleming * along with this program; if not, write to the Free Software 1967431059SAndy Fleming * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 2067431059SAndy Fleming * MA 02111-1307 USA 2167431059SAndy Fleming */ 2267431059SAndy Fleming 2367431059SAndy Fleming /* 2467431059SAndy Fleming * mpc8568mds board configuration file 2567431059SAndy Fleming */ 2667431059SAndy Fleming #ifndef __CONFIG_H 2767431059SAndy Fleming #define __CONFIG_H 2867431059SAndy Fleming 2967431059SAndy Fleming /* High Level Configuration Options */ 3067431059SAndy Fleming #define CONFIG_BOOKE 1 /* BOOKE */ 3167431059SAndy Fleming #define CONFIG_E500 1 /* BOOKE e500 family */ 3267431059SAndy Fleming #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48/68 */ 3367431059SAndy Fleming #define CONFIG_MPC8568 1 /* MPC8568 specific */ 3467431059SAndy Fleming #define CONFIG_MPC8568MDS 1 /* MPC8568MDS board specific */ 3567431059SAndy Fleming 361563f56eSHaiying Wang #define CONFIG_PCI 1 /* Enable PCI/PCIE */ 371563f56eSHaiying Wang #define CONFIG_PCI1 1 /* PCI controller */ 381563f56eSHaiying Wang #define CONFIG_PCIE1 1 /* PCIE controller */ 391563f56eSHaiying Wang #define CONFIG_FSL_PCI_INIT 1 /* use common fsl pci init code */ 408ff3de61SKumar Gala #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ 410151cbacSKumar Gala #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ 4267431059SAndy Fleming #define CONFIG_TSEC_ENET /* tsec ethernet support */ 43b96c83d4SAndy Fleming #define CONFIG_QE /* Enable QE */ 4467431059SAndy Fleming #define CONFIG_ENV_OVERWRITE 454d3521ccSKumar Gala #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ 4667431059SAndy Fleming 4767431059SAndy Fleming /* 4867431059SAndy Fleming * When initializing flash, if we cannot find the manufacturer ID, 4967431059SAndy Fleming * assume this is the AMD flash associated with the MDS board. 5067431059SAndy Fleming * This allows booting from a promjet. 5167431059SAndy Fleming */ 5267431059SAndy Fleming #define CONFIG_ASSUME_AMD_FLASH 5367431059SAndy Fleming 5467431059SAndy Fleming #ifndef __ASSEMBLY__ 5567431059SAndy Fleming extern unsigned long get_clock_freq(void); 5667431059SAndy Fleming #endif /*Replace a call to get_clock_freq (after it is implemented)*/ 5767431059SAndy Fleming #define CONFIG_SYS_CLK_FREQ 66000000 /*TODO: restore if wanting to read from BCSR: get_clock_freq()*/ /* sysclk for MPC85xx */ 5867431059SAndy Fleming 5967431059SAndy Fleming /* 6067431059SAndy Fleming * These can be toggled for performance analysis, otherwise use default. 6167431059SAndy Fleming */ 627a1ac419SHaiying Wang #define CONFIG_L2_CACHE /* toggle L2 cache */ 6367431059SAndy Fleming #define CONFIG_BTB /* toggle branch predition */ 6467431059SAndy Fleming 6567431059SAndy Fleming /* 6667431059SAndy Fleming * Only possible on E500 Version 2 or newer cores. 6767431059SAndy Fleming */ 6867431059SAndy Fleming #define CONFIG_ENABLE_36BIT_PHYS 1 6967431059SAndy Fleming 7067431059SAndy Fleming 7167431059SAndy Fleming #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ 7267431059SAndy Fleming 736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */ 746d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END 0x00400000 7567431059SAndy Fleming 7667431059SAndy Fleming /* 7767431059SAndy Fleming * Base addresses -- Note these are effective addresses where the 7867431059SAndy Fleming * actual resources get mapped (not physical addresses) 7967431059SAndy Fleming */ 806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ 816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CCSRBAR 0xe0000000 /* relocated CCSRBAR */ 826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ 836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ 8467431059SAndy Fleming 856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR+0x8000) 866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) 871563f56eSHaiying Wang 88e6f5b35bSJon Loeliger /* DDR Setup */ 89e6f5b35bSJon Loeliger #define CONFIG_FSL_DDR2 90e6f5b35bSJon Loeliger #undef CONFIG_FSL_DDR_INTERACTIVE 91e6f5b35bSJon Loeliger #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup*/ 92e6f5b35bSJon Loeliger #define CONFIG_DDR_SPD 93e6f5b35bSJon Loeliger #define CONFIG_DDR_DLL /* possible DLL fix needed */ 949b0ad1b1SDave Liu #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ 95e6f5b35bSJon Loeliger 96e6f5b35bSJon Loeliger #define CONFIG_MEM_INIT_VALUE 0xDeadBeef 97e6f5b35bSJon Loeliger 986d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 /* DDR is system memory*/ 996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE 10067431059SAndy Fleming 101e6f5b35bSJon Loeliger #define CONFIG_NUM_DDR_CONTROLLERS 1 102e6f5b35bSJon Loeliger #define CONFIG_DIMM_SLOTS_PER_CTLR 1 103e6f5b35bSJon Loeliger #define CONFIG_CHIP_SELECTS_PER_CTRL (2 * CONFIG_DIMM_SLOTS_PER_CTLR) 10467431059SAndy Fleming 105e6f5b35bSJon Loeliger /* I2C addresses of SPD EEPROMs */ 106e6f5b35bSJon Loeliger #define SPD_EEPROM_ADDRESS 0x51 /* CTLR 0 DIMM 0 */ 107e6f5b35bSJon Loeliger 108e6f5b35bSJon Loeliger /* Make sure required options are set */ 10967431059SAndy Fleming #ifndef CONFIG_SPD_EEPROM 11067431059SAndy Fleming #error ("CONFIG_SPD_EEPROM is required") 11167431059SAndy Fleming #endif 11267431059SAndy Fleming 11367431059SAndy Fleming #undef CONFIG_CLOCKS_IN_MHZ 11467431059SAndy Fleming 11567431059SAndy Fleming /* 11667431059SAndy Fleming * Local Bus Definitions 11767431059SAndy Fleming */ 11867431059SAndy Fleming 11967431059SAndy Fleming /* 12067431059SAndy Fleming * FLASH on the Local Bus 12167431059SAndy Fleming * Two banks, 8M each, using the CFI driver. 12267431059SAndy Fleming * Boot from BR0/OR0 bank at 0xff00_0000 12367431059SAndy Fleming * Alternate BR1/OR1 bank at 0xff80_0000 12467431059SAndy Fleming * 12567431059SAndy Fleming * BR0, BR1: 12667431059SAndy Fleming * Base address 0 = 0xff00_0000 = BR0[0:16] = 1111 1111 0000 0000 0 12767431059SAndy Fleming * Base address 1 = 0xff80_0000 = BR1[0:16] = 1111 1111 1000 0000 0 12867431059SAndy Fleming * Port Size = 16 bits = BRx[19:20] = 10 12967431059SAndy Fleming * Use GPCM = BRx[24:26] = 000 13067431059SAndy Fleming * Valid = BRx[31] = 1 13167431059SAndy Fleming * 13267431059SAndy Fleming * 0 4 8 12 16 20 24 28 13367431059SAndy Fleming * 1111 1111 1000 0000 0001 0000 0000 0001 = ff801001 BR0 13467431059SAndy Fleming * 1111 1111 0000 0000 0001 0000 0000 0001 = ff001001 BR1 13567431059SAndy Fleming * 13667431059SAndy Fleming * OR0, OR1: 13767431059SAndy Fleming * Addr Mask = 8M = ORx[0:16] = 1111 1111 1000 0000 0 13867431059SAndy Fleming * Reserved ORx[17:18] = 11, confusion here? 13967431059SAndy Fleming * CSNT = ORx[20] = 1 14067431059SAndy Fleming * ACS = half cycle delay = ORx[21:22] = 11 14167431059SAndy Fleming * SCY = 6 = ORx[24:27] = 0110 14267431059SAndy Fleming * TRLX = use relaxed timing = ORx[29] = 1 14367431059SAndy Fleming * EAD = use external address latch delay = OR[31] = 1 14467431059SAndy Fleming * 14567431059SAndy Fleming * 0 4 8 12 16 20 24 28 14667431059SAndy Fleming * 1111 1111 1000 0000 0110 1110 0110 0101 = ff806e65 ORx 14767431059SAndy Fleming */ 1486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BCSR_BASE 0xf8000000 14967431059SAndy Fleming 1506d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE 0xfe000000 /* start of FLASH 32M */ 15167431059SAndy Fleming 15267431059SAndy Fleming /*Chip select 0 - Flash*/ 1536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR0_PRELIM 0xfe001001 1546d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR0_PRELIM 0xfe006ff7 15567431059SAndy Fleming 15667431059SAndy Fleming /*Chip slelect 1 - BCSR*/ 1576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR1_PRELIM 0xf8000801 1586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR1_PRELIM 0xffffe9f7 15967431059SAndy Fleming 1606d0f6bcfSJean-Christophe PLAGNIOL-VILLARD /*#define CONFIG_SYS_FLASH_BANKS_LIST {0xff800000, CONFIG_SYS_FLASH_BASE} */ 1616d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ 1626d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_SECT 512 /* sectors per device */ 1636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef CONFIG_SYS_FLASH_CHECKSUM 1646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ 1656d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ 16667431059SAndy Fleming 1676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ 16867431059SAndy Fleming 16900b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER 1706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI 1716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_EMPTY_INFO 17267431059SAndy Fleming 17367431059SAndy Fleming 17467431059SAndy Fleming /* 17567431059SAndy Fleming * SDRAM on the LocalBus 17667431059SAndy Fleming */ 1776d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_SDRAM_BASE 0xf0000000 /* Localbus SDRAM */ 1786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */ 17967431059SAndy Fleming 18067431059SAndy Fleming 18167431059SAndy Fleming /*Chip select 2 - SDRAM*/ 1826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR2_PRELIM 0xf0001861 1836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR2_PRELIM 0xfc006901 18467431059SAndy Fleming 1856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LCRR 0x00030004 /* LB clock ratio reg */ 1866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LBCR 0x00000000 /* LB config reg */ 1876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_LSRT 0x20000000 /* LB sdram refresh timer */ 1886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LBC_MRTPR 0x00000000 /* LB refresh timer prescal*/ 18967431059SAndy Fleming 19067431059SAndy Fleming /* 19167431059SAndy Fleming * Common settings for all Local Bus SDRAM commands. 19267431059SAndy Fleming * At run time, either BSMA1516 (for CPU 1.1) 19367431059SAndy Fleming * or BSMA1617 (for CPU 1.0) (old) 19467431059SAndy Fleming * is OR'ed in too. 19567431059SAndy Fleming */ 196*b0fe93edSKumar Gala #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFCR16 \ 197*b0fe93edSKumar Gala | LSDMR_PRETOACT7 \ 198*b0fe93edSKumar Gala | LSDMR_ACTTORW7 \ 199*b0fe93edSKumar Gala | LSDMR_BL8 \ 200*b0fe93edSKumar Gala | LSDMR_WRC4 \ 201*b0fe93edSKumar Gala | LSDMR_CL3 \ 202*b0fe93edSKumar Gala | LSDMR_RFEN \ 20367431059SAndy Fleming ) 20467431059SAndy Fleming 20567431059SAndy Fleming /* 20667431059SAndy Fleming * The bcsr registers are connected to CS3 on MDS. 20767431059SAndy Fleming * The new memory map places bcsr at 0xf8000000. 20867431059SAndy Fleming * 20967431059SAndy Fleming * For BR3, need: 21067431059SAndy Fleming * Base address of 0xf8000000 = BR[0:16] = 1111 1000 0000 0000 0 21167431059SAndy Fleming * port-size = 8-bits = BR[19:20] = 01 21267431059SAndy Fleming * no parity checking = BR[21:22] = 00 21367431059SAndy Fleming * GPMC for MSEL = BR[24:26] = 000 21467431059SAndy Fleming * Valid = BR[31] = 1 21567431059SAndy Fleming * 21667431059SAndy Fleming * 0 4 8 12 16 20 24 28 21767431059SAndy Fleming * 1111 1000 0000 0000 0000 1000 0000 0001 = f8000801 21867431059SAndy Fleming * 21967431059SAndy Fleming * For OR3, need: 22067431059SAndy Fleming * 1 MB mask for AM, OR[0:16] = 1111 1111 1111 0000 0 22167431059SAndy Fleming * disable buffer ctrl OR[19] = 0 22267431059SAndy Fleming * CSNT OR[20] = 1 22367431059SAndy Fleming * ACS OR[21:22] = 11 22467431059SAndy Fleming * XACS OR[23] = 1 22567431059SAndy Fleming * SCY 15 wait states OR[24:27] = 1111 max is suboptimal but safe 22667431059SAndy Fleming * SETA OR[28] = 0 22767431059SAndy Fleming * TRLX OR[29] = 1 22867431059SAndy Fleming * EHTR OR[30] = 1 22967431059SAndy Fleming * EAD extra time OR[31] = 1 23067431059SAndy Fleming * 23167431059SAndy Fleming * 0 4 8 12 16 20 24 28 23267431059SAndy Fleming * 1111 1111 1111 0000 0000 1111 1111 0111 = fff00ff7 23367431059SAndy Fleming */ 2346d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BCSR (0xf8000000) 23567431059SAndy Fleming 23667431059SAndy Fleming /*Chip slelect 4 - PIB*/ 2376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR4_PRELIM 0xf8008801 2386d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR4_PRELIM 0xffffe9f7 23967431059SAndy Fleming 24067431059SAndy Fleming /*Chip select 5 - PIB*/ 2416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BR5_PRELIM 0xf8010801 2426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_OR5_PRELIM 0xffff69f7 24367431059SAndy Fleming 2446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_LOCK 1 2456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_ADDR 0xe4010000 /* Initial RAM address */ 2466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End of used area in RAM */ 24767431059SAndy Fleming 2486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ 2496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) 2506d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET 25167431059SAndy Fleming 2526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ 2536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ 25467431059SAndy Fleming 25567431059SAndy Fleming /* Serial Port */ 25667431059SAndy Fleming #define CONFIG_CONS_INDEX 1 25767431059SAndy Fleming #undef CONFIG_SERIAL_SOFTWARE_FIFO 2586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550 2596d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_SERIAL 2606d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_REG_SIZE 1 2616d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) 26267431059SAndy Fleming 2636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BAUDRATE_TABLE \ 26467431059SAndy Fleming {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} 26567431059SAndy Fleming 2666d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) 2676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) 26867431059SAndy Fleming 26967431059SAndy Fleming /* Use the HUSH parser*/ 2706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HUSH_PARSER 2716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef CONFIG_SYS_HUSH_PARSER 2726d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " 27367431059SAndy Fleming #endif 27467431059SAndy Fleming 27567431059SAndy Fleming /* pass open firmware flat tree */ 276c480861bSKumar Gala #define CONFIG_OF_LIBFDT 1 27767431059SAndy Fleming #define CONFIG_OF_BOARD_SETUP 1 278c480861bSKumar Gala #define CONFIG_OF_STDOUT_VIA_ALIAS 1 27967431059SAndy Fleming 2806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_64BIT_VSPRINTF 1 2816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_64BIT_STRTOUL 1 282e6f5b35bSJon Loeliger 28367431059SAndy Fleming /* 28467431059SAndy Fleming * I2C 28567431059SAndy Fleming */ 28667431059SAndy Fleming #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ 28767431059SAndy Fleming #define CONFIG_HARD_I2C /* I2C with hardware support*/ 28867431059SAndy Fleming #undef CONFIG_SOFT_I2C /* I2C bit-banged */ 289c59e4091SHaiying Wang #define CONFIG_I2C_MULTI_BUS 290c59e4091SHaiying Wang #define CONFIG_I2C_CMD_TREE 2916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ 2926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 2936d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_SLAVE 0x7F 2946d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ 2956d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C_OFFSET 0x3000 2966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_I2C2_OFFSET 0x3100 29767431059SAndy Fleming 29867431059SAndy Fleming /* 29967431059SAndy Fleming * General PCI 30067431059SAndy Fleming * Memory Addresses are mapped 1-1. I/O is mapped from 0 30167431059SAndy Fleming */ 3025af0fdd8SKumar Gala #define CONFIG_SYS_PCI1_MEM_VIRT 0x80000000 30310795f42SKumar Gala #define CONFIG_SYS_PCI1_MEM_BUS 0x80000000 3045af0fdd8SKumar Gala #define CONFIG_SYS_PCI1_MEM_PHYS 0x80000000 3056d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000 /* 512M */ 306aca5f018SKumar Gala #define CONFIG_SYS_PCI1_IO_VIRT 0xe2000000 3075f91ef6aSKumar Gala #define CONFIG_SYS_PCI1_IO_BUS 0x00000000 3086d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_PHYS 0xe2000000 3096d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI1_IO_SIZE 0x00800000 /* 8M */ 31067431059SAndy Fleming 3115af0fdd8SKumar Gala #define CONFIG_SYS_PCIE1_MEM_VIRT 0xa0000000 31210795f42SKumar Gala #define CONFIG_SYS_PCIE1_MEM_BUS 0xa0000000 3135af0fdd8SKumar Gala #define CONFIG_SYS_PCIE1_MEM_PHYS 0xa0000000 3146d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ 315aca5f018SKumar Gala #define CONFIG_SYS_PCIE1_IO_VIRT 0xe2800000 3165f91ef6aSKumar Gala #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 3176d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCIE1_IO_PHYS 0xe2800000 3186d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */ 31967431059SAndy Fleming 3205af0fdd8SKumar Gala #define CONFIG_SYS_SRIO_MEM_VIRT 0xc0000000 32110795f42SKumar Gala #define CONFIG_SYS_SRIO_MEM_BUS 0xc0000000 322a6e04c34SKumar Gala #define CONFIG_SYS_SRIO_MEM_PHYS 0xc0000000 32367431059SAndy Fleming 324da9d4610SAndy Fleming #ifdef CONFIG_QE 325da9d4610SAndy Fleming /* 326da9d4610SAndy Fleming * QE UEC ethernet configuration 327da9d4610SAndy Fleming */ 328da9d4610SAndy Fleming #define CONFIG_UEC_ETH 329da9d4610SAndy Fleming #ifndef CONFIG_TSEC_ENET 330b96c83d4SAndy Fleming #define CONFIG_ETHPRIME "FSL UEC0" 331da9d4610SAndy Fleming #endif 332da9d4610SAndy Fleming #define CONFIG_PHY_MODE_NEED_CHANGE 333da9d4610SAndy Fleming #define CONFIG_eTSEC_MDIO_BUS 334da9d4610SAndy Fleming 335da9d4610SAndy Fleming #ifdef CONFIG_eTSEC_MDIO_BUS 336da9d4610SAndy Fleming #define CONFIG_MIIM_ADDRESS 0xE0024520 337da9d4610SAndy Fleming #endif 338da9d4610SAndy Fleming 339da9d4610SAndy Fleming #define CONFIG_UEC_ETH1 /* GETH1 */ 340da9d4610SAndy Fleming 341da9d4610SAndy Fleming #ifdef CONFIG_UEC_ETH1 3426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ 3436d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE 3446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_TX_CLK QE_CLK16 3456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH 3466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_PHY_ADDR 7 3476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_1000_RGMII_ID 348da9d4610SAndy Fleming #endif 349da9d4610SAndy Fleming 350da9d4610SAndy Fleming #define CONFIG_UEC_ETH2 /* GETH2 */ 351da9d4610SAndy Fleming 352da9d4610SAndy Fleming #ifdef CONFIG_UEC_ETH2 3536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */ 3546d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE 3556d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_TX_CLK QE_CLK16 3566d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH 3576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_PHY_ADDR 1 3586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_UEC2_INTERFACE_MODE ENET_1000_RGMII_ID 359da9d4610SAndy Fleming #endif 360da9d4610SAndy Fleming #endif /* CONFIG_QE */ 361da9d4610SAndy Fleming 362f30ad49bSHaiying Wang #if defined(CONFIG_PCI) 363f30ad49bSHaiying Wang 364f30ad49bSHaiying Wang #define CONFIG_NET_MULTI 365f30ad49bSHaiying Wang #define CONFIG_PCI_PNP /* do pci plug-and-play */ 366f30ad49bSHaiying Wang 36767431059SAndy Fleming #undef CONFIG_EEPRO100 36867431059SAndy Fleming #undef CONFIG_TULIP 36967431059SAndy Fleming 37067431059SAndy Fleming #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ 3716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ 37267431059SAndy Fleming 37367431059SAndy Fleming #endif /* CONFIG_PCI */ 37467431059SAndy Fleming 37567431059SAndy Fleming #ifndef CONFIG_NET_MULTI 37667431059SAndy Fleming #define CONFIG_NET_MULTI 1 37767431059SAndy Fleming #endif 37867431059SAndy Fleming 379da9d4610SAndy Fleming #if defined(CONFIG_TSEC_ENET) 380da9d4610SAndy Fleming 38167431059SAndy Fleming #define CONFIG_MII 1 /* MII PHY management */ 382255a3577SKim Phillips #define CONFIG_TSEC1 1 383255a3577SKim Phillips #define CONFIG_TSEC1_NAME "eTSEC0" 384255a3577SKim Phillips #define CONFIG_TSEC2 1 385255a3577SKim Phillips #define CONFIG_TSEC2_NAME "eTSEC1" 38667431059SAndy Fleming 38767431059SAndy Fleming #define TSEC1_PHY_ADDR 2 38867431059SAndy Fleming #define TSEC2_PHY_ADDR 3 38967431059SAndy Fleming 39067431059SAndy Fleming #define TSEC1_PHYIDX 0 39167431059SAndy Fleming #define TSEC2_PHYIDX 0 39267431059SAndy Fleming 3933a79013eSAndy Fleming #define TSEC1_FLAGS TSEC_GIGABIT 3943a79013eSAndy Fleming #define TSEC2_FLAGS TSEC_GIGABIT 3953a79013eSAndy Fleming 396b96c83d4SAndy Fleming /* Options are: eTSEC[0-1] */ 39767431059SAndy Fleming #define CONFIG_ETHPRIME "eTSEC0" 39867431059SAndy Fleming 39967431059SAndy Fleming #endif /* CONFIG_TSEC_ENET */ 40067431059SAndy Fleming 40167431059SAndy Fleming /* 40267431059SAndy Fleming * Environment 40367431059SAndy Fleming */ 4045a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH 1 4056d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000) 4060e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SECT_SIZE 0x40000 /* 256K(one sector) for env */ 4070e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE 0x2000 40867431059SAndy Fleming 40967431059SAndy Fleming #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ 4106d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ 41167431059SAndy Fleming 4122835e518SJon Loeliger 4132835e518SJon Loeliger /* 414079a136cSJon Loeliger * BOOTP options 415079a136cSJon Loeliger */ 416079a136cSJon Loeliger #define CONFIG_BOOTP_BOOTFILESIZE 417079a136cSJon Loeliger #define CONFIG_BOOTP_BOOTPATH 418079a136cSJon Loeliger #define CONFIG_BOOTP_GATEWAY 419079a136cSJon Loeliger #define CONFIG_BOOTP_HOSTNAME 420079a136cSJon Loeliger 421079a136cSJon Loeliger 422079a136cSJon Loeliger /* 4232835e518SJon Loeliger * Command line configuration. 4242835e518SJon Loeliger */ 4252835e518SJon Loeliger #include <config_cmd_default.h> 4262835e518SJon Loeliger 4272835e518SJon Loeliger #define CONFIG_CMD_PING 4282835e518SJon Loeliger #define CONFIG_CMD_I2C 4292835e518SJon Loeliger #define CONFIG_CMD_MII 43082ac8c97SKumar Gala #define CONFIG_CMD_ELF 4311c9aa76bSKumar Gala #define CONFIG_CMD_IRQ 4321c9aa76bSKumar Gala #define CONFIG_CMD_SETEXPR 4332835e518SJon Loeliger 43467431059SAndy Fleming #if defined(CONFIG_PCI) 4352835e518SJon Loeliger #define CONFIG_CMD_PCI 43667431059SAndy Fleming #endif 4372835e518SJon Loeliger 43867431059SAndy Fleming 43967431059SAndy Fleming #undef CONFIG_WATCHDOG /* watchdog disabled */ 44067431059SAndy Fleming 44167431059SAndy Fleming /* 44267431059SAndy Fleming * Miscellaneous configurable options 44367431059SAndy Fleming */ 4446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP /* undef to save memory */ 44522abb2d2SKumar Gala #define CONFIG_CMDLINE_EDITING /* Command-line editing */ 4466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ 4476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ 4482835e518SJon Loeliger #if defined(CONFIG_CMD_KGDB) 4496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ 45067431059SAndy Fleming #else 4516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ 45267431059SAndy Fleming #endif 4536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ 4546d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ 4556d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ 4566d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ 45767431059SAndy Fleming 45867431059SAndy Fleming /* 45967431059SAndy Fleming * For booting Linux, the board info and command line data 46067431059SAndy Fleming * have to be in the first 8 MB of memory, since this is 46167431059SAndy Fleming * the maximum mapped by the Linux kernel during initialization. 46267431059SAndy Fleming */ 4636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ 46467431059SAndy Fleming 46567431059SAndy Fleming /* 46667431059SAndy Fleming * Internal Definitions 46767431059SAndy Fleming * 46867431059SAndy Fleming * Boot Flags 46967431059SAndy Fleming */ 47067431059SAndy Fleming #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ 47167431059SAndy Fleming #define BOOTFLAG_WARM 0x02 /* Software reboot */ 47267431059SAndy Fleming 4732835e518SJon Loeliger #if defined(CONFIG_CMD_KGDB) 47467431059SAndy Fleming #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ 47567431059SAndy Fleming #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ 47667431059SAndy Fleming #endif 47767431059SAndy Fleming 47867431059SAndy Fleming /* 47967431059SAndy Fleming * Environment Configuration 48067431059SAndy Fleming */ 48167431059SAndy Fleming 48267431059SAndy Fleming /* The mac addresses for all ethernet interface */ 483da9d4610SAndy Fleming #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_UEC_ETH) 484da9d4610SAndy Fleming #define CONFIG_HAS_ETH0 48567431059SAndy Fleming #define CONFIG_ETHADDR 00:E0:0C:00:00:FD 48667431059SAndy Fleming #define CONFIG_HAS_ETH1 48767431059SAndy Fleming #define CONFIG_ETH1ADDR 00:E0:0C:00:01:FD 48867431059SAndy Fleming #define CONFIG_HAS_ETH2 48967431059SAndy Fleming #define CONFIG_ETH2ADDR 00:E0:0C:00:02:FD 490da9d4610SAndy Fleming #define CONFIG_HAS_ETH3 491da9d4610SAndy Fleming #define CONFIG_ETH3ADDR 00:E0:0C:00:03:FD 49267431059SAndy Fleming #endif 49367431059SAndy Fleming 49467431059SAndy Fleming #define CONFIG_IPADDR 192.168.1.253 49567431059SAndy Fleming 49667431059SAndy Fleming #define CONFIG_HOSTNAME unknown 49767431059SAndy Fleming #define CONFIG_ROOTPATH /nfsroot 49867431059SAndy Fleming #define CONFIG_BOOTFILE your.uImage 49967431059SAndy Fleming 50067431059SAndy Fleming #define CONFIG_SERVERIP 192.168.1.1 50167431059SAndy Fleming #define CONFIG_GATEWAYIP 192.168.1.1 50267431059SAndy Fleming #define CONFIG_NETMASK 255.255.255.0 50367431059SAndy Fleming 50467431059SAndy Fleming #define CONFIG_LOADADDR 200000 /*default location for tftp and bootm*/ 50567431059SAndy Fleming 50667431059SAndy Fleming #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ 50767431059SAndy Fleming #undef CONFIG_BOOTARGS /* the boot command will set bootargs*/ 50867431059SAndy Fleming 50967431059SAndy Fleming #define CONFIG_BAUDRATE 115200 51067431059SAndy Fleming 51167431059SAndy Fleming #define CONFIG_EXTRA_ENV_SETTINGS \ 51267431059SAndy Fleming "netdev=eth0\0" \ 51367431059SAndy Fleming "consoledev=ttyS0\0" \ 51467431059SAndy Fleming "ramdiskaddr=600000\0" \ 51567431059SAndy Fleming "ramdiskfile=your.ramdisk.u-boot\0" \ 51667431059SAndy Fleming "fdtaddr=400000\0" \ 51767431059SAndy Fleming "fdtfile=your.fdt.dtb\0" \ 51867431059SAndy Fleming "nfsargs=setenv bootargs root=/dev/nfs rw " \ 51967431059SAndy Fleming "nfsroot=$serverip:$rootpath " \ 52067431059SAndy Fleming "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ 52167431059SAndy Fleming "console=$consoledev,$baudrate $othbootargs\0" \ 52267431059SAndy Fleming "ramargs=setenv bootargs root=/dev/ram rw " \ 52367431059SAndy Fleming "console=$consoledev,$baudrate $othbootargs\0" \ 52467431059SAndy Fleming 52567431059SAndy Fleming 52667431059SAndy Fleming #define CONFIG_NFSBOOTCOMMAND \ 52767431059SAndy Fleming "run nfsargs;" \ 52867431059SAndy Fleming "tftp $loadaddr $bootfile;" \ 52967431059SAndy Fleming "tftp $fdtaddr $fdtfile;" \ 53067431059SAndy Fleming "bootm $loadaddr - $fdtaddr" 53167431059SAndy Fleming 53267431059SAndy Fleming 53367431059SAndy Fleming #define CONFIG_RAMBOOTCOMMAND \ 53467431059SAndy Fleming "run ramargs;" \ 53567431059SAndy Fleming "tftp $ramdiskaddr $ramdiskfile;" \ 53667431059SAndy Fleming "tftp $loadaddr $bootfile;" \ 53767431059SAndy Fleming "bootm $loadaddr $ramdiskaddr" 53867431059SAndy Fleming 53967431059SAndy Fleming #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND 54067431059SAndy Fleming 54167431059SAndy Fleming #endif /* __CONFIG_H */ 542