2014-10-22 10:13:17 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2011
|
|
|
|
* Marvell Semiconductor <www.marvell.com>
|
|
|
|
* Written-by: Lei Wen <leiwen@marvell.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file should be included in board config header file.
|
|
|
|
*
|
2015-04-25 04:29:49 +00:00
|
|
|
* It supports common definitions for MVEBU platforms
|
2014-10-22 10:13:17 +00:00
|
|
|
*/
|
|
|
|
|
2015-04-25 04:29:47 +00:00
|
|
|
#ifndef _MVEBU_CONFIG_H
|
|
|
|
#define _MVEBU_CONFIG_H
|
2014-10-22 10:13:17 +00:00
|
|
|
|
|
|
|
#include <asm/arch/soc.h>
|
|
|
|
|
2015-04-25 04:29:49 +00:00
|
|
|
#if defined(CONFIG_ARMADA_XP)
|
2014-10-22 10:13:17 +00:00
|
|
|
#define MV88F78X60 /* for the DDR training bin_hdr code */
|
2015-04-25 04:29:49 +00:00
|
|
|
#endif
|
2014-10-22 10:13:17 +00:00
|
|
|
|
|
|
|
#define CONFIG_SYS_CACHELINE_SIZE 32
|
|
|
|
|
2015-11-18 11:44:29 +00:00
|
|
|
#define CONFIG_SYS_L2_PL310
|
|
|
|
|
|
|
|
#ifdef CONFIG_SPL_BUILD
|
|
|
|
#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
|
|
|
|
#endif
|
|
|
|
|
2014-10-22 10:13:17 +00:00
|
|
|
/*
|
|
|
|
* By default kwbimage.cfg from board specific folder is used
|
|
|
|
* If for some board, different configuration file need to be used,
|
|
|
|
* CONFIG_SYS_KWD_CONFIG should be defined in board specific header file
|
|
|
|
*/
|
|
|
|
#ifndef CONFIG_SYS_KWD_CONFIG
|
|
|
|
#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg
|
|
|
|
#endif /* CONFIG_SYS_KWD_CONFIG */
|
|
|
|
|
|
|
|
/* Add target to build it automatically upon "make" */
|
2015-01-19 10:33:49 +00:00
|
|
|
#ifdef CONFIG_SPL
|
|
|
|
#define CONFIG_BUILD_TARGET "u-boot-spl.kwb"
|
|
|
|
#endif
|
2014-10-22 10:13:17 +00:00
|
|
|
|
|
|
|
/* end of 16M scrubbed by training in bootrom */
|
|
|
|
#define CONFIG_SYS_INIT_SP_ADDR 0x00FF0000
|
|
|
|
#define CONFIG_NR_DRAM_BANKS_MAX 2
|
|
|
|
|
|
|
|
#define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SPI Flash configuration
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_CMD_SF
|
2015-11-20 12:51:57 +00:00
|
|
|
#define CONFIG_KIRKWOOD_SPI
|
2014-10-22 10:13:17 +00:00
|
|
|
#ifndef CONFIG_ENV_SPI_BUS
|
|
|
|
# define CONFIG_ENV_SPI_BUS 0
|
|
|
|
#endif
|
|
|
|
#ifndef CONFIG_ENV_SPI_CS
|
|
|
|
# define CONFIG_ENV_SPI_CS 0
|
|
|
|
#endif
|
|
|
|
#ifndef CONFIG_ENV_SPI_MAX_HZ
|
|
|
|
# define CONFIG_ENV_SPI_MAX_HZ 50000000
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2015-11-20 12:51:57 +00:00
|
|
|
/* Needed for SPI NOR booting in SPL */
|
|
|
|
#define CONFIG_DM_SEQ_ALIAS 1
|
|
|
|
|
2014-10-22 10:13:17 +00:00
|
|
|
/*
|
|
|
|
* Ethernet Driver configuration
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_CMD_NET
|
|
|
|
#define CONFIG_CMD_MII
|
|
|
|
#define CONFIG_MII /* expose smi ove miiphy interface */
|
|
|
|
#define CONFIG_MVNETA /* Enable Marvell Gbe Controller Driver */
|
|
|
|
#define CONFIG_PHYLIB
|
|
|
|
#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
|
|
|
|
#define CONFIG_PHY_GIGE /* GbE speed/duplex detect */
|
2015-11-24 08:15:22 +00:00
|
|
|
#define CONFIG_ARP_TIMEOUT 200
|
|
|
|
#define CONFIG_NET_RETRY_COUNT 50
|
2014-10-22 10:13:17 +00:00
|
|
|
#endif /* CONFIG_CMD_NET */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* I2C related stuff
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_CMD_I2C
|
|
|
|
#ifndef CONFIG_SYS_I2C_SOFT
|
|
|
|
#define CONFIG_I2C_MVTWSI
|
|
|
|
#endif
|
|
|
|
#define CONFIG_SYS_I2C_SLAVE 0x0
|
|
|
|
#define CONFIG_SYS_I2C_SPEED 100000
|
|
|
|
#endif
|
|
|
|
|
2015-10-22 10:36:31 +00:00
|
|
|
/* Use common timer */
|
|
|
|
#define CONFIG_SYS_TIMER_COUNTS_DOWN
|
|
|
|
#define CONFIG_SYS_TIMER_COUNTER (MVEBU_TIMER_BASE + 0x14)
|
|
|
|
#define CONFIG_SYS_TIMER_RATE 25000000
|
|
|
|
|
2015-04-25 04:29:47 +00:00
|
|
|
#endif /* __MVEBU_CONFIG_H */
|