Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * Configuration settings for the Freescale i.MX6SL EVK board. |
| 5 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __CONFIG_H |
| 10 | #define __CONFIG_H |
| 11 | |
| 12 | #include <asm/arch/imx-regs.h> |
| 13 | #include <asm/sizes.h> |
| 14 | |
| 15 | #define CONFIG_MX6 |
| 16 | #define CONFIG_DISPLAY_CPUINFO |
| 17 | #define CONFIG_DISPLAY_BOARDINFO |
| 18 | |
| 19 | #define MACH_TYPE_MX6SLEVK 4307 |
| 20 | #define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK |
| 21 | |
| 22 | #define CONFIG_CMDLINE_TAG |
| 23 | #define CONFIG_SETUP_MEMORY_TAGS |
| 24 | #define CONFIG_INITRD_TAG |
| 25 | #define CONFIG_REVISION_TAG |
| 26 | |
| 27 | /* Size of malloc() pool */ |
| 28 | #define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M) |
| 29 | |
| 30 | #define CONFIG_BOARD_EARLY_INIT_F |
| 31 | #define CONFIG_MXC_GPIO |
| 32 | |
| 33 | #define CONFIG_MXC_UART |
| 34 | #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR |
| 35 | |
| 36 | /* MMC Configs */ |
| 37 | #define CONFIG_FSL_ESDHC |
| 38 | #define CONFIG_FSL_USDHC |
| 39 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 40 | |
| 41 | #define CONFIG_MMC |
| 42 | #define CONFIG_CMD_MMC |
| 43 | #define CONFIG_GENERIC_MMC |
| 44 | #define CONFIG_CMD_FAT |
| 45 | #define CONFIG_DOS_PARTITION |
| 46 | |
Fabio Estevam | 31f0796 | 2013-09-13 00:36:28 -0300 | [diff] [blame] | 47 | #define CONFIG_CMD_PING |
| 48 | #define CONFIG_CMD_DHCP |
| 49 | #define CONFIG_CMD_MII |
| 50 | #define CONFIG_CMD_NET |
| 51 | #define CONFIG_FEC_MXC |
| 52 | #define CONFIG_MII |
| 53 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 54 | #define CONFIG_FEC_XCV_TYPE RMII |
| 55 | #define CONFIG_ETHPRIME "FEC" |
| 56 | #define CONFIG_FEC_MXC_PHYADDR 0 |
| 57 | |
| 58 | #define CONFIG_PHYLIB |
| 59 | #define CONFIG_PHY_SMSC |
| 60 | |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 61 | /* allow to overwrite serial and ethaddr */ |
| 62 | #define CONFIG_ENV_OVERWRITE |
| 63 | #define CONFIG_CONS_INDEX 1 |
| 64 | #define CONFIG_BAUDRATE 115200 |
| 65 | |
| 66 | /* Command definition */ |
| 67 | #include <config_cmd_default.h> |
| 68 | |
| 69 | #undef CONFIG_CMD_IMLS |
| 70 | |
| 71 | #define CONFIG_BOOTDELAY 3 |
| 72 | |
Fabio Estevam | af0a37f | 2013-05-23 13:57:18 +0000 | [diff] [blame] | 73 | #define CONFIG_LOADADDR 0x82000000 |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 74 | #define CONFIG_SYS_TEXT_BASE 0x87800000 |
| 75 | |
| 76 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 77 | "script=boot.scr\0" \ |
| 78 | "uimage=uImage\0" \ |
| 79 | "console=ttymxc0\0" \ |
| 80 | "fdt_high=0xffffffff\0" \ |
| 81 | "initrd_high=0xffffffff\0" \ |
| 82 | "fdt_file=imx6sl-evk.dtb\0" \ |
| 83 | "fdt_addr=0x81000000\0" \ |
| 84 | "boot_fdt=try\0" \ |
| 85 | "ip_dyn=yes\0" \ |
| 86 | "mmcdev=0\0" \ |
Otavio Salvador | 94aeb8a | 2013-06-28 18:52:41 -0300 | [diff] [blame] | 87 | "mmcpart=1\0" \ |
| 88 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 89 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 90 | "root=${mmcroot}\0" \ |
| 91 | "loadbootscript=" \ |
| 92 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 93 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 94 | "source\0" \ |
| 95 | "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ |
| 96 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 97 | "mmcboot=echo Booting from mmc ...; " \ |
| 98 | "run mmcargs; " \ |
| 99 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 100 | "if run loadfdt; then " \ |
| 101 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 102 | "else " \ |
| 103 | "if test ${boot_fdt} = try; then " \ |
| 104 | "bootm; " \ |
| 105 | "else " \ |
| 106 | "echo WARN: Cannot load the DT; " \ |
| 107 | "fi; " \ |
| 108 | "fi; " \ |
| 109 | "else " \ |
| 110 | "bootm; " \ |
| 111 | "fi;\0" \ |
| 112 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 113 | "root=/dev/nfs " \ |
| 114 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 115 | "netboot=echo Booting from net ...; " \ |
| 116 | "run netargs; " \ |
| 117 | "if test ${ip_dyn} = yes; then " \ |
| 118 | "setenv get_cmd dhcp; " \ |
| 119 | "else " \ |
| 120 | "setenv get_cmd tftp; " \ |
| 121 | "fi; " \ |
| 122 | "${get_cmd} ${uimage}; " \ |
| 123 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 124 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 125 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 126 | "else " \ |
| 127 | "if test ${boot_fdt} = try; then " \ |
| 128 | "bootm; " \ |
| 129 | "else " \ |
| 130 | "echo WARN: Cannot load the DT; " \ |
| 131 | "fi; " \ |
| 132 | "fi; " \ |
| 133 | "else " \ |
| 134 | "bootm; " \ |
| 135 | "fi;\0" |
| 136 | |
| 137 | #define CONFIG_BOOTCOMMAND \ |
| 138 | "mmc dev ${mmcdev};" \ |
| 139 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 140 | "if run loadbootscript; then " \ |
| 141 | "run bootscript; " \ |
| 142 | "else " \ |
| 143 | "if run loaduimage; then " \ |
| 144 | "run mmcboot; " \ |
| 145 | "else run netboot; " \ |
| 146 | "fi; " \ |
| 147 | "fi; " \ |
| 148 | "else run netboot; fi" |
| 149 | |
| 150 | /* Miscellaneous configurable options */ |
| 151 | #define CONFIG_SYS_LONGHELP |
| 152 | #define CONFIG_SYS_HUSH_PARSER |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 153 | #define CONFIG_AUTO_COMPLETE |
| 154 | #define CONFIG_SYS_CBSIZE 256 |
| 155 | |
| 156 | /* Print Buffer Size */ |
| 157 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 158 | #define CONFIG_SYS_MAXARGS 16 |
| 159 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 160 | |
| 161 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
| 162 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M) |
| 163 | |
| 164 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 165 | |
| 166 | #define CONFIG_CMDLINE_EDITING |
| 167 | #define CONFIG_STACKSIZE SZ_128K |
| 168 | |
| 169 | /* Physical Memory Map */ |
| 170 | #define CONFIG_NR_DRAM_BANKS 1 |
| 171 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 172 | #define PHYS_SDRAM_SIZE SZ_1G |
| 173 | |
| 174 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 175 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 176 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 177 | |
| 178 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 179 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 180 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 181 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 182 | |
| 183 | /* FLASH and environment organization */ |
| 184 | #define CONFIG_SYS_NO_FLASH |
| 185 | |
| 186 | #define CONFIG_ENV_OFFSET (6 * SZ_64K) |
| 187 | #define CONFIG_ENV_SIZE SZ_8K |
| 188 | #define CONFIG_ENV_IS_IN_MMC |
| 189 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
| 190 | |
| 191 | #define CONFIG_OF_LIBFDT |
| 192 | #define CONFIG_CMD_BOOTZ |
| 193 | |
| 194 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 195 | #define CONFIG_CMD_CACHE |
| 196 | #endif |
| 197 | |
| 198 | #endif /* __CONFIG_H */ |