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