3 * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com>
5 * SPDX-License-Identifier: GPL-2.0+
12 * High Level Configuration Options
15 #if defined(CONFIG_spear300)
16 #define CONFIG_SPEAR3XX
17 #define CONFIG_SPEAR300
18 #elif defined(CONFIG_spear310)
19 #define CONFIG_SPEAR3XX
20 #define CONFIG_SPEAR310
21 #elif defined(CONFIG_spear320)
22 #define CONFIG_SPEAR3XX
23 #define CONFIG_SPEAR320
26 #if defined(CONFIG_usbtty)
27 #define CONFIG_SPEAR_USBTTY
30 #if defined(CONFIG_nand)
31 #define CONFIG_ENV_IS_IN_NAND
33 #define CONFIG_ENV_IS_IN_FLASH
36 #include <configs/spear-common.h>
38 /* Ethernet driver configuration */
39 #define CONFIG_DW_ALTDESCRIPTOR
41 #if defined(CONFIG_SPEAR310)
43 #define CONFIG_MACB0_PHY 0x01
44 #define CONFIG_MACB1_PHY 0x03
45 #define CONFIG_MACB2_PHY 0x05
46 #define CONFIG_MACB3_PHY 0x07
48 #elif defined(CONFIG_SPEAR320)
50 #define CONFIG_MACB0_PHY 0x01
54 /* Serial Configuration (PL011) */
55 #define CONFIG_SYS_SERIAL0 0xD0000000
57 #if defined(CONFIG_SPEAR300)
58 #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
60 #elif defined(CONFIG_SPEAR310)
62 #if (CONFIG_CONS_INDEX)
63 #undef CONFIG_PL011_CLOCK
64 #define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
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 }
78 #elif defined(CONFIG_SPEAR320)
80 #if (CONFIG_CONS_INDEX)
81 #undef CONFIG_PL011_CLOCK
82 #define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
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 }
92 #if defined(CONFIG_SPEAR_EMI)
94 #define CONFIG_SYS_FLASH_CFI
95 #define CONFIG_FLASH_CFI_DRIVER
97 #if defined(CONFIG_SPEAR310)
98 #define CONFIG_SYS_FLASH_PROTECTION
99 #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
113 #elif defined(CONFIG_SPEAR320)
114 #define CONFIG_SYS_FLASH_PROTECTION
115 #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
127 #define CONFIG_SYS_MAX_FLASH_SECT (127 + 8)
128 #define CONFIG_SYS_FLASH_QUIET_TEST
132 /* NAND flash configuration */
133 #define CONFIG_SYS_FSMC_NAND_SP
134 #define CONFIG_SYS_FSMC_NAND_8BIT
136 #if defined(CONFIG_SPEAR300)
137 #define CONFIG_SYS_NAND_BASE 0x80000000
139 #elif defined(CONFIG_SPEAR310)
140 #define CONFIG_SYS_NAND_BASE 0x40000000
142 #elif defined(CONFIG_SPEAR320)
143 #define CONFIG_SYS_NAND_BASE 0x50000000
147 /* Environment Settings */
148 #if defined(CONFIG_SPEAR300)
149 #define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY
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
157 #endif /* __CONFIG_H */