Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2006 Freescale Semiconductor, Inc. |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __CONFIG_H |
| 7 | #define __CONFIG_H |
| 8 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 9 | /* |
| 10 | * High Level Configuration Options |
| 11 | */ |
| 12 | #define CONFIG_E300 1 /* E300 family */ |
| 13 | #define CONFIG_QE 1 /* Has QE */ |
Wolfgang Denk | 291ba1b | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 14 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 15 | /* |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 16 | * System IO Config |
| 17 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 18 | #define CONFIG_SYS_SICRL 0x00000000 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 19 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 20 | /* |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 21 | * DDR Setup |
| 22 | */ |
Mario Six | c9f9277 | 2019-01-21 09:18:15 +0100 | [diff] [blame^] | 23 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* DDR is system memory */ |
| 24 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_SDRAM_BASE |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 25 | #define CONFIG_SYS_DDRCDR 0x73000002 /* DDR II voltage is 1.8V */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 26 | |
| 27 | #undef CONFIG_SPD_EEPROM |
| 28 | #if defined(CONFIG_SPD_EEPROM) |
| 29 | /* Determine DDR configuration from I2C interface |
| 30 | */ |
| 31 | #define SPD_EEPROM_ADDRESS 0x51 /* DDR SODIMM */ |
| 32 | #else |
| 33 | /* Manually set up DDR parameters |
| 34 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 35 | #define CONFIG_SYS_DDR_SIZE 128 /* MB */ |
Joe Hershberger | cc03b80 | 2011-10-11 23:57:29 -0500 | [diff] [blame] | 36 | #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN \ |
| 37 | | CSCONFIG_AP \ |
| 38 | | CSCONFIG_ODT_WR_CFG \ |
| 39 | | CSCONFIG_ROW_BIT_13 \ |
| 40 | | CSCONFIG_COL_BIT_10) |
| 41 | /* 0x80840102 */ |
| 42 | #define CONFIG_SYS_DDR_TIMING_0 ((0 << TIMING_CFG0_RWT_SHIFT) \ |
| 43 | | (0 << TIMING_CFG0_WRT_SHIFT) \ |
| 44 | | (0 << TIMING_CFG0_RRT_SHIFT) \ |
| 45 | | (0 << TIMING_CFG0_WWT_SHIFT) \ |
| 46 | | (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) \ |
| 47 | | (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) \ |
| 48 | | (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) \ |
| 49 | | (2 << TIMING_CFG0_MRS_CYC_SHIFT)) |
| 50 | /* 0x00220802 */ |
| 51 | #define CONFIG_SYS_DDR_TIMING_1 ((3 << TIMING_CFG1_PRETOACT_SHIFT) \ |
| 52 | | (9 << TIMING_CFG1_ACTTOPRE_SHIFT) \ |
| 53 | | (3 << TIMING_CFG1_ACTTORW_SHIFT) \ |
| 54 | | (5 << TIMING_CFG1_CASLAT_SHIFT) \ |
| 55 | | (13 << TIMING_CFG1_REFREC_SHIFT) \ |
| 56 | | (3 << TIMING_CFG1_WRREC_SHIFT) \ |
| 57 | | (2 << TIMING_CFG1_ACTTOACT_SHIFT) \ |
| 58 | | (2 << TIMING_CFG1_WRTORD_SHIFT)) |
| 59 | /* 0x3935D322 */ |
| 60 | #define CONFIG_SYS_DDR_TIMING_2 ((0 << TIMING_CFG2_ADD_LAT_SHIFT) \ |
| 61 | | (31 << TIMING_CFG2_CPO_SHIFT) \ |
| 62 | | (2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) \ |
| 63 | | (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) \ |
| 64 | | (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) \ |
| 65 | | (3 << TIMING_CFG2_CKE_PLS_SHIFT) \ |
| 66 | | (10 << TIMING_CFG2_FOUR_ACT_SHIFT)) |
| 67 | /* 0x0F9048CA */ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 68 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 |
Joe Hershberger | cc03b80 | 2011-10-11 23:57:29 -0500 | [diff] [blame] | 69 | #define CONFIG_SYS_DDR_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 |
| 70 | /* 0x02000000 */ |
| 71 | #define CONFIG_SYS_DDR_MODE ((0x4440 << SDRAM_MODE_ESD_SHIFT) \ |
| 72 | | (0x0232 << SDRAM_MODE_SD_SHIFT)) |
| 73 | /* 0x44400232 */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 74 | #define CONFIG_SYS_DDR_MODE2 0x8000c000 |
Joe Hershberger | cc03b80 | 2011-10-11 23:57:29 -0500 | [diff] [blame] | 75 | #define CONFIG_SYS_DDR_INTERVAL ((800 << SDRAM_INTERVAL_REFINT_SHIFT) \ |
| 76 | | (100 << SDRAM_INTERVAL_BSTOPRE_SHIFT)) |
| 77 | /* 0x03200064 */ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 78 | #define CONFIG_SYS_DDR_CS0_BNDS 0x00000007 |
Joe Hershberger | cc03b80 | 2011-10-11 23:57:29 -0500 | [diff] [blame] | 79 | #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SREN \ |
| 80 | | SDRAM_CFG_SDRAM_TYPE_DDR2 \ |
| 81 | | SDRAM_CFG_32_BE) |
| 82 | /* 0x43080000 */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 83 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 84 | #endif |
| 85 | |
| 86 | /* |
| 87 | * Memory test |
| 88 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 89 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ |
| 90 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */ |
| 91 | #define CONFIG_SYS_MEMTEST_END 0x00100000 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 92 | |
| 93 | /* |
| 94 | * The reserved memory |
| 95 | */ |
Wolfgang Denk | 0708bc6 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 96 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 97 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 98 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) |
| 99 | #define CONFIG_SYS_RAMBOOT |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 100 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 101 | #undef CONFIG_SYS_RAMBOOT |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 102 | #endif |
| 103 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 104 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ |
Kevin Hao | 349a015 | 2016-07-08 11:25:14 +0800 | [diff] [blame] | 105 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon */ |
Timur Tabi | fc5e879 | 2012-03-17 17:44:00 -0500 | [diff] [blame] | 106 | #define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Reserved for malloc */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 107 | |
| 108 | /* |
| 109 | * Initial RAM Base Address Setup |
| 110 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 111 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 112 | #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM addr */ |
| 113 | #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM */ |
| 114 | #define CONFIG_SYS_GBL_DATA_OFFSET \ |
| 115 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 116 | |
| 117 | /* |
| 118 | * Local Bus Configuration & Clock Setup |
| 119 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 120 | #define CONFIG_SYS_LBC_LBCR 0x00000000 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 121 | |
| 122 | /* |
| 123 | * FLASH on the Local Bus |
| 124 | */ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 125 | #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* FLASH base address */ |
| 126 | #define CONFIG_SYS_FLASH_SIZE 16 /* FLASH size is 16M */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 127 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 128 | |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 129 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
| 130 | #define CONFIG_SYS_MAX_FLASH_SECT 128 /* sectors per device */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 131 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 132 | #undef CONFIG_SYS_FLASH_CHECKSUM |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 133 | |
| 134 | /* |
| 135 | * BCSR on the Local Bus |
| 136 | */ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 137 | #define CONFIG_SYS_BCSR 0xF8000000 |
| 138 | /* Access window base at BCSR base */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 139 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 140 | |
| 141 | /* |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 142 | * Windows to access PIB via local bus |
| 143 | */ |
Joe Hershberger | f05b933 | 2011-10-11 23:57:30 -0500 | [diff] [blame] | 144 | /* PIB window base 0xF8008000 */ |
| 145 | #define CONFIG_SYS_PIB_BASE 0xF8008000 |
| 146 | #define CONFIG_SYS_PIB_WINDOW_SIZE (32 * 1024) |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 147 | |
| 148 | /* |
| 149 | * CS2 on Local Bus, to PIB |
| 150 | */ |
Mario Six | c1e29d9 | 2019-01-21 09:18:01 +0100 | [diff] [blame] | 151 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 152 | |
| 153 | /* |
| 154 | * CS3 on Local Bus, to PIB |
| 155 | */ |
Mario Six | c1e29d9 | 2019-01-21 09:18:01 +0100 | [diff] [blame] | 156 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 157 | |
| 158 | /* |
| 159 | * Serial Port |
| 160 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 161 | #define CONFIG_SYS_NS16550_SERIAL |
| 162 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
| 163 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 164 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 165 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 166 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 167 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 168 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) |
| 169 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 170 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 171 | /* I2C */ |
Heiko Schocher | f285074 | 2012-10-24 13:48:22 +0200 | [diff] [blame] | 172 | #define CONFIG_SYS_I2C |
| 173 | #define CONFIG_SYS_I2C_FSL |
| 174 | #define CONFIG_SYS_FSL_I2C_SPEED 400000 |
| 175 | #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F |
| 176 | #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 |
| 177 | #define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} } |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 178 | |
| 179 | /* |
| 180 | * Config on-board RTC |
| 181 | */ |
| 182 | #define CONFIG_RTC_DS1374 /* use ds1374 rtc via i2c */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 183 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 184 | |
| 185 | /* |
| 186 | * General PCI |
| 187 | * Addresses are mapped 1-1. |
| 188 | */ |
Kim Phillips | 57a2af3 | 2009-07-18 18:42:13 -0500 | [diff] [blame] | 189 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
| 190 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
| 191 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ |
| 192 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 |
| 193 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE |
| 194 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ |
| 195 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 |
| 196 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE0300000 |
| 197 | #define CONFIG_SYS_PCI1_IO_SIZE 0x100000 /* 1M */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 198 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 199 | #define CONFIG_SYS_PCI_SLV_MEM_LOCAL CONFIG_SYS_SDRAM_BASE |
| 200 | #define CONFIG_SYS_PCI_SLV_MEM_BUS 0x00000000 |
| 201 | #define CONFIG_SYS_PCI_SLV_MEM_SIZE 0x80000000 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 202 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 203 | #ifdef CONFIG_PCI |
Gabor Juhos | b445873 | 2013-05-30 07:06:12 +0000 | [diff] [blame] | 204 | #define CONFIG_PCI_INDIRECT_BRIDGE |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 205 | |
Kim Phillips | 57a2af3 | 2009-07-18 18:42:13 -0500 | [diff] [blame] | 206 | #define CONFIG_83XX_PCI_STREAMING |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 207 | |
| 208 | #undef CONFIG_EEPRO100 |
| 209 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 210 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 211 | |
| 212 | #endif /* CONFIG_PCI */ |
| 213 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 214 | /* |
| 215 | * QE UEC ethernet configuration |
| 216 | */ |
| 217 | #define CONFIG_UEC_ETH |
Kim Phillips | b42cf5f | 2010-07-26 18:34:57 -0500 | [diff] [blame] | 218 | #define CONFIG_ETHPRIME "UEC0" |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 219 | |
| 220 | #define CONFIG_UEC_ETH1 /* ETH3 */ |
| 221 | |
| 222 | #ifdef CONFIG_UEC_ETH1 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 223 | #define CONFIG_SYS_UEC1_UCC_NUM 2 /* UCC3 */ |
| 224 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK9 |
| 225 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK10 |
| 226 | #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH |
| 227 | #define CONFIG_SYS_UEC1_PHY_ADDR 3 |
Andy Fleming | 7832a46 | 2011-04-13 00:37:12 -0500 | [diff] [blame] | 228 | #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_MII |
Heiko Schocher | 40b44bc | 2010-01-20 09:04:28 +0100 | [diff] [blame] | 229 | #define CONFIG_SYS_UEC1_INTERFACE_SPEED 100 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 230 | #endif |
| 231 | |
| 232 | #define CONFIG_UEC_ETH2 /* ETH4 */ |
| 233 | |
| 234 | #ifdef CONFIG_UEC_ETH2 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 235 | #define CONFIG_SYS_UEC2_UCC_NUM 3 /* UCC4 */ |
| 236 | #define CONFIG_SYS_UEC2_RX_CLK QE_CLK7 |
| 237 | #define CONFIG_SYS_UEC2_TX_CLK QE_CLK8 |
| 238 | #define CONFIG_SYS_UEC2_ETH_TYPE FAST_ETH |
| 239 | #define CONFIG_SYS_UEC2_PHY_ADDR 4 |
Andy Fleming | 7832a46 | 2011-04-13 00:37:12 -0500 | [diff] [blame] | 240 | #define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_MII |
Heiko Schocher | 40b44bc | 2010-01-20 09:04:28 +0100 | [diff] [blame] | 241 | #define CONFIG_SYS_UEC2_INTERFACE_SPEED 100 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 242 | #endif |
| 243 | |
| 244 | /* |
| 245 | * Environment |
| 246 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 247 | #ifndef CONFIG_SYS_RAMBOOT |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 248 | #define CONFIG_ENV_ADDR \ |
| 249 | (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
Jean-Christophe PLAGNIOL-VILLARD | 7e1cda6 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 250 | #define CONFIG_ENV_SECT_SIZE 0x20000 |
| 251 | #define CONFIG_ENV_SIZE 0x2000 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 252 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 253 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
Jean-Christophe PLAGNIOL-VILLARD | 7e1cda6 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 254 | #define CONFIG_ENV_SIZE 0x2000 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 255 | #endif |
| 256 | |
| 257 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 258 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 259 | |
Jon Loeliger | 3b7116d | 2007-07-04 22:30:06 -0500 | [diff] [blame] | 260 | /* |
Jon Loeliger | 5c4ddae | 2007-07-10 10:12:10 -0500 | [diff] [blame] | 261 | * BOOTP options |
| 262 | */ |
| 263 | #define CONFIG_BOOTP_BOOTFILESIZE |
Jon Loeliger | 5c4ddae | 2007-07-10 10:12:10 -0500 | [diff] [blame] | 264 | |
Jon Loeliger | 5c4ddae | 2007-07-10 10:12:10 -0500 | [diff] [blame] | 265 | /* |
Jon Loeliger | 3b7116d | 2007-07-04 22:30:06 -0500 | [diff] [blame] | 266 | * Command line configuration. |
| 267 | */ |
Jon Loeliger | 3b7116d | 2007-07-04 22:30:06 -0500 | [diff] [blame] | 268 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 269 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
| 270 | |
| 271 | /* |
| 272 | * Miscellaneous configurable options |
| 273 | */ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 274 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 275 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 276 | /* |
| 277 | * For booting Linux, the board info and command line data |
Ira W. Snyder | c5a22d0 | 2010-09-10 15:42:32 -0700 | [diff] [blame] | 278 | * have to be in the first 256 MB of memory, since this is |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 279 | * the maximum mapped by the Linux kernel during initialization. |
| 280 | */ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 281 | /* Initial Memory map for Linux */ |
| 282 | #define CONFIG_SYS_BOOTMAPSZ (256 << 20) |
Kevin Hao | 9c74796 | 2016-07-08 11:25:15 +0800 | [diff] [blame] | 283 | #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 284 | |
Jon Loeliger | 3b7116d | 2007-07-04 22:30:06 -0500 | [diff] [blame] | 285 | #if defined(CONFIG_CMD_KGDB) |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 286 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 287 | #endif |
| 288 | |
| 289 | /* |
| 290 | * Environment Configuration |
Kim Phillips | 57a2af3 | 2009-07-18 18:42:13 -0500 | [diff] [blame] | 291 | */ #define CONFIG_ENV_OVERWRITE |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 292 | |
| 293 | #if defined(CONFIG_UEC_ETH) |
Kim Phillips | 007fbba | 2008-01-09 15:24:06 -0600 | [diff] [blame] | 294 | #define CONFIG_HAS_ETH0 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 295 | #define CONFIG_HAS_ETH1 |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 296 | #endif |
| 297 | |
Kim Phillips | fd3a3fc | 2009-08-21 16:34:38 -0500 | [diff] [blame] | 298 | #define CONFIG_LOADADDR 800000 /* default location for tftp and bootm */ |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 299 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 300 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 301 | "netdev=eth0\0" \ |
| 302 | "consoledev=ttyS0\0" \ |
| 303 | "ramdiskaddr=1000000\0" \ |
| 304 | "ramdiskfile=ramfs.83xx\0" \ |
| 305 | "fdtaddr=780000\0" \ |
| 306 | "fdtfile=mpc832x_mds.dtb\0" \ |
| 307 | "" |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 308 | |
| 309 | #define CONFIG_NFSBOOTCOMMAND \ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 310 | "setenv bootargs root=/dev/nfs rw " \ |
| 311 | "nfsroot=$serverip:$rootpath " \ |
| 312 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:" \ |
| 313 | "$netdev:off " \ |
| 314 | "console=$consoledev,$baudrate $othbootargs;" \ |
| 315 | "tftp $loadaddr $bootfile;" \ |
| 316 | "tftp $fdtaddr $fdtfile;" \ |
| 317 | "bootm $loadaddr - $fdtaddr" |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 318 | |
| 319 | #define CONFIG_RAMBOOTCOMMAND \ |
Joe Hershberger | b88888d | 2011-10-11 23:57:13 -0500 | [diff] [blame] | 320 | "setenv bootargs root=/dev/ram rw " \ |
| 321 | "console=$consoledev,$baudrate $othbootargs;" \ |
| 322 | "tftp $ramdiskaddr $ramdiskfile;" \ |
| 323 | "tftp $loadaddr $bootfile;" \ |
| 324 | "tftp $fdtaddr $fdtfile;" \ |
| 325 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 326 | |
Dave Liu | e740c46 | 2006-12-07 21:13:15 +0800 | [diff] [blame] | 327 | #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND |
| 328 | |
| 329 | #endif /* __CONFIG_H */ |