blob: 61ee576aa83df7dada86852742a2637ed13629d6 [file] [log] [blame]
Peter Tyser1c2b3292008-12-17 16:36:23 -06001/*
2 * Copyright 2008 Extreme Engineering Solutions, Inc.
3 * Copyright 2007-2008 Freescale Semiconductor, Inc.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Peter Tyser1c2b3292008-12-17 16:36:23 -06006 */
7
8/*
Peter Tyser6ae37062010-10-22 00:20:26 -05009 * xpedite537x board configuration file
Peter Tyser1c2b3292008-12-17 16:36:23 -060010 */
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
14/*
15 * High Level Configuration Options
16 */
17#define CONFIG_BOOKE 1 /* BOOKE */
18#define CONFIG_E500 1 /* BOOKE e500 family */
Peter Tyser1c2b3292008-12-17 16:36:23 -060019#define CONFIG_XPEDITE5370 1
20#define CONFIG_SYS_BOARD_NAME "XPedite5370"
John Schmollerd9c2dd52010-10-22 00:20:24 -050021#define CONFIG_SYS_FORM_3U_VPX 1
Peter Tyser1c2b3292008-12-17 16:36:23 -060022#define CONFIG_BOARD_EARLY_INIT_R /* Call board_pre_init */
Peter Tyser1c2b3292008-12-17 16:36:23 -060023
Wolfgang Denk291ba1b2010-10-06 09:05:45 +020024#ifndef CONFIG_SYS_TEXT_BASE
25#define CONFIG_SYS_TEXT_BASE 0xfff80000
26#endif
27
Peter Tyser1c2b3292008-12-17 16:36:23 -060028#define CONFIG_PCI_SCAN_SHOW 1 /* show pci devices on startup */
Robert P. J. Daya8099812016-05-03 19:52:49 -040029#define CONFIG_PCIE1 1 /* PCIE controller 1 */
30#define CONFIG_PCIE2 1 /* PCIE controller 2 */
Peter Tyser1c2b3292008-12-17 16:36:23 -060031#define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */
Gabor Juhosb4458732013-05-30 07:06:12 +000032#define CONFIG_PCI_INDIRECT_BRIDGE 1 /* indirect PCI bridge support */
Peter Tyser1c2b3292008-12-17 16:36:23 -060033#define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */
34#define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */
35#define CONFIG_FSL_LAW 1 /* Use common FSL init code */
Becky Brucedfe6e232010-06-17 11:37:18 -050036#define CONFIG_FSL_ELBC 1
Peter Tyser1c2b3292008-12-17 16:36:23 -060037
38/*
Peter Tyser997d1772009-10-23 15:55:48 -050039 * Multicore config
40 */
41#define CONFIG_MP
42#define CONFIG_BPTR_VIRT_ADDR 0xee000000 /* virt boot page address */
43#define CONFIG_MPC8xxx_DISABLE_BPTR /* Don't leave BPTR enabled */
44
45/*
Peter Tyser1c2b3292008-12-17 16:36:23 -060046 * DDR config
47 */
York Sunf0626592013-09-30 09:22:09 -070048#define CONFIG_SYS_FSL_DDR2
Peter Tyser1c2b3292008-12-17 16:36:23 -060049#undef CONFIG_FSL_DDR_INTERACTIVE
50#define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */
51#define CONFIG_DDR_SPD
52#define CONFIG_MEM_INIT_VALUE 0xdeadbeef
53#define SPD_EEPROM_ADDRESS1 0x54 /* Both channels use the */
54#define SPD_EEPROM_ADDRESS2 0x54 /* same SPD data */
55#define SPD_EEPROM_OFFSET 0x200 /* OFFSET of SPD in EEPROM */
56#define CONFIG_NUM_DDR_CONTROLLERS 2
57#define CONFIG_DIMM_SLOTS_PER_CTLR 1
58#define CONFIG_CHIP_SELECTS_PER_CTRL 1
59#define CONFIG_DDR_ECC
60#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
61#define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 /* DDR is system memory*/
62#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
63#define CONFIG_VERY_BIG_RAM
64
65#ifndef __ASSEMBLY__
66extern unsigned long get_board_sys_clk(unsigned long dummy);
67extern unsigned long get_board_ddr_clk(unsigned long dummy);
68#endif
69
70#define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /* sysclk for MPC85xx */
71#define CONFIG_DDR_CLK_FREQ get_board_ddr_clk(0) /* ddrclk for MPC85xx */
72
73/*
74 * These can be toggled for performance analysis, otherwise use default.
75 */
76#define CONFIG_L2_CACHE /* toggle L2 cache */
77#define CONFIG_BTB /* toggle branch predition */
78#define CONFIG_ENABLE_36BIT_PHYS 1
79
Timur Tabid8f341c2011-08-04 18:03:41 -050080#define CONFIG_SYS_CCSRBAR 0xef000000
81#define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR
Peter Tyser1c2b3292008-12-17 16:36:23 -060082
83/*
84 * Diagnostics
85 */
86#define CONFIG_SYS_ALT_MEMTEST
87#define CONFIG_SYS_MEMTEST_START 0x10000000
88#define CONFIG_SYS_MEMTEST_END 0x20000000
Peter Tysera9585322010-10-22 00:20:33 -050089#define CONFIG_POST (CONFIG_SYS_POST_MEMORY | \
90 CONFIG_SYS_POST_I2C)
91#define I2C_ADDR_LIST {CONFIG_SYS_I2C_DS1621_ADDR, \
92 CONFIG_SYS_I2C_DS4510_ADDR, \
93 CONFIG_SYS_I2C_EEPROM_ADDR, \
94 CONFIG_SYS_I2C_LM90_ADDR, \
95 CONFIG_SYS_I2C_PCA953X_ADDR0, \
96 CONFIG_SYS_I2C_PCA953X_ADDR1, \
97 CONFIG_SYS_I2C_PCA953X_ADDR2, \
98 CONFIG_SYS_I2C_PCA953X_ADDR3, \
99 CONFIG_SYS_I2C_PEX8518_ADDR, \
100 CONFIG_SYS_I2C_RTC_ADDR}
101/* The XPedite5370 can host an XMC which has an EEPROM at address 0x50 */
102#define I2C_ADDR_IGNORE_LIST {0x50}
Peter Tyser1c2b3292008-12-17 16:36:23 -0600103
104/*
105 * Memory map
106 * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable
107 * 0x8000_0000 0xbfff_ffff PCIe1 Mem 1G non-cacheable
108 * 0xc000_0000 0xcfff_ffff PCIe2 Mem 256M non-cacheable
109 * 0xe000_0000 0xe7ff_ffff SRAM/SSRAM/L1 Cache 128M non-cacheable
110 * 0xe800_0000 0xe87f_ffff PCIe1 IO 8M non-cacheable
111 * 0xe880_0000 0xe8ff_ffff PCIe2 IO 8M non-cacheable
Peter Tyser997d1772009-10-23 15:55:48 -0500112 * 0xee00_0000 0xee00_ffff Boot page translation 4K non-cacheable
Peter Tyser1c2b3292008-12-17 16:36:23 -0600113 * 0xef00_0000 0xef0f_ffff CCSR/IMMR 1M non-cacheable
114 * 0xef80_0000 0xef8f_ffff NAND Flash 1M non-cacheable
115 * 0xf000_0000 0xf7ff_ffff NOR Flash 2 128M non-cacheable
116 * 0xf800_0000 0xffff_ffff NOR Flash 1 128M non-cacheable
117 */
118
Kumar Gala6fa11c12009-09-15 22:21:58 -0500119#define CONFIG_SYS_LBC_LCRR (LCRR_CLKDIV_8 | LCRR_EADC_3)
Peter Tyser1c2b3292008-12-17 16:36:23 -0600120
121/*
122 * NAND flash configuration
123 */
124#define CONFIG_SYS_NAND_BASE 0xef800000
125#define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */
Peter Tyser95947f92009-07-21 13:51:08 -0500126#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE, \
127 CONFIG_SYS_NAND_BASE2}
128#define CONFIG_SYS_MAX_NAND_DEVICE 2
Peter Tyser95947f92009-07-21 13:51:08 -0500129#define CONFIG_NAND_FSL_ELBC
Peter Tyser1c2b3292008-12-17 16:36:23 -0600130
131/*
132 * NOR flash configuration
133 */
134#define CONFIG_SYS_FLASH_BASE 0xf8000000
135#define CONFIG_SYS_FLASH_BASE2 0xf0000000
136#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2}
137#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */
138#define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */
139#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
140#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
141#define CONFIG_FLASH_CFI_DRIVER
142#define CONFIG_SYS_FLASH_CFI
Peter Tyser977b0b72009-07-19 19:17:40 -0500143#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
Peter Tyser1c2b3292008-12-17 16:36:23 -0600144#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST { {0xfff40000, 0xc0000}, \
145 {0xf7f40000, 0xc0000} }
Wolfgang Denk0708bc62010-10-07 21:51:12 +0200146#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600147
148/*
149 * Chip select configuration
150 */
151/* NOR Flash 0 on CS0 */
152#define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | \
153 BR_PS_16 | \
154 BR_V)
155#define CONFIG_SYS_OR0_PRELIM (OR_AM_128MB | \
156 OR_GPCM_CSNT | \
157 OR_GPCM_XACS | \
158 OR_GPCM_ACS_DIV2 | \
159 OR_GPCM_SCY_8 | \
160 OR_GPCM_TRLX | \
161 OR_GPCM_EHTR | \
162 OR_GPCM_EAD)
163
164/* NOR Flash 1 on CS1 */
165#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_FLASH_BASE2 | \
166 BR_PS_16 | \
167 BR_V)
168#define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_OR0_PRELIM
169
170/* NAND flash on CS2 */
171#define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_NAND_BASE | \
172 (2<<BR_DECC_SHIFT) | \
173 BR_PS_8 | \
174 BR_MS_FCM | \
175 BR_V)
176
177/* NAND flash on CS2 */
178#define CONFIG_SYS_OR2_PRELIM (OR_AM_256KB | \
179 OR_FCM_PGS | \
180 OR_FCM_CSCT | \
181 OR_FCM_CST | \
182 OR_FCM_CHT | \
183 OR_FCM_SCY_1 | \
184 OR_FCM_TRLX | \
185 OR_FCM_EHTR)
186
187/* NAND flash on CS3 */
188#define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_NAND_BASE2 | \
189 (2<<BR_DECC_SHIFT) | \
190 BR_PS_8 | \
191 BR_MS_FCM | \
192 BR_V)
193#define CONFIG_SYS_OR3_PRELIM CONFIG_SYS_OR2_PRELIM
194
195/*
196 * Use L1 as initial stack
197 */
198#define CONFIG_SYS_INIT_RAM_LOCK 1
199#define CONFIG_SYS_INIT_RAM_ADDR 0xe0000000
Wolfgang Denk1c2e98e2010-10-26 13:32:32 +0200200#define CONFIG_SYS_INIT_RAM_SIZE 0x00004000
Peter Tyser1c2b3292008-12-17 16:36:23 -0600201
Wolfgang Denk0191e472010-10-26 14:34:52 +0200202#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Peter Tyser1c2b3292008-12-17 16:36:23 -0600203#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
204
205#define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 KB for Mon */
206#define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */
207
208/*
209 * Serial Port
210 */
211#define CONFIG_CONS_INDEX 1
Peter Tyser1c2b3292008-12-17 16:36:23 -0600212#define CONFIG_SYS_NS16550_SERIAL
213#define CONFIG_SYS_NS16550_REG_SIZE 1
214#define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
215#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500)
216#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600)
217#define CONFIG_SYS_BAUDRATE_TABLE \
218 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
219#define CONFIG_BAUDRATE 115200
220#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
221#define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
222
223/*
Peter Tyser1c2b3292008-12-17 16:36:23 -0600224 * I2C
225 */
Heiko Schocherf2850742012-10-24 13:48:22 +0200226#define CONFIG_SYS_I2C
227#define CONFIG_SYS_I2C_FSL
228#define CONFIG_SYS_FSL_I2C_SPEED 400000
229#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
230#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
231#define CONFIG_SYS_FSL_I2C2_SPEED 400000
232#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
233#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
234#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} }
Peter Tyser1c2b3292008-12-17 16:36:23 -0600235
236/* PEX8518 slave I2C interface */
237#define CONFIG_SYS_I2C_PEX8518_ADDR 0x70
238
239/* I2C DS1631 temperature sensor */
240#define CONFIG_SYS_I2C_DS1621_ADDR 0x48
241#define CONFIG_DTT_DS1621
242#define CONFIG_DTT_SENSORS { 0 }
Peter Tysera9585322010-10-22 00:20:33 -0500243#define CONFIG_SYS_I2C_LM90_ADDR 0x4c
Peter Tyser1c2b3292008-12-17 16:36:23 -0600244
245/* I2C EEPROM - AT24C128B */
246#define CONFIG_SYS_I2C_EEPROM_ADDR 0x54
247#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
248#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */
249#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* take up to 10 msec */
250
251/* I2C RTC */
252#define CONFIG_RTC_M41T11 1
253#define CONFIG_SYS_I2C_RTC_ADDR 0x68
254#define CONFIG_SYS_M41T11_BASE_YEAR 2000
255
256/* GPIO/EEPROM/SRAM */
257#define CONFIG_DS4510
258#define CONFIG_SYS_I2C_DS4510_ADDR 0x51
259
260/* GPIO */
261#define CONFIG_PCA953X
262#define CONFIG_SYS_I2C_PCA953X_ADDR0 0x18
263#define CONFIG_SYS_I2C_PCA953X_ADDR1 0x1c
264#define CONFIG_SYS_I2C_PCA953X_ADDR2 0x1e
265#define CONFIG_SYS_I2C_PCA953X_ADDR3 0x1f
266#define CONFIG_SYS_I2C_PCA953X_ADDR CONFIG_SYS_I2C_PCA953X_ADDR0
267
268/*
269 * PU = pulled high, PD = pulled low
270 * I = input, O = output, IO = input/output
271 */
272/* PCA9557 @ 0x18*/
273#define CONFIG_SYS_PCA953X_C0_SER0_EN 0x01 /* PU; UART0 enable (1: enabled) */
274#define CONFIG_SYS_PCA953X_C0_SER0_MODE 0x02 /* PU; UART0 serial mode select */
275#define CONFIG_SYS_PCA953X_C0_SER1_EN 0x04 /* PU; UART1 enable (1: enabled) */
276#define CONFIG_SYS_PCA953X_C0_SER1_MODE 0x08 /* PU; UART1 serial mode select */
277#define CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS 0x10 /* PU; Boot flash CS select */
278#define CONFIG_SYS_PCA953X_NVM_WP 0x20 /* PU; Set to 0 to enable NVM writing */
279#define CONFIG_SYS_PCA953X_C0_VCORE_VID2 0x40 /* VID2 of ISL6262 */
280#define CONFIG_SYS_PCA953X_C0_VCORE_VID3 0x80 /* VID3 of ISL6262 */
281
282/* PCA9557 @ 0x1c*/
283#define CONFIG_SYS_PCA953X_XMC0_ROOT0 0x01 /* PU; Low if XMC is RC */
284#define CONFIG_SYS_PCA953X_XMC0_MVMR0 0x02 /* XMC EEPROM write protect */
285#define CONFIG_SYS_PCA953X_XMC0_WAKE 0x04 /* PU; XMC wake */
286#define CONFIG_SYS_PCA953X_XMC0_BIST 0x08 /* PU; XMC built in self test */
287#define CONFIG_SYS_PCA953X_XMC_PRESENT 0x10 /* PU; Low if XMC module installed */
288#define CONFIG_SYS_PCA953X_PMC_PRESENT 0x20 /* PU; Low if PMC module installed */
289#define CONFIG_SYS_PCA953X_PMC0_MONARCH 0x40 /* PMC monarch mode enable */
290#define CONFIG_SYS_PCA953X_PMC0_EREADY 0x80 /* PU; PMC PCI eready */
291
292/* PCA9557 @ 0x1e*/
293#define CONFIG_SYS_PCA953X_P0_GA0 0x01 /* PU; VPX Geographical address */
294#define CONFIG_SYS_PCA953X_P0_GA1 0x02 /* PU; VPX Geographical address */
295#define CONFIG_SYS_PCA953X_P0_GA2 0x04 /* PU; VPX Geographical address */
296#define CONFIG_SYS_PCA953X_P0_GA3 0x08 /* PU; VPX Geographical address */
297#define CONFIG_SYS_PCA953X_P0_GA4 0x10 /* PU; VPX Geographical address */
298#define CONFIG_SYS_PCA953X_P0_GAP 0x20 /* PU; tied to VPX P0.GAP */
299#define CONFIG_SYS_PCA953X_P1_SYSEN 0x80 /* PU; Pulled high; tied to VPX P1.SYSCON */
300
301/* PCA9557 @ 0x1f */
302#define CONFIG_SYS_PCA953X_GPIO_VPX0 0x01 /* PU */
303#define CONFIG_SYS_PCA953X_GPIO_VPX1 0x02 /* PU */
304#define CONFIG_SYS_PCA953X_GPIO_VPX2 0x04 /* PU */
305#define CONFIG_SYS_PCA953X_GPIO_VPX3 0x08 /* PU */
306#define CONFIG_SYS_PCA953X_VPX_FRU_WRCTL 0x10 /* PD; I2C master source for FRU SEEPROM */
307
308/*
309 * General PCI
310 * Memory space is mapped 1-1, but I/O space must start from 0.
311 */
312/* PCIE1 - VPX P1 */
Peter Tyser51944772010-10-22 00:20:22 -0500313#define CONFIG_SYS_PCIE1_MEM_BUS 0x80000000
314#define CONFIG_SYS_PCIE1_MEM_PHYS CONFIG_SYS_PCIE1_MEM_BUS
Peter Tyser1c2b3292008-12-17 16:36:23 -0600315#define CONFIG_SYS_PCIE1_MEM_SIZE 0x40000000 /* 1G */
Peter Tyser51944772010-10-22 00:20:22 -0500316#define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
Peter Tyser1c2b3292008-12-17 16:36:23 -0600317#define CONFIG_SYS_PCIE1_IO_PHYS 0xe8000000
318#define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */
319
320/* PCIE2 - PEX8518 */
Peter Tyser51944772010-10-22 00:20:22 -0500321#define CONFIG_SYS_PCIE2_MEM_BUS 0xc0000000
322#define CONFIG_SYS_PCIE2_MEM_PHYS CONFIG_SYS_PCIE2_MEM_BUS
Peter Tyser1c2b3292008-12-17 16:36:23 -0600323#define CONFIG_SYS_PCIE2_MEM_SIZE 0x10000000 /* 256M */
Peter Tyser51944772010-10-22 00:20:22 -0500324#define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
Peter Tyser1c2b3292008-12-17 16:36:23 -0600325#define CONFIG_SYS_PCIE2_IO_PHYS 0xe8800000
326#define CONFIG_SYS_PCIE2_IO_SIZE 0x00800000 /* 8M */
327
328/*
329 * Networking options
330 */
331#define CONFIG_TSEC_ENET /* tsec ethernet support */
332#define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600333#define CONFIG_TSEC_TBI
334#define CONFIG_MII 1 /* MII PHY management */
335#define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */
336#define CONFIG_ETHPRIME "eTSEC2"
337
Kumar Galac1457f92010-12-01 22:55:54 -0600338/*
339 * In-band SGMII auto-negotiation between TBI and BCM5482S PHY fails, force
340 * 1000mbps SGMII link
341 */
342#define CONFIG_TSEC_TBICR_SETTINGS ( \
343 TBICR_PHY_RESET \
344 | TBICR_FULL_DUPLEX \
345 | TBICR_SPEED1_SET \
346 )
347
Peter Tyser1c2b3292008-12-17 16:36:23 -0600348#define CONFIG_TSEC1 1
349#define CONFIG_TSEC1_NAME "eTSEC1"
350#define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
351#define TSEC1_PHY_ADDR 1
352#define TSEC1_PHYIDX 0
353#define CONFIG_HAS_ETH0
354
355#define CONFIG_TSEC2 1
356#define CONFIG_TSEC2_NAME "eTSEC2"
357#define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
358#define TSEC2_PHY_ADDR 2
359#define TSEC2_PHYIDX 0
360#define CONFIG_HAS_ETH1
361
362/*
363 * Command configuration.
364 */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600365#define CONFIG_CMD_DATE
Peter Tyser1c2b3292008-12-17 16:36:23 -0600366#define CONFIG_CMD_DS4510
367#define CONFIG_CMD_DS4510_INFO
368#define CONFIG_CMD_DTT
369#define CONFIG_CMD_EEPROM
Peter Tyser1c2b3292008-12-17 16:36:23 -0600370#define CONFIG_CMD_JFFS2
Peter Tyser95947f92009-07-21 13:51:08 -0500371#define CONFIG_CMD_NAND
Peter Tyser1c2b3292008-12-17 16:36:23 -0600372#define CONFIG_CMD_PCA953X
373#define CONFIG_CMD_PCA953X_INFO
374#define CONFIG_CMD_PCI
John Schmoller60e877f2010-10-22 00:20:23 -0500375#define CONFIG_CMD_PCI_ENUM
Becky Bruceee888da2010-06-17 11:37:25 -0500376#define CONFIG_CMD_REGINFO
Peter Tyser1c2b3292008-12-17 16:36:23 -0600377
378/*
379 * Miscellaneous configurable options
380 */
381#define CONFIG_SYS_LONGHELP /* undef to save memory */
382#define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600383#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
384#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
385#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
386#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600387#define CONFIG_CMDLINE_EDITING 1 /* add command line history */
Kim Phillipsf7758c12010-07-14 19:47:18 -0500388#define CONFIG_AUTO_COMPLETE 1 /* add autocompletion support */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600389#define CONFIG_LOADADDR 0x1000000 /* default location for tftp and bootm */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600390#define CONFIG_PANIC_HANG /* do not reset board on panic */
391#define CONFIG_PREBOOT /* enable preboot variable */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600392#define CONFIG_INTEGRITY /* support booting INTEGRITY OS */
393
394/*
395 * For booting Linux, the board info and command line data
396 * have to be in the first 16 MB of memory, since this is
397 * the maximum mapped by the Linux kernel during initialization.
398 */
399#define CONFIG_SYS_BOOTMAPSZ (16 << 20) /* Initial Memory map for Linux*/
Peter Tyser3744c402009-07-21 13:51:07 -0500400#define CONFIG_SYS_BOOTM_LEN (16 << 20) /* Increase max gunzip size */
Peter Tyser1c2b3292008-12-17 16:36:23 -0600401
402/*
Peter Tyser1c2b3292008-12-17 16:36:23 -0600403 * Environment Configuration
404 */
405#define CONFIG_ENV_IS_IN_FLASH 1
406#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128k (one sector) for env */
407#define CONFIG_ENV_SIZE 0x8000
408#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
409
410/*
411 * Flash memory map:
412 * fff80000 - ffffffff Pri U-Boot (512 KB)
413 * fff40000 - fff7ffff Pri U-Boot Environment (256 KB)
414 * fff00000 - fff3ffff Pri FDT (256KB)
415 * fef00000 - ffefffff Pri OS image (16MB)
416 * f8000000 - feefffff Pri OS Use/Filesystem (111MB)
417 *
418 * f7f80000 - f7ffffff Sec U-Boot (512 KB)
419 * f7f40000 - f7f7ffff Sec U-Boot Environment (256 KB)
420 * f7f00000 - f7f3ffff Sec FDT (256KB)
421 * f6f00000 - f7efffff Sec OS image (16MB)
422 * f0000000 - f6efffff Sec OS Use/Filesystem (111MB)
423 */
Marek Vasut0b3176c2012-09-23 17:41:24 +0200424#define CONFIG_UBOOT1_ENV_ADDR __stringify(0xfff80000)
425#define CONFIG_UBOOT2_ENV_ADDR __stringify(0xf7f80000)
426#define CONFIG_FDT1_ENV_ADDR __stringify(0xfff00000)
427#define CONFIG_FDT2_ENV_ADDR __stringify(0xf7f00000)
428#define CONFIG_OS1_ENV_ADDR __stringify(0xfef00000)
429#define CONFIG_OS2_ENV_ADDR __stringify(0xf6f00000)
Peter Tyser1c2b3292008-12-17 16:36:23 -0600430
431#define CONFIG_PROG_UBOOT1 \
432 "$download_cmd $loadaddr $ubootfile; " \
433 "if test $? -eq 0; then " \
434 "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; " \
435 "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; " \
436 "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; " \
437 "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; " \
438 "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; " \
439 "if test $? -ne 0; then " \
440 "echo PROGRAM FAILED; " \
441 "else; " \
442 "echo PROGRAM SUCCEEDED; " \
443 "fi; " \
444 "else; " \
445 "echo DOWNLOAD FAILED; " \
446 "fi;"
447
448#define CONFIG_PROG_UBOOT2 \
449 "$download_cmd $loadaddr $ubootfile; " \
450 "if test $? -eq 0; then " \
451 "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; " \
452 "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; " \
453 "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; " \
454 "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; " \
455 "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; " \
456 "if test $? -ne 0; then " \
457 "echo PROGRAM FAILED; " \
458 "else; " \
459 "echo PROGRAM SUCCEEDED; " \
460 "fi; " \
461 "else; " \
462 "echo DOWNLOAD FAILED; " \
463 "fi;"
464
465#define CONFIG_BOOT_OS_NET \
466 "$download_cmd $osaddr $osfile; " \
467 "if test $? -eq 0; then " \
468 "if test -n $fdtaddr; then " \
469 "$download_cmd $fdtaddr $fdtfile; " \
470 "if test $? -eq 0; then " \
471 "bootm $osaddr - $fdtaddr; " \
472 "else; " \
473 "echo FDT DOWNLOAD FAILED; " \
474 "fi; " \
475 "else; " \
476 "bootm $osaddr; " \
477 "fi; " \
478 "else; " \
479 "echo OS DOWNLOAD FAILED; " \
480 "fi;"
481
482#define CONFIG_PROG_OS1 \
483 "$download_cmd $osaddr $osfile; " \
484 "if test $? -eq 0; then " \
485 "erase "CONFIG_OS1_ENV_ADDR" +$filesize; " \
486 "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \
487 "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \
488 "if test $? -ne 0; then " \
489 "echo OS PROGRAM FAILED; " \
490 "else; " \
491 "echo OS PROGRAM SUCCEEDED; " \
492 "fi; " \
493 "else; " \
494 "echo OS DOWNLOAD FAILED; " \
495 "fi;"
496
497#define CONFIG_PROG_OS2 \
498 "$download_cmd $osaddr $osfile; " \
499 "if test $? -eq 0; then " \
500 "erase "CONFIG_OS2_ENV_ADDR" +$filesize; " \
501 "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \
502 "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \
503 "if test $? -ne 0; then " \
504 "echo OS PROGRAM FAILED; " \
505 "else; " \
506 "echo OS PROGRAM SUCCEEDED; " \
507 "fi; " \
508 "else; " \
509 "echo OS DOWNLOAD FAILED; " \
510 "fi;"
511
512#define CONFIG_PROG_FDT1 \
513 "$download_cmd $fdtaddr $fdtfile; " \
514 "if test $? -eq 0; then " \
515 "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;" \
516 "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \
517 "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \
518 "if test $? -ne 0; then " \
519 "echo FDT PROGRAM FAILED; " \
520 "else; " \
521 "echo FDT PROGRAM SUCCEEDED; " \
522 "fi; " \
523 "else; " \
524 "echo FDT DOWNLOAD FAILED; " \
525 "fi;"
526
527#define CONFIG_PROG_FDT2 \
528 "$download_cmd $fdtaddr $fdtfile; " \
529 "if test $? -eq 0; then " \
530 "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;" \
531 "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \
532 "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \
533 "if test $? -ne 0; then " \
534 "echo FDT PROGRAM FAILED; " \
535 "else; " \
536 "echo FDT PROGRAM SUCCEEDED; " \
537 "fi; " \
538 "else; " \
539 "echo FDT DOWNLOAD FAILED; " \
540 "fi;"
541
542#define CONFIG_EXTRA_ENV_SETTINGS \
543 "autoload=yes\0" \
544 "download_cmd=tftp\0" \
545 "console_args=console=ttyS0,115200\0" \
546 "root_args=root=/dev/nfs rw\0" \
547 "misc_args=ip=on\0" \
548 "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \
549 "bootfile=/home/user/file\0" \
Peter Tyser6ae37062010-10-22 00:20:26 -0500550 "osfile=/home/user/board.uImage\0" \
551 "fdtfile=/home/user/board.dtb\0" \
Peter Tyser1c2b3292008-12-17 16:36:23 -0600552 "ubootfile=/home/user/u-boot.bin\0" \
Scott Woodb7f4b852016-07-19 17:52:06 -0500553 "fdtaddr=0x1e00000\0" \
Peter Tyser1c2b3292008-12-17 16:36:23 -0600554 "osaddr=0x1000000\0" \
555 "loadaddr=0x1000000\0" \
556 "prog_uboot1="CONFIG_PROG_UBOOT1"\0" \
557 "prog_uboot2="CONFIG_PROG_UBOOT2"\0" \
558 "prog_os1="CONFIG_PROG_OS1"\0" \
559 "prog_os2="CONFIG_PROG_OS2"\0" \
560 "prog_fdt1="CONFIG_PROG_FDT1"\0" \
561 "prog_fdt2="CONFIG_PROG_FDT2"\0" \
562 "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0" \
563 "bootcmd_flash1=run set_bootargs; " \
564 "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\
565 "bootcmd_flash2=run set_bootargs; " \
566 "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\
567 "bootcmd=run bootcmd_flash1\0"
568#endif /* __CONFIG_H */