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