Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2012, Stefano Babic <sbabic@denx.de> |
| 3 | * |
| 4 | * Copyright (C) 2010 Freescale Semiconductor, Inc. |
| 5 | * |
| 6 | * Configuration settings for the MX53-EVK Freescale board. |
| 7 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 8 | * SPDX-License-Identifier: GPL-2.0+ |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __CONFIG_H |
| 12 | #define __CONFIG_H |
| 13 | |
| 14 | /* SOC type must be included before imx-regs.h */ |
| 15 | #define CONFIG_MX53 |
| 16 | #include <asm/arch/imx-regs.h> |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 17 | |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 18 | #define CONFIG_DISPLAY_CPUINFO |
| 19 | #define CONFIG_DISPLAY_BOARDINFO |
| 20 | |
| 21 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
| 22 | #define CONFIG_SETUP_MEMORY_TAGS |
| 23 | #define CONFIG_INITRD_TAG |
| 24 | |
| 25 | #define CONFIG_OF_LIBFDT |
| 26 | |
| 27 | /* Size of malloc() pool */ |
| 28 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) |
| 29 | |
| 30 | #define CONFIG_BOARD_EARLY_INIT_F |
| 31 | |
| 32 | /* Enable GPIOs */ |
| 33 | #define CONFIG_MXC_GPIO |
| 34 | |
| 35 | /* UART */ |
| 36 | #define CONFIG_MXC_UART |
| 37 | #define CONFIG_MXC_UART_BASE UART4_BASE_ADDR |
| 38 | |
| 39 | /* MMC */ |
| 40 | #define CONFIG_FSL_ESDHC |
| 41 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 42 | #define CONFIG_SYS_FSL_ESDHC_NUM 1 |
| 43 | |
| 44 | #define CONFIG_MMC |
| 45 | #define CONFIG_GENERIC_MMC |
| 46 | #define CONFIG_DOS_PARTITION |
| 47 | |
| 48 | /* Ethernet on FEC */ |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 49 | #define CONFIG_MII |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 50 | |
| 51 | #define CONFIG_FEC_MXC |
| 52 | #define IMX_FEC_BASE FEC_BASE_ADDR |
| 53 | #define CONFIG_FEC_MXC_PHYADDR 0x01 |
| 54 | #define CONFIG_PHY_ADDR CONFIG_FEC_MXC_PHYADDR |
| 55 | #define CONFIG_RESET_PHY_R |
| 56 | #define CONFIG_FEC_MXC_NO_ANEG |
Ashok Kumar Reddy | f0afa1a | 2012-09-05 22:09:37 +0530 | [diff] [blame] | 57 | #define CONFIG_ETHPRIME "FEC0" |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 58 | |
| 59 | /* SPI */ |
| 60 | #define CONFIG_HARD_SPI |
| 61 | #define CONFIG_MXC_SPI |
| 62 | #define CONFIG_DEFAULT_SPI_BUS 1 |
| 63 | #define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0 |
| 64 | |
| 65 | /* SPI FLASH - not used for environment */ |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 66 | #define CONFIG_SPI_FLASH_STMICRO |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 67 | #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 |
| 68 | #define CONFIG_SF_DEFAULT_SPEED 25000000 |
| 69 | |
| 70 | /* allow to overwrite serial and ethaddr */ |
| 71 | #define CONFIG_ENV_OVERWRITE |
| 72 | #define CONFIG_CONS_INDEX 1 |
| 73 | #define CONFIG_BAUDRATE 115200 |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 74 | |
| 75 | /* Command definition */ |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 76 | #define CONFIG_CMD_PING |
| 77 | #define CONFIG_CMD_DHCP |
| 78 | #define CONFIG_CMD_MII |
| 79 | #define CONFIG_CMD_MMC |
| 80 | #define CONFIG_CMD_FAT |
| 81 | #define CONFIG_CMD_EXT2 |
| 82 | #define CONFIG_CMD_MTDPARTS |
| 83 | #define CONFIG_CMD_SPI |
| 84 | #define CONFIG_CMD_SF |
| 85 | #define CONFIG_CMD_GPIO |
| 86 | |
| 87 | #define CONFIG_BOOTDELAY 3 |
| 88 | |
| 89 | #define CONFIG_LOADADDR 0x70800000 /* loadaddr env var */ |
| 90 | #define CONFIG_SYS_TEXT_BASE 0xf0001400 /* uboot in nor flash */ |
| 91 | |
| 92 | #define CONFIG_ARP_TIMEOUT 200UL |
| 93 | |
| 94 | /* Miscellaneous configurable options */ |
| 95 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 96 | #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 97 | #define CONFIG_AUTO_COMPLETE |
| 98 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 99 | |
| 100 | /* Print Buffer Size */ |
| 101 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 102 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 103 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
| 104 | |
| 105 | #define CONFIG_SYS_MEMTEST_START 0x70000000 |
| 106 | #define CONFIG_SYS_MEMTEST_END 0x10000 |
| 107 | |
| 108 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 109 | |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 110 | #define CONFIG_CMDLINE_EDITING |
| 111 | |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 112 | /* Physical Memory Map */ |
| 113 | #define CONFIG_NR_DRAM_BANKS 1 |
| 114 | #define PHYS_SDRAM_1 CSD0_BASE_ADDR |
| 115 | #define PHYS_SDRAM_1_SIZE (1024 * 1024 * 1024) |
| 116 | |
| 117 | #define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1) |
| 118 | #define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR) |
| 119 | #define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE) |
| 120 | |
| 121 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 122 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 123 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 124 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 125 | |
| 126 | #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ |
| 127 | #define MTDIDS_DEFAULT "nor0=f0000000.flash" |
| 128 | |
| 129 | /* FLASH and environment organization */ |
| 130 | |
| 131 | #define CONFIG_SYS_FLASH_BASE 0xF0000000 |
| 132 | #define CONFIG_SYS_FLASH_CFI /* Flash is CFI conformant */ |
| 133 | #define CONFIG_FLASH_CFI_DRIVER /* Use the common driver */ |
| 134 | #define CONFIG_FLASH_CFI_MTD /* with MTD support */ |
| 135 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } |
| 136 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 |
| 137 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 |
| 138 | |
| 139 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
| 140 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE |
| 141 | |
| 142 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
| 143 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) |
| 144 | |
| 145 | #define CONFIG_ENV_SIZE (8 * 1024) |
| 146 | #define CONFIG_ENV_IS_IN_FLASH |
| 147 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \ |
| 148 | CONFIG_SYS_MONITOR_LEN) |
| 149 | #define CONFIG_ENV_SECT_SIZE 0x20000 |
| 150 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \ |
| 151 | CONFIG_ENV_SECT_SIZE) |
| 152 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE |
| 153 | |
| 154 | /* |
| 155 | * Default environment and default scripts |
| 156 | * to update uboot and load kernel |
| 157 | */ |
| 158 | |
| 159 | #define HOSTNAME ima3-mx53 |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 160 | |
| 161 | #define CONFIG_HOSTNAME ima3-mx53 |
| 162 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 163 | "netdev=eth0\0" \ |
| 164 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
| 165 | "nfsroot=${serverip}:${rootpath}\0" \ |
| 166 | "ramargs=setenv bootargs root=/dev/ram0 rw\0" \ |
| 167 | "addip_sta=setenv bootargs ${bootargs} " \ |
| 168 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
| 169 | ":${hostname}:${netdev}:off panic=1\0" \ |
| 170 | "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0" \ |
| 171 | "addip=if test -n ${ipdyn};then run addip_dyn;" \ |
| 172 | "else run addip_sta;fi\0" \ |
| 173 | "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ |
| 174 | "addtty=setenv bootargs ${bootargs}" \ |
| 175 | " console=${console},${baudrate}\0" \ |
| 176 | "addmisc=setenv bootargs ${bootargs} ${misc}\0" \ |
| 177 | "console=ttymxc3\0" \ |
| 178 | "loadaddr=70800000\0" \ |
| 179 | "kernel_addr_r=70800000\0" \ |
| 180 | "ramdisk_addr_r=71000000\0" \ |
Marek Vasut | fd5ba89 | 2012-09-23 17:41:23 +0200 | [diff] [blame] | 181 | "hostname=" __stringify(CONFIG_HOSTNAME) "\0" \ |
| 182 | "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \ |
| 183 | "ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/uRamdisk\0" \ |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 184 | "mmcargs=setenv bootargs root=${mmcroot} " \ |
| 185 | "rootfstype=${mmcrootfstype}\0" \ |
| 186 | "mmcroot=/dev/mmcblk0p3 rw\0" \ |
| 187 | "mmcboot=echo Booting from mmc ...; " \ |
| 188 | "run mmcargs addip addtty addmtd addmisc mmcload;" \ |
| 189 | "bootm\0" \ |
| 190 | "mmcload=fatload mmc ${mmcdev}:${mmcpart} " \ |
| 191 | "${loadaddr} ${uimage}\0" \ |
| 192 | "mmcrootfstype=ext3 rootwait\0" \ |
| 193 | "flash_self=run ramargs addip addtty addmtd addmisc;" \ |
| 194 | "bootm ${kernel_addr} ${ramdisk_addr}\0" \ |
| 195 | "flash_nfs=run nfsargs addip addtty addmtd addmisc;" \ |
| 196 | "bootm ${kernel_addr}\0" \ |
| 197 | "net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \ |
| 198 | "run nfsargs addip addtty addmtd addmisc;" \ |
| 199 | "bootm ${kernel_addr_r}\0" \ |
| 200 | "net_self_load=tftp ${ramdisk_addr_r} ${ramdisk_file};" \ |
| 201 | "tftp ${kernel_addr_r} ${bootfile}\0" \ |
| 202 | "net_self=if run net_self_load;then " \ |
| 203 | "run ramargs addip addtty addmtd addmisc;" \ |
| 204 | "bootm ${kernel_addr_r} ${ramdisk_addr_r};" \ |
| 205 | "else echo Images not loades;fi\0" \ |
| 206 | "satargs=setenv bootargs root=/dev/sda1\0" \ |
| 207 | "satafile=boot/uImage\0" \ |
| 208 | "ssdboot=echo Booting from ssd ...; " \ |
| 209 | "run satargs addip addtty addmtd addmisc;" \ |
| 210 | "sata init;ext2load sata 0:1 ${kernel_addr_r} " \ |
| 211 | "${satafile};bootm\0" \ |
Marek Vasut | fd5ba89 | 2012-09-23 17:41:23 +0200 | [diff] [blame] | 212 | "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.imx\0" \ |
Stefano Babic | 53b603c | 2012-02-22 00:24:40 +0000 | [diff] [blame] | 213 | "uimage=uImage\0" \ |
| 214 | "load=tftp ${loadaddr} ${u-boot}\0" \ |
| 215 | "uboot_addr=0xf0001000\0" \ |
| 216 | "update=protect off 0xf0000000 +60000;" \ |
| 217 | "erase ${uboot_addr} +60000;" \ |
| 218 | "cp.b ${loadaddr} ${uboot_addr} ${filesize}\0" \ |
| 219 | "upd=if run load;then echo Updating u-boot;if run update;" \ |
| 220 | "then echo U-Boot updated;" \ |
| 221 | "else echo Error updating u-boot !;" \ |
| 222 | "echo Board without bootloader !!;" \ |
| 223 | "fi;" \ |
| 224 | "else echo U-Boot not downloaded..exiting;fi\0" \ |
| 225 | "bootcmd=run net_nfs\0" |
| 226 | |
| 227 | |
| 228 | #define CONFIG_CMD_SATA |
| 229 | #ifdef CONFIG_CMD_SATA |
| 230 | #define CONFIG_DWC_AHSATA |
| 231 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 |
| 232 | #define CONFIG_DWC_AHSATA_PORT_ID 0 |
| 233 | #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_BASE_ADDR |
| 234 | #define CONFIG_LBA48 |
| 235 | #define CONFIG_LIBATA |
| 236 | #endif |
| 237 | |
| 238 | #endif /* __CONFIG_H */ |