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