1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 249f5befaSXie Xiaobo /* 349f5befaSXie Xiaobo * Copyright 2013 Freescale Semiconductor, Inc. 449f5befaSXie Xiaobo */ 549f5befaSXie Xiaobo 649f5befaSXie Xiaobo /* 749f5befaSXie Xiaobo * QorIQ P1 Tower boards configuration file 849f5befaSXie Xiaobo */ 949f5befaSXie Xiaobo #ifndef __CONFIG_H 1049f5befaSXie Xiaobo #define __CONFIG_H 1149f5befaSXie Xiaobo 1249f5befaSXie Xiaobo #if defined(CONFIG_TWR_P1025) 1349f5befaSXie Xiaobo #define CONFIG_BOARDNAME "TWR-P1025" 1449f5befaSXie Xiaobo #define CONFIG_PHY_ATHEROS 1549f5befaSXie Xiaobo #define CONFIG_QE 1649f5befaSXie Xiaobo #define CONFIG_SYS_LBC_LBCR 0x00080000 /* Conversion of LBC addr */ 1749f5befaSXie Xiaobo #define CONFIG_SYS_LBC_LCRR 0x80000002 /* LB clock ratio reg */ 1849f5befaSXie Xiaobo #endif 1949f5befaSXie Xiaobo 2049f5befaSXie Xiaobo #ifdef CONFIG_SDCARD 2149f5befaSXie Xiaobo #define CONFIG_RAMBOOT_SDCARD 2249f5befaSXie Xiaobo #define CONFIG_SYS_RAMBOOT 23e222b1f3SPrabhakar Kushwaha #define CONFIG_RESET_VECTOR_ADDRESS 0x110bfffc 2449f5befaSXie Xiaobo #endif 2549f5befaSXie Xiaobo 2649f5befaSXie Xiaobo #ifndef CONFIG_RESET_VECTOR_ADDRESS 2749f5befaSXie Xiaobo #define CONFIG_RESET_VECTOR_ADDRESS 0xeffffffc 2849f5befaSXie Xiaobo #endif 2949f5befaSXie Xiaobo 3049f5befaSXie Xiaobo #ifndef CONFIG_SYS_MONITOR_BASE 3149f5befaSXie Xiaobo #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ 3249f5befaSXie Xiaobo #endif 3349f5befaSXie Xiaobo 34b38eaec5SRobert P. J. Day #define CONFIG_PCIE1 /* PCIE controller 1 (slot 1) */ 35b38eaec5SRobert P. J. Day #define CONFIG_PCIE2 /* PCIE controller 2 (slot 2) */ 3649f5befaSXie Xiaobo #define CONFIG_FSL_PCI_INIT /* Use common FSL init code */ 3749f5befaSXie Xiaobo #define CONFIG_PCI_INDIRECT_BRIDGE /* indirect PCI bridge support */ 3849f5befaSXie Xiaobo #define CONFIG_FSL_PCIE_RESET /* need PCIe reset errata */ 3949f5befaSXie Xiaobo #define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */ 4049f5befaSXie Xiaobo 4149f5befaSXie Xiaobo #define CONFIG_ENV_OVERWRITE 4249f5befaSXie Xiaobo 4349f5befaSXie Xiaobo #define CONFIG_SYS_SATA_MAX_DEVICE 2 4449f5befaSXie Xiaobo #define CONFIG_LBA48 4549f5befaSXie Xiaobo 4649f5befaSXie Xiaobo #ifndef __ASSEMBLY__ 4749f5befaSXie Xiaobo extern unsigned long get_board_sys_clk(unsigned long dummy); 4849f5befaSXie Xiaobo #endif 4949f5befaSXie Xiaobo #define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /*sysclk for TWR-P1025 */ 5049f5befaSXie Xiaobo 5149f5befaSXie Xiaobo #define CONFIG_DDR_CLK_FREQ 66666666 5249f5befaSXie Xiaobo 5349f5befaSXie Xiaobo #define CONFIG_HWCONFIG 5449f5befaSXie Xiaobo /* 5549f5befaSXie Xiaobo * These can be toggled for performance analysis, otherwise use default. 5649f5befaSXie Xiaobo */ 5749f5befaSXie Xiaobo #define CONFIG_L2_CACHE 5849f5befaSXie Xiaobo #define CONFIG_BTB 5949f5befaSXie Xiaobo 6049f5befaSXie Xiaobo #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */ 6149f5befaSXie Xiaobo #define CONFIG_SYS_MEMTEST_END 0x1fffffff 6249f5befaSXie Xiaobo 6349f5befaSXie Xiaobo #define CONFIG_SYS_CCSRBAR 0xffe00000 6449f5befaSXie Xiaobo #define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR 6549f5befaSXie Xiaobo 6649f5befaSXie Xiaobo /* DDR Setup */ 6749f5befaSXie Xiaobo 6849f5befaSXie Xiaobo #define CONFIG_SYS_SDRAM_SIZE_LAW LAW_SIZE_512M 6949f5befaSXie Xiaobo #define CONFIG_CHIP_SELECTS_PER_CTRL 1 7049f5befaSXie Xiaobo 7149f5befaSXie Xiaobo #define CONFIG_SYS_SDRAM_SIZE (1u << (CONFIG_SYS_SDRAM_SIZE_LAW - 19)) 7249f5befaSXie Xiaobo #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 7349f5befaSXie Xiaobo #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE 7449f5befaSXie Xiaobo 7549f5befaSXie Xiaobo #define CONFIG_DIMM_SLOTS_PER_CTLR 1 7649f5befaSXie Xiaobo 7749f5befaSXie Xiaobo /* Default settings for DDR3 */ 7849f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CS0_BNDS 0x0000001f 7949f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CS0_CONFIG 0x80014202 8049f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CS0_CONFIG_2 0x00000000 8149f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CS1_BNDS 0x00000000 8249f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CS1_CONFIG 0x00000000 8349f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CS1_CONFIG_2 0x00000000 8449f5befaSXie Xiaobo 8549f5befaSXie Xiaobo #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef 8649f5befaSXie Xiaobo #define CONFIG_SYS_DDR_INIT_ADDR 0x00000000 8749f5befaSXie Xiaobo #define CONFIG_SYS_DDR_INIT_EXT_ADDR 0x00000000 8849f5befaSXie Xiaobo #define CONFIG_SYS_DDR_MODE_CONTROL 0x00000000 8949f5befaSXie Xiaobo 9049f5befaSXie Xiaobo #define CONFIG_SYS_DDR_ZQ_CONTROL 0x89080600 9149f5befaSXie Xiaobo #define CONFIG_SYS_DDR_WRLVL_CONTROL 0x8655a608 9249f5befaSXie Xiaobo #define CONFIG_SYS_DDR_SR_CNTR 0x00000000 9349f5befaSXie Xiaobo #define CONFIG_SYS_DDR_RCW_1 0x00000000 9449f5befaSXie Xiaobo #define CONFIG_SYS_DDR_RCW_2 0x00000000 9549f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CONTROL 0xc70c0000 /* Type = DDR3 */ 9649f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CONTROL_2 0x04401050 9749f5befaSXie Xiaobo #define CONFIG_SYS_DDR_TIMING_4 0x00220001 9849f5befaSXie Xiaobo #define CONFIG_SYS_DDR_TIMING_5 0x03402400 9949f5befaSXie Xiaobo 10049f5befaSXie Xiaobo #define CONFIG_SYS_DDR_TIMING_3 0x00020000 10149f5befaSXie Xiaobo #define CONFIG_SYS_DDR_TIMING_0 0x00220004 10249f5befaSXie Xiaobo #define CONFIG_SYS_DDR_TIMING_1 0x5c5b6544 10349f5befaSXie Xiaobo #define CONFIG_SYS_DDR_TIMING_2 0x0fa880de 10449f5befaSXie Xiaobo #define CONFIG_SYS_DDR_CLK_CTRL 0x03000000 10549f5befaSXie Xiaobo #define CONFIG_SYS_DDR_MODE_1 0x80461320 10649f5befaSXie Xiaobo #define CONFIG_SYS_DDR_MODE_2 0x00008000 10749f5befaSXie Xiaobo #define CONFIG_SYS_DDR_INTERVAL 0x09480000 10849f5befaSXie Xiaobo 10949f5befaSXie Xiaobo /* 11049f5befaSXie Xiaobo * Memory map 11149f5befaSXie Xiaobo * 11249f5befaSXie Xiaobo * 0x0000_0000 0x1fff_ffff DDR Up to 512MB cacheable 11349f5befaSXie Xiaobo * 0x8000_0000 0xdfff_ffff PCI Express Mem 1.5G non-cacheable(PCIe * 3) 11449f5befaSXie Xiaobo * 0xffc0_0000 0xffc3_ffff PCI IO range 256k non-cacheable 11549f5befaSXie Xiaobo * 11649f5befaSXie Xiaobo * Localbus 11749f5befaSXie Xiaobo * 0xe000_0000 0xe002_0000 SSD1289 128K non-cacheable 11849f5befaSXie Xiaobo * 0xec00_0000 0xefff_ffff FLASH Up to 64M non-cacheable 11949f5befaSXie Xiaobo * 12049f5befaSXie Xiaobo * 0xff90_0000 0xff97_ffff L2 SRAM Up to 512K cacheable 12149f5befaSXie Xiaobo * 0xffd0_0000 0xffd0_3fff init ram 16K Cacheable 12249f5befaSXie Xiaobo * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable 12349f5befaSXie Xiaobo */ 12449f5befaSXie Xiaobo 12549f5befaSXie Xiaobo /* 12649f5befaSXie Xiaobo * Local Bus Definitions 12749f5befaSXie Xiaobo */ 12849f5befaSXie Xiaobo #define CONFIG_SYS_MAX_FLASH_SECT 512 /* 64M */ 12949f5befaSXie Xiaobo #define CONFIG_SYS_FLASH_BASE 0xec000000 13049f5befaSXie Xiaobo 13149f5befaSXie Xiaobo #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE 13249f5befaSXie Xiaobo 13349f5befaSXie Xiaobo #define CONFIG_FLASH_BR_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_FLASH_BASE_PHYS)) \ 13449f5befaSXie Xiaobo | BR_PS_16 | BR_V) 13549f5befaSXie Xiaobo 13649f5befaSXie Xiaobo #define CONFIG_FLASH_OR_PRELIM 0xfc0000b1 13749f5befaSXie Xiaobo 13849f5befaSXie Xiaobo #define CONFIG_SYS_SSD_BASE 0xe0000000 13949f5befaSXie Xiaobo #define CONFIG_SYS_SSD_BASE_PHYS CONFIG_SYS_SSD_BASE 14049f5befaSXie Xiaobo #define CONFIG_SSD_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_SSD_BASE_PHYS) | \ 14149f5befaSXie Xiaobo BR_PS_16 | BR_V) 14249f5befaSXie Xiaobo #define CONFIG_SSD_OR_PRELIM (OR_AM_64KB | OR_GPCM_CSNT | OR_GPCM_XACS | \ 14349f5befaSXie Xiaobo OR_GPCM_ACS_DIV2 | OR_GPCM_SCY | \ 14449f5befaSXie Xiaobo OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD) 14549f5befaSXie Xiaobo 14649f5befaSXie Xiaobo #define CONFIG_SYS_BR2_PRELIM CONFIG_SSD_BR_PRELIM 14749f5befaSXie Xiaobo #define CONFIG_SYS_OR2_PRELIM CONFIG_SSD_OR_PRELIM 14849f5befaSXie Xiaobo 14949f5befaSXie Xiaobo #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS} 15049f5befaSXie Xiaobo #define CONFIG_SYS_FLASH_QUIET_TEST 15149f5befaSXie Xiaobo #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ 15249f5befaSXie Xiaobo 15349f5befaSXie Xiaobo #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ 15449f5befaSXie Xiaobo 15549f5befaSXie Xiaobo #undef CONFIG_SYS_FLASH_CHECKSUM 15649f5befaSXie Xiaobo #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ 15749f5befaSXie Xiaobo #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ 15849f5befaSXie Xiaobo 15949f5befaSXie Xiaobo #define CONFIG_SYS_FLASH_EMPTY_INFO 16049f5befaSXie Xiaobo 16149f5befaSXie Xiaobo #define CONFIG_SYS_INIT_RAM_LOCK 16249f5befaSXie Xiaobo #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 16349f5befaSXie Xiaobo /* Initial L1 address */ 16449f5befaSXie Xiaobo #define CONFIG_SYS_INIT_RAM_ADDR_PHYS CONFIG_SYS_INIT_RAM_ADDR 16549f5befaSXie Xiaobo #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0 16649f5befaSXie Xiaobo #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS 16749f5befaSXie Xiaobo /* Size of used area in RAM */ 16849f5befaSXie Xiaobo #define CONFIG_SYS_INIT_RAM_SIZE 0x00004000 16949f5befaSXie Xiaobo 17049f5befaSXie Xiaobo #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ 17149f5befaSXie Xiaobo GENERATED_GBL_DATA_SIZE) 17249f5befaSXie Xiaobo #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET 17349f5befaSXie Xiaobo 1749307cbabSPrabhakar Kushwaha #define CONFIG_SYS_MONITOR_LEN (768 * 1024) 17549f5befaSXie Xiaobo #define CONFIG_SYS_MALLOC_LEN (1024 * 1024)/* Reserved for malloc */ 17649f5befaSXie Xiaobo 17749f5befaSXie Xiaobo #define CONFIG_SYS_BR0_PRELIM CONFIG_FLASH_BR_PRELIM /* NOR Base Address */ 17849f5befaSXie Xiaobo #define CONFIG_SYS_OR0_PRELIM CONFIG_FLASH_OR_PRELIM /* NOR Options */ 17949f5befaSXie Xiaobo 18049f5befaSXie Xiaobo /* Serial Port 18149f5befaSXie Xiaobo * open - index 2 18249f5befaSXie Xiaobo * shorted - index 1 18349f5befaSXie Xiaobo */ 18449f5befaSXie Xiaobo #undef CONFIG_SERIAL_SOFTWARE_FIFO 18549f5befaSXie Xiaobo #define CONFIG_SYS_NS16550_SERIAL 18649f5befaSXie Xiaobo #define CONFIG_SYS_NS16550_REG_SIZE 1 18749f5befaSXie Xiaobo #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) 18849f5befaSXie Xiaobo 18949f5befaSXie Xiaobo #define CONFIG_SYS_BAUDRATE_TABLE \ 19049f5befaSXie Xiaobo {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} 19149f5befaSXie Xiaobo 19249f5befaSXie Xiaobo #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) 19349f5befaSXie Xiaobo #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) 19449f5befaSXie Xiaobo 19549f5befaSXie Xiaobo /* I2C */ 19649f5befaSXie Xiaobo #define CONFIG_SYS_I2C 19749f5befaSXie Xiaobo #define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */ 19849f5befaSXie Xiaobo #define CONFIG_SYS_FSL_I2C_SPEED 400000 /* I2C spd and slave address */ 19949f5befaSXie Xiaobo #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F 20049f5befaSXie Xiaobo #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 20149f5befaSXie Xiaobo #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 20249f5befaSXie Xiaobo 20349f5befaSXie Xiaobo /* 20449f5befaSXie Xiaobo * I2C2 EEPROM 20549f5befaSXie Xiaobo */ 20649f5befaSXie Xiaobo #define CONFIG_SYS_FSL_I2C2_SPEED 400000 /* I2C spd and slave address */ 20749f5befaSXie Xiaobo #define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F 20849f5befaSXie Xiaobo #define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 20949f5befaSXie Xiaobo 21049f5befaSXie Xiaobo #define CONFIG_SYS_I2C_PCA9555_ADDR 0x23 21149f5befaSXie Xiaobo 21249f5befaSXie Xiaobo /* enable read and write access to EEPROM */ 21349f5befaSXie Xiaobo #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 21449f5befaSXie Xiaobo #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 21549f5befaSXie Xiaobo #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 21649f5befaSXie Xiaobo 21749f5befaSXie Xiaobo #if defined(CONFIG_PCI) 21849f5befaSXie Xiaobo /* 21949f5befaSXie Xiaobo * General PCI 22049f5befaSXie Xiaobo * Memory space is mapped 1-1, but I/O space must start from 0. 22149f5befaSXie Xiaobo */ 22249f5befaSXie Xiaobo 22349f5befaSXie Xiaobo /* controller 2, direct to uli, tgtid 2, Base address 9000 */ 22449f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_NAME "TWR-ELEV PCIe SLOT" 22549f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000 22649f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000 22749f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000 22849f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */ 22949f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc10000 23049f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000 23149f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc10000 23249f5befaSXie Xiaobo #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */ 23349f5befaSXie Xiaobo 23449f5befaSXie Xiaobo /* controller 1, tgtid 1, Base address a000 */ 23549f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_NAME "mini PCIe SLOT" 23649f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_MEM_VIRT 0x80000000 23749f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_MEM_BUS 0x80000000 23849f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_MEM_PHYS 0x80000000 23949f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ 24049f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc00000 24149f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 24249f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc00000 24349f5befaSXie Xiaobo #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */ 24449f5befaSXie Xiaobo 24549f5befaSXie Xiaobo #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ 24649f5befaSXie Xiaobo #endif /* CONFIG_PCI */ 24749f5befaSXie Xiaobo 24849f5befaSXie Xiaobo #if defined(CONFIG_TSEC_ENET) 24949f5befaSXie Xiaobo 25049f5befaSXie Xiaobo #define CONFIG_TSEC1 25149f5befaSXie Xiaobo #define CONFIG_TSEC1_NAME "eTSEC1" 25249f5befaSXie Xiaobo #undef CONFIG_TSEC2 25349f5befaSXie Xiaobo #undef CONFIG_TSEC2_NAME 25449f5befaSXie Xiaobo #define CONFIG_TSEC3 25549f5befaSXie Xiaobo #define CONFIG_TSEC3_NAME "eTSEC3" 25649f5befaSXie Xiaobo 25749f5befaSXie Xiaobo #define TSEC1_PHY_ADDR 2 25849f5befaSXie Xiaobo #define TSEC2_PHY_ADDR 0 25949f5befaSXie Xiaobo #define TSEC3_PHY_ADDR 1 26049f5befaSXie Xiaobo 26149f5befaSXie Xiaobo #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) 26249f5befaSXie Xiaobo #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) 26349f5befaSXie Xiaobo #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) 26449f5befaSXie Xiaobo 26549f5befaSXie Xiaobo #define TSEC1_PHYIDX 0 26649f5befaSXie Xiaobo #define TSEC2_PHYIDX 0 26749f5befaSXie Xiaobo #define TSEC3_PHYIDX 0 26849f5befaSXie Xiaobo 26949f5befaSXie Xiaobo #define CONFIG_ETHPRIME "eTSEC1" 27049f5befaSXie Xiaobo 27149f5befaSXie Xiaobo #define CONFIG_HAS_ETH0 27249f5befaSXie Xiaobo #define CONFIG_HAS_ETH1 27349f5befaSXie Xiaobo #undef CONFIG_HAS_ETH2 27449f5befaSXie Xiaobo #endif /* CONFIG_TSEC_ENET */ 27549f5befaSXie Xiaobo 27649f5befaSXie Xiaobo #ifdef CONFIG_QE 27749f5befaSXie Xiaobo /* QE microcode/firmware address */ 27849f5befaSXie Xiaobo #define CONFIG_SYS_QE_FMAN_FW_IN_NOR 279dcf1d774SZhao Qiang #define CONFIG_SYS_QE_FW_ADDR 0xefec0000 28049f5befaSXie Xiaobo #define CONFIG_SYS_QE_FMAN_FW_LENGTH 0x10000 28149f5befaSXie Xiaobo #endif /* CONFIG_QE */ 28249f5befaSXie Xiaobo 28349f5befaSXie Xiaobo #ifdef CONFIG_TWR_P1025 28449f5befaSXie Xiaobo /* 28549f5befaSXie Xiaobo * QE UEC ethernet configuration 28649f5befaSXie Xiaobo */ 28749f5befaSXie Xiaobo #define CONFIG_MIIM_ADDRESS (CONFIG_SYS_CCSRBAR + 0x82120) 28849f5befaSXie Xiaobo 28949f5befaSXie Xiaobo #undef CONFIG_UEC_ETH 29049f5befaSXie Xiaobo #define CONFIG_PHY_MODE_NEED_CHANGE 29149f5befaSXie Xiaobo 29249f5befaSXie Xiaobo #define CONFIG_UEC_ETH1 /* ETH1 */ 29349f5befaSXie Xiaobo #define CONFIG_HAS_ETH0 29449f5befaSXie Xiaobo 29549f5befaSXie Xiaobo #ifdef CONFIG_UEC_ETH1 29649f5befaSXie Xiaobo #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ 29749f5befaSXie Xiaobo #define CONFIG_SYS_UEC1_RX_CLK QE_CLK12 /* CLK12 for MII */ 29849f5befaSXie Xiaobo #define CONFIG_SYS_UEC1_TX_CLK QE_CLK9 /* CLK9 for MII */ 29949f5befaSXie Xiaobo #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH 30049f5befaSXie Xiaobo #define CONFIG_SYS_UEC1_PHY_ADDR 0x18 /* 0x18 for MII */ 30149f5befaSXie Xiaobo #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_MII 30249f5befaSXie Xiaobo #define CONFIG_SYS_UEC1_INTERFACE_SPEED 100 30349f5befaSXie Xiaobo #endif /* CONFIG_UEC_ETH1 */ 30449f5befaSXie Xiaobo 30549f5befaSXie Xiaobo #define CONFIG_UEC_ETH5 /* ETH5 */ 30649f5befaSXie Xiaobo #define CONFIG_HAS_ETH1 30749f5befaSXie Xiaobo 30849f5befaSXie Xiaobo #ifdef CONFIG_UEC_ETH5 30949f5befaSXie Xiaobo #define CONFIG_SYS_UEC5_UCC_NUM 4 /* UCC5 */ 31049f5befaSXie Xiaobo #define CONFIG_SYS_UEC5_RX_CLK QE_CLK_NONE 31149f5befaSXie Xiaobo #define CONFIG_SYS_UEC5_TX_CLK QE_CLK13 /* CLK 13 for RMII */ 31249f5befaSXie Xiaobo #define CONFIG_SYS_UEC5_ETH_TYPE FAST_ETH 31349f5befaSXie Xiaobo #define CONFIG_SYS_UEC5_PHY_ADDR 0x19 /* 0x19 for RMII */ 31449f5befaSXie Xiaobo #define CONFIG_SYS_UEC5_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII 31549f5befaSXie Xiaobo #define CONFIG_SYS_UEC5_INTERFACE_SPEED 100 31649f5befaSXie Xiaobo #endif /* CONFIG_UEC_ETH5 */ 31749f5befaSXie Xiaobo #endif /* CONFIG_TWR-P1025 */ 31849f5befaSXie Xiaobo 31949f5befaSXie Xiaobo /* 32094b383e7SYangbo Lu * Dynamic MTD Partition support with mtdparts 32194b383e7SYangbo Lu */ 32294b383e7SYangbo Lu 32394b383e7SYangbo Lu /* 32449f5befaSXie Xiaobo * Environment 32549f5befaSXie Xiaobo */ 32649f5befaSXie Xiaobo #ifdef CONFIG_SYS_RAMBOOT 32749f5befaSXie Xiaobo #ifdef CONFIG_RAMBOOT_SDCARD 32849f5befaSXie Xiaobo #define CONFIG_ENV_SIZE 0x2000 32949f5befaSXie Xiaobo #define CONFIG_SYS_MMC_ENV_DEV 0 33049f5befaSXie Xiaobo #else 33149f5befaSXie Xiaobo #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) 33249f5befaSXie Xiaobo #define CONFIG_ENV_SIZE 0x2000 33349f5befaSXie Xiaobo #endif 33449f5befaSXie Xiaobo #else 33549f5befaSXie Xiaobo #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) 33649f5befaSXie Xiaobo #define CONFIG_ENV_SIZE 0x2000 33749f5befaSXie Xiaobo #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ 33849f5befaSXie Xiaobo #endif 33949f5befaSXie Xiaobo 34049f5befaSXie Xiaobo #define CONFIG_LOADS_ECHO /* echo on for serial download */ 34149f5befaSXie Xiaobo #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ 34249f5befaSXie Xiaobo 34349f5befaSXie Xiaobo /* 34449f5befaSXie Xiaobo * USB 34549f5befaSXie Xiaobo */ 34649f5befaSXie Xiaobo #define CONFIG_HAS_FSL_DR_USB 34749f5befaSXie Xiaobo 34849f5befaSXie Xiaobo #if defined(CONFIG_HAS_FSL_DR_USB) 3498850c5d5STom Rini #ifdef CONFIG_USB_EHCI_HCD 35049f5befaSXie Xiaobo #define CONFIG_EHCI_HCD_INIT_AFTER_RESET 35149f5befaSXie Xiaobo #define CONFIG_USB_EHCI_FSL 35249f5befaSXie Xiaobo #endif 35349f5befaSXie Xiaobo #endif 35449f5befaSXie Xiaobo 35549f5befaSXie Xiaobo #ifdef CONFIG_MMC 35649f5befaSXie Xiaobo #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR 35749f5befaSXie Xiaobo #endif 35849f5befaSXie Xiaobo 35949f5befaSXie Xiaobo #undef CONFIG_WATCHDOG /* watchdog disabled */ 36049f5befaSXie Xiaobo 36149f5befaSXie Xiaobo /* 36249f5befaSXie Xiaobo * Miscellaneous configurable options 36349f5befaSXie Xiaobo */ 36449f5befaSXie Xiaobo #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ 36549f5befaSXie Xiaobo 36649f5befaSXie Xiaobo /* 36749f5befaSXie Xiaobo * For booting Linux, the board info and command line data 36849f5befaSXie Xiaobo * have to be in the first 64 MB of memory, since this is 36949f5befaSXie Xiaobo * the maximum mapped by the Linux kernel during initialization. 37049f5befaSXie Xiaobo */ 37149f5befaSXie Xiaobo #define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory for Linux*/ 37249f5befaSXie Xiaobo #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ 37349f5befaSXie Xiaobo 37449f5befaSXie Xiaobo /* 37549f5befaSXie Xiaobo * Environment Configuration 37649f5befaSXie Xiaobo */ 3775bc0543dSMario Six #define CONFIG_HOSTNAME "unknown" 37849f5befaSXie Xiaobo #define CONFIG_ROOTPATH "/opt/nfsroot" 37949f5befaSXie Xiaobo #define CONFIG_BOOTFILE "uImage" 38049f5befaSXie Xiaobo #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ 38149f5befaSXie Xiaobo 38249f5befaSXie Xiaobo /* default location for tftp and bootm */ 38349f5befaSXie Xiaobo #define CONFIG_LOADADDR 1000000 38449f5befaSXie Xiaobo 38549f5befaSXie Xiaobo #define CONFIG_EXTRA_ENV_SETTINGS \ 38649f5befaSXie Xiaobo "netdev=eth0\0" \ 38749f5befaSXie Xiaobo "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \ 38849f5befaSXie Xiaobo "loadaddr=1000000\0" \ 38949f5befaSXie Xiaobo "bootfile=uImage\0" \ 39049f5befaSXie Xiaobo "dtbfile=twr-p1025twr.dtb\0" \ 39149f5befaSXie Xiaobo "ramdiskfile=rootfs.ext2.gz.uboot\0" \ 39249f5befaSXie Xiaobo "qefirmwarefile=fsl_qe_ucode_1021_10_A.bin\0" \ 39349f5befaSXie Xiaobo "tftpflash=tftpboot $loadaddr $uboot; " \ 39449f5befaSXie Xiaobo "protect off " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \ 39549f5befaSXie Xiaobo "erase " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \ 39649f5befaSXie Xiaobo "cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize; " \ 39749f5befaSXie Xiaobo "protect on " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \ 39849f5befaSXie Xiaobo "cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize\0" \ 39949f5befaSXie Xiaobo "kernelflash=tftpboot $loadaddr $bootfile; " \ 40049f5befaSXie Xiaobo "protect off 0xefa80000 +$filesize; " \ 40149f5befaSXie Xiaobo "erase 0xefa80000 +$filesize; " \ 40249f5befaSXie Xiaobo "cp.b $loadaddr 0xefa80000 $filesize; " \ 40349f5befaSXie Xiaobo "protect on 0xefa80000 +$filesize; " \ 40449f5befaSXie Xiaobo "cmp.b $loadaddr 0xefa80000 $filesize\0" \ 40549f5befaSXie Xiaobo "dtbflash=tftpboot $loadaddr $dtbfile; " \ 40649f5befaSXie Xiaobo "protect off 0xefe80000 +$filesize; " \ 40749f5befaSXie Xiaobo "erase 0xefe80000 +$filesize; " \ 40849f5befaSXie Xiaobo "cp.b $loadaddr 0xefe80000 $filesize; " \ 40949f5befaSXie Xiaobo "protect on 0xefe80000 +$filesize; " \ 41049f5befaSXie Xiaobo "cmp.b $loadaddr 0xefe80000 $filesize\0" \ 41149f5befaSXie Xiaobo "ramdiskflash=tftpboot $loadaddr $ramdiskfile; " \ 41249f5befaSXie Xiaobo "protect off 0xeeb80000 +$filesize; " \ 41349f5befaSXie Xiaobo "erase 0xeeb80000 +$filesize; " \ 41449f5befaSXie Xiaobo "cp.b $loadaddr 0xeeb80000 $filesize; " \ 41549f5befaSXie Xiaobo "protect on 0xeeb80000 +$filesize; " \ 41649f5befaSXie Xiaobo "cmp.b $loadaddr 0xeeb80000 $filesize\0" \ 41749f5befaSXie Xiaobo "qefirmwareflash=tftpboot $loadaddr $qefirmwarefile; " \ 41849f5befaSXie Xiaobo "protect off 0xefec0000 +$filesize; " \ 41949f5befaSXie Xiaobo "erase 0xefec0000 +$filesize; " \ 42049f5befaSXie Xiaobo "cp.b $loadaddr 0xefec0000 $filesize; " \ 42149f5befaSXie Xiaobo "protect on 0xefec0000 +$filesize; " \ 42249f5befaSXie Xiaobo "cmp.b $loadaddr 0xefec0000 $filesize\0" \ 42349f5befaSXie Xiaobo "consoledev=ttyS0\0" \ 42449f5befaSXie Xiaobo "ramdiskaddr=2000000\0" \ 42549f5befaSXie Xiaobo "ramdiskfile=rootfs.ext2.gz.uboot\0" \ 426b24a4f62SScott Wood "fdtaddr=1e00000\0" \ 42749f5befaSXie Xiaobo "bdev=sda1\0" \ 42849f5befaSXie Xiaobo "norbootaddr=ef080000\0" \ 42949f5befaSXie Xiaobo "norfdtaddr=ef040000\0" \ 43049f5befaSXie Xiaobo "ramdisk_size=120000\0" \ 43149f5befaSXie Xiaobo "usbboot=setenv bootargs root=/dev/sda1 rw rootdelay=5 " \ 43249f5befaSXie Xiaobo "console=$consoledev,$baudrate $othbootargs ; bootm 0xefa80000 - 0xefe80000" 43349f5befaSXie Xiaobo 43449f5befaSXie Xiaobo #define CONFIG_NFSBOOTCOMMAND \ 43549f5befaSXie Xiaobo "setenv bootargs root=/dev/nfs rw " \ 43649f5befaSXie Xiaobo "nfsroot=$serverip:$rootpath " \ 43749f5befaSXie Xiaobo "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ 43849f5befaSXie Xiaobo "console=$consoledev,$baudrate $othbootargs;" \ 43949f5befaSXie Xiaobo "tftp $loadaddr $bootfile&&" \ 44049f5befaSXie Xiaobo "tftp $fdtaddr $fdtfile&&" \ 44149f5befaSXie Xiaobo "bootm $loadaddr - $fdtaddr" 44249f5befaSXie Xiaobo 44349f5befaSXie Xiaobo #define CONFIG_HDBOOT \ 44449f5befaSXie Xiaobo "setenv bootargs root=/dev/$bdev rw rootdelay=30 " \ 44549f5befaSXie Xiaobo "console=$consoledev,$baudrate $othbootargs;" \ 44649f5befaSXie Xiaobo "usb start;" \ 44749f5befaSXie Xiaobo "ext2load usb 0:1 $loadaddr /boot/$bootfile;" \ 44849f5befaSXie Xiaobo "ext2load usb 0:1 $fdtaddr /boot/$fdtfile;" \ 44949f5befaSXie Xiaobo "bootm $loadaddr - $fdtaddr" 45049f5befaSXie Xiaobo 45149f5befaSXie Xiaobo #define CONFIG_USB_FAT_BOOT \ 45249f5befaSXie Xiaobo "setenv bootargs root=/dev/ram rw " \ 45349f5befaSXie Xiaobo "console=$consoledev,$baudrate $othbootargs " \ 45449f5befaSXie Xiaobo "ramdisk_size=$ramdisk_size;" \ 45549f5befaSXie Xiaobo "usb start;" \ 45649f5befaSXie Xiaobo "fatload usb 0:2 $loadaddr $bootfile;" \ 45749f5befaSXie Xiaobo "fatload usb 0:2 $fdtaddr $fdtfile;" \ 45849f5befaSXie Xiaobo "fatload usb 0:2 $ramdiskaddr $ramdiskfile;" \ 45949f5befaSXie Xiaobo "bootm $loadaddr $ramdiskaddr $fdtaddr" 46049f5befaSXie Xiaobo 46149f5befaSXie Xiaobo #define CONFIG_USB_EXT2_BOOT \ 46249f5befaSXie Xiaobo "setenv bootargs root=/dev/ram rw " \ 46349f5befaSXie Xiaobo "console=$consoledev,$baudrate $othbootargs " \ 46449f5befaSXie Xiaobo "ramdisk_size=$ramdisk_size;" \ 46549f5befaSXie Xiaobo "usb start;" \ 46649f5befaSXie Xiaobo "ext2load usb 0:4 $loadaddr $bootfile;" \ 46749f5befaSXie Xiaobo "ext2load usb 0:4 $fdtaddr $fdtfile;" \ 46849f5befaSXie Xiaobo "ext2load usb 0:4 $ramdiskaddr $ramdiskfile;" \ 46949f5befaSXie Xiaobo "bootm $loadaddr $ramdiskaddr $fdtaddr" 47049f5befaSXie Xiaobo 47149f5befaSXie Xiaobo #define CONFIG_NORBOOT \ 47249f5befaSXie Xiaobo "setenv bootargs root=/dev/mtdblock3 rw " \ 47349f5befaSXie Xiaobo "console=$consoledev,$baudrate rootfstype=jffs2 $othbootargs;" \ 47449f5befaSXie Xiaobo "bootm $norbootaddr - $norfdtaddr" 47549f5befaSXie Xiaobo 47649f5befaSXie Xiaobo #define CONFIG_RAMBOOTCOMMAND_TFTP \ 47749f5befaSXie Xiaobo "setenv bootargs root=/dev/ram rw " \ 47849f5befaSXie Xiaobo "console=$consoledev,$baudrate $othbootargs " \ 47949f5befaSXie Xiaobo "ramdisk_size=$ramdisk_size;" \ 48049f5befaSXie Xiaobo "tftp $ramdiskaddr $ramdiskfile;" \ 48149f5befaSXie Xiaobo "tftp $loadaddr $bootfile;" \ 48249f5befaSXie Xiaobo "tftp $fdtaddr $fdtfile;" \ 48349f5befaSXie Xiaobo "bootm $loadaddr $ramdiskaddr $fdtaddr" 48449f5befaSXie Xiaobo 48549f5befaSXie Xiaobo #define CONFIG_RAMBOOTCOMMAND \ 48649f5befaSXie Xiaobo "setenv bootargs root=/dev/ram rw " \ 48749f5befaSXie Xiaobo "console=$consoledev,$baudrate $othbootargs " \ 48849f5befaSXie Xiaobo "ramdisk_size=$ramdisk_size;" \ 48949f5befaSXie Xiaobo "bootm 0xefa80000 0xeeb80000 0xefe80000" 49049f5befaSXie Xiaobo 49149f5befaSXie Xiaobo #define CONFIG_BOOTCOMMAND CONFIG_RAMBOOTCOMMAND 49249f5befaSXie Xiaobo 49349f5befaSXie Xiaobo #endif /* __CONFIG_H */ 494