blob: 8090bc8973647a4ab23c406f1dc6da46de3b6a8a [file] [log] [blame]
Vipin KUMAR7e074152010-01-15 19:15:50 +05301/*
2 * (C) Copyright 2009
3 * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Vipin KUMAR7e074152010-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 Denkd24f2d32010-10-04 19:58:00 +020015#if defined(CONFIG_spear300)
Amit Virdi9b382b42012-05-07 13:07:02 +053016#define CONFIG_SPEAR3XX
17#define CONFIG_SPEAR300
Wolfgang Denkd24f2d32010-10-04 19:58:00 +020018#elif defined(CONFIG_spear310)
Amit Virdi9b382b42012-05-07 13:07:02 +053019#define CONFIG_SPEAR3XX
20#define CONFIG_SPEAR310
Wolfgang Denkd24f2d32010-10-04 19:58:00 +020021#elif defined(CONFIG_spear320)
Amit Virdi9b382b42012-05-07 13:07:02 +053022#define CONFIG_SPEAR3XX
23#define CONFIG_SPEAR320
Vipin KUMAR080cfee2010-01-15 19:15:52 +053024#endif
Vipin KUMAR7e074152010-01-15 19:15:50 +053025
Vipin KUMARf273e5b2012-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 KUMAR7e074152010-01-15 19:15:50 +053036#include <configs/spear-common.h>
37
Vipin KUMARdeb00562012-05-07 13:06:42 +053038/* Ethernet driver configuration */
Amit Virdi9b382b42012-05-07 13:07:02 +053039#define CONFIG_DW_ALTDESCRIPTOR
Vipin KUMARdeb00562012-05-07 13:06:42 +053040
Vipin KUMAR8eb0ee62012-05-07 13:06:43 +053041#if defined(CONFIG_SPEAR310)
Amit Virdi9b382b42012-05-07 13:07:02 +053042#define CONFIG_MACB
Vipin KUMAR8eb0ee62012-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 Virdi9b382b42012-05-07 13:07:02 +053049#define CONFIG_MACB
Vipin KUMAR8eb0ee62012-05-07 13:06:43 +053050#define CONFIG_MACB0_PHY 0x01
51
52#endif
53
Vipin KUMAR7e074152010-01-15 19:15:50 +053054/* Serial Configuration (PL011) */
55#define CONFIG_SYS_SERIAL0 0xD0000000
Vipin KUMAR080cfee2010-01-15 19:15:52 +053056
57#if defined(CONFIG_SPEAR300)
Vipin KUMAR7e074152010-01-15 19:15:50 +053058#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
59
Vipin KUMAR080cfee2010-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 KUMAR7da69232010-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)
83#endif
84
85#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 }
Vipin KUMAR080cfee2010-01-15 19:15:52 +053090#endif
91
92#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 Kumar484e0b02012-05-07 13:06:54 +053098#define CONFIG_SYS_FLASH_PROTECTION
Vipin KUMAR080cfee2010-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 KUMAR7da69232010-01-15 19:15:53 +0530113#elif defined(CONFIG_SPEAR320)
Vipin Kumar484e0b02012-05-07 13:06:54 +0530114#define CONFIG_SYS_FLASH_PROTECTION
Vipin KUMAR7da69232010-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 KUMAR080cfee2010-01-15 19:15:52 +0530125#endif
126
127#define CONFIG_SYS_MAX_FLASH_SECT (127 + 8)
Amit Virdi9b382b42012-05-07 13:07:02 +0530128#define CONFIG_SYS_FLASH_QUIET_TEST
Vipin KUMAR080cfee2010-01-15 19:15:52 +0530129
130#endif
131
Vipin KUMAR1fa943b2012-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 KUMAR080cfee2010-01-15 19:15:52 +0530136#if defined(CONFIG_SPEAR300)
Amit Virdibc0bdf42012-05-07 13:07:01 +0530137#define CONFIG_SYS_NAND_BASE 0x80000000
Vipin KUMAR7e074152010-01-15 19:15:50 +0530138
Vipin KUMAR080cfee2010-01-15 19:15:52 +0530139#elif defined(CONFIG_SPEAR310)
Amit Virdibc0bdf42012-05-07 13:07:01 +0530140#define CONFIG_SYS_NAND_BASE 0x40000000
Vipin KUMAR080cfee2010-01-15 19:15:52 +0530141
Vipin KUMAR7da69232010-01-15 19:15:53 +0530142#elif defined(CONFIG_SPEAR320)
Amit Virdibc0bdf42012-05-07 13:07:01 +0530143#define CONFIG_SYS_NAND_BASE 0x50000000
Vipin KUMAR7da69232010-01-15 19:15:53 +0530144
Vipin KUMAR080cfee2010-01-15 19:15:52 +0530145#endif
146
Vipin KUMAR1b7935c2012-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 KUMAR7e074152010-01-15 19:15:50 +0530157#endif /* __CONFIG_H */