blob: 8342a1a7e187fd5b3c3ced849dde1887782c3916 [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
Peter Tyser72f2d392009-05-22 17:23:25 -050037#define CONFIG_MPC834x 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +020038#define CONFIG_MPC8343 1
39
Wolfgang Denk291ba1b2010-10-06 09:05:45 +020040#define CONFIG_SYS_TEXT_BASE 0xFFF00000
41
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020042#define CONFIG_SYS_IMMR 0xE0000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020043
44#define CONFIG_PCI
Gabor Juhosb4458732013-05-30 07:06:12 +000045#define CONFIG_PCI_INDIRECT_BRIDGE
Andre Schwarz546cb1f2008-06-10 09:13:16 +020046#define CONFIG_PCI_SKIP_HOST_BRIDGE
Andre Schwarz546cb1f2008-06-10 09:13:16 +020047#define CONFIG_TSEC_ENET
48#define CONFIG_MPC8XXX_SPI
49#define CONFIG_HARD_SPI
50#define MVBLM7_MMC_CS 0x04000000
André Schwarza8e1d952009-08-27 14:48:35 +020051#define CONFIG_MISC_INIT_R
Andre Schwarz546cb1f2008-06-10 09:13:16 +020052
53/* I2C */
Heiko Schocherf2850742012-10-24 13:48:22 +020054#define CONFIG_SYS_I2C
55#define CONFIG_SYS_I2C_FSL
56#define CONFIG_SYS_FSL_I2C_SPEED 100000
57#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
58#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
59#define CONFIG_SYS_FSL_I2C2_SPEED 100000
60#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
61#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
Andre Schwarz546cb1f2008-06-10 09:13:16 +020062
63/*
64 * DDR Setup
65 */
André Schwarza8e1d952009-08-27 14:48:35 +020066#undef CONFIG_SPD_EEPROM
67
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020068#define CONFIG_SYS_DDR_BASE 0x00000000
69#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
70#define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
71#define CONFIG_SYS_83XX_DDR_USES_CS0 1
72#define CONFIG_SYS_MEMTEST_START (60<<20)
73#define CONFIG_SYS_MEMTEST_END (70<<20)
André Schwarza8e1d952009-08-27 14:48:35 +020074#define CONFIG_VERY_BIG_RAM
Andre Schwarz546cb1f2008-06-10 09:13:16 +020075
Joe Hershbergercc03b802011-10-11 23:57:29 -050076#define CONFIG_SYS_DDRCDR (DDRCDR_PZ_HIZ \
77 | DDRCDR_NZ_HIZ \
78 | DDRCDR_Q_DRN)
79 /* 0x22000001 */
André Schwarza8e1d952009-08-27 14:48:35 +020080#define CONFIG_SYS_DDR_SDRAM_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05
Andre Schwarz546cb1f2008-06-10 09:13:16 +020081
André Schwarza8e1d952009-08-27 14:48:35 +020082#define CONFIG_SYS_DDR_SIZE 512
Andre Schwarz546cb1f2008-06-10 09:13:16 +020083
André Schwarza8e1d952009-08-27 14:48:35 +020084#define CONFIG_SYS_DDR_CS0_CONFIG 0x80014202
Andre Schwarz546cb1f2008-06-10 09:13:16 +020085
André Schwarza8e1d952009-08-27 14:48:35 +020086#define CONFIG_SYS_DDR_CS0_BNDS 0x0000003f
Andre Schwarz546cb1f2008-06-10 09:13:16 +020087
André Schwarza8e1d952009-08-27 14:48:35 +020088#define CONFIG_SYS_DDR_TIMING_0 0x00260802
89#define CONFIG_SYS_DDR_TIMING_1 0x3837c322
90#define CONFIG_SYS_DDR_TIMING_2 0x0f9848c6
91#define CONFIG_SYS_DDR_TIMING_3 0x00000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020092
André Schwarza8e1d952009-08-27 14:48:35 +020093#define CONFIG_SYS_DDR_SDRAM_CFG 0x43080008
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020094#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
André Schwarza8e1d952009-08-27 14:48:35 +020095#define CONFIG_SYS_DDR_INTERVAL 0x02000100
Andre Schwarz546cb1f2008-06-10 09:13:16 +020096
André Schwarza8e1d952009-08-27 14:48:35 +020097#define CONFIG_SYS_DDR_MODE 0x04040242
98#define CONFIG_SYS_DDR_MODE2 0x00800000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020099
100/* Flash */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200101#define CONFIG_SYS_FLASH_CFI
Jean-Christophe PLAGNIOL-VILLARD8d94c232008-08-13 01:40:42 +0200102#define CONFIG_FLASH_CFI_DRIVER
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200103#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200104
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200105#define CONFIG_SYS_FLASH_BASE 0xFF800000
106#define CONFIG_SYS_FLASH_SIZE 8
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200107#define CONFIG_SYS_FLASH_EMPTY_INFO
108#define CONFIG_SYS_FLASH_ERASE_TOUT 60000
109#define CONFIG_SYS_FLASH_WRITE_TOUT 500
110#define CONFIG_SYS_MAX_FLASH_BANKS 1
111#define CONFIG_SYS_MAX_FLASH_SECT 256
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200112
Joe Hershbergerf05b9332011-10-11 23:57:30 -0500113#define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE \
114 | BR_PS_16 \
115 | BR_MS_GPCM \
116 | BR_V)
117#define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500118 | OR_UPM_XAM \
119 | OR_GPCM_CSNT \
120 | OR_GPCM_ACS_DIV2 \
121 | OR_GPCM_XACS \
122 | OR_GPCM_SCY_15 \
Joe Hershbergerf05b9332011-10-11 23:57:30 -0500123 | OR_GPCM_TRLX_SET \
124 | OR_GPCM_EHTR_SET \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500125 | OR_GPCM_EAD)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200126#define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
Joe Hershbergerf05b9332011-10-11 23:57:30 -0500127#define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_8MB)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200128
129/*
130 * U-Boot memory configuration
131 */
Wolfgang Denk0708bc62010-10-07 21:51:12 +0200132#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200133#undef CONFIG_SYS_RAMBOOT
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200134
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200135#define CONFIG_SYS_INIT_RAM_LOCK
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500136#define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */
137#define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM*/
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200138
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500139#define CONFIG_SYS_GBL_DATA_OFFSET \
140 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200141#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200142
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200143/* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
144#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
145#define CONFIG_SYS_MALLOC_LEN (512 * 1024)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200146
147/*
148 * Local Bus LCRR and LBCR regs
149 * LCRR: DLL bypass, Clock divider is 4
150 * External Local Bus rate is
151 * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
152 */
Kim Phillips328040a2009-09-25 18:19:44 -0500153#define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
154#define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200155#define CONFIG_SYS_LBC_LBCR 0x00000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200156
157/* LB sdram refresh timer, about 6us */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200158#define CONFIG_SYS_LBC_LSRT 0x32000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200159/* LB refresh timer prescal, 266MHz/32*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200160#define CONFIG_SYS_LBC_MRTPR 0x20000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200161
162/*
163 * Serial Port
164 */
165#define CONFIG_CONS_INDEX 1
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200166#define CONFIG_SYS_NS16550
167#define CONFIG_SYS_NS16550_SERIAL
168#define CONFIG_SYS_NS16550_REG_SIZE 1
169#define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200170
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200171#define CONFIG_SYS_BAUDRATE_TABLE \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500172 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200173
174#define CONFIG_CONSOLE ttyS0
175#define CONFIG_BAUDRATE 115200
176
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200177#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500)
178#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200179
180/* pass open firmware flat tree */
181#define CONFIG_OF_LIBFDT 1
182#define CONFIG_OF_BOARD_SETUP 1
183#define CONFIG_OF_STDOUT_VIA_ALIAS 1
184#define MV_DTB_NAME "mvblm7.dtb"
185
186/*
187 * PCI
188 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200189#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
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500192#define CONFIG_SYS_PCI1_MMIO_BASE \
193 (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200194#define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
195#define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000
196#define CONFIG_SYS_PCI1_IO_BASE 0x00000000
197#define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000
198#define CONFIG_SYS_PCI1_IO_SIZE 0x01000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200199
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200200#define CONFIG_NET_RETRY_COUNT 3
201
Wolfgang Denk291ba1b2010-10-06 09:05:45 +0200202#define CONFIG_PCI_66M
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200203#define CONFIG_83XX_CLKIN 66666667
204#define CONFIG_PCI_PNP
205#define CONFIG_PCI_SCAN_SHOW
206
207/* TSEC */
208#define CONFIG_GMII
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200209#define CONFIG_SYS_VSC8601_SKEWFIX
210#define CONFIG_SYS_VSC8601_SKEW_TX 3
211#define CONFIG_SYS_VSC8601_SKEW_RX 3
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200212
213#define CONFIG_TSEC1
214#define CONFIG_TSEC2
215
216#define CONFIG_HAS_ETH0
217#define CONFIG_TSEC1_NAME "TSEC0"
218#define CONFIG_FEC1_PHY_NORXERR
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200219#define CONFIG_SYS_TSEC1_OFFSET 0x24000
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500220#define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200221#define TSEC1_PHY_ADDR 0x10
222#define TSEC1_PHYIDX 0
223#define TSEC1_FLAGS (TSEC_GIGABIT|TSEC_REDUCED)
224
225#define CONFIG_HAS_ETH1
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500226#define CONFIG_TSEC2_NAME "TSEC1"
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200227#define CONFIG_FEC2_PHY_NORXERR
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200228#define CONFIG_SYS_TSEC2_OFFSET 0x25000
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500229#define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200230#define TSEC2_PHY_ADDR 0x11
231#define TSEC2_PHYIDX 0
232#define TSEC2_FLAGS (TSEC_GIGABIT|TSEC_REDUCED)
233
234#define CONFIG_ETHPRIME "TSEC0"
235
236#define CONFIG_BOOTP_VENDOREX
237#define CONFIG_BOOTP_SUBNETMASK
238#define CONFIG_BOOTP_GATEWAY
239#define CONFIG_BOOTP_DNS
240#define CONFIG_BOOTP_DNS2
241#define CONFIG_BOOTP_HOSTNAME
242#define CONFIG_BOOTP_BOOTFILESIZE
243#define CONFIG_BOOTP_BOOTPATH
244#define CONFIG_BOOTP_NTPSERVER
245#define CONFIG_BOOTP_RANDOM_DELAY
246#define CONFIG_BOOTP_SEND_HOSTNAME
247
248/* USB */
Andre Schwarzd3f51dd2010-05-03 13:22:31 +0200249#define CONFIG_SYS_USB_HOST
250#define CONFIG_USB_EHCI
251#define CONFIG_USB_EHCI_FSL
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200252#define CONFIG_HAS_FSL_DR_USB
Andre Schwarzd3f51dd2010-05-03 13:22:31 +0200253#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200254
255/*
256 * Environment
257 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200258#undef CONFIG_SYS_FLASH_PROTECTION
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200259#define CONFIG_ENV_OVERWRITE
260
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200261#define CONFIG_ENV_IS_IN_FLASH 1
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200262#define CONFIG_ENV_ADDR 0xFF800000
263#define CONFIG_ENV_SIZE 0x2000
264#define CONFIG_ENV_SECT_SIZE 0x2000
265#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500266#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200267
Wolfgang Denk41df50a2008-06-28 23:34:37 +0200268#define CONFIG_LOADS_ECHO
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200269#define CONFIG_SYS_LOADS_BAUD_CHANGE
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200270
271/*
272 * Command line configuration.
273 */
274#include <config_cmd_default.h>
275
276#define CONFIG_CMD_CACHE
277#define CONFIG_CMD_IRQ
278#define CONFIG_CMD_NET
279#define CONFIG_CMD_MII
280#define CONFIG_CMD_PING
281#define CONFIG_CMD_DHCP
282#define CONFIG_CMD_SDRAM
283#define CONFIG_CMD_PCI
284#define CONFIG_CMD_I2C
285#define CONFIG_CMD_FPGA
Andre Schwarzd3f51dd2010-05-03 13:22:31 +0200286#define CONFIG_CMD_USB
287#define CONFIG_DOS_PARTITION
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200288
289#undef CONFIG_WATCHDOG
290
291/*
292 * Miscellaneous configurable options
293 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200294#define CONFIG_SYS_LONGHELP
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200295#define CONFIG_CMDLINE_EDITING
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500296#define CONFIG_AUTO_COMPLETE /* add autocompletion support */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200297#define CONFIG_SYS_HUSH_PARSER
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200298
299/* default load address */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200300#define CONFIG_SYS_LOAD_ADDR 0x2000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200301/* default location for tftp and bootm */
302#define CONFIG_LOADADDR 0x200000
303
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200304#define CONFIG_SYS_PROMPT "mvBL-M7> "
305#define CONFIG_SYS_CBSIZE 256
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200306
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500307#define CONFIG_SYS_PBSIZE \
308 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200309#define CONFIG_SYS_MAXARGS 16
310#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
311#define CONFIG_SYS_HZ 1000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200312
313/*
314 * For booting Linux, the board info and command line data
Ira W. Snyderc5a22d02010-09-10 15:42:32 -0700315 * have to be in the first 256 MB of memory, since this is
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200316 * the maximum mapped by the Linux kernel during initialization.
317 */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500318 /* Initial Memory map for Linux*/
319#define CONFIG_SYS_BOOTMAPSZ (256 << 20)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200320
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200321#define CONFIG_SYS_HRCW_LOW 0x0
322#define CONFIG_SYS_HRCW_HIGH 0x0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200323
324/*
325 * System performance
326 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200327#define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500328#define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200329#define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */
330#define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200331
332/* clocking */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200333#define CONFIG_SYS_SCCR_ENCCM 0
334#define CONFIG_SYS_SCCR_USBMPHCM 0
335#define CONFIG_SYS_SCCR_USBDRCM 2
336#define CONFIG_SYS_SCCR_TSEC1CM 1
337#define CONFIG_SYS_SCCR_TSEC2CM 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200338
Andre Schwarz1978bdd2010-10-22 11:21:46 +0200339#define CONFIG_SYS_SICRH 0x1fef0003
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200340#define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1 | SICRL_USB0)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200341
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200342#define CONFIG_SYS_HID0_INIT 0x000000000
Kim Phillipsf3c7cd92010-04-20 19:37:54 -0500343#define CONFIG_SYS_HID0_FINAL (CONFIG_SYS_HID0_INIT | \
344 HID0_ENABLE_INSTRUCTION_CACHE)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200345
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200346#define CONFIG_SYS_HID2 HID2_HBE
Andre Schwarz65ef0172008-07-02 18:54:08 +0200347#define CONFIG_HIGH_BATS 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200348
349/* DDR */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500350#define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500351 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500352 | BATL_MEMCOHERENCE)
353#define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE \
354 | BATU_BL_256M \
355 | BATU_VS \
356 | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200357
358/* PCI */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500359#define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500360 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500361 | BATL_MEMCOHERENCE)
362#define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE \
363 | BATU_BL_256M \
364 | BATU_VS \
365 | BATU_VP)
366#define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500367 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500368 | BATL_CACHEINHIBIT \
369 | BATL_GUARDEDSTORAGE)
370#define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE \
371 | BATU_BL_256M \
372 | BATU_VS \
373 | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200374
375/* no PCI2 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200376#define CONFIG_SYS_IBAT3L 0
377#define CONFIG_SYS_IBAT3U 0
378#define CONFIG_SYS_IBAT4L 0
379#define CONFIG_SYS_IBAT4U 0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200380
381/* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500382#define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500383 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500384 | BATL_CACHEINHIBIT \
385 | BATL_GUARDEDSTORAGE)
386#define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR \
387 | BATU_BL_256M \
388 | BATU_VS \
389 | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200390
391/* stack in DCACHE 0xFDF00000 & FLASH @ 0xFF800000 */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500392#define CONFIG_SYS_IBAT6L (0xF0000000 \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500393 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500394 | BATL_MEMCOHERENCE \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500395 | BATL_GUARDEDSTORAGE)
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500396#define CONFIG_SYS_IBAT6U (0xF0000000 \
397 | BATU_BL_256M \
398 | BATU_VS \
399 | BATU_VP)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200400#define CONFIG_SYS_IBAT7L 0
401#define CONFIG_SYS_IBAT7U 0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200402
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200403#define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
404#define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
405#define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
406#define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
407#define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
408#define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
409#define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
410#define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
411#define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
412#define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
413#define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
414#define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
415#define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
416#define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
417#define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
418#define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200419
420/*
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200421 * Environment Configuration
422 */
423#define CONFIG_ENV_OVERWRITE
424
425#define CONFIG_NETDEV eth0
426
427/* Default path and filenames */
428#define CONFIG_BOOTDELAY 5
429#define CONFIG_AUTOBOOT_KEYED
430#define CONFIG_AUTOBOOT_STOP_STR "s"
431#define CONFIG_ZERO_BOOTDELAY_CHECK
432#define CONFIG_RESET_TO_RETRY 1000
433
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500434#define MV_CI "mvBL-M7"
435#define MV_VCI "mvBL-M7"
André Schwarza8e1d952009-08-27 14:48:35 +0200436#define MV_FPGA_DATA 0xfff40000
437#define MV_FPGA_SIZE 0
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200438#define MV_KERNEL_ADDR 0xff810000
439#define MV_INITRD_ADDR 0xffb00000
Peter Tyserd78876c2009-09-16 21:38:10 -0500440#define MV_SCRIPT_ADDR 0xff804000
441#define MV_SCRIPT_ADDR2 0xff806000
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200442#define MV_DTB_ADDR 0xff808000
443#define MV_INITRD_LENGTH 0x00400000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200444
445#define CONFIG_SHOW_BOOT_PROGRESS 1
446
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200447#define MV_KERNEL_ADDR_RAM 0x00100000
448#define MV_DTB_ADDR_RAM 0x00600000
449#define MV_INITRD_ADDR_RAM 0x01000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200450
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500451#define CONFIG_BOOTCOMMAND "if imi ${script_addr}; " \
452 "then source ${script_addr}; " \
453 "else source ${script_addr2}; " \
454 "fi;"
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200455#define CONFIG_BOOTARGS "root=/dev/ram ro rootfstype=squashfs"
456
457#define CONFIG_EXTRA_ENV_SETTINGS \
458 "console_nr=0\0" \
Marek Vasut0b3176c2012-09-23 17:41:24 +0200459 "baudrate=" __stringify(CONFIG_BAUDRATE) "\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200460 "stdin=serial\0" \
461 "stdout=serial\0" \
462 "stderr=serial\0" \
463 "fpga=0\0" \
Marek Vasut0b3176c2012-09-23 17:41:24 +0200464 "fpgadata=" __stringify(MV_FPGA_DATA) "\0" \
465 "fpgadatasize=" __stringify(MV_FPGA_SIZE) "\0" \
466 "script_addr=" __stringify(MV_SCRIPT_ADDR) "\0" \
467 "script_addr2=" __stringify(MV_SCRIPT_ADDR2) "\0" \
468 "mv_kernel_addr=" __stringify(MV_KERNEL_ADDR) "\0" \
469 "mv_kernel_addr_ram=" __stringify(MV_KERNEL_ADDR_RAM) "\0" \
470 "mv_initrd_addr=" __stringify(MV_INITRD_ADDR) "\0" \
471 "mv_initrd_addr_ram=" __stringify(MV_INITRD_ADDR_RAM) "\0" \
472 "mv_initrd_length=" __stringify(MV_INITRD_LENGTH) "\0" \
473 "mv_dtb_addr=" __stringify(MV_DTB_ADDR) "\0" \
474 "mv_dtb_addr_ram=" __stringify(MV_DTB_ADDR_RAM) "\0" \
475 "dtb_name=" __stringify(MV_DTB_NAME) "\0" \
Andre Schwarz65ef0172008-07-02 18:54:08 +0200476 "mv_version=" U_BOOT_VERSION "\0" \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500477 "dhcp_client_id=" MV_CI "\0" \
478 "dhcp_vendor-class-identifier=" MV_VCI "\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200479 "netretry=no\0" \
480 "use_static_ipaddr=no\0" \
481 "static_ipaddr=192.168.90.10\0" \
482 "static_netmask=255.255.255.0\0" \
483 "static_gateway=0.0.0.0\0" \
André Schwarza8e1d952009-08-27 14:48:35 +0200484 "initrd_name=uInitrd.mvBL-M7-rfs\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200485 "zcip=no\0" \
486 "netboot=yes\0" \
487 "mvtest=Ff\0" \
488 "tried_bootfromflash=no\0" \
489 "tried_bootfromnet=no\0" \
490 "bootfile=mvblm72625.boot\0" \
491 "use_dhcp=yes\0" \
492 "gev_start=yes\0" \
493 "mvbcdma_debug=0\0" \
494 "mvbcia_debug=0\0" \
495 "propdev_debug=0\0" \
496 "gevss_debug=0\0" \
497 "watchdog=0\0" \
498 "usb_dr_mode=host\0" \
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200499 "sensor_cnt=2\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200500 ""
501
502#define CONFIG_FPGA_COUNT 1
Michal Simekb6b8aaa2013-05-01 18:05:56 +0200503#define CONFIG_FPGA
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200504#define CONFIG_FPGA_ALTERA
505#define CONFIG_FPGA_CYCLON2
506
507#endif