blob: 84cbcdda93cad81e9c68b724f5181c3f4c011591 [file] [log] [blame]
Sergey Kostanbaev68286762014-06-25 23:44:29 +04001/*
Bin Meng75574052016-02-05 19:30:11 -08002 * U-Boot - Configuration file for Cirrus Logic EDB93xx boards
Sergey Kostanbaev68286762014-06-25 23:44:29 +04003 */
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. */
Sergey Kostanbaev68286762014-06-25 23:44:29 +040029#define CONFIG_CMDLINE_TAG 1
30#define CONFIG_INITRD_TAG 1
31#define CONFIG_SETUP_MEMORY_TAGS 1
Sergey Kostanbaev68286762014-06-25 23:44:29 +040032#define CONFIG_BOOTFILE "edb93xx.img"
33
Sergey Kostanbaev68286762014-06-25 23:44:29 +040034#ifdef CONFIG_EDB9301
Sergey Kostanbaev68286762014-06-25 23:44:29 +040035#define CONFIG_MACH_TYPE MACH_TYPE_EDB9301
Sergey Kostanbaev68286762014-06-25 23:44:29 +040036#define CONFIG_ENV_SECT_SIZE 0x00020000
37#elif defined(CONFIG_EDB9302)
38#define CONFIG_EP9302
39#define CONFIG_MACH_TYPE MACH_TYPE_EDB9302
Sergey Kostanbaev68286762014-06-25 23:44:29 +040040#define CONFIG_ENV_SECT_SIZE 0x00020000
41#elif defined(CONFIG_EDB9302A)
42#define CONFIG_EP9302
43#define CONFIG_MACH_TYPE MACH_TYPE_EDB9302A
Sergey Kostanbaev68286762014-06-25 23:44:29 +040044#define CONFIG_ENV_SECT_SIZE 0x00020000
45#elif defined(CONFIG_EDB9307)
46#define CONFIG_EP9307
47#define CONFIG_MACH_TYPE MACH_TYPE_EDB9307
Sergey Kostanbaev68286762014-06-25 23:44:29 +040048#define CONFIG_ENV_SECT_SIZE 0x00040000
49#elif defined(CONFIG_EDB9307A)
50#define CONFIG_EP9307
51#define CONFIG_MACH_TYPE MACH_TYPE_EDB9307A
Sergey Kostanbaev68286762014-06-25 23:44:29 +040052#define CONFIG_ENV_SECT_SIZE 0x00020000
53#elif defined(CONFIG_EDB9312)
54#define CONFIG_EP9312
55#define CONFIG_MACH_TYPE MACH_TYPE_EDB9312
Sergey Kostanbaev68286762014-06-25 23:44:29 +040056#define CONFIG_ENV_SECT_SIZE 0x00040000
57#elif defined(CONFIG_EDB9315)
58#define CONFIG_EP9315
59#define CONFIG_MACH_TYPE MACH_TYPE_EDB9315
Sergey Kostanbaev68286762014-06-25 23:44:29 +040060#define CONFIG_ENV_SECT_SIZE 0x00040000
61#elif defined(CONFIG_EDB9315A)
62#define CONFIG_EP9315
63#define CONFIG_MACH_TYPE MACH_TYPE_EDB9315A
Sergey Kostanbaev68286762014-06-25 23:44:29 +040064#define CONFIG_ENV_SECT_SIZE 0x00020000
65#else
66#error "no board defined"
67#endif
68
69/* High-level configuration options */
Masahiro Yamada7a5b2922014-11-06 14:59:35 +090070#define CONFIG_EP93XX 1 /* This is a Cirrus Logic 93xx SoC */
Sergey Kostanbaev68286762014-06-25 23:44:29 +040071
72#define CONFIG_SYS_CLK_FREQ 14745600 /* EP93xx has a 14.7456 clock */
Sergey Kostanbaev68286762014-06-25 23:44:29 +040073
74/* Monitor configuration */
Sergey Kostanbaev68286762014-06-25 23:44:29 +040075
Sergey Kostanbaev68286762014-06-25 23:44:29 +040076#define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */
Sergey Kostanbaev68286762014-06-25 23:44:29 +040077
78/* Serial port hardware configuration */
Sergey Kostanbaev68286762014-06-25 23:44:29 +040079#define CONFIG_SYS_BAUDRATE_TABLE {9600, 19200, 38400, 57600, \
80 115200, 230400}
81#define CONFIG_SYS_SERIAL0 0x808C0000
82#define CONFIG_SYS_SERIAL1 0x808D0000
83/*#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
84 (void *)CONFIG_SYS_SERIAL1} */
85
86#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
87
88/* Status LED */
Sergey Kostanbaev68286762014-06-25 23:44:29 +040089/* Optional value */
Sergey Kostanbaev68286762014-06-25 23:44:29 +040090
91/* Network hardware configuration */
92#define CONFIG_DRIVER_EP93XX_MAC
93#define CONFIG_MII_SUPPRESS_PREAMBLE
Sergey Kostanbaev68286762014-06-25 23:44:29 +040094#undef CONFIG_NETCONSOLE
95
96/* SDRAM configuration */
97#if defined(CONFIG_EDB9301) || defined(CONFIG_EDB9302) || \
98 defined(CONFIG_EDB9307) || defined CONFIG_EDB9312 || \
99 defined(CONFIG_EDB9315)
100/*
101 * EDB9301/2 has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75
102 * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set
103 * the SROMLL bit on the processor, resulting in this non-contiguous memory map.
104 *
105 * The EDB9307, EDB9312, and EDB9315 have 2 banks of SDRAM consisting of
106 * 2x Samsung K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of
107 * 64 MB of SDRAM.
108 */
109
110#define CONFIG_EDB93XX_SDCS3
111
112#elif defined(CONFIG_EDB9302A) || \
113 defined(CONFIG_EDB9307A) || defined(CONFIG_EDB9315A)
114/*
115 * EDB9302a has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75
116 * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set
117 * the SROMLL bit on the processor, resulting in this non-contiguous memory map.
118 *
119 * The EDB9307A and EDB9315A have 2 banks of SDRAM consisting of 2x Samsung
120 * K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of 64 MB of SDRAM.
121 */
122#define CONFIG_EDB93XX_SDCS0
123
124#else
125#error "no SDCS configuration for this board"
126#endif
127
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400128#if defined(CONFIG_EDB93XX_SDCS3)
129#define CONFIG_SYS_LOAD_ADDR 0x01000000 /* Default load address */
130#define PHYS_SDRAM_1 0x00000000
131#elif defined(CONFIG_EDB93XX_SDCS0)
132#define CONFIG_SYS_LOAD_ADDR 0xc1000000 /* Default load address */
133#define PHYS_SDRAM_1 0xc0000000
134#endif
135
136#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400137
138#define CONFIG_SYS_INIT_SP_ADDR \
139 (CONFIG_SYS_SDRAM_BASE + 32*1024 - GENERATED_GBL_DATA_SIZE)
140
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400141/* Must match kernel config */
142#define LINUX_BOOT_PARAM_ADDR (PHYS_SDRAM_1 + 0x100)
143
144/* Run-time memory allocatons */
145#define CONFIG_SYS_GBL_DATA_SIZE 128
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400146
147#define CONFIG_SYS_MALLOC_LEN (512 * 1024)
148
149/* -----------------------------------------------------------------------------
150 * FLASH and environment organization
151 *
152 * The EDB9301, EDB9302(a), EDB9307a, EDB9315a have 1 bank of flash memory at
153 * 0x60000000 consisting of 1x Intel TE28F128J3C-150 128 Mbit flash on a 16-bit
154 * data bus, for a total of 16 MB of CFI-compatible flash.
155 *
156 * The EDB9307, EDB9312, and EDB9315 have 1 bank of flash memory at
157 * 0x60000000 consisting of 2x Micron MT28F128J3-12 128 Mbit flash on a 32-bit
158 * data bus, for a total of 32 MB of CFI-compatible flash.
159 *
160 *
161 * EDB9301/02(a)7a/15a EDB9307/12/15
162 * 0x60000000 - 0x0003FFFF u-boot u-boot
163 * 0x60040000 - 0x0005FFFF environment #1 environment #1
164 * 0x60060000 - 0x0007FFFF environment #2 environment #1 (continued)
165 * 0x60080000 - 0x0009FFFF unused environment #2
166 * 0x600A0000 - 0x000BFFFF unused environment #2 (continued)
167 * 0x600C0000 - 0x00FFFFFF unused unused
168 * 0x61000000 - 0x01FFFFFF not present unused
169 */
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400170
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400171#define CONFIG_SYS_MAX_FLASH_BANKS 1
172#define CONFIG_SYS_MAX_FLASH_SECT (256+8)
173
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400174#define PHYS_FLASH_1 CONFIG_SYS_TEXT_BASE
175#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE
176
177#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
178#define CONFIG_SYS_MONITOR_LEN (256 * 1024)
179
180#define CONFIG_ENV_OVERWRITE /* Vendor params unprotected */
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400181
182#define CONFIG_ENV_ADDR 0x60040000
183#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
184
185#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
186#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
187
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400188#define CONFIG_USB_OHCI_NEW
189#define CONFIG_USB_OHCI_EP93XX
190#define CONFIG_SYS_USB_OHCI_CPU_INIT
191#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 3
192#define CONFIG_SYS_USB_OHCI_SLOT_NAME "ep93xx-ohci"
193#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x80020000
194
Sergey Kostanbaev68286762014-06-25 23:44:29 +0400195/* Define to disable flash configuration*/
196/* #define CONFIG_EP93XX_NO_FLASH_CFG */
197
198/* Define this for indusrial rated chips */
199/* #define CONFIG_EDB93XX_INDUSTRIAL */
200
201#endif /* !defined (__CONFIG_H) */