blob: 5c8626e6cf967b3f6a4e28996c7bfbc4b22239ab [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Vipin KUMARb0ea0892010-01-15 19:15:50 +05302/*
3 * (C) Copyright 2009
4 * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com>
Vipin KUMARb0ea0892010-01-15 19:15:50 +05305 */
6
7#ifndef __CONFIG_H
8#define __CONFIG_H
9
10/*
11 * High Level Configuration Options
12 * (easy to change)
13 */
Simon Glass167ad902016-09-12 23:18:30 -060014#if defined(CONFIG_SPEAR300)
Amit Virdi870d11e2012-05-07 13:07:02 +053015#define CONFIG_SPEAR3XX
Simon Glass167ad902016-09-12 23:18:30 -060016#elif defined(CONFIG_SPEAR310)
Amit Virdi870d11e2012-05-07 13:07:02 +053017#define CONFIG_SPEAR3XX
Simon Glass167ad902016-09-12 23:18:30 -060018#elif defined(CONFIG_SPEAR320)
Amit Virdi870d11e2012-05-07 13:07:02 +053019#define CONFIG_SPEAR3XX
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053020#endif
Vipin KUMARb0ea0892010-01-15 19:15:50 +053021
Simon Glass167ad902016-09-12 23:18:30 -060022#if defined(CONFIG_USBTTY)
Vipin KUMAR0c93dec2012-05-07 13:06:46 +053023#define CONFIG_SPEAR_USBTTY
24#endif
25
Vipin KUMARb0ea0892010-01-15 19:15:50 +053026#include <configs/spear-common.h>
27
Vipin KUMAR6b49f982012-05-07 13:06:42 +053028/* Ethernet driver configuration */
Amit Virdi870d11e2012-05-07 13:07:02 +053029#define CONFIG_DW_ALTDESCRIPTOR
Vipin KUMAR6b49f982012-05-07 13:06:42 +053030
Vipin KUMARa1dba022012-05-07 13:06:43 +053031#if defined(CONFIG_SPEAR310)
Amit Virdi870d11e2012-05-07 13:07:02 +053032#define CONFIG_MACB
Vipin KUMARa1dba022012-05-07 13:06:43 +053033#define CONFIG_MACB0_PHY 0x01
34#define CONFIG_MACB1_PHY 0x03
35#define CONFIG_MACB2_PHY 0x05
36#define CONFIG_MACB3_PHY 0x07
37
38#elif defined(CONFIG_SPEAR320)
Amit Virdi870d11e2012-05-07 13:07:02 +053039#define CONFIG_MACB
Vipin KUMARa1dba022012-05-07 13:06:43 +053040#define CONFIG_MACB0_PHY 0x01
41
42#endif
43
Vipin KUMARb0ea0892010-01-15 19:15:50 +053044/* Serial Configuration (PL011) */
45#define CONFIG_SYS_SERIAL0 0xD0000000
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053046
47#if defined(CONFIG_SPEAR300)
Vipin KUMARb0ea0892010-01-15 19:15:50 +053048#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
49
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053050#elif defined(CONFIG_SPEAR310)
51
52#if (CONFIG_CONS_INDEX)
53#undef CONFIG_PL011_CLOCK
54#define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
55#endif
56
57#define CONFIG_SYS_SERIAL1 0xB2000000
58#define CONFIG_SYS_SERIAL2 0xB2080000
59#define CONFIG_SYS_SERIAL3 0xB2100000
60#define CONFIG_SYS_SERIAL4 0xB2180000
61#define CONFIG_SYS_SERIAL5 0xB2200000
62#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
63 (void *)CONFIG_SYS_SERIAL1, \
64 (void *)CONFIG_SYS_SERIAL2, \
65 (void *)CONFIG_SYS_SERIAL3, \
66 (void *)CONFIG_SYS_SERIAL4, \
67 (void *)CONFIG_SYS_SERIAL5 }
Vipin KUMARcc0da712010-01-15 19:15:53 +053068#elif defined(CONFIG_SPEAR320)
69
70#if (CONFIG_CONS_INDEX)
71#undef CONFIG_PL011_CLOCK
72#define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053073#endif
74
Vipin KUMARcc0da712010-01-15 19:15:53 +053075#define CONFIG_SYS_SERIAL1 0xA3000000
76#define CONFIG_SYS_SERIAL2 0xA4000000
77#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
78 (void *)CONFIG_SYS_SERIAL1, \
79 (void *)CONFIG_SYS_SERIAL2 }
80#endif
81
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053082#if defined(CONFIG_SPEAR_EMI)
83
84#define CONFIG_SYS_FLASH_CFI
85#define CONFIG_FLASH_CFI_DRIVER
86
87#if defined(CONFIG_SPEAR310)
Vipin Kumar6e051e92012-05-07 13:06:54 +053088#define CONFIG_SYS_FLASH_PROTECTION
Vipin KUMAR6e2998f2010-01-15 19:15:52 +053089#define CONFIG_SYS_FLASH_BASE 0x50000000
90#define CONFIG_SYS_CS1_FLASH_BASE 0x60000000
91#define CONFIG_SYS_CS2_FLASH_BASE 0x70000000
92#define CONFIG_SYS_CS3_FLASH_BASE 0x80000000
93#define CONFIG_SYS_CS4_FLASH_BASE 0x90000000
94#define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000
95#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
96 CONFIG_SYS_CS1_FLASH_BASE, \
97 CONFIG_SYS_CS2_FLASH_BASE, \
98 CONFIG_SYS_CS3_FLASH_BASE, \
99 CONFIG_SYS_CS4_FLASH_BASE, \
100 CONFIG_SYS_CS5_FLASH_BASE }
101#define CONFIG_SYS_MAX_FLASH_BANKS 6
102
Vipin KUMARcc0da712010-01-15 19:15:53 +0530103#elif defined(CONFIG_SPEAR320)
Vipin Kumar6e051e92012-05-07 13:06:54 +0530104#define CONFIG_SYS_FLASH_PROTECTION
Vipin KUMARcc0da712010-01-15 19:15:53 +0530105#define CONFIG_SYS_FLASH_BASE 0x44000000
106#define CONFIG_SYS_CS1_FLASH_BASE 0x45000000
107#define CONFIG_SYS_CS2_FLASH_BASE 0x46000000
108#define CONFIG_SYS_CS3_FLASH_BASE 0x47000000
109#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
110 CONFIG_SYS_CS1_FLASH_BASE, \
111 CONFIG_SYS_CS2_FLASH_BASE, \
112 CONFIG_SYS_CS3_FLASH_BASE }
113#define CONFIG_SYS_MAX_FLASH_BANKS 4
114
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530115#endif
116
117#define CONFIG_SYS_MAX_FLASH_SECT (127 + 8)
Amit Virdi870d11e2012-05-07 13:07:02 +0530118#define CONFIG_SYS_FLASH_QUIET_TEST
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530119
120#endif
121
Vipin KUMARf1bd24e2012-05-22 00:15:55 +0000122/* NAND flash configuration */
123#define CONFIG_SYS_FSMC_NAND_SP
124#define CONFIG_SYS_FSMC_NAND_8BIT
125
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530126#if defined(CONFIG_SPEAR300)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530127#define CONFIG_SYS_NAND_BASE 0x80000000
Vipin KUMARb0ea0892010-01-15 19:15:50 +0530128
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530129#elif defined(CONFIG_SPEAR310)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530130#define CONFIG_SYS_NAND_BASE 0x40000000
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530131
Vipin KUMARcc0da712010-01-15 19:15:53 +0530132#elif defined(CONFIG_SPEAR320)
Amit Virdi9ee8d632012-05-07 13:07:01 +0530133#define CONFIG_SYS_NAND_BASE 0x50000000
Vipin KUMARcc0da712010-01-15 19:15:53 +0530134
Vipin KUMAR6e2998f2010-01-15 19:15:52 +0530135#endif
136
Vipin KUMARc54105b2012-05-07 13:06:48 +0530137/* Environment Settings */
138#if defined(CONFIG_SPEAR300)
139#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY
140
141#elif defined(CONFIG_SPEAR310) || defined(CONFIG_SPEAR320)
142#define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0"
143#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \
144 CONFIG_EXTRA_ENV_UNLOCK
145#endif
146
Vipin KUMARb0ea0892010-01-15 19:15:50 +0530147#endif /* __CONFIG_H */