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