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