blob: 044a1bc2c8f74d257638dfe3c7c0dc4630e8073b [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 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Andre Schwarz546cb1f2008-06-10 09:13:16 +02008 */
9
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
Andre Schwarz65ef0172008-07-02 18:54:08 +020014#include <version.h>
Andre Schwarz546cb1f2008-06-10 09:13:16 +020015
16/*
17 * High Level Configuration Options
18 */
19#define CONFIG_E300 1
Peter Tyser62e73982009-05-22 17:23:24 -050020#define CONFIG_MPC83xx 1
Peter Tyser72f2d392009-05-22 17:23:25 -050021#define CONFIG_MPC834x 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +020022#define CONFIG_MPC8343 1
23
Wolfgang Denk291ba1b2010-10-06 09:05:45 +020024#define CONFIG_SYS_TEXT_BASE 0xFFF00000
25
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020026#define CONFIG_SYS_IMMR 0xE0000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020027
28#define CONFIG_PCI
Gabor Juhosb4458732013-05-30 07:06:12 +000029#define CONFIG_PCI_INDIRECT_BRIDGE
Andre Schwarz546cb1f2008-06-10 09:13:16 +020030#define CONFIG_PCI_SKIP_HOST_BRIDGE
Andre Schwarz546cb1f2008-06-10 09:13:16 +020031#define CONFIG_TSEC_ENET
32#define CONFIG_MPC8XXX_SPI
33#define CONFIG_HARD_SPI
34#define MVBLM7_MMC_CS 0x04000000
André Schwarza8e1d952009-08-27 14:48:35 +020035#define CONFIG_MISC_INIT_R
Andre Schwarz546cb1f2008-06-10 09:13:16 +020036
37/* I2C */
Heiko Schocherf2850742012-10-24 13:48:22 +020038#define CONFIG_SYS_I2C
39#define CONFIG_SYS_I2C_FSL
40#define CONFIG_SYS_FSL_I2C_SPEED 100000
41#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
42#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
43#define CONFIG_SYS_FSL_I2C2_SPEED 100000
44#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
45#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
Andre Schwarz546cb1f2008-06-10 09:13:16 +020046
47/*
48 * DDR Setup
49 */
André Schwarza8e1d952009-08-27 14:48:35 +020050#undef CONFIG_SPD_EEPROM
51
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020052#define CONFIG_SYS_DDR_BASE 0x00000000
53#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
54#define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
55#define CONFIG_SYS_83XX_DDR_USES_CS0 1
56#define CONFIG_SYS_MEMTEST_START (60<<20)
57#define CONFIG_SYS_MEMTEST_END (70<<20)
André Schwarza8e1d952009-08-27 14:48:35 +020058#define CONFIG_VERY_BIG_RAM
Andre Schwarz546cb1f2008-06-10 09:13:16 +020059
Joe Hershbergercc03b802011-10-11 23:57:29 -050060#define CONFIG_SYS_DDRCDR (DDRCDR_PZ_HIZ \
61 | DDRCDR_NZ_HIZ \
62 | DDRCDR_Q_DRN)
63 /* 0x22000001 */
André Schwarza8e1d952009-08-27 14:48:35 +020064#define CONFIG_SYS_DDR_SDRAM_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05
Andre Schwarz546cb1f2008-06-10 09:13:16 +020065
André Schwarza8e1d952009-08-27 14:48:35 +020066#define CONFIG_SYS_DDR_SIZE 512
Andre Schwarz546cb1f2008-06-10 09:13:16 +020067
André Schwarza8e1d952009-08-27 14:48:35 +020068#define CONFIG_SYS_DDR_CS0_CONFIG 0x80014202
Andre Schwarz546cb1f2008-06-10 09:13:16 +020069
André Schwarza8e1d952009-08-27 14:48:35 +020070#define CONFIG_SYS_DDR_CS0_BNDS 0x0000003f
Andre Schwarz546cb1f2008-06-10 09:13:16 +020071
André Schwarza8e1d952009-08-27 14:48:35 +020072#define CONFIG_SYS_DDR_TIMING_0 0x00260802
73#define CONFIG_SYS_DDR_TIMING_1 0x3837c322
74#define CONFIG_SYS_DDR_TIMING_2 0x0f9848c6
75#define CONFIG_SYS_DDR_TIMING_3 0x00000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020076
André Schwarza8e1d952009-08-27 14:48:35 +020077#define CONFIG_SYS_DDR_SDRAM_CFG 0x43080008
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020078#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
André Schwarza8e1d952009-08-27 14:48:35 +020079#define CONFIG_SYS_DDR_INTERVAL 0x02000100
Andre Schwarz546cb1f2008-06-10 09:13:16 +020080
André Schwarza8e1d952009-08-27 14:48:35 +020081#define CONFIG_SYS_DDR_MODE 0x04040242
82#define CONFIG_SYS_DDR_MODE2 0x00800000
Andre Schwarz546cb1f2008-06-10 09:13:16 +020083
84/* Flash */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020085#define CONFIG_SYS_FLASH_CFI
Jean-Christophe PLAGNIOL-VILLARD8d94c232008-08-13 01:40:42 +020086#define CONFIG_FLASH_CFI_DRIVER
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020087#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
Andre Schwarz546cb1f2008-06-10 09:13:16 +020088
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020089#define CONFIG_SYS_FLASH_BASE 0xFF800000
90#define CONFIG_SYS_FLASH_SIZE 8
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020091#define CONFIG_SYS_FLASH_EMPTY_INFO
92#define CONFIG_SYS_FLASH_ERASE_TOUT 60000
93#define CONFIG_SYS_FLASH_WRITE_TOUT 500
94#define CONFIG_SYS_MAX_FLASH_BANKS 1
95#define CONFIG_SYS_MAX_FLASH_SECT 256
Andre Schwarz546cb1f2008-06-10 09:13:16 +020096
Joe Hershbergerf05b9332011-10-11 23:57:30 -050097#define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE \
98 | BR_PS_16 \
99 | BR_MS_GPCM \
100 | BR_V)
101#define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500102 | OR_UPM_XAM \
103 | OR_GPCM_CSNT \
104 | OR_GPCM_ACS_DIV2 \
105 | OR_GPCM_XACS \
106 | OR_GPCM_SCY_15 \
Joe Hershbergerf05b9332011-10-11 23:57:30 -0500107 | OR_GPCM_TRLX_SET \
108 | OR_GPCM_EHTR_SET \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500109 | OR_GPCM_EAD)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200110#define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
Joe Hershbergerf05b9332011-10-11 23:57:30 -0500111#define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_8MB)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200112
113/*
114 * U-Boot memory configuration
115 */
Wolfgang Denk0708bc62010-10-07 21:51:12 +0200116#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200117#undef CONFIG_SYS_RAMBOOT
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200118
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200119#define CONFIG_SYS_INIT_RAM_LOCK
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500120#define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */
121#define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM*/
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200122
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500123#define CONFIG_SYS_GBL_DATA_OFFSET \
124 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200125#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200126
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200127/* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
128#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
129#define CONFIG_SYS_MALLOC_LEN (512 * 1024)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200130
131/*
132 * Local Bus LCRR and LBCR regs
133 * LCRR: DLL bypass, Clock divider is 4
134 * External Local Bus rate is
135 * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
136 */
Kim Phillips328040a2009-09-25 18:19:44 -0500137#define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
138#define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200139#define CONFIG_SYS_LBC_LBCR 0x00000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200140
141/* LB sdram refresh timer, about 6us */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200142#define CONFIG_SYS_LBC_LSRT 0x32000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200143/* LB refresh timer prescal, 266MHz/32*/
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200144#define CONFIG_SYS_LBC_MRTPR 0x20000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200145
146/*
147 * Serial Port
148 */
149#define CONFIG_CONS_INDEX 1
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200150#define CONFIG_SYS_NS16550
151#define CONFIG_SYS_NS16550_SERIAL
152#define CONFIG_SYS_NS16550_REG_SIZE 1
153#define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200154
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200155#define CONFIG_SYS_BAUDRATE_TABLE \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500156 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200157
158#define CONFIG_CONSOLE ttyS0
159#define CONFIG_BAUDRATE 115200
160
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200161#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500)
162#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200163
164/* pass open firmware flat tree */
165#define CONFIG_OF_LIBFDT 1
166#define CONFIG_OF_BOARD_SETUP 1
167#define CONFIG_OF_STDOUT_VIA_ALIAS 1
168#define MV_DTB_NAME "mvblm7.dtb"
169
170/*
171 * PCI
172 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200173#define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
174#define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
175#define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500176#define CONFIG_SYS_PCI1_MMIO_BASE \
177 (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200178#define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
179#define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000
180#define CONFIG_SYS_PCI1_IO_BASE 0x00000000
181#define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000
182#define CONFIG_SYS_PCI1_IO_SIZE 0x01000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200183
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200184#define CONFIG_NET_RETRY_COUNT 3
185
Wolfgang Denk291ba1b2010-10-06 09:05:45 +0200186#define CONFIG_PCI_66M
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200187#define CONFIG_83XX_CLKIN 66666667
188#define CONFIG_PCI_PNP
189#define CONFIG_PCI_SCAN_SHOW
190
191/* TSEC */
192#define CONFIG_GMII
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200193#define CONFIG_SYS_VSC8601_SKEWFIX
194#define CONFIG_SYS_VSC8601_SKEW_TX 3
195#define CONFIG_SYS_VSC8601_SKEW_RX 3
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200196
197#define CONFIG_TSEC1
198#define CONFIG_TSEC2
199
200#define CONFIG_HAS_ETH0
201#define CONFIG_TSEC1_NAME "TSEC0"
202#define CONFIG_FEC1_PHY_NORXERR
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200203#define CONFIG_SYS_TSEC1_OFFSET 0x24000
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500204#define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200205#define TSEC1_PHY_ADDR 0x10
206#define TSEC1_PHYIDX 0
207#define TSEC1_FLAGS (TSEC_GIGABIT|TSEC_REDUCED)
208
209#define CONFIG_HAS_ETH1
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500210#define CONFIG_TSEC2_NAME "TSEC1"
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200211#define CONFIG_FEC2_PHY_NORXERR
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200212#define CONFIG_SYS_TSEC2_OFFSET 0x25000
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500213#define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200214#define TSEC2_PHY_ADDR 0x11
215#define TSEC2_PHYIDX 0
216#define TSEC2_FLAGS (TSEC_GIGABIT|TSEC_REDUCED)
217
218#define CONFIG_ETHPRIME "TSEC0"
219
220#define CONFIG_BOOTP_VENDOREX
221#define CONFIG_BOOTP_SUBNETMASK
222#define CONFIG_BOOTP_GATEWAY
223#define CONFIG_BOOTP_DNS
224#define CONFIG_BOOTP_DNS2
225#define CONFIG_BOOTP_HOSTNAME
226#define CONFIG_BOOTP_BOOTFILESIZE
227#define CONFIG_BOOTP_BOOTPATH
228#define CONFIG_BOOTP_NTPSERVER
229#define CONFIG_BOOTP_RANDOM_DELAY
230#define CONFIG_BOOTP_SEND_HOSTNAME
231
232/* USB */
Andre Schwarzd3f51dd2010-05-03 13:22:31 +0200233#define CONFIG_SYS_USB_HOST
234#define CONFIG_USB_EHCI
235#define CONFIG_USB_EHCI_FSL
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200236#define CONFIG_HAS_FSL_DR_USB
Andre Schwarzd3f51dd2010-05-03 13:22:31 +0200237#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200238
239/*
240 * Environment
241 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200242#undef CONFIG_SYS_FLASH_PROTECTION
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200243#define CONFIG_ENV_OVERWRITE
244
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200245#define CONFIG_ENV_IS_IN_FLASH 1
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200246#define CONFIG_ENV_ADDR 0xFF800000
247#define CONFIG_ENV_SIZE 0x2000
248#define CONFIG_ENV_SECT_SIZE 0x2000
249#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500250#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200251
Wolfgang Denk41df50a2008-06-28 23:34:37 +0200252#define CONFIG_LOADS_ECHO
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200253#define CONFIG_SYS_LOADS_BAUD_CHANGE
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200254
255/*
256 * Command line configuration.
257 */
258#include <config_cmd_default.h>
259
260#define CONFIG_CMD_CACHE
261#define CONFIG_CMD_IRQ
262#define CONFIG_CMD_NET
263#define CONFIG_CMD_MII
264#define CONFIG_CMD_PING
265#define CONFIG_CMD_DHCP
266#define CONFIG_CMD_SDRAM
267#define CONFIG_CMD_PCI
268#define CONFIG_CMD_I2C
269#define CONFIG_CMD_FPGA
Andre Schwarzd3f51dd2010-05-03 13:22:31 +0200270#define CONFIG_CMD_USB
271#define CONFIG_DOS_PARTITION
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200272
273#undef CONFIG_WATCHDOG
274
275/*
276 * Miscellaneous configurable options
277 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200278#define CONFIG_SYS_LONGHELP
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200279#define CONFIG_CMDLINE_EDITING
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500280#define CONFIG_AUTO_COMPLETE /* add autocompletion support */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200281#define CONFIG_SYS_HUSH_PARSER
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200282
283/* default load address */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200284#define CONFIG_SYS_LOAD_ADDR 0x2000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200285/* default location for tftp and bootm */
286#define CONFIG_LOADADDR 0x200000
287
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200288#define CONFIG_SYS_PROMPT "mvBL-M7> "
289#define CONFIG_SYS_CBSIZE 256
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200290
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500291#define CONFIG_SYS_PBSIZE \
292 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200293#define CONFIG_SYS_MAXARGS 16
294#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
295#define CONFIG_SYS_HZ 1000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200296
297/*
298 * For booting Linux, the board info and command line data
Ira W. Snyderc5a22d02010-09-10 15:42:32 -0700299 * have to be in the first 256 MB of memory, since this is
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200300 * the maximum mapped by the Linux kernel during initialization.
301 */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500302 /* Initial Memory map for Linux*/
303#define CONFIG_SYS_BOOTMAPSZ (256 << 20)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200304
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200305#define CONFIG_SYS_HRCW_LOW 0x0
306#define CONFIG_SYS_HRCW_HIGH 0x0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200307
308/*
309 * System performance
310 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200311#define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500312#define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200313#define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */
314#define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200315
316/* clocking */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200317#define CONFIG_SYS_SCCR_ENCCM 0
318#define CONFIG_SYS_SCCR_USBMPHCM 0
319#define CONFIG_SYS_SCCR_USBDRCM 2
320#define CONFIG_SYS_SCCR_TSEC1CM 1
321#define CONFIG_SYS_SCCR_TSEC2CM 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200322
Andre Schwarz1978bdd2010-10-22 11:21:46 +0200323#define CONFIG_SYS_SICRH 0x1fef0003
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200324#define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1 | SICRL_USB0)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200325
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200326#define CONFIG_SYS_HID0_INIT 0x000000000
Kim Phillipsf3c7cd92010-04-20 19:37:54 -0500327#define CONFIG_SYS_HID0_FINAL (CONFIG_SYS_HID0_INIT | \
328 HID0_ENABLE_INSTRUCTION_CACHE)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200329
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200330#define CONFIG_SYS_HID2 HID2_HBE
Andre Schwarz65ef0172008-07-02 18:54:08 +0200331#define CONFIG_HIGH_BATS 1
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200332
333/* DDR */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500334#define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500335 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500336 | BATL_MEMCOHERENCE)
337#define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE \
338 | BATU_BL_256M \
339 | BATU_VS \
340 | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200341
342/* PCI */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500343#define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500344 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500345 | BATL_MEMCOHERENCE)
346#define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE \
347 | BATU_BL_256M \
348 | BATU_VS \
349 | BATU_VP)
350#define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500351 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500352 | BATL_CACHEINHIBIT \
353 | BATL_GUARDEDSTORAGE)
354#define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE \
355 | BATU_BL_256M \
356 | BATU_VS \
357 | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200358
359/* no PCI2 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200360#define CONFIG_SYS_IBAT3L 0
361#define CONFIG_SYS_IBAT3U 0
362#define CONFIG_SYS_IBAT4L 0
363#define CONFIG_SYS_IBAT4U 0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200364
365/* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500366#define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR \
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_IBAT5U (CONFIG_SYS_IMMR \
371 | BATU_BL_256M \
372 | BATU_VS \
373 | BATU_VP)
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200374
375/* stack in DCACHE 0xFDF00000 & FLASH @ 0xFF800000 */
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500376#define CONFIG_SYS_IBAT6L (0xF0000000 \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500377 | BATL_PP_RW \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500378 | BATL_MEMCOHERENCE \
Joe Hershbergerbfd89732011-10-11 23:57:28 -0500379 | BATL_GUARDEDSTORAGE)
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500380#define CONFIG_SYS_IBAT6U (0xF0000000 \
381 | BATU_BL_256M \
382 | BATU_VS \
383 | BATU_VP)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200384#define CONFIG_SYS_IBAT7L 0
385#define CONFIG_SYS_IBAT7U 0
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200386
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200387#define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
388#define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
389#define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
390#define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
391#define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
392#define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
393#define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
394#define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
395#define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
396#define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
397#define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
398#define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
399#define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
400#define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
401#define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
402#define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200403
404/*
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200405 * Environment Configuration
406 */
407#define CONFIG_ENV_OVERWRITE
408
409#define CONFIG_NETDEV eth0
410
411/* Default path and filenames */
412#define CONFIG_BOOTDELAY 5
413#define CONFIG_AUTOBOOT_KEYED
414#define CONFIG_AUTOBOOT_STOP_STR "s"
415#define CONFIG_ZERO_BOOTDELAY_CHECK
416#define CONFIG_RESET_TO_RETRY 1000
417
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500418#define MV_CI "mvBL-M7"
419#define MV_VCI "mvBL-M7"
André Schwarza8e1d952009-08-27 14:48:35 +0200420#define MV_FPGA_DATA 0xfff40000
421#define MV_FPGA_SIZE 0
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200422#define MV_KERNEL_ADDR 0xff810000
423#define MV_INITRD_ADDR 0xffb00000
Peter Tyserd78876c2009-09-16 21:38:10 -0500424#define MV_SCRIPT_ADDR 0xff804000
425#define MV_SCRIPT_ADDR2 0xff806000
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200426#define MV_DTB_ADDR 0xff808000
427#define MV_INITRD_LENGTH 0x00400000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200428
429#define CONFIG_SHOW_BOOT_PROGRESS 1
430
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200431#define MV_KERNEL_ADDR_RAM 0x00100000
432#define MV_DTB_ADDR_RAM 0x00600000
433#define MV_INITRD_ADDR_RAM 0x01000000
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200434
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500435#define CONFIG_BOOTCOMMAND "if imi ${script_addr}; " \
436 "then source ${script_addr}; " \
437 "else source ${script_addr2}; " \
438 "fi;"
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200439#define CONFIG_BOOTARGS "root=/dev/ram ro rootfstype=squashfs"
440
441#define CONFIG_EXTRA_ENV_SETTINGS \
442 "console_nr=0\0" \
Marek Vasut0b3176c2012-09-23 17:41:24 +0200443 "baudrate=" __stringify(CONFIG_BAUDRATE) "\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200444 "stdin=serial\0" \
445 "stdout=serial\0" \
446 "stderr=serial\0" \
447 "fpga=0\0" \
Marek Vasut0b3176c2012-09-23 17:41:24 +0200448 "fpgadata=" __stringify(MV_FPGA_DATA) "\0" \
449 "fpgadatasize=" __stringify(MV_FPGA_SIZE) "\0" \
450 "script_addr=" __stringify(MV_SCRIPT_ADDR) "\0" \
451 "script_addr2=" __stringify(MV_SCRIPT_ADDR2) "\0" \
452 "mv_kernel_addr=" __stringify(MV_KERNEL_ADDR) "\0" \
453 "mv_kernel_addr_ram=" __stringify(MV_KERNEL_ADDR_RAM) "\0" \
454 "mv_initrd_addr=" __stringify(MV_INITRD_ADDR) "\0" \
455 "mv_initrd_addr_ram=" __stringify(MV_INITRD_ADDR_RAM) "\0" \
456 "mv_initrd_length=" __stringify(MV_INITRD_LENGTH) "\0" \
457 "mv_dtb_addr=" __stringify(MV_DTB_ADDR) "\0" \
458 "mv_dtb_addr_ram=" __stringify(MV_DTB_ADDR_RAM) "\0" \
459 "dtb_name=" __stringify(MV_DTB_NAME) "\0" \
Andre Schwarz65ef0172008-07-02 18:54:08 +0200460 "mv_version=" U_BOOT_VERSION "\0" \
Joe Hershberger4f16dce2011-10-11 23:57:20 -0500461 "dhcp_client_id=" MV_CI "\0" \
462 "dhcp_vendor-class-identifier=" MV_VCI "\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200463 "netretry=no\0" \
464 "use_static_ipaddr=no\0" \
465 "static_ipaddr=192.168.90.10\0" \
466 "static_netmask=255.255.255.0\0" \
467 "static_gateway=0.0.0.0\0" \
André Schwarza8e1d952009-08-27 14:48:35 +0200468 "initrd_name=uInitrd.mvBL-M7-rfs\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200469 "zcip=no\0" \
470 "netboot=yes\0" \
471 "mvtest=Ff\0" \
472 "tried_bootfromflash=no\0" \
473 "tried_bootfromnet=no\0" \
474 "bootfile=mvblm72625.boot\0" \
475 "use_dhcp=yes\0" \
476 "gev_start=yes\0" \
477 "mvbcdma_debug=0\0" \
478 "mvbcia_debug=0\0" \
479 "propdev_debug=0\0" \
480 "gevss_debug=0\0" \
481 "watchdog=0\0" \
482 "usb_dr_mode=host\0" \
Andre Schwarzdf77a9b2008-08-20 11:11:52 +0200483 "sensor_cnt=2\0" \
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200484 ""
485
486#define CONFIG_FPGA_COUNT 1
Michal Simekb6b8aaa2013-05-01 18:05:56 +0200487#define CONFIG_FPGA
Andre Schwarz546cb1f2008-06-10 09:13:16 +0200488#define CONFIG_FPGA_ALTERA
489#define CONFIG_FPGA_CYCLON2
490
491#endif