xref: /OK3568_Linux_fs/u-boot/include/configs/mv-common.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * (C) Copyright 2010
3*4882a593Smuzhiyun  * Marvell Semiconductor <www.marvell.com>
4*4882a593Smuzhiyun  * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * SPDX-License-Identifier:	GPL-2.0+
7*4882a593Smuzhiyun  */
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun /*
10*4882a593Smuzhiyun  * This file contains Marvell Board Specific common defincations.
11*4882a593Smuzhiyun  * This file should be included in board config header file.
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  * It supports common definations for Kirkwood platform
14*4882a593Smuzhiyun  * TBD: support for Orion5X platforms
15*4882a593Smuzhiyun  */
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #ifndef _MV_COMMON_H
18*4882a593Smuzhiyun #define _MV_COMMON_H
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun /*
21*4882a593Smuzhiyun  * High Level Configuration Options (easy to change)
22*4882a593Smuzhiyun  */
23*4882a593Smuzhiyun #define CONFIG_MARVELL		1
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun /*
26*4882a593Smuzhiyun  * Custom CONFIG_SYS_TEXT_BASE can be done in <board>.h
27*4882a593Smuzhiyun  */
28*4882a593Smuzhiyun #ifndef CONFIG_SYS_TEXT_BASE
29*4882a593Smuzhiyun #define	CONFIG_SYS_TEXT_BASE	0x00600000
30*4882a593Smuzhiyun #endif /* CONFIG_SYS_TEXT_BASE */
31*4882a593Smuzhiyun 
32*4882a593Smuzhiyun /* additions for new ARM relocation support */
33*4882a593Smuzhiyun #define CONFIG_SYS_SDRAM_BASE	0x00000000
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun /*
36*4882a593Smuzhiyun  * CLKs configurations
37*4882a593Smuzhiyun  */
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun /*
40*4882a593Smuzhiyun  * NS16550 Configuration
41*4882a593Smuzhiyun  */
42*4882a593Smuzhiyun #define CONFIG_SYS_NS16550_SERIAL
43*4882a593Smuzhiyun #define CONFIG_SYS_NS16550_CLK		CONFIG_SYS_TCLK
44*4882a593Smuzhiyun #if !defined(CONFIG_DM_SERIAL)
45*4882a593Smuzhiyun #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
46*4882a593Smuzhiyun #define CONFIG_SYS_NS16550_COM1		MV_UART_CONSOLE_BASE
47*4882a593Smuzhiyun #endif
48*4882a593Smuzhiyun 
49*4882a593Smuzhiyun /*
50*4882a593Smuzhiyun  * Serial Port configuration
51*4882a593Smuzhiyun  * The following definitions let you select what serial you want to use
52*4882a593Smuzhiyun  * for your console driver.
53*4882a593Smuzhiyun  */
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun #define CONFIG_CONS_INDEX	1	/*Console on UART0 */
56*4882a593Smuzhiyun #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
57*4882a593Smuzhiyun 					  115200,230400, 460800, 921600 }
58*4882a593Smuzhiyun /* auto boot */
59*4882a593Smuzhiyun #define CONFIG_PREBOOT
60*4882a593Smuzhiyun 
61*4882a593Smuzhiyun /*
62*4882a593Smuzhiyun  * For booting Linux, the board info and command line data
63*4882a593Smuzhiyun  * have to be in the first 8 MB of memory, since this is
64*4882a593Smuzhiyun  * the maximum mapped by the Linux kernel during initialization.
65*4882a593Smuzhiyun  */
66*4882a593Smuzhiyun #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs  */
67*4882a593Smuzhiyun #define CONFIG_INITRD_TAG	1	/* enable INITRD tag */
68*4882a593Smuzhiyun #define CONFIG_SETUP_MEMORY_TAGS 1	/* enable memory tag */
69*4882a593Smuzhiyun 
70*4882a593Smuzhiyun #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
71*4882a593Smuzhiyun 
72*4882a593Smuzhiyun /*
73*4882a593Smuzhiyun  * Size of malloc() pool
74*4882a593Smuzhiyun  */
75*4882a593Smuzhiyun #define CONFIG_SYS_MALLOC_LEN	(1024 * 1024 * 4) /* 4MiB for malloc() */
76*4882a593Smuzhiyun 
77*4882a593Smuzhiyun /*
78*4882a593Smuzhiyun  * Other required minimal configurations
79*4882a593Smuzhiyun  */
80*4882a593Smuzhiyun #define CONFIG_SYS_LONGHELP
81*4882a593Smuzhiyun #define CONFIG_AUTO_COMPLETE
82*4882a593Smuzhiyun #define CONFIG_CMDLINE_EDITING
83*4882a593Smuzhiyun #define CONFIG_ARCH_CPU_INIT	/* call arch_cpu_init() */
84*4882a593Smuzhiyun #define CONFIG_SYS_LOAD_ADDR	0x00800000	/* default load adr- 8M */
85*4882a593Smuzhiyun #define CONFIG_SYS_MEMTEST_START 0x00800000	/* 8M */
86*4882a593Smuzhiyun #define CONFIG_SYS_MEMTEST_END	0x00ffffff	/*(_16M -1) */
87*4882a593Smuzhiyun #define CONFIG_SYS_RESET_ADDRESS 0xffff0000	/* Rst Vector Adr */
88*4882a593Smuzhiyun #define CONFIG_SYS_MAXARGS	32	/* max number of command args */
89*4882a593Smuzhiyun 
90*4882a593Smuzhiyun /* ====> Include platform Common Definitions */
91*4882a593Smuzhiyun #include <asm/arch/config.h>
92*4882a593Smuzhiyun 
93*4882a593Smuzhiyun /*
94*4882a593Smuzhiyun  * DRAM Banks configuration, Custom config can be done in <board>.h
95*4882a593Smuzhiyun  */
96*4882a593Smuzhiyun #ifndef CONFIG_NR_DRAM_BANKS
97*4882a593Smuzhiyun #define CONFIG_NR_DRAM_BANKS	CONFIG_NR_DRAM_BANKS_MAX
98*4882a593Smuzhiyun #else
99*4882a593Smuzhiyun #if (CONFIG_NR_DRAM_BANKS > CONFIG_NR_DRAM_BANKS_MAX)
100*4882a593Smuzhiyun #error CONFIG_NR_DRAM_BANKS Configurated more than available
101*4882a593Smuzhiyun #endif
102*4882a593Smuzhiyun #endif /* CONFIG_NR_DRAM_BANKS */
103*4882a593Smuzhiyun 
104*4882a593Smuzhiyun /* ====> Include driver Common Definitions */
105*4882a593Smuzhiyun /*
106*4882a593Smuzhiyun  * Common NAND configuration
107*4882a593Smuzhiyun  */
108*4882a593Smuzhiyun #ifdef CONFIG_CMD_NAND
109*4882a593Smuzhiyun #define CONFIG_SYS_MAX_NAND_DEVICE     1
110*4882a593Smuzhiyun #endif
111*4882a593Smuzhiyun 
112*4882a593Smuzhiyun /*
113*4882a593Smuzhiyun  * Common SPI Flash configuration
114*4882a593Smuzhiyun  */
115*4882a593Smuzhiyun #ifdef CONFIG_CMD_SF
116*4882a593Smuzhiyun #endif
117*4882a593Smuzhiyun 
118*4882a593Smuzhiyun /*
119*4882a593Smuzhiyun  * Common USB/EHCI configuration
120*4882a593Smuzhiyun  */
121*4882a593Smuzhiyun #if defined(CONFIG_CMD_USB) && !defined(CONFIG_DM)
122*4882a593Smuzhiyun #define CONFIG_SUPPORT_VFAT
123*4882a593Smuzhiyun #endif /* CONFIG_CMD_USB */
124*4882a593Smuzhiyun 
125*4882a593Smuzhiyun /*
126*4882a593Smuzhiyun  * File system
127*4882a593Smuzhiyun  */
128*4882a593Smuzhiyun #ifdef CONFIG_SYS_MVFS
129*4882a593Smuzhiyun #define CONFIG_MTD_DEVICE               /* needed for mtdparts commands */
130*4882a593Smuzhiyun #define CONFIG_MTD_PARTITIONS
131*4882a593Smuzhiyun #endif
132*4882a593Smuzhiyun 
133*4882a593Smuzhiyun #endif /* _MV_COMMON_H */
134