blob: f3e335465df92c6de583b730495330648a29160a [file] [log] [blame]
Vipin KUMAR7e074152010-01-15 19:15:50 +05301/*
2 * (C) Copyright 2009
3 * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com>
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24#ifndef __CONFIG_H
25#define __CONFIG_H
26
27/*
28 * High Level Configuration Options
29 * (easy to change)
30 */
Wolfgang Denkd24f2d32010-10-04 19:58:00 +020031#if defined(CONFIG_spear300)
Vipin KUMAR7e074152010-01-15 19:15:50 +053032#define CONFIG_SPEAR3XX 1
Vipin KUMAR080cfee2010-01-15 19:15:52 +053033#define CONFIG_SPEAR300 1
Wolfgang Denkd24f2d32010-10-04 19:58:00 +020034#elif defined(CONFIG_spear310)
Vipin KUMAR080cfee2010-01-15 19:15:52 +053035#define CONFIG_SPEAR3XX 1
36#define CONFIG_SPEAR310 1
Wolfgang Denkd24f2d32010-10-04 19:58:00 +020037#elif defined(CONFIG_spear320)
Vipin KUMAR7da69232010-01-15 19:15:53 +053038#define CONFIG_SPEAR3XX 1
39#define CONFIG_SPEAR320 1
Vipin KUMAR080cfee2010-01-15 19:15:52 +053040#endif
Vipin KUMAR7e074152010-01-15 19:15:50 +053041
42#include <configs/spear-common.h>
43
Vipin KUMARdeb00562012-05-07 13:06:42 +053044/* Ethernet driver configuration */
45#define CONFIG_DW_ALTDESCRIPTOR 1
46
Vipin KUMAR8eb0ee62012-05-07 13:06:43 +053047#if defined(CONFIG_SPEAR310)
48#define CONFIG_MACB 1
49#define CONFIG_MACB0_PHY 0x01
50#define CONFIG_MACB1_PHY 0x03
51#define CONFIG_MACB2_PHY 0x05
52#define CONFIG_MACB3_PHY 0x07
53
54#elif defined(CONFIG_SPEAR320)
55#define CONFIG_MACB 1
56#define CONFIG_MACB0_PHY 0x01
57
58#endif
59
Vipin KUMAR7e074152010-01-15 19:15:50 +053060/* Serial Configuration (PL011) */
61#define CONFIG_SYS_SERIAL0 0xD0000000
Vipin KUMAR080cfee2010-01-15 19:15:52 +053062
63#if defined(CONFIG_SPEAR300)
Vipin KUMAR7e074152010-01-15 19:15:50 +053064#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
65
Vipin KUMAR080cfee2010-01-15 19:15:52 +053066#elif defined(CONFIG_SPEAR310)
67
68#if (CONFIG_CONS_INDEX)
69#undef CONFIG_PL011_CLOCK
70#define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
71#endif
72
73#define CONFIG_SYS_SERIAL1 0xB2000000
74#define CONFIG_SYS_SERIAL2 0xB2080000
75#define CONFIG_SYS_SERIAL3 0xB2100000
76#define CONFIG_SYS_SERIAL4 0xB2180000
77#define CONFIG_SYS_SERIAL5 0xB2200000
78#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
79 (void *)CONFIG_SYS_SERIAL1, \
80 (void *)CONFIG_SYS_SERIAL2, \
81 (void *)CONFIG_SYS_SERIAL3, \
82 (void *)CONFIG_SYS_SERIAL4, \
83 (void *)CONFIG_SYS_SERIAL5 }
Vipin KUMAR7da69232010-01-15 19:15:53 +053084#elif defined(CONFIG_SPEAR320)
85
86#if (CONFIG_CONS_INDEX)
87#undef CONFIG_PL011_CLOCK
88#define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
89#endif
90
91#define CONFIG_SYS_SERIAL1 0xA3000000
92#define CONFIG_SYS_SERIAL2 0xA4000000
93#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
94 (void *)CONFIG_SYS_SERIAL1, \
95 (void *)CONFIG_SYS_SERIAL2 }
Vipin KUMAR080cfee2010-01-15 19:15:52 +053096#endif
97
98#if defined(CONFIG_SPEAR_EMI)
99
100#define CONFIG_SYS_FLASH_CFI
101#define CONFIG_FLASH_CFI_DRIVER
102
103#if defined(CONFIG_SPEAR310)
104#define CONFIG_SYS_FLASH_BASE 0x50000000
105#define CONFIG_SYS_CS1_FLASH_BASE 0x60000000
106#define CONFIG_SYS_CS2_FLASH_BASE 0x70000000
107#define CONFIG_SYS_CS3_FLASH_BASE 0x80000000
108#define CONFIG_SYS_CS4_FLASH_BASE 0x90000000
109#define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000
110#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
111 CONFIG_SYS_CS1_FLASH_BASE, \
112 CONFIG_SYS_CS2_FLASH_BASE, \
113 CONFIG_SYS_CS3_FLASH_BASE, \
114 CONFIG_SYS_CS4_FLASH_BASE, \
115 CONFIG_SYS_CS5_FLASH_BASE }
116#define CONFIG_SYS_MAX_FLASH_BANKS 6
117
Vipin KUMAR7da69232010-01-15 19:15:53 +0530118#elif defined(CONFIG_SPEAR320)
119#define CONFIG_SYS_FLASH_BASE 0x44000000
120#define CONFIG_SYS_CS1_FLASH_BASE 0x45000000
121#define CONFIG_SYS_CS2_FLASH_BASE 0x46000000
122#define CONFIG_SYS_CS3_FLASH_BASE 0x47000000
123#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
124 CONFIG_SYS_CS1_FLASH_BASE, \
125 CONFIG_SYS_CS2_FLASH_BASE, \
126 CONFIG_SYS_CS3_FLASH_BASE }
127#define CONFIG_SYS_MAX_FLASH_BANKS 4
128
Vipin KUMAR080cfee2010-01-15 19:15:52 +0530129#endif
130
131#define CONFIG_SYS_MAX_FLASH_SECT (127 + 8)
132#define CONFIG_SYS_FLASH_QUIET_TEST 1
133
134#endif
135
Vipin KUMAR1fa943b2012-05-22 00:15:55 +0000136/* NAND flash configuration */
137#define CONFIG_SYS_FSMC_NAND_SP
138#define CONFIG_SYS_FSMC_NAND_8BIT
139
Vipin KUMAR080cfee2010-01-15 19:15:52 +0530140#if defined(CONFIG_SPEAR300)
Vipin KUMAR7e074152010-01-15 19:15:50 +0530141#define CONFIG_SYS_NAND_BASE (0x80000000)
142
Vipin KUMAR080cfee2010-01-15 19:15:52 +0530143#elif defined(CONFIG_SPEAR310)
144#define CONFIG_SYS_NAND_BASE (0x40000000)
145
Vipin KUMAR7da69232010-01-15 19:15:53 +0530146#elif defined(CONFIG_SPEAR320)
147#define CONFIG_SYS_NAND_BASE (0x50000000)
148
Vipin KUMAR080cfee2010-01-15 19:15:52 +0530149#endif
150
Vipin KUMAR7e074152010-01-15 19:15:50 +0530151#endif /* __CONFIG_H */