xref: /openbmc/u-boot/arch/arm/mach-mvebu/include/mach/config.h (revision b322c83aa47f2fcf1af73a4f686ce4478fca19e3)
1 /*
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  *
12  * It supports common definitions for MVEBU platforms
13  */
14 
15 #ifndef _MVEBU_CONFIG_H
16 #define _MVEBU_CONFIG_H
17 
18 #include <asm/arch/soc.h>
19 
20 #if defined(CONFIG_ARMADA_XP)
21 #define MV88F78X60 /* for the DDR training bin_hdr code */
22 #endif
23 
24 #define CONFIG_SYS_CACHELINE_SIZE	32
25 
26 #define CONFIG_SYS_L2_PL310
27 
28 #ifdef CONFIG_SPL_BUILD
29 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
30 #endif
31 
32 /*
33  * By default kwbimage.cfg from board specific folder is used
34  * If for some board, different configuration file need to be used,
35  * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file
36  */
37 #ifndef CONFIG_SYS_KWD_CONFIG
38 #define	CONFIG_SYS_KWD_CONFIG	$(CONFIG_BOARDDIR)/kwbimage.cfg
39 #endif /* CONFIG_SYS_KWD_CONFIG */
40 
41 /* Add target to build it automatically upon "make" */
42 #ifdef CONFIG_SPL
43 #define CONFIG_BUILD_TARGET	"u-boot-spl.kwb"
44 #endif
45 
46 /* end of 16M scrubbed by training in bootrom */
47 #define CONFIG_SYS_INIT_SP_ADDR		0x00FF0000
48 #define CONFIG_NR_DRAM_BANKS_MAX	2
49 
50 #define MV_UART_CONSOLE_BASE		MVEBU_UART0_BASE
51 
52 /*
53  * SPI Flash configuration
54  */
55 #ifdef CONFIG_CMD_SF
56 #define CONFIG_KIRKWOOD_SPI
57 #ifndef CONFIG_ENV_SPI_BUS
58 # define CONFIG_ENV_SPI_BUS		0
59 #endif
60 #ifndef CONFIG_ENV_SPI_CS
61 # define CONFIG_ENV_SPI_CS		0
62 #endif
63 #ifndef CONFIG_ENV_SPI_MAX_HZ
64 # define CONFIG_ENV_SPI_MAX_HZ		50000000
65 #endif
66 #endif
67 
68 /* Needed for SPI NOR booting in SPL */
69 #define CONFIG_DM_SEQ_ALIAS		1
70 
71 /*
72  * Ethernet Driver configuration
73  */
74 #ifdef CONFIG_CMD_NET
75 #define CONFIG_CMD_MII
76 #define CONFIG_MII		/* expose smi ove miiphy interface */
77 #define CONFIG_MVNETA		/* Enable Marvell Gbe Controller Driver */
78 #define CONFIG_PHYLIB
79 #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
80 #define CONFIG_PHY_GIGE		/* GbE speed/duplex detect */
81 #define CONFIG_ARP_TIMEOUT	200
82 #define CONFIG_NET_RETRY_COUNT	50
83 #endif /* CONFIG_CMD_NET */
84 
85 /*
86  * I2C related stuff
87  */
88 #ifdef CONFIG_CMD_I2C
89 #ifndef CONFIG_SYS_I2C_SOFT
90 #define CONFIG_I2C_MVTWSI
91 #endif
92 #define CONFIG_SYS_I2C_SLAVE		0x0
93 #define CONFIG_SYS_I2C_SPEED		100000
94 #endif
95 
96 /* Use common timer */
97 #define CONFIG_SYS_TIMER_COUNTS_DOWN
98 #define CONFIG_SYS_TIMER_COUNTER	(MVEBU_TIMER_BASE + 0x14)
99 #define CONFIG_SYS_TIMER_RATE		25000000
100 
101 #endif /* __MVEBU_CONFIG_H */
102