blob: e6aba865b3923e778c610e5df9fd871420d28c57 [file] [log] [blame]
Andre Schwarz546cb1f2008-06-10 09:13:16 +02001/*
2 * Copyright (C) Matrix Vision GmbH 2008
3 *
4 * Matrix Vision mvBlueLYNX-M7 configuration file
5 * based on Freescale's MPC8349ITX.
6 *
7 * See file CREDITS for list of people who contributed to this
8 * project.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA
24 */
25
26
27#ifndef __CONFIG_H
28#define __CONFIG_H
29
Andre Schwarz65ef0172008-07-02 18:54:08 +020030#include <version.h>
Andre Schwarz546cb1f2008-06-10 09:13:16 +020031
32/*
33 * High Level Configuration Options
34 */
35#define CONFIG_E300 1
Peter Tyser62e73982009-05-22 17:23:24 -050036#define CONFIG_MPC83xx 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +020037#define CONFIG_MPC834X 1
38#define CONFIG_MPC8343 1
39
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020040#define CONFIG_SYS_IMMR 0xE0000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020041
42#define CONFIG_PCI
43#define CONFIG_83XX_GENERIC_PCI
44#define CONFIG_PCI_SKIP_HOST_BRIDGE
45#define CONFIG_HARD_I2C
46#define CONFIG_TSEC_ENET
47#define CONFIG_MPC8XXX_SPI
48#define CONFIG_HARD_SPI
49#define MVBLM7_MMC_CS 0x04000000
50
51/* I2C */
52#undef CONFIG_SOFT_I2C
53
54#define CONFIG_FSL_I2C
55#define CONFIG_I2C_MULTI_BUS
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020056#define CONFIG_SYS_I2C_OFFSET 0x3000
57#define CONFIG_SYS_I2C2_OFFSET 0x3100
Andre Schwarz546cb1f2008-06-10 09:13:16 +020058
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020059#define CONFIG_SYS_I2C_SPEED 100000
60#define CONFIG_SYS_I2C_SLAVE 0x7F
Andre Schwarz546cb1f2008-06-10 09:13:16 +020061
62/*
63 * DDR Setup
64 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020065#define CONFIG_SYS_DDR_BASE 0x00000000
66#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
67#define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
68#define CONFIG_SYS_83XX_DDR_USES_CS0 1
69#define CONFIG_SYS_MEMTEST_START (60<<20)
70#define CONFIG_SYS_MEMTEST_END (70<<20)
Andre Schwarz546cb1f2008-06-10 09:13:16 +020071
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020072#define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
Andre Schwarz546cb1f2008-06-10 09:13:16 +020073 DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05
74
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020075#define CONFIG_SYS_DDR_SIZE 256
Andre Schwarz546cb1f2008-06-10 09:13:16 +020076
77/* HC, 75Ohm, DDR-II, DRQ */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020078#define CONFIG_SYS_DDRCDR 0x80000001
Andre Schwarz546cb1f2008-06-10 09:13:16 +020079/* EN, ODT_WR, 3BA, 14row, 10col */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020080#define CONFIG_SYS_DDR_CS0_CONFIG 0x80014102
81#define CONFIG_SYS_DDR_CS1_CONFIG 0x0
82#define CONFIG_SYS_DDR_CS2_CONFIG 0x0
83#define CONFIG_SYS_DDR_CS3_CONFIG 0x0
Andre Schwarz546cb1f2008-06-10 09:13:16 +020084
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020085#define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f
86#define CONFIG_SYS_DDR_CS1_BNDS 0x0
87#define CONFIG_SYS_DDR_CS2_BNDS 0x0
88#define CONFIG_SYS_DDR_CS3_BNDS 0x0
Andre Schwarz546cb1f2008-06-10 09:13:16 +020089
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020090#define CONFIG_SYS_DDR_CLK_CNTL 0x02000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020091
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020092#define CONFIG_SYS_DDR_TIMING_0 0x00260802
93#define CONFIG_SYS_DDR_TIMING_1 0x2625b221
94#define CONFIG_SYS_DDR_TIMING_2 0x1f9820c7
95#define CONFIG_SYS_DDR_TIMING_3 0x00000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020096
97/* ~MEM_EN, SREN, DDR-II, 32_BE */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020098#define CONFIG_SYS_DDR_SDRAM_CFG 0x43080000
99#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
100#define CONFIG_SYS_DDR_INTERVAL 0x04060100
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200101
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200102#define CONFIG_SYS_DDR_MODE 0x078e0232
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200103
104/* Flash */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200105#define CONFIG_SYS_FLASH_CFI
Jean-Christophe PLAGNIOL-VILLARD8d94c232008-08-13 01:40:42 +0200106#define CONFIG_FLASH_CFI_DRIVER
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200107#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200108
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200109#define CONFIG_SYS_FLASH_BASE 0xFF800000
110#define CONFIG_SYS_FLASH_SIZE 8
111#define CONFIG_SYS_FLASH_SIZE_SHIFT 3
112#define CONFIG_SYS_FLASH_EMPTY_INFO
113#define CONFIG_SYS_FLASH_ERASE_TOUT 60000
114#define CONFIG_SYS_FLASH_WRITE_TOUT 500
115#define CONFIG_SYS_MAX_FLASH_BANKS 1
116#define CONFIG_SYS_MAX_FLASH_SECT 256
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200117
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200118#define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V)
119#define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \
Kim Phillips1558d0d2008-06-10 13:25:24 -0500120 OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS|\
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200121 OR_GPCM_SCY_15 | OR_GPCM_TRLX | OR_GPCM_EHTR | \
122 OR_GPCM_EAD)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200123#define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
124#define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | (0x13 + CONFIG_SYS_FLASH_SIZE_SHIFT))
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200125
126/*
127 * U-Boot memory configuration
128 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200129#define CONFIG_SYS_MONITOR_BASE TEXT_BASE
130#undef CONFIG_SYS_RAMBOOT
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200131
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200132#define CONFIG_SYS_INIT_RAM_LOCK
133#define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */
134#define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200135
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200136#define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */
137#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
138#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200139
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200140/* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
141#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
142#define CONFIG_SYS_MALLOC_LEN (512 * 1024)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200143
144/*
145 * Local Bus LCRR and LBCR regs
146 * LCRR: DLL bypass, Clock divider is 4
147 * External Local Bus rate is
148 * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
149 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200150#define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4)
151#define CONFIG_SYS_LBC_LBCR 0x00000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200152
153/* LB sdram refresh timer, about 6us */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200154#define CONFIG_SYS_LBC_LSRT 0x32000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200155/* LB refresh timer prescal, 266MHz/32*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200156#define CONFIG_SYS_LBC_MRTPR 0x20000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200157
158/*
159 * Serial Port
160 */
161#define CONFIG_CONS_INDEX 1
162#undef CONFIG_SERIAL_SOFTWARE_FIFO
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200163#define CONFIG_SYS_NS16550
164#define CONFIG_SYS_NS16550_SERIAL
165#define CONFIG_SYS_NS16550_REG_SIZE 1
166#define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200167
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200168#define CONFIG_SYS_BAUDRATE_TABLE \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200169 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
170
171#define CONFIG_CONSOLE ttyS0
172#define CONFIG_BAUDRATE 115200
173
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200174#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500)
175#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200176
177/* pass open firmware flat tree */
178#define CONFIG_OF_LIBFDT 1
179#define CONFIG_OF_BOARD_SETUP 1
180#define CONFIG_OF_STDOUT_VIA_ALIAS 1
181#define MV_DTB_NAME "mvblm7.dtb"
182
183/*
184 * PCI
185 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200186#define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
187#define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
188#define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000
189#define CONFIG_SYS_PCI1_MMIO_BASE (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE)
190#define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
191#define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000
192#define CONFIG_SYS_PCI1_IO_BASE 0x00000000
193#define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000
194#define CONFIG_SYS_PCI1_IO_SIZE 0x01000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200195
196#define _IO_BASE 0x00000000
197
198#define CONFIG_NET_MULTI 1
199#define CONFIG_NET_RETRY_COUNT 3
200
201#define PCI_66M
202#define CONFIG_83XX_CLKIN 66666667
203#define CONFIG_PCI_PNP
204#define CONFIG_PCI_SCAN_SHOW
205
206/* TSEC */
207#define CONFIG_GMII
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200208#define CONFIG_SYS_VSC8601_SKEWFIX
209#define CONFIG_SYS_VSC8601_SKEW_TX 3
210#define CONFIG_SYS_VSC8601_SKEW_RX 3
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200211
212#define CONFIG_TSEC1
213#define CONFIG_TSEC2
214
215#define CONFIG_HAS_ETH0
216#define CONFIG_TSEC1_NAME "TSEC0"
217#define CONFIG_FEC1_PHY_NORXERR
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200218#define CONFIG_SYS_TSEC1_OFFSET 0x24000
219#define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200220#define TSEC1_PHY_ADDR 0x10
221#define TSEC1_PHYIDX 0
222#define TSEC1_FLAGS (TSEC_GIGABIT|TSEC_REDUCED)
223
224#define CONFIG_HAS_ETH1
225#define CONFIG_TSEC2_NAME "TSEC1"
226#define CONFIG_FEC2_PHY_NORXERR
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200227#define CONFIG_SYS_TSEC2_OFFSET 0x25000
228#define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200229#define TSEC2_PHY_ADDR 0x11
230#define TSEC2_PHYIDX 0
231#define TSEC2_FLAGS (TSEC_GIGABIT|TSEC_REDUCED)
232
233#define CONFIG_ETHPRIME "TSEC0"
234
235#define CONFIG_BOOTP_VENDOREX
236#define CONFIG_BOOTP_SUBNETMASK
237#define CONFIG_BOOTP_GATEWAY
238#define CONFIG_BOOTP_DNS
239#define CONFIG_BOOTP_DNS2
240#define CONFIG_BOOTP_HOSTNAME
241#define CONFIG_BOOTP_BOOTFILESIZE
242#define CONFIG_BOOTP_BOOTPATH
243#define CONFIG_BOOTP_NTPSERVER
244#define CONFIG_BOOTP_RANDOM_DELAY
245#define CONFIG_BOOTP_SEND_HOSTNAME
246
247/* USB */
248#define CONFIG_HAS_FSL_DR_USB
249
250/*
251 * Environment
252 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200253#undef CONFIG_SYS_FLASH_PROTECTION
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200254#define CONFIG_ENV_OVERWRITE
255
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200256#define CONFIG_ENV_IS_IN_FLASH 1
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200257#define CONFIG_ENV_ADDR 0xFF800000
258#define CONFIG_ENV_SIZE 0x2000
259#define CONFIG_ENV_SECT_SIZE 0x2000
260#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
261#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200262
Wolfgang Denk41df50a2008-06-28 23:34:37 +0200263#define CONFIG_LOADS_ECHO
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200264#define CONFIG_SYS_LOADS_BAUD_CHANGE
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200265
266/*
267 * Command line configuration.
268 */
269#include <config_cmd_default.h>
270
271#define CONFIG_CMD_CACHE
272#define CONFIG_CMD_IRQ
273#define CONFIG_CMD_NET
274#define CONFIG_CMD_MII
275#define CONFIG_CMD_PING
276#define CONFIG_CMD_DHCP
277#define CONFIG_CMD_SDRAM
278#define CONFIG_CMD_PCI
279#define CONFIG_CMD_I2C
280#define CONFIG_CMD_FPGA
281
282#undef CONFIG_WATCHDOG
283
284/*
285 * Miscellaneous configurable options
286 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200287#define CONFIG_SYS_LONGHELP
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200288#define CONFIG_CMDLINE_EDITING
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200289#define CONFIG_SYS_HUSH_PARSER
290#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200291
292/* default load address */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200293#define CONFIG_SYS_LOAD_ADDR 0x2000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200294/* default location for tftp and bootm */
295#define CONFIG_LOADADDR 0x200000
296
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200297#define CONFIG_SYS_PROMPT "mvBL-M7> "
298#define CONFIG_SYS_CBSIZE 256
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200299
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200300#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
301#define CONFIG_SYS_MAXARGS 16
302#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
303#define CONFIG_SYS_HZ 1000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200304
305/*
306 * For booting Linux, the board info and command line data
307 * have to be in the first 8 MB of memory, since this is
308 * the maximum mapped by the Linux kernel during initialization.
309 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200310#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200311
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200312#define CONFIG_SYS_HRCW_LOW 0x0
313#define CONFIG_SYS_HRCW_HIGH 0x0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200314
315/*
316 * System performance
317 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200318#define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */
319#define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */
320#define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */
321#define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200322
323/* clocking */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200324#define CONFIG_SYS_SCCR_ENCCM 0
325#define CONFIG_SYS_SCCR_USBMPHCM 0
326#define CONFIG_SYS_SCCR_USBDRCM 2
327#define CONFIG_SYS_SCCR_TSEC1CM 1
328#define CONFIG_SYS_SCCR_TSEC2CM 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200329
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200330#define CONFIG_SYS_SICRH 0x1fff8003
331#define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1 | SICRL_USB0)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200332
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200333#define CONFIG_SYS_HID0_INIT 0x000000000
334#define CONFIG_SYS_HID0_FINAL CONFIG_SYS_HID0_INIT
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200335
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200336#define CONFIG_SYS_HID2 HID2_HBE
Andre Schwarz65ef0172008-07-02 18:54:08 +0200337#define CONFIG_HIGH_BATS 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200338
339/* DDR */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200340#define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
341#define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200342
343/* PCI */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200344#define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
345#define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
346#define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT |\
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200347 BATL_GUARDEDSTORAGE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200348#define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200349
350/* no PCI2 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200351#define CONFIG_SYS_IBAT3L 0
352#define CONFIG_SYS_IBAT3U 0
353#define CONFIG_SYS_IBAT4L 0
354#define CONFIG_SYS_IBAT4U 0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200355
356/* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200357#define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200358 BATL_GUARDEDSTORAGE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200359#define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200360
361/* stack in DCACHE 0xFDF00000 & FLASH @ 0xFF800000 */
Scott Wood7acde322009-03-31 17:49:36 -0500362#define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \
363 BATL_GUARDEDSTORAGE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200364#define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
365#define CONFIG_SYS_IBAT7L 0
366#define CONFIG_SYS_IBAT7U 0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200367
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200368#define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
369#define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
370#define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
371#define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
372#define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
373#define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
374#define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
375#define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
376#define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
377#define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
378#define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
379#define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
380#define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
381#define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
382#define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
383#define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200384
385/*
386 * Internal Definitions
387 *
388 * Boot Flags
389 */
390#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
391#define BOOTFLAG_WARM 0x02 /* Software reboot */
392
393
394/*
395 * Environment Configuration
396 */
397#define CONFIG_ENV_OVERWRITE
398
399#define CONFIG_NETDEV eth0
400
401/* Default path and filenames */
402#define CONFIG_BOOTDELAY 5
403#define CONFIG_AUTOBOOT_KEYED
404#define CONFIG_AUTOBOOT_STOP_STR "s"
405#define CONFIG_ZERO_BOOTDELAY_CHECK
406#define CONFIG_RESET_TO_RETRY 1000
407
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200408#define MV_CI mvBL-M7
409#define MV_VCI mvBL-M7
410#define MV_FPGA_DATA 0xfff80000
411#define MV_FPGA_SIZE 0x00076ca2
412#define MV_KERNEL_ADDR 0xff810000
413#define MV_INITRD_ADDR 0xffb00000
Wolfgang Denk85c25df2009-04-01 23:34:12 +0200414#define MV_SOURCE_ADDR 0xff804000
415#define MV_SOURCE_ADDR2 0xff806000
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200416#define MV_DTB_ADDR 0xff808000
417#define MV_INITRD_LENGTH 0x00400000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200418
419#define CONFIG_SHOW_BOOT_PROGRESS 1
420
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200421#define MV_KERNEL_ADDR_RAM 0x00100000
422#define MV_DTB_ADDR_RAM 0x00600000
423#define MV_INITRD_ADDR_RAM 0x01000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200424
425#define CONFIG_BOOTCOMMAND "if imi ${autoscr_addr}; \
Wolfgang Denk85c25df2009-04-01 23:34:12 +0200426 then source ${autoscr_addr}; \
427 else source ${autoscr_addr2}; \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200428 fi;"
429#define CONFIG_BOOTARGS "root=/dev/ram ro rootfstype=squashfs"
430
431#define CONFIG_EXTRA_ENV_SETTINGS \
432 "console_nr=0\0" \
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200433 "baudrate=" MK_STR(CONFIG_BAUDRATE) "\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200434 "stdin=serial\0" \
435 "stdout=serial\0" \
436 "stderr=serial\0" \
437 "fpga=0\0" \
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200438 "fpgadata=" MK_STR(MV_FPGA_DATA) "\0" \
439 "fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0" \
Wolfgang Denk85c25df2009-04-01 23:34:12 +0200440 "autoscr_addr=" MK_STR(MV_SOURCE_ADDR) "\0" \
441 "autoscr_addr2=" MK_STR(MV_SOURCE_ADDR2) "\0" \
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200442 "mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0" \
443 "mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0" \
444 "mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0" \
445 "mv_initrd_addr_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0" \
446 "mv_initrd_length=" MK_STR(MV_INITRD_LENGTH) "\0" \
447 "mv_dtb_addr=" MK_STR(MV_DTB_ADDR) "\0" \
448 "mv_dtb_addr_ram=" MK_STR(MV_DTB_ADDR_RAM) "\0" \
449 "dtb_name=" MK_STR(MV_DTB_NAME) "\0" \
Andre Schwarz65ef0172008-07-02 18:54:08 +0200450 "mv_version=" U_BOOT_VERSION "\0" \
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200451 "dhcp_client_id=" MK_STR(MV_CI) "\0" \
452 "dhcp_vendor-class-identifier=" MK_STR(MV_VCI) "\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200453 "netretry=no\0" \
454 "use_static_ipaddr=no\0" \
455 "static_ipaddr=192.168.90.10\0" \
456 "static_netmask=255.255.255.0\0" \
457 "static_gateway=0.0.0.0\0" \
458 "initrd_name=uInitrd.mvblm7-xenorfs\0" \
459 "zcip=no\0" \
460 "netboot=yes\0" \
461 "mvtest=Ff\0" \
462 "tried_bootfromflash=no\0" \
463 "tried_bootfromnet=no\0" \
464 "bootfile=mvblm72625.boot\0" \
465 "use_dhcp=yes\0" \
466 "gev_start=yes\0" \
467 "mvbcdma_debug=0\0" \
468 "mvbcia_debug=0\0" \
469 "propdev_debug=0\0" \
470 "gevss_debug=0\0" \
471 "watchdog=0\0" \
472 "usb_dr_mode=host\0" \
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200473 "sensor_cnt=2\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200474 ""
475
476#define CONFIG_FPGA_COUNT 1
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200477#define CONFIG_FPGA CONFIG_SYS_ALTERA_CYCLON2
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200478#define CONFIG_FPGA_ALTERA
479#define CONFIG_FPGA_CYCLON2
480
481#endif