blob: 09cdb7c1a8a407c6e90e732412ab78b44a82485e [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Paul Gortmaker91e25762007-01-16 11:38:14 -05002/*
3 * WindRiver SBC8349 U-Boot configuration file.
4 * Copyright (c) 2006, 2007 Wind River Systems, Inc.
5 *
6 * Paul Gortmaker <paul.gortmaker@windriver.com>
7 * Based on the MPC8349EMDS config.
Paul Gortmaker91e25762007-01-16 11:38:14 -05008 */
9
10/*
11 * sbc8349 board configuration file.
12 */
13
14#ifndef __CONFIG_H
15#define __CONFIG_H
16
Paul Gortmaker91e25762007-01-16 11:38:14 -050017/*
18 * High Level Configuration Options
19 */
20#define CONFIG_E300 1 /* E300 Family */
Paul Gortmaker91e25762007-01-16 11:38:14 -050021
Paul Gortmaker91e25762007-01-16 11:38:14 -050022/* Don't enable PCI2 on sbc834x - it doesn't exist physically. */
23#undef CONFIG_MPC83XX_PCI2 /* support for 2nd PCI controller */
24
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020025#define CONFIG_SYS_IMMR 0xE0000000
Paul Gortmaker91e25762007-01-16 11:38:14 -050026
Joe Hershberger60e1dc12011-10-11 23:57:25 -050027#undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020028#define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */
29#define CONFIG_SYS_MEMTEST_END 0x00100000
Paul Gortmaker91e25762007-01-16 11:38:14 -050030
31/*
32 * DDR Setup
33 */
34#undef CONFIG_DDR_ECC /* only for ECC DDR module */
35#undef CONFIG_DDR_ECC_CMD /* use DDR ECC user commands */
36#define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/
Joe Hershberger60e1dc12011-10-11 23:57:25 -050037#define CONFIG_SYS_83XX_DDR_USES_CS0 /* WRS; Fsl board uses CS2/CS3 */
Paul Gortmaker91e25762007-01-16 11:38:14 -050038
39/*
40 * 32-bit data path mode.
41 *
42 * Please note that using this mode for devices with the real density of 64-bit
43 * effectively reduces the amount of available memory due to the effect of
44 * wrapping around while translating address to row/columns, for example in the
45 * 256MB module the upper 128MB get aliased with contents of the lower
46 * 128MB); normally this define should be used for devices with real 32-bit
47 * data path.
48 */
49#undef CONFIG_DDR_32BIT
50
Joe Hershberger60e1dc12011-10-11 23:57:25 -050051#define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020052#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
53#define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
54#define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
Paul Gortmaker91e25762007-01-16 11:38:14 -050055 DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075)
56#define CONFIG_DDR_2T_TIMING
57
58#if defined(CONFIG_SPD_EEPROM)
59/*
60 * Determine DDR configuration from I2C interface.
61 */
62#define SPD_EEPROM_ADDRESS 0x52 /* DDR DIMM */
63
64#else
65/*
66 * Manually set up DDR parameters
67 * NB: manual DDR setup untested on sbc834x
68 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020069#define CONFIG_SYS_DDR_SIZE 256 /* MB */
Joe Hershberger2e651b22011-10-11 23:57:31 -050070#define CONFIG_SYS_DDR_CS2_CONFIG (CSCONFIG_EN \
Joe Hershberger60e1dc12011-10-11 23:57:25 -050071 | CSCONFIG_ROW_BIT_13 \
72 | CSCONFIG_COL_BIT_10)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020073#define CONFIG_SYS_DDR_TIMING_1 0x36332321
74#define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45,may need tuning */
Joe Hershberger60e1dc12011-10-11 23:57:25 -050075#define CONFIG_SYS_DDR_CONTROL 0xc2000000 /* unbuffered,no DYN_PWR */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020076#define CONFIG_SYS_DDR_INTERVAL 0x04060100 /* autocharge,no open page */
Paul Gortmaker91e25762007-01-16 11:38:14 -050077
78#if defined(CONFIG_DDR_32BIT)
79/* set burst length to 8 for 32-bit data path */
Joe Hershberger60e1dc12011-10-11 23:57:25 -050080 /* DLL,normal,seq,4/2.5, 8 burst len */
81#define CONFIG_SYS_DDR_MODE 0x00000023
Paul Gortmaker91e25762007-01-16 11:38:14 -050082#else
83/* the default burst length is 4 - for 64-bit data path */
Joe Hershberger60e1dc12011-10-11 23:57:25 -050084 /* DLL,normal,seq,4/2.5, 4 burst len */
85#define CONFIG_SYS_DDR_MODE 0x00000022
Paul Gortmaker91e25762007-01-16 11:38:14 -050086#endif
87#endif
88
89/*
90 * SDRAM on the Local Bus
91 */
Joe Hershberger7d6a0982011-10-11 23:57:30 -050092#define CONFIG_SYS_LBC_SDRAM_BASE 0xF0000000 /* Localbus SDRAM */
93#define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */
Paul Gortmaker91e25762007-01-16 11:38:14 -050094
95/*
96 * FLASH on the Local Bus
97 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020098#define CONFIG_SYS_FLASH_BASE 0xFF800000 /* start of FLASH */
99#define CONFIG_SYS_FLASH_SIZE 8 /* flash size in MB */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500100
Mario Sixa8f97532019-01-21 09:18:01 +0100101/* FLASH */
102#define CONFIG_SYS_BR0_PRELIM (0xFF800000 | BR_PS_16 | BR_MS_GPCM | BR_V)
103#define CONFIG_SYS_OR0_PRELIM (OR_AM_8MB | OR_GPCM_XAM | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS | OR_GPCM_SCY_15 | OR_GPCM_TRLX_SET | OR_GPCM_EHTR_SET | OR_GPCM_EAD)
Joe Hershberger7d6a0982011-10-11 23:57:30 -0500104
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500105#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
106#define CONFIG_SYS_MAX_FLASH_SECT 64 /* sectors per device */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500107
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200108#undef CONFIG_SYS_FLASH_CHECKSUM
109#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
110#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500111
Wolfgang Denk14d0a022010-10-07 21:51:12 +0200112#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500113
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200114#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
115#define CONFIG_SYS_RAMBOOT
Paul Gortmaker91e25762007-01-16 11:38:14 -0500116#else
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200117#undef CONFIG_SYS_RAMBOOT
Paul Gortmaker91e25762007-01-16 11:38:14 -0500118#endif
119
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200120#define CONFIG_SYS_INIT_RAM_LOCK 1
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500121 /* Initial RAM address */
122#define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000
123 /* Size of used area in RAM*/
124#define CONFIG_SYS_INIT_RAM_SIZE 0x1000
Paul Gortmaker91e25762007-01-16 11:38:14 -0500125
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500126#define CONFIG_SYS_GBL_DATA_OFFSET \
127 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200128#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
Paul Gortmaker91e25762007-01-16 11:38:14 -0500129
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500130#define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */
Kim Phillipsc8a90642012-06-30 18:29:20 -0500131#define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Reserved for malloc */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500132
133/*
134 * Local Bus LCRR and LBCR regs
135 * LCRR: DLL bypass, Clock divider is 4
136 * External Local Bus rate is
137 * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
138 */
Kim Phillipsc7190f02009-09-25 18:19:44 -0500139#define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
140#define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200141#define CONFIG_SYS_LBC_LBCR 0x00000000
Paul Gortmaker91e25762007-01-16 11:38:14 -0500142
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200143#undef CONFIG_SYS_LB_SDRAM /* if board has SDRAM on local bus */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500144
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200145#ifdef CONFIG_SYS_LB_SDRAM
Paul Gortmaker91e25762007-01-16 11:38:14 -0500146/* Local bus BR2, OR2 definition for SDRAM if soldered on the board*/
147/*
148 * Base Register 2 and Option Register 2 configure SDRAM.
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200149 * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000.
Paul Gortmaker91e25762007-01-16 11:38:14 -0500150 *
151 * For BR2, need:
152 * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0
153 * port-size = 32-bits = BR2[19:20] = 11
154 * no parity checking = BR2[21:22] = 00
155 * SDRAM for MSEL = BR2[24:26] = 011
156 * Valid = BR[31] = 1
157 *
158 * 0 4 8 12 16 20 24 28
159 * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861
Paul Gortmaker91e25762007-01-16 11:38:14 -0500160 */
161
Joe Hershberger7d6a0982011-10-11 23:57:30 -0500162#define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_LBC_SDRAM_BASE \
163 | BR_PS_32 \
164 | BR_MS_SDRAM \
165 | BR_V)
166 /* 0xF0001861 */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500167/*
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200168 * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64.
Paul Gortmaker91e25762007-01-16 11:38:14 -0500169 *
170 * For OR2, need:
171 * 64MB mask for AM, OR2[0:7] = 1111 1100
172 * XAM, OR2[17:18] = 11
173 * 9 columns OR2[19-21] = 010
174 * 13 rows OR2[23-25] = 100
175 * EAD set for extra time OR[31] = 1
176 *
177 * 0 4 8 12 16 20 24 28
178 * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901
179 */
180
Mario Six5d2f4c92019-01-21 09:17:59 +0100181#define CONFIG_SYS_OR2_PRELIM (OR_AM_64MB \
Joe Hershberger7d6a0982011-10-11 23:57:30 -0500182 | OR_SDRAM_XAM \
183 | ((9 - OR_SDRAM_MIN_COLS) << OR_SDRAM_COLS_SHIFT) \
184 | ((13 - OR_SDRAM_MIN_ROWS) << OR_SDRAM_ROWS_SHIFT) \
185 | OR_SDRAM_EAD)
186 /* 0xFC006901 */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500187
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500188 /* LB sdram refresh timer, about 6us */
189#define CONFIG_SYS_LBC_LSRT 0x32000000
190 /* LB refresh timer prescal, 266MHz/32 */
191#define CONFIG_SYS_LBC_MRTPR 0x20000000
Paul Gortmaker91e25762007-01-16 11:38:14 -0500192
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500193#define CONFIG_SYS_LBC_LSDMR_COMMON (LSDMR_RFEN \
194 | LSDMR_BSMA1516 \
195 | LSDMR_RFCR8 \
196 | LSDMR_PRETOACT6 \
197 | LSDMR_ACTTORW3 \
198 | LSDMR_BL8 \
199 | LSDMR_WRC3 \
200 | LSDMR_CL3)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500201
202/*
203 * SDRAM Controller configuration sequence.
204 */
Kumar Gala540dcf12009-03-26 01:34:39 -0500205#define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL)
206#define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
207#define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
208#define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW)
209#define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500210#endif
211
212/*
213 * Serial Port
214 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200215#define CONFIG_SYS_NS16550_SERIAL
216#define CONFIG_SYS_NS16550_REG_SIZE 1
217#define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500218
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200219#define CONFIG_SYS_BAUDRATE_TABLE \
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500220 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
Paul Gortmaker91e25762007-01-16 11:38:14 -0500221
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200222#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
223#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500224
Paul Gortmaker91e25762007-01-16 11:38:14 -0500225/* I2C */
Heiko Schocher00f792e2012-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}, {1, 0x69} }
Paul Gortmakerefaf6f12009-10-02 18:54:20 -0400235/* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SYS_SPD_BUS_NUM... */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500236
237/* TSEC */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200238#define CONFIG_SYS_TSEC1_OFFSET 0x24000
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500239#define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200240#define CONFIG_SYS_TSEC2_OFFSET 0x25000
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500241#define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500242
243/*
244 * General PCI
245 * Addresses are mapped 1-1.
246 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200247#define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
248#define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
249#define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
250#define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000
251#define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
252#define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500253#define CONFIG_SYS_PCI1_IO_BASE 0x00000000
254#define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000
255#define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500256
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200257#define CONFIG_SYS_PCI2_MEM_BASE 0xA0000000
258#define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE
259#define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */
260#define CONFIG_SYS_PCI2_MMIO_BASE 0xB0000000
261#define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE
262#define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500263#define CONFIG_SYS_PCI2_IO_BASE 0x00000000
264#define CONFIG_SYS_PCI2_IO_PHYS 0xE2100000
265#define CONFIG_SYS_PCI2_IO_SIZE 0x00100000 /* 1M */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500266
267#if defined(CONFIG_PCI)
268
Paul Gortmaker91e25762007-01-16 11:38:14 -0500269#undef CONFIG_EEPRO100
270#undef CONFIG_TULIP
271
272#if !defined(CONFIG_PCI_PNP)
273 #define PCI_ENET0_IOADDR 0xFIXME
274 #define PCI_ENET0_MEMADDR 0xFIXME
275 #define PCI_IDSEL_NUMBER 0xFIXME
276#endif
277
278#undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200279#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500280
281#endif /* CONFIG_PCI */
282
283/*
284 * TSEC configuration
285 */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500286
287#if defined(CONFIG_TSEC_ENET)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500288
Kim Phillips255a35772007-05-16 16:52:19 -0500289#define CONFIG_TSEC1 1
290#define CONFIG_TSEC1_NAME "TSEC0"
291#define CONFIG_TSEC2 1
292#define CONFIG_TSEC2_NAME "TSEC1"
Paul Gortmaker91e25762007-01-16 11:38:14 -0500293#define CONFIG_PHY_BCM5421S 1
294#define TSEC1_PHY_ADDR 0x19
295#define TSEC2_PHY_ADDR 0x1a
296#define TSEC1_PHYIDX 0
297#define TSEC2_PHYIDX 0
Andy Fleming3a790132007-08-15 20:03:25 -0500298#define TSEC1_FLAGS TSEC_GIGABIT
299#define TSEC2_FLAGS TSEC_GIGABIT
Paul Gortmaker91e25762007-01-16 11:38:14 -0500300
301/* Options are: TSEC[0-1] */
302#define CONFIG_ETHPRIME "TSEC0"
303
304#endif /* CONFIG_TSEC_ENET */
305
306/*
307 * Environment
308 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200309#ifndef CONFIG_SYS_RAMBOOT
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200310 #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000)
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200311 #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
312 #define CONFIG_ENV_SIZE 0x2000
Paul Gortmaker91e25762007-01-16 11:38:14 -0500313
314/* Address and size of Redundant Environment Sector */
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200315#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
316#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500317
318#else
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200319 #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200320 #define CONFIG_ENV_SIZE 0x2000
Paul Gortmaker91e25762007-01-16 11:38:14 -0500321#endif
322
323#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200324#define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500325
Jon Loeliger866e3082007-07-04 22:30:58 -0500326/*
Jon Loeliger079a1362007-07-10 10:12:10 -0500327 * BOOTP options
328 */
329#define CONFIG_BOOTP_BOOTFILESIZE
Jon Loeliger079a1362007-07-10 10:12:10 -0500330
Jon Loeliger079a1362007-07-10 10:12:10 -0500331/*
Jon Loeliger866e3082007-07-04 22:30:58 -0500332 * Command line configuration.
333 */
Jon Loeliger866e3082007-07-04 22:30:58 -0500334
Paul Gortmaker91e25762007-01-16 11:38:14 -0500335#undef CONFIG_WATCHDOG /* watchdog disabled */
336
337/*
338 * Miscellaneous configurable options
339 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200340#define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500341
Paul Gortmaker91e25762007-01-16 11:38:14 -0500342/*
343 * For booting Linux, the board info and command line data
Ira W. Snyder9f530d52010-09-10 15:42:32 -0700344 * have to be in the first 256 MB of memory, since this is
Paul Gortmaker91e25762007-01-16 11:38:14 -0500345 * the maximum mapped by the Linux kernel during initialization.
346 */
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500347 /* Initial Memory map for Linux*/
348#define CONFIG_SYS_BOOTMAPSZ (256 << 20)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500349
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200350#define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500351
Paul Gortmaker91e25762007-01-16 11:38:14 -0500352/* System IO Config */
Kim Phillips3c9b1ee2009-06-05 14:11:33 -0500353#define CONFIG_SYS_SICRH 0
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200354#define CONFIG_SYS_SICRL SICRL_LDP_A
Paul Gortmaker91e25762007-01-16 11:38:14 -0500355
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200356#define CONFIG_SYS_HID0_INIT 0x000000000
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500357#define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK \
358 | HID0_ENABLE_INSTRUCTION_CACHE)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500359
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500360/* #define CONFIG_SYS_HID0_FINAL (\
Paul Gortmaker91e25762007-01-16 11:38:14 -0500361 HID0_ENABLE_INSTRUCTION_CACHE |\
362 HID0_ENABLE_M_BIT |\
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500363 HID0_ENABLE_ADDRESS_BROADCAST) */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500364
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200365#define CONFIG_SYS_HID2 HID2_HBE
Paul Gortmaker91e25762007-01-16 11:38:14 -0500366
Paul Gortmaker91e25762007-01-16 11:38:14 -0500367#ifdef CONFIG_PCI
Gabor Juhos842033e2013-05-30 07:06:12 +0000368#define CONFIG_PCI_INDIRECT_BRIDGE
Paul Gortmaker91e25762007-01-16 11:38:14 -0500369#endif
370
Jon Loeliger866e3082007-07-04 22:30:58 -0500371#if defined(CONFIG_CMD_KGDB)
Paul Gortmaker91e25762007-01-16 11:38:14 -0500372#define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
Paul Gortmaker91e25762007-01-16 11:38:14 -0500373#endif
374
375/*
376 * Environment Configuration
377 */
378#define CONFIG_ENV_OVERWRITE
379
380#if defined(CONFIG_TSEC_ENET)
Andy Fleming10327dc2007-08-16 16:35:02 -0500381#define CONFIG_HAS_ETH0
Paul Gortmaker91e25762007-01-16 11:38:14 -0500382#define CONFIG_HAS_ETH1
Paul Gortmaker91e25762007-01-16 11:38:14 -0500383#endif
384
Mario Six5bc05432018-03-28 14:38:20 +0200385#define CONFIG_HOSTNAME "SBC8349"
Joe Hershberger8b3637c2011-10-13 13:03:47 +0000386#define CONFIG_ROOTPATH "/tftpboot/rootfs"
Joe Hershbergerb3f44c22011-10-13 13:03:48 +0000387#define CONFIG_BOOTFILE "uImage"
Paul Gortmaker91e25762007-01-16 11:38:14 -0500388
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500389 /* default location for tftp and bootm */
390#define CONFIG_LOADADDR 800000
Paul Gortmaker91e25762007-01-16 11:38:14 -0500391
Paul Gortmaker91e25762007-01-16 11:38:14 -0500392#define CONFIG_EXTRA_ENV_SETTINGS \
393 "netdev=eth0\0" \
Detlev Zundela99715b2008-04-18 14:50:01 +0200394 "hostname=sbc8349\0" \
Paul Gortmaker91e25762007-01-16 11:38:14 -0500395 "nfsargs=setenv bootargs root=/dev/nfs rw " \
396 "nfsroot=${serverip}:${rootpath}\0" \
397 "ramargs=setenv bootargs root=/dev/ram rw\0" \
398 "addip=setenv bootargs ${bootargs} " \
399 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
400 ":${hostname}:${netdev}:off panic=1\0" \
401 "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
402 "flash_nfs=run nfsargs addip addtty;" \
403 "bootm ${kernel_addr}\0" \
404 "flash_self=run ramargs addip addtty;" \
405 "bootm ${kernel_addr} ${ramdisk_addr}\0" \
406 "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \
407 "bootm\0" \
408 "load=tftp 100000 /tftpboot/sbc8349/u-boot.bin\0" \
Paul Gortmakerfe613cd2009-07-23 17:10:55 -0400409 "update=protect off ff800000 ff83ffff; " \
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500410 "era ff800000 ff83ffff; cp.b 100000 ff800000 ${filesize}\0" \
Detlev Zundeld8ab58b2008-03-06 16:45:53 +0100411 "upd=run load update\0" \
Kim Phillips79f516b2009-08-21 16:34:38 -0500412 "fdtaddr=780000\0" \
Detlev Zundela99715b2008-04-18 14:50:01 +0200413 "fdtfile=sbc8349.dtb\0" \
Paul Gortmaker91e25762007-01-16 11:38:14 -0500414 ""
415
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500416#define CONFIG_NFSBOOTCOMMAND \
417 "setenv bootargs root=/dev/nfs rw " \
418 "nfsroot=$serverip:$rootpath " \
419 "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:" \
420 "$netdev:off " \
421 "console=$consoledev,$baudrate $othbootargs;" \
422 "tftp $loadaddr $bootfile;" \
423 "tftp $fdtaddr $fdtfile;" \
424 "bootm $loadaddr - $fdtaddr"
Paul Gortmaker91e25762007-01-16 11:38:14 -0500425
426#define CONFIG_RAMBOOTCOMMAND \
Joe Hershberger60e1dc12011-10-11 23:57:25 -0500427 "setenv bootargs root=/dev/ram rw " \
428 "console=$consoledev,$baudrate $othbootargs;" \
429 "tftp $ramdiskaddr $ramdiskfile;" \
430 "tftp $loadaddr $bootfile;" \
431 "tftp $fdtaddr $fdtfile;" \
432 "bootm $loadaddr $ramdiskaddr $fdtaddr"
Paul Gortmaker91e25762007-01-16 11:38:14 -0500433
434#define CONFIG_BOOTCOMMAND "run flash_self"
435
436#endif /* __CONFIG_H */