blob: 8090bc8973647a4ab23c406f1dc6da46de3b6a8a [file] [log] [blame]
Vipin KUMARb0ea0892010-01-15 19:15:50 +05301/*
2 * (C) Copyright 2009
3 * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com>
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Vipin KUMARb0ea0892010-01-15 19:15:50 +05306 */
7
8#ifndef __CONFIG_H
9#define __CONFIG_H
10
11/*
12 * High Level Configuration Options
13 * (easy to change)
14 */
Wolfgang Denkdc25d152010-10-04 19:58:00 +020015#if defined(CONFIG_spear300)
Amit Virdi870d11e2012-05-07 13:07:02 +053016#define CONFIG_SPEAR3XX
17#define CONFIG_SPEAR300
Wolfgang Denkdc25d152010-10-04 19:58:00 +020018#elif defined(CONFIG_spear310)
Amit Virdi870d11e2012-05-07 13:07:02 +053019#define CONFIG_SPEAR3XX
20#define CONFIG_SPEAR310
Wolfgang Denkdc25d152010-10-04 19:58:00 +020021#elif defined(CONFIG_spear320)
Amit Virdi870d11e2012-05-07 13:07:02 +053022#define CONFIG_SPEAR3XX
23#define CONFIG_SPEAR320
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053024#endif
Vipin KUMARb0ea0892010-01-15 19:15:50 +053025
Vipin KUMAR0c93dec2012-05-07 13:06:46 +053026#if defined(CONFIG_usbtty)
27#define CONFIG_SPEAR_USBTTY
28#endif
29
30#if defined(CONFIG_nand)
31#define CONFIG_ENV_IS_IN_NAND
32#else
33#define CONFIG_ENV_IS_IN_FLASH
34#endif
35
Vipin KUMARb0ea0892010-01-15 19:15:50 +053036#include <configs/spear-common.h>
37
Vipin KUMAR6b49f982012-05-07 13:06:42 +053038/* Ethernet driver configuration */
Amit Virdi870d11e2012-05-07 13:07:02 +053039#define CONFIG_DW_ALTDESCRIPTOR
Vipin KUMAR6b49f982012-05-07 13:06:42 +053040
Vipin KUMARa1dba022012-05-07 13:06:43 +053041#if defined(CONFIG_SPEAR310)
Amit Virdi870d11e2012-05-07 13:07:02 +053042#define CONFIG_MACB
Vipin KUMARa1dba022012-05-07 13:06:43 +053043#define CONFIG_MACB0_PHY 0x01
44#define CONFIG_MACB1_PHY 0x03
45#define CONFIG_MACB2_PHY 0x05
46#define CONFIG_MACB3_PHY 0x07
47
48#elif defined(CONFIG_SPEAR320)
Amit Virdi870d11e2012-05-07 13:07:02 +053049#define CONFIG_MACB
Vipin KUMARa1dba022012-05-07 13:06:43 +053050#define CONFIG_MACB0_PHY 0x01
51
52#endif
53
Vipin KUMARb0ea0892010-01-15 19:15:50 +053054/* Serial Configuration (PL011) */
55#define CONFIG_SYS_SERIAL0 0xD0000000
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053056
57#if defined(CONFIG_SPEAR300)
Vipin KUMARb0ea0892010-01-15 19:15:50 +053058#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
59
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053060#elif defined(CONFIG_SPEAR310)
61
62#if (CONFIG_CONS_INDEX)
63#undef CONFIG_PL011_CLOCK
64#define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
65#endif
66
67#define CONFIG_SYS_SERIAL1 0xB2000000
68#define CONFIG_SYS_SERIAL2 0xB2080000
69#define CONFIG_SYS_SERIAL3 0xB2100000
70#define CONFIG_SYS_SERIAL4 0xB2180000
71#define CONFIG_SYS_SERIAL5 0xB2200000
72#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
73 (void *)CONFIG_SYS_SERIAL1, \
74 (void *)CONFIG_SYS_SERIAL2, \
75 (void *)CONFIG_SYS_SERIAL3, \
76 (void *)CONFIG_SYS_SERIAL4, \
77 (void *)CONFIG_SYS_SERIAL5 }
Vipin KUMARcc0da712010-01-15 19:15:53 +053078#elif defined(CONFIG_SPEAR320)
79
80#if (CONFIG_CONS_INDEX)
81#undef CONFIG_PL011_CLOCK
82#define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053083#endif
84
Vipin KUMARcc0da712010-01-15 19:15:53 +053085#define CONFIG_SYS_SERIAL1 0xA3000000
86#define CONFIG_SYS_SERIAL2 0xA4000000
87#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
88 (void *)CONFIG_SYS_SERIAL1, \
89 (void *)CONFIG_SYS_SERIAL2 }
90#endif
91
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053092#if defined(CONFIG_SPEAR_EMI)
93
94#define CONFIG_SYS_FLASH_CFI
95#define CONFIG_FLASH_CFI_DRIVER
96
97#if defined(CONFIG_SPEAR310)
Vipin Kumar6e051e92012-05-07 13:06:54 +053098#define CONFIG_SYS_FLASH_PROTECTION
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053099#define CONFIG_SYS_FLASH_BASE 0x50000000
100#define CONFIG_SYS_CS1_FLASH_BASE 0x60000000
101#define CONFIG_SYS_CS2_FLASH_BASE 0x70000000
102#define CONFIG_SYS_CS3_FLASH_BASE 0x80000000
103#define CONFIG_SYS_CS4_FLASH_BASE 0x90000000
104#define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000
105#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
106 CONFIG_SYS_CS1_FLASH_BASE, \
107 CONFIG_SYS_CS2_FLASH_BASE, \
108 CONFIG_SYS_CS3_FLASH_BASE, \
109 CONFIG_SYS_CS4_FLASH_BASE, \
110 CONFIG_SYS_CS5_FLASH_BASE }
111#define CONFIG_SYS_MAX_FLASH_BANKS 6
112
Vipin KUMARcc0da712010-01-15 19:15:53 +0530113#elif defined(CONFIG_SPEAR320)
Vipin Kumar6e051e92012-05-07 13:06:54 +0530114#define CONFIG_SYS_FLASH_PROTECTION
Vipin KUMARcc0da712010-01-15 19:15:53 +0530115#define CONFIG_SYS_FLASH_BASE 0x44000000
116#define CONFIG_SYS_CS1_FLASH_BASE 0x45000000
117#define CONFIG_SYS_CS2_FLASH_BASE 0x46000000
118#define CONFIG_SYS_CS3_FLASH_BASE 0x47000000
119#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
120 CONFIG_SYS_CS1_FLASH_BASE, \
121 CONFIG_SYS_CS2_FLASH_BASE, \
122 CONFIG_SYS_CS3_FLASH_BASE }
123#define CONFIG_SYS_MAX_FLASH_BANKS 4
124
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530125#endif
126
127#define CONFIG_SYS_MAX_FLASH_SECT (127 + 8)
Amit Virdi870d11e2012-05-07 13:07:02 +0530128#define CONFIG_SYS_FLASH_QUIET_TEST
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530129
130#endif
131
Vipin KUMARf1bd24e2012-05-22 00:15:55 +0000132/* NAND flash configuration */
133#define CONFIG_SYS_FSMC_NAND_SP
134#define CONFIG_SYS_FSMC_NAND_8BIT
135
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530136#if defined(CONFIG_SPEAR300)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530137#define CONFIG_SYS_NAND_BASE 0x80000000
Vipin KUMARb0ea0892010-01-15 19:15:50 +0530138
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530139#elif defined(CONFIG_SPEAR310)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530140#define CONFIG_SYS_NAND_BASE 0x40000000
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530141
Vipin KUMARcc0da712010-01-15 19:15:53 +0530142#elif defined(CONFIG_SPEAR320)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530143#define CONFIG_SYS_NAND_BASE 0x50000000
Vipin KUMARcc0da712010-01-15 19:15:53 +0530144
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530145#endif
146
Vipin KUMARc54105b2012-05-07 13:06:48 +0530147/* Environment Settings */
148#if defined(CONFIG_SPEAR300)
149#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY
150
151#elif defined(CONFIG_SPEAR310) || defined(CONFIG_SPEAR320)
152#define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0"
153#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \
154 CONFIG_EXTRA_ENV_UNLOCK
155#endif
156
Vipin KUMARb0ea0892010-01-15 19:15:50 +0530157#endif /* __CONFIG_H */