blob: 86a0aed7699e2dfcc8ccf297fb407589930f718b [file] [log] [blame]
Stefan Roese41e5ee52014-10-22 12:13:17 +02001/*
2 * (C) Copyright 2011
3 * Marvell Semiconductor <www.marvell.com>
4 * Written-by: Lei Wen <leiwen@marvell.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9/*
10 * This file should be included in board config header file.
11 *
Stefan Roesef7c0ef02015-04-25 06:29:49 +020012 * It supports common definitions for MVEBU platforms
Stefan Roese41e5ee52014-10-22 12:13:17 +020013 */
14
Stefan Roese250eea72015-04-25 06:29:47 +020015#ifndef _MVEBU_CONFIG_H
16#define _MVEBU_CONFIG_H
Stefan Roese41e5ee52014-10-22 12:13:17 +020017
18#include <asm/arch/soc.h>
19
Stefan Roesef7c0ef02015-04-25 06:29:49 +020020#if defined(CONFIG_ARMADA_XP)
Stefan Roese41e5ee52014-10-22 12:13:17 +020021#define MV88F78X60 /* for the DDR training bin_hdr code */
Stefan Roesef7c0ef02015-04-25 06:29:49 +020022#endif
Stefan Roese41e5ee52014-10-22 12:13:17 +020023
24#define CONFIG_SYS_CACHELINE_SIZE 32
25
26/*
27 * By default kwbimage.cfg from board specific folder is used
28 * If for some board, different configuration file need to be used,
29 * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file
30 */
31#ifndef CONFIG_SYS_KWD_CONFIG
32#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg
33#endif /* CONFIG_SYS_KWD_CONFIG */
34
35/* Add target to build it automatically upon "make" */
Stefan Roese1e0b5982015-01-19 11:33:49 +010036#ifdef CONFIG_SPL
37#define CONFIG_BUILD_TARGET "u-boot-spl.kwb"
38#else
Stefan Roese41e5ee52014-10-22 12:13:17 +020039#define CONFIG_BUILD_TARGET "u-boot.kwb"
Stefan Roese1e0b5982015-01-19 11:33:49 +010040#endif
Stefan Roese41e5ee52014-10-22 12:13:17 +020041
42/* end of 16M scrubbed by training in bootrom */
43#define CONFIG_SYS_INIT_SP_ADDR 0x00FF0000
44#define CONFIG_NR_DRAM_BANKS_MAX 2
45
46#define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE
47
48/*
49 * SPI Flash configuration
50 */
51#ifdef CONFIG_CMD_SF
52#define CONFIG_HARD_SPI 1
53#define CONFIG_KIRKWOOD_SPI 1
54#ifndef CONFIG_ENV_SPI_BUS
55# define CONFIG_ENV_SPI_BUS 0
56#endif
57#ifndef CONFIG_ENV_SPI_CS
58# define CONFIG_ENV_SPI_CS 0
59#endif
60#ifndef CONFIG_ENV_SPI_MAX_HZ
61# define CONFIG_ENV_SPI_MAX_HZ 50000000
62#endif
63#endif
64
65/*
66 * Ethernet Driver configuration
67 */
68#ifdef CONFIG_CMD_NET
69#define CONFIG_CMD_MII
70#define CONFIG_MII /* expose smi ove miiphy interface */
71#define CONFIG_MVNETA /* Enable Marvell Gbe Controller Driver */
72#define CONFIG_PHYLIB
73#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
74#define CONFIG_PHY_GIGE /* GbE speed/duplex detect */
75#endif /* CONFIG_CMD_NET */
76
77/*
78 * I2C related stuff
79 */
80#ifdef CONFIG_CMD_I2C
81#ifndef CONFIG_SYS_I2C_SOFT
82#define CONFIG_I2C_MVTWSI
83#endif
84#define CONFIG_SYS_I2C_SLAVE 0x0
85#define CONFIG_SYS_I2C_SPEED 100000
86#endif
87
Stefan Roese250eea72015-04-25 06:29:47 +020088#endif /* __MVEBU_CONFIG_H */