blob: 6ecd394a533d56266e208e4a5e7f84929e35d81b [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stefan Roese93e6bf42014-10-22 12:13:17 +02002/*
3 * (C) Copyright 2011
4 * Marvell Semiconductor <www.marvell.com>
5 * Written-by: Lei Wen <leiwen@marvell.com>
Stefan Roese93e6bf42014-10-22 12:13:17 +02006 */
7
8/*
9 * This file should be included in board config header file.
10 *
Stefan Roese7cd34842015-04-25 06:29:49 +020011 * It supports common definitions for MVEBU platforms
Stefan Roese93e6bf42014-10-22 12:13:17 +020012 */
13
Stefan Roeseebda3ec2015-04-25 06:29:47 +020014#ifndef _MVEBU_CONFIG_H
15#define _MVEBU_CONFIG_H
Stefan Roese93e6bf42014-10-22 12:13:17 +020016
17#include <asm/arch/soc.h>
18
Stefan Roese479f9af2016-02-10 07:23:00 +010019#if defined(CONFIG_ARMADA_XP) || defined(CONFIG_ARMADA_375) \
Chris Packhama8f845e2019-04-11 22:22:50 +120020 || defined(CONFIG_ARMADA_38X) || defined(CONFIG_ARMADA_MSYS)
Stefan Roeseeb083e52015-12-21 13:56:33 +010021/*
22 * Set this for the common xor register definitions needed in dram.c
23 * for A38x as well here.
24 */
Stefan Roese93e6bf42014-10-22 12:13:17 +020025#define MV88F78X60 /* for the DDR training bin_hdr code */
Stefan Roese7cd34842015-04-25 06:29:49 +020026#endif
Stefan Roese93e6bf42014-10-22 12:13:17 +020027
Stefan Roesec14c93f2015-11-18 12:44:29 +010028#define CONFIG_SYS_L2_PL310
29
Stefan Roese93e6bf42014-10-22 12:13:17 +020030/*
Baruch Siachea3d9de2018-06-18 21:56:25 +030031 * By default the generated mvebu kwbimage.cfg is used
Stefan Roese93e6bf42014-10-22 12:13:17 +020032 * If for some board, different configuration file need to be used,
33 * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file
34 */
35#ifndef CONFIG_SYS_KWD_CONFIG
Baruch Siachea3d9de2018-06-18 21:56:25 +030036#define CONFIG_SYS_KWD_CONFIG arch/arm/mach-mvebu/kwbimage.cfg
Stefan Roese93e6bf42014-10-22 12:13:17 +020037#endif /* CONFIG_SYS_KWD_CONFIG */
38
Stefan Roese93e6bf42014-10-22 12:13:17 +020039/* end of 16M scrubbed by training in bootrom */
40#define CONFIG_SYS_INIT_SP_ADDR 0x00FF0000
Stefan Roese93e6bf42014-10-22 12:13:17 +020041
42#define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE
43
Stefan Roese49e7d772015-11-20 13:51:57 +010044/* Needed for SPI NOR booting in SPL */
45#define CONFIG_DM_SEQ_ALIAS 1
46
Stefan Roese93e6bf42014-10-22 12:13:17 +020047/*
48 * Ethernet Driver configuration
49 */
50#ifdef CONFIG_CMD_NET
Stefan Roeseb3efc572015-11-24 09:15:22 +010051#define CONFIG_ARP_TIMEOUT 200
52#define CONFIG_NET_RETRY_COUNT 50
Stefan Roese93e6bf42014-10-22 12:13:17 +020053#endif /* CONFIG_CMD_NET */
54
55/*
56 * I2C related stuff
57 */
58#ifdef CONFIG_CMD_I2C
59#ifndef CONFIG_SYS_I2C_SOFT
60#define CONFIG_I2C_MVTWSI
61#endif
Stefan Roese93e6bf42014-10-22 12:13:17 +020062#endif
63
Stefan Roese64174892015-10-22 12:36:31 +020064/* Use common timer */
65#define CONFIG_SYS_TIMER_COUNTS_DOWN
66#define CONFIG_SYS_TIMER_COUNTER (MVEBU_TIMER_BASE + 0x14)
67#define CONFIG_SYS_TIMER_RATE 25000000
68
Stefan Roeseebda3ec2015-04-25 06:29:47 +020069#endif /* __MVEBU_CONFIG_H */