configs: Re-sync HUSH options
[platform/kernel/u-boot.git] / include / configs / edb93xx.h
1 /*
2  * U-Boot - Configuration file for Cirrus Logic EDB93xx boards
3  */
4
5 #ifndef __CONFIG_H
6 #define __CONFIG_H
7
8 #ifdef CONFIG_MK_edb9301
9 #define CONFIG_EDB9301
10 #elif defined(CONFIG_MK_edb9302)
11 #define CONFIG_EDB9302
12 #elif defined(CONFIG_MK_edb9302a)
13 #define CONFIG_EDB9302A
14 #elif defined(CONFIG_MK_edb9307)
15 #define CONFIG_EDB9307
16 #elif defined(CONFIG_MK_edb9307a)
17 #define CONFIG_EDB9307A
18 #elif defined(CONFIG_MK_edb9312)
19 #define CONFIG_EDB9312
20 #elif defined(CONFIG_MK_edb9315)
21 #define CONFIG_EDB9315
22 #elif defined(CONFIG_MK_edb9315a)
23 #define CONFIG_EDB9315A
24 #else
25 #error "no board defined"
26 #endif
27
28
29 /* Initial environment and monitor configuration options. */
30 #define CONFIG_BOOTDELAY                2
31 #define CONFIG_CMDLINE_TAG              1
32 #define CONFIG_INITRD_TAG               1
33 #define CONFIG_SETUP_MEMORY_TAGS        1
34 #define CONFIG_BOOTARGS         "root=/dev/nfs console=ttyAM0,115200 ip=dhcp"
35 #define CONFIG_BOOTFILE         "edb93xx.img"
36
37
38
39 #define CONFIG_SYS_LDSCRIPT     "board/cirrus/edb93xx/u-boot.lds"
40
41 #undef CONFIG_SYS_PROMPT
42 #ifdef CONFIG_EDB9301
43 #define CONFIG_EP9301
44 #define CONFIG_MACH_TYPE                MACH_TYPE_EDB9301
45 #define CONFIG_SYS_PROMPT               "EDB9301> "
46 #define CONFIG_ENV_SECT_SIZE            0x00020000
47 #elif defined(CONFIG_EDB9302)
48 #define CONFIG_EP9302
49 #define CONFIG_MACH_TYPE                MACH_TYPE_EDB9302
50 #define CONFIG_SYS_PROMPT               "EDB9302> "
51 #define CONFIG_ENV_SECT_SIZE            0x00020000
52 #elif defined(CONFIG_EDB9302A)
53 #define CONFIG_EP9302
54 #define CONFIG_MACH_TYPE                MACH_TYPE_EDB9302A
55 #define CONFIG_SYS_PROMPT               "EDB9302A> "
56 #define CONFIG_ENV_SECT_SIZE            0x00020000
57 #elif defined(CONFIG_EDB9307)
58 #define CONFIG_EP9307
59 #define CONFIG_MACH_TYPE                MACH_TYPE_EDB9307
60 #define CONFIG_SYS_PROMPT               "EDB9307> "
61 #define CONFIG_ENV_SECT_SIZE            0x00040000
62 #elif defined(CONFIG_EDB9307A)
63 #define CONFIG_EP9307
64 #define CONFIG_MACH_TYPE                MACH_TYPE_EDB9307A
65 #define CONFIG_SYS_PROMPT               "EDB9307A> "
66 #define CONFIG_ENV_SECT_SIZE            0x00020000
67 #elif defined(CONFIG_EDB9312)
68 #define CONFIG_EP9312
69 #define CONFIG_MACH_TYPE                MACH_TYPE_EDB9312
70 #define CONFIG_SYS_PROMPT               "EDB9312> "
71 #define CONFIG_ENV_SECT_SIZE            0x00040000
72 #elif defined(CONFIG_EDB9315)
73 #define CONFIG_EP9315
74 #define CONFIG_MACH_TYPE                MACH_TYPE_EDB9315
75 #define CONFIG_SYS_PROMPT               "EDB9315> "
76 #define CONFIG_ENV_SECT_SIZE            0x00040000
77 #elif defined(CONFIG_EDB9315A)
78 #define CONFIG_EP9315
79 #define CONFIG_MACH_TYPE                MACH_TYPE_EDB9315A
80 #define CONFIG_SYS_PROMPT               "EDB9315A> "
81 #define CONFIG_ENV_SECT_SIZE            0x00020000
82 #else
83 #error "no board defined"
84 #endif
85
86 /* High-level configuration options */
87 #define CONFIG_EP93XX           1               /* This is a Cirrus Logic 93xx SoC */
88
89 #define CONFIG_SYS_CLK_FREQ     14745600        /* EP93xx has a 14.7456 clock */
90 #undef CONFIG_USE_IRQ                           /* Don't need IRQ/FIQ */
91
92 /* Monitor configuration */
93 #undef CONFIG_CMD_DATE
94 #define CONFIG_CMD_DHCP
95 #define CONFIG_CMD_JFFS2
96
97 #define CONFIG_SYS_LONGHELP                     /* Enable "long" help in mon */
98 #define CONFIG_SYS_CBSIZE               1024    /* Console I/O buffer size */
99 /* Print buffer size */
100 #define CONFIG_SYS_PBSIZE       (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
101 /* Boot argument buffer size */
102 #define CONFIG_SYS_BARGSIZE     CONFIG_SYS_CBSIZE
103 #define CONFIG_SYS_MAXARGS      16              /* Max number of command args */
104
105 /* Serial port hardware configuration */
106 #define CONFIG_PL010_SERIAL
107 #define CONFIG_CONS_INDEX               0
108 #define CONFIG_BAUDRATE                 115200
109 #define CONFIG_SYS_BAUDRATE_TABLE       {9600, 19200, 38400, 57600, \
110                         115200, 230400}
111 #define CONFIG_SYS_SERIAL0              0x808C0000
112 #define CONFIG_SYS_SERIAL1              0x808D0000
113 /*#define CONFIG_PL01x_PORTS    {(void *)CONFIG_SYS_SERIAL0, \
114             (void *)CONFIG_SYS_SERIAL1} */
115
116 #define CONFIG_PL01x_PORTS      {(void *)CONFIG_SYS_SERIAL0}
117
118 /* Status LED */
119 #define CONFIG_STATUS_LED               1 /* Status LED enabled */
120 #define CONFIG_BOARD_SPECIFIC_LED       1
121 #define STATUS_LED_GREEN                0
122 #define STATUS_LED_RED                  1
123 /* Green */
124 #define STATUS_LED_BIT                  STATUS_LED_GREEN
125 #define STATUS_LED_STATE                STATUS_LED_ON
126 #define STATUS_LED_PERIOD               (CONFIG_SYS_HZ / 2)
127 /* Red */
128 #define STATUS_LED_BIT1                 STATUS_LED_RED
129 #define STATUS_LED_STATE1               STATUS_LED_OFF
130 #define STATUS_LED_PERIOD1              (CONFIG_SYS_HZ / 2)
131 /* Optional value */
132 #define STATUS_LED_BOOT                 STATUS_LED_BIT
133
134 /* Network hardware configuration */
135 #define CONFIG_DRIVER_EP93XX_MAC
136 #define CONFIG_MII_SUPPRESS_PREAMBLE
137 #define CONFIG_MII
138 #define CONFIG_PHY_ADDR         1
139 #undef CONFIG_NETCONSOLE
140
141 /* SDRAM configuration */
142 #if defined(CONFIG_EDB9301) || defined(CONFIG_EDB9302) || \
143     defined(CONFIG_EDB9307) || defined CONFIG_EDB9312 || \
144     defined(CONFIG_EDB9315)
145 /*
146  * EDB9301/2 has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75
147  * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set
148  * the SROMLL bit on the processor, resulting in this non-contiguous memory map.
149  *
150  * The EDB9307, EDB9312, and EDB9315 have 2 banks of SDRAM consisting of
151  * 2x Samsung K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of
152  * 64 MB of SDRAM.
153  */
154
155 #define CONFIG_EDB93XX_SDCS3
156
157 #elif defined(CONFIG_EDB9302A) || \
158     defined(CONFIG_EDB9307A) || defined(CONFIG_EDB9315A)
159 /*
160  * EDB9302a has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75
161  * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set
162  * the SROMLL bit on the processor, resulting in this non-contiguous memory map.
163  *
164  * The EDB9307A and EDB9315A have 2 banks of SDRAM consisting of 2x Samsung
165  * K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of 64 MB of SDRAM.
166  */
167 #define CONFIG_EDB93XX_SDCS0
168
169 #else
170 #error "no SDCS configuration for this board"
171 #endif
172
173
174 #if defined(CONFIG_EDB93XX_SDCS3)
175 #define CONFIG_SYS_LOAD_ADDR    0x01000000      /* Default load address */
176 #define PHYS_SDRAM_1            0x00000000
177 #elif defined(CONFIG_EDB93XX_SDCS0)
178 #define CONFIG_SYS_LOAD_ADDR    0xc1000000      /* Default load address */
179 #define PHYS_SDRAM_1            0xc0000000
180 #endif
181
182 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM_1
183 #define CONFIG_NR_DRAM_BANKS            8
184
185 #define CONFIG_SYS_INIT_SP_ADDR \
186     (CONFIG_SYS_SDRAM_BASE + 32*1024 - GENERATED_GBL_DATA_SIZE)
187
188
189 /* Must match kernel config */
190 #define LINUX_BOOT_PARAM_ADDR   (PHYS_SDRAM_1 + 0x100)
191
192 /* Run-time memory allocatons */
193 #define CONFIG_SYS_GBL_DATA_SIZE        128
194 #define CONFIG_STACKSIZE                (128 * 1024)
195
196 #if defined(CONFIG_USE_IRQ)
197 #define CONFIG_STACKSIZE_IRQ    (4 * 1024)
198 #define CONFIG_STACKSIZE_FIQ    (4 * 1024)
199 #endif
200
201 #define CONFIG_SYS_MALLOC_LEN           (512 * 1024)
202
203 /* -----------------------------------------------------------------------------
204  * FLASH and environment organization
205  *
206  * The EDB9301, EDB9302(a), EDB9307a, EDB9315a have 1 bank of flash memory at
207  * 0x60000000 consisting of 1x Intel TE28F128J3C-150 128 Mbit flash on a 16-bit
208  * data bus, for a total of 16 MB of CFI-compatible flash.
209  *
210  * The EDB9307, EDB9312, and EDB9315 have 1 bank of flash memory at
211  * 0x60000000 consisting of 2x Micron MT28F128J3-12 128 Mbit flash on a 32-bit
212  * data bus, for a total of 32 MB of CFI-compatible flash.
213  *
214  *
215  *                            EDB9301/02(a)7a/15a    EDB9307/12/15
216  * 0x60000000 - 0x0003FFFF    u-boot                 u-boot
217  * 0x60040000 - 0x0005FFFF    environment #1         environment #1
218  * 0x60060000 - 0x0007FFFF    environment #2         environment #1 (continued)
219  * 0x60080000 - 0x0009FFFF    unused                 environment #2
220  * 0x600A0000 - 0x000BFFFF    unused                 environment #2 (continued)
221  * 0x600C0000 - 0x00FFFFFF    unused                 unused
222  * 0x61000000 - 0x01FFFFFF    not present            unused
223  */
224 #define CONFIG_SYS_FLASH_CFI
225 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
226
227
228 #define CONFIG_SYS_FLASH_PROTECTION
229 #define CONFIG_FLASH_CFI_DRIVER
230 #define CONFIG_SYS_MAX_FLASH_BANKS      1
231 #define CONFIG_SYS_MAX_FLASH_SECT       (256+8)
232
233 #define CONFIG_SYS_TEXT_BASE            0x60000000
234 #define PHYS_FLASH_1                    CONFIG_SYS_TEXT_BASE
235 #define CONFIG_SYS_FLASH_BASE           CONFIG_SYS_TEXT_BASE
236
237 #define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_FLASH_BASE
238 #define CONFIG_SYS_MONITOR_LEN          (256 * 1024)
239
240 #define CONFIG_ENV_OVERWRITE            /* Vendor params unprotected */
241 #define CONFIG_ENV_IS_IN_FLASH
242
243 #define CONFIG_ENV_ADDR                 0x60040000
244 #define CONFIG_ENV_ADDR_REDUND          (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
245
246 #define CONFIG_ENV_SIZE                 CONFIG_ENV_SECT_SIZE
247 #define CONFIG_ENV_SIZE_REDUND          CONFIG_ENV_SIZE
248
249 /* Define to enable MMC on SPI support */
250 /* #define CONFIG_EP93XX_SPI_MMC */
251
252 #ifdef CONFIG_EP93XX_SPI_MMC
253 #define CONFIG_EP93XX_SPI
254 #define CONFIG_MMC
255 #define CONFIG_GENERIC_MMC
256 #define CONFIG_MMC_SPI
257 #define CONFIG_CMD_MMC
258 #define CONFIG_MMC_SPI_NPOWER_EGPIO     9
259 #endif
260
261 #define CONFIG_USB_STORAGE
262 #define CONFIG_USB_OHCI_NEW
263 #define CONFIG_USB_OHCI_EP93XX
264 #define CONFIG_SYS_USB_OHCI_CPU_INIT
265 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS      3
266 #define CONFIG_SYS_USB_OHCI_SLOT_NAME           "ep93xx-ohci"
267 #define CONFIG_SYS_USB_OHCI_REGS_BASE           0x80020000
268
269 #define CONFIG_CMD_EXT2
270 #define CONFIG_CMD_EXT4
271 #define CONFIG_CMD_FAT
272 #define CONFIG_CMD_USB
273
274 #define CONFIG_BOARD_EARLY_INIT_F
275 #define CONFIG_CMD_BOOTZ
276
277 /* Define to disable flash configuration*/
278 /* #define CONFIG_EP93XX_NO_FLASH_CFG */
279
280 /* Define this for indusrial rated chips */
281 /* #define CONFIG_EDB93XX_INDUSTRIAL */
282
283 #endif /* !defined (__CONFIG_H) */