blob: 4dbf919cfa0ba9252312cdf9e0ae9ca0b23b2e89 [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 */
Simon Glass167ad902016-09-12 23:18:30 -060015#if defined(CONFIG_SPEAR300)
Amit Virdi870d11e2012-05-07 13:07:02 +053016#define CONFIG_SPEAR3XX
Simon Glass167ad902016-09-12 23:18:30 -060017#elif defined(CONFIG_SPEAR310)
Amit Virdi870d11e2012-05-07 13:07:02 +053018#define CONFIG_SPEAR3XX
Simon Glass167ad902016-09-12 23:18:30 -060019#elif defined(CONFIG_SPEAR320)
Amit Virdi870d11e2012-05-07 13:07:02 +053020#define CONFIG_SPEAR3XX
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053021#endif
Vipin KUMARb0ea0892010-01-15 19:15:50 +053022
Simon Glass167ad902016-09-12 23:18:30 -060023#if defined(CONFIG_USBTTY)
Vipin KUMAR0c93dec2012-05-07 13:06:46 +053024#define CONFIG_SPEAR_USBTTY
25#endif
26
Vipin KUMARb0ea0892010-01-15 19:15:50 +053027#include <configs/spear-common.h>
28
Vipin KUMAR6b49f982012-05-07 13:06:42 +053029/* Ethernet driver configuration */
Amit Virdi870d11e2012-05-07 13:07:02 +053030#define CONFIG_DW_ALTDESCRIPTOR
Vipin KUMAR6b49f982012-05-07 13:06:42 +053031
Vipin KUMARa1dba022012-05-07 13:06:43 +053032#if defined(CONFIG_SPEAR310)
Amit Virdi870d11e2012-05-07 13:07:02 +053033#define CONFIG_MACB
Vipin KUMARa1dba022012-05-07 13:06:43 +053034#define CONFIG_MACB0_PHY 0x01
35#define CONFIG_MACB1_PHY 0x03
36#define CONFIG_MACB2_PHY 0x05
37#define CONFIG_MACB3_PHY 0x07
38
39#elif defined(CONFIG_SPEAR320)
Amit Virdi870d11e2012-05-07 13:07:02 +053040#define CONFIG_MACB
Vipin KUMARa1dba022012-05-07 13:06:43 +053041#define CONFIG_MACB0_PHY 0x01
42
43#endif
44
Vipin KUMARb0ea0892010-01-15 19:15:50 +053045/* Serial Configuration (PL011) */
46#define CONFIG_SYS_SERIAL0 0xD0000000
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053047
48#if defined(CONFIG_SPEAR300)
Vipin KUMARb0ea0892010-01-15 19:15:50 +053049#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
50
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053051#elif defined(CONFIG_SPEAR310)
52
53#if (CONFIG_CONS_INDEX)
54#undef CONFIG_PL011_CLOCK
55#define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
56#endif
57
58#define CONFIG_SYS_SERIAL1 0xB2000000
59#define CONFIG_SYS_SERIAL2 0xB2080000
60#define CONFIG_SYS_SERIAL3 0xB2100000
61#define CONFIG_SYS_SERIAL4 0xB2180000
62#define CONFIG_SYS_SERIAL5 0xB2200000
63#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
64 (void *)CONFIG_SYS_SERIAL1, \
65 (void *)CONFIG_SYS_SERIAL2, \
66 (void *)CONFIG_SYS_SERIAL3, \
67 (void *)CONFIG_SYS_SERIAL4, \
68 (void *)CONFIG_SYS_SERIAL5 }
Vipin KUMARcc0da712010-01-15 19:15:53 +053069#elif defined(CONFIG_SPEAR320)
70
71#if (CONFIG_CONS_INDEX)
72#undef CONFIG_PL011_CLOCK
73#define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053074#endif
75
Vipin KUMARcc0da712010-01-15 19:15:53 +053076#define CONFIG_SYS_SERIAL1 0xA3000000
77#define CONFIG_SYS_SERIAL2 0xA4000000
78#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
79 (void *)CONFIG_SYS_SERIAL1, \
80 (void *)CONFIG_SYS_SERIAL2 }
81#endif
82
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053083#if defined(CONFIG_SPEAR_EMI)
84
85#define CONFIG_SYS_FLASH_CFI
86#define CONFIG_FLASH_CFI_DRIVER
87
88#if defined(CONFIG_SPEAR310)
Vipin Kumar6e051e92012-05-07 13:06:54 +053089#define CONFIG_SYS_FLASH_PROTECTION
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053090#define CONFIG_SYS_FLASH_BASE 0x50000000
91#define CONFIG_SYS_CS1_FLASH_BASE 0x60000000
92#define CONFIG_SYS_CS2_FLASH_BASE 0x70000000
93#define CONFIG_SYS_CS3_FLASH_BASE 0x80000000
94#define CONFIG_SYS_CS4_FLASH_BASE 0x90000000
95#define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000
96#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
97 CONFIG_SYS_CS1_FLASH_BASE, \
98 CONFIG_SYS_CS2_FLASH_BASE, \
99 CONFIG_SYS_CS3_FLASH_BASE, \
100 CONFIG_SYS_CS4_FLASH_BASE, \
101 CONFIG_SYS_CS5_FLASH_BASE }
102#define CONFIG_SYS_MAX_FLASH_BANKS 6
103
Vipin KUMARcc0da712010-01-15 19:15:53 +0530104#elif defined(CONFIG_SPEAR320)
Vipin Kumar6e051e92012-05-07 13:06:54 +0530105#define CONFIG_SYS_FLASH_PROTECTION
Vipin KUMARcc0da712010-01-15 19:15:53 +0530106#define CONFIG_SYS_FLASH_BASE 0x44000000
107#define CONFIG_SYS_CS1_FLASH_BASE 0x45000000
108#define CONFIG_SYS_CS2_FLASH_BASE 0x46000000
109#define CONFIG_SYS_CS3_FLASH_BASE 0x47000000
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#define CONFIG_SYS_MAX_FLASH_BANKS 4
115
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530116#endif
117
118#define CONFIG_SYS_MAX_FLASH_SECT (127 + 8)
Amit Virdi870d11e2012-05-07 13:07:02 +0530119#define CONFIG_SYS_FLASH_QUIET_TEST
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530120
121#endif
122
Vipin KUMARf1bd24e2012-05-22 00:15:55 +0000123/* NAND flash configuration */
124#define CONFIG_SYS_FSMC_NAND_SP
125#define CONFIG_SYS_FSMC_NAND_8BIT
126
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530127#if defined(CONFIG_SPEAR300)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530128#define CONFIG_SYS_NAND_BASE 0x80000000
Vipin KUMARb0ea0892010-01-15 19:15:50 +0530129
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530130#elif defined(CONFIG_SPEAR310)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530131#define CONFIG_SYS_NAND_BASE 0x40000000
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530132
Vipin KUMARcc0da712010-01-15 19:15:53 +0530133#elif defined(CONFIG_SPEAR320)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530134#define CONFIG_SYS_NAND_BASE 0x50000000
Vipin KUMARcc0da712010-01-15 19:15:53 +0530135
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530136#endif
137
Vipin KUMARc54105b2012-05-07 13:06:48 +0530138/* Environment Settings */
139#if defined(CONFIG_SPEAR300)
140#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY
141
142#elif defined(CONFIG_SPEAR310) || defined(CONFIG_SPEAR320)
143#define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0"
144#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \
145 CONFIG_EXTRA_ENV_UNLOCK
146#endif
147
Vipin KUMARb0ea0892010-01-15 19:15:50 +0530148#endif /* __CONFIG_H */