Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de> |
| 3 | * |
| 4 | * (C) Copyright 2009 Freescale Semiconductor, Inc. |
| 5 | * |
| 6 | * Configuration settings for the MX51EVK Board |
| 7 | * |
Wolfgang Denk | 3765b3e | 2013-10-07 13:07:26 +0200 | [diff] [blame] | 8 | * SPDX-License-Identifier: GPL-2.0+ |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __CONFIG_H |
| 12 | #define __CONFIG_H |
| 13 | |
| 14 | #include <config_cmd_default.h> |
| 15 | |
| 16 | /* |
| 17 | * High Level Board Configuration Options |
| 18 | */ |
| 19 | /* An i.MX51 CPU */ |
| 20 | #define CONFIG_MX51 |
Marek Vasut | af708cb | 2011-09-25 09:55:43 +0000 | [diff] [blame] | 21 | |
| 22 | #define machine_is_efikamx() (CONFIG_MACH_TYPE == MACH_TYPE_MX51_EFIKAMX) |
| 23 | #define machine_is_efikasb() (CONFIG_MACH_TYPE == MACH_TYPE_MX51_EFIKASB) |
| 24 | |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 25 | #include <asm/arch/imx-regs.h> |
| 26 | |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 27 | #define CONFIG_DISPLAY_CPUINFO |
| 28 | #define CONFIG_DISPLAY_BOARDINFO |
| 29 | |
Jana Rapava | 745525f | 2011-07-11 14:16:44 +0000 | [diff] [blame] | 30 | #define CONFIG_SYS_TEXT_BASE 0x97800000 |
| 31 | |
Marek Vasut | d98d8bc | 2011-06-24 21:46:07 +0200 | [diff] [blame] | 32 | #define CONFIG_SYS_ICACHE_OFF |
| 33 | #define CONFIG_SYS_DCACHE_OFF |
| 34 | |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 35 | /* |
| 36 | * Bootloader Components Configuration |
| 37 | */ |
| 38 | #define CONFIG_CMD_SPI |
| 39 | #define CONFIG_CMD_SF |
| 40 | #define CONFIG_CMD_MMC |
| 41 | #define CONFIG_CMD_FAT |
Marek Vasut | 4e0499e | 2011-07-11 14:16:45 +0000 | [diff] [blame] | 42 | #define CONFIG_CMD_EXT2 |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 43 | #define CONFIG_CMD_IDE |
Marek Vasut | d98d8bc | 2011-06-24 21:46:07 +0200 | [diff] [blame] | 44 | #define CONFIG_CMD_NET |
| 45 | #define CONFIG_CMD_DATE |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 46 | #undef CONFIG_CMD_IMLS |
| 47 | |
| 48 | /* |
| 49 | * Environmental settings |
| 50 | */ |
| 51 | |
| 52 | #define CONFIG_ENV_OFFSET (6 * 64 * 1024) |
| 53 | #define CONFIG_ENV_SECT_SIZE (1 * 64 * 1024) |
| 54 | #define CONFIG_ENV_SIZE (4 * 1024) |
| 55 | |
| 56 | /* |
| 57 | * ATAG setup |
| 58 | */ |
| 59 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
| 60 | #define CONFIG_REVISION_TAG |
| 61 | #define CONFIG_SETUP_MEMORY_TAGS |
| 62 | #define CONFIG_INITRD_TAG |
| 63 | |
Grant Likely | 2fa8ca9 | 2011-03-28 09:59:07 +0000 | [diff] [blame] | 64 | #define CONFIG_OF_LIBFDT 1 |
| 65 | |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 66 | /* |
| 67 | * Size of malloc() pool |
| 68 | */ |
| 69 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) |
| 70 | |
| 71 | #define CONFIG_BOARD_EARLY_INIT_F |
Helmut Raiger | 9660e44 | 2011-10-20 04:19:47 +0000 | [diff] [blame] | 72 | #define CONFIG_BOARD_LATE_INIT |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 73 | |
| 74 | /* |
| 75 | * Hardware drivers |
| 76 | */ |
| 77 | #define CONFIG_MXC_UART |
Stefano Babic | 40f6fff | 2011-11-22 15:22:39 +0100 | [diff] [blame] | 78 | #define CONFIG_MXC_UART_BASE UART1_BASE |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 79 | #define CONFIG_CONS_INDEX 1 |
| 80 | #define CONFIG_BAUDRATE 115200 |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 81 | |
| 82 | #define CONFIG_MXC_GPIO |
| 83 | |
| 84 | /* |
| 85 | * SPI Interface |
| 86 | */ |
| 87 | #ifdef CONFIG_CMD_SPI |
| 88 | |
| 89 | #define CONFIG_HARD_SPI |
| 90 | #define CONFIG_MXC_SPI |
| 91 | #define CONFIG_DEFAULT_SPI_BUS 1 |
| 92 | #define CONFIG_DEFAULT_SPI_MODE (SPI_MODE_0 | SPI_CS_HIGH) |
| 93 | |
| 94 | /* SPI FLASH */ |
| 95 | #ifdef CONFIG_CMD_SF |
| 96 | |
| 97 | #define CONFIG_SPI_FLASH |
| 98 | #define CONFIG_SPI_FLASH_SST |
Nikita Kiryanov | 155fa9a | 2014-08-20 15:08:50 +0300 | [diff] [blame] | 99 | #define CONFIG_SF_DEFAULT_CS 1 |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 100 | #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) |
| 101 | #define CONFIG_SF_DEFAULT_SPEED 25000000 |
| 102 | |
Nikita Kiryanov | 155fa9a | 2014-08-20 15:08:50 +0300 | [diff] [blame] | 103 | #define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 104 | #define CONFIG_ENV_SPI_BUS 0 |
| 105 | #define CONFIG_ENV_SPI_MAX_HZ 25000000 |
| 106 | #define CONFIG_ENV_SPI_MODE (SPI_MODE_0) |
| 107 | #define CONFIG_FSL_ENV_IN_SF |
| 108 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 109 | #define CONFIG_SYS_NO_FLASH |
| 110 | |
| 111 | #else |
| 112 | #define CONFIG_ENV_IS_NOWHERE |
| 113 | #endif |
| 114 | |
| 115 | /* SPI PMIC */ |
Łukasz Majewski | be3b51a | 2012-11-13 03:22:14 +0000 | [diff] [blame] | 116 | #define CONFIG_POWER |
| 117 | #define CONFIG_POWER_SPI |
| 118 | #define CONFIG_POWER_FSL |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 119 | #define CONFIG_FSL_PMIC_BUS 0 |
| 120 | #define CONFIG_FSL_PMIC_CS (0 | 120 << 8) |
| 121 | #define CONFIG_FSL_PMIC_CLK 25000000 |
| 122 | #define CONFIG_FSL_PMIC_MODE (SPI_MODE_0 | SPI_CS_HIGH) |
Stefano Babic | 9c38f7d | 2011-10-06 11:44:26 +0200 | [diff] [blame] | 123 | #define CONFIG_FSL_PMIC_BITLEN 32 |
Fabio Estevam | 4e8b754 | 2011-10-24 06:44:15 +0000 | [diff] [blame] | 124 | #define CONFIG_RTC_MC13XXX |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 125 | #endif |
| 126 | |
| 127 | /* |
| 128 | * MMC Configs |
| 129 | */ |
| 130 | #ifdef CONFIG_CMD_MMC |
| 131 | #define CONFIG_MMC |
| 132 | #define CONFIG_GENERIC_MMC |
| 133 | #define CONFIG_FSL_ESDHC |
| 134 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 135 | #define CONFIG_SYS_FSL_ESDHC_NUM 2 |
| 136 | #endif |
| 137 | |
| 138 | /* |
| 139 | * ATA/IDE |
| 140 | */ |
| 141 | #ifdef CONFIG_CMD_IDE |
| 142 | #define CONFIG_LBA48 |
| 143 | #undef CONFIG_IDE_LED |
| 144 | #undef CONFIG_IDE_RESET |
| 145 | |
| 146 | #define CONFIG_MX51_PATA |
| 147 | |
| 148 | #define __io |
| 149 | |
| 150 | #define CONFIG_SYS_IDE_MAXBUS 1 |
| 151 | #define CONFIG_SYS_IDE_MAXDEVICE 1 |
| 152 | |
| 153 | #define CONFIG_SYS_ATA_BASE_ADDR 0x83fe0000 |
| 154 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0 |
| 155 | |
| 156 | #define CONFIG_SYS_ATA_DATA_OFFSET 0xa0 |
| 157 | #define CONFIG_SYS_ATA_REG_OFFSET 0xa0 |
| 158 | #define CONFIG_SYS_ATA_ALT_OFFSET 0xd8 |
| 159 | |
| 160 | #define CONFIG_SYS_ATA_STRIDE 4 |
| 161 | |
| 162 | #define CONFIG_IDE_PREINIT |
| 163 | #define CONFIG_MXC_ATA_PIO_MODE 4 |
| 164 | #endif |
| 165 | |
| 166 | /* |
Marek Vasut | d98d8bc | 2011-06-24 21:46:07 +0200 | [diff] [blame] | 167 | * USB |
| 168 | */ |
| 169 | #define CONFIG_CMD_USB |
| 170 | #ifdef CONFIG_CMD_USB |
| 171 | #define CONFIG_USB_EHCI /* Enable EHCI USB support */ |
| 172 | #define CONFIG_USB_EHCI_MX5 |
| 173 | #define CONFIG_USB_ULPI |
| 174 | #define CONFIG_USB_ULPI_VIEWPORT |
| 175 | #define CONFIG_MXC_USB_PORT 1 |
| 176 | #if (CONFIG_MXC_USB_PORT == 0) |
| 177 | #define CONFIG_MXC_USB_PORTSC (1 << 28) |
| 178 | #define CONFIG_MXC_USB_FLAGS MXC_EHCI_INTERNAL_PHY |
| 179 | #else |
| 180 | #define CONFIG_MXC_USB_PORTSC (2 << 30) |
| 181 | #define CONFIG_MXC_USB_FLAGS 0 |
| 182 | #endif |
| 183 | #define CONFIG_EHCI_IS_TDI |
| 184 | #define CONFIG_USB_STORAGE |
| 185 | #define CONFIG_USB_HOST_ETHER |
| 186 | #define CONFIG_USB_KEYBOARD |
| 187 | #define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP |
| 188 | #define CONFIG_PREBOOT |
| 189 | /* USB NET */ |
| 190 | #ifdef CONFIG_CMD_NET |
| 191 | #define CONFIG_USB_ETHER_ASIX |
Marek Vasut | d98d8bc | 2011-06-24 21:46:07 +0200 | [diff] [blame] | 192 | #define CONFIG_CMD_PING |
| 193 | #define CONFIG_CMD_DHCP |
| 194 | #endif |
| 195 | #endif /* CONFIG_CMD_USB */ |
| 196 | |
| 197 | /* |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 198 | * Filesystems |
| 199 | */ |
| 200 | #ifdef CONFIG_CMD_FAT |
| 201 | #define CONFIG_DOS_PARTITION |
Marek Vasut | d98d8bc | 2011-06-24 21:46:07 +0200 | [diff] [blame] | 202 | #ifdef CONFIG_CMD_NET |
| 203 | #define CONFIG_CMD_NFS |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 204 | #endif |
Marek Vasut | d98d8bc | 2011-06-24 21:46:07 +0200 | [diff] [blame] | 205 | #endif |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 206 | |
| 207 | /* |
| 208 | * Miscellaneous configurable options |
| 209 | */ |
| 210 | #define CONFIG_ENV_OVERWRITE |
| 211 | #define CONFIG_BOOTDELAY 3 |
| 212 | #define CONFIG_LOADADDR 0x90800000 |
| 213 | |
| 214 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 215 | #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 216 | #define CONFIG_SYS_PROMPT "Efika> " |
| 217 | #define CONFIG_AUTO_COMPLETE |
| 218 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 219 | /* Print Buffer Size */ |
| 220 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 221 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 222 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
| 223 | |
| 224 | #define CONFIG_SYS_MEMTEST_START 0x90000000 |
Fabio Estevam | f361a5c | 2012-02-09 14:25:11 +0000 | [diff] [blame] | 225 | #define CONFIG_SYS_MEMTEST_END 0x90010000 |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 226 | |
| 227 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 228 | |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 229 | #define CONFIG_CMDLINE_EDITING |
| 230 | |
| 231 | /*----------------------------------------------------------------------- |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 232 | * Physical Memory Map |
| 233 | */ |
| 234 | #define CONFIG_NR_DRAM_BANKS 1 |
| 235 | #define PHYS_SDRAM_1 CSD0_BASE_ADDR |
| 236 | #define PHYS_SDRAM_1_SIZE (512 * 1024 * 1024) |
| 237 | |
| 238 | #define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1) |
| 239 | #define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR) |
| 240 | #define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE) |
| 241 | |
| 242 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 243 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 244 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 245 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 246 | |
| 247 | #define CONFIG_SYS_DDR_CLKSEL 0 |
Marek Vasut | b7171d9 | 2011-09-14 18:16:57 +0000 | [diff] [blame] | 248 | #define CONFIG_SYS_CLKTL_CBCDR 0x59E35145 |
Benoît Thébaudeau | 39e8576 | 2012-11-05 10:07:04 +0000 | [diff] [blame] | 249 | #define CONFIG_SYS_MAIN_PWR_ON |
Marek Vasut | d591401 | 2011-01-19 04:40:37 +0000 | [diff] [blame] | 250 | |
| 251 | #endif |