Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * Configuration settings for the Wandboard. |
| 5 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __CONFIG_H |
| 10 | #define __CONFIG_H |
| 11 | |
| 12 | #include <asm/arch/imx-regs.h> |
| 13 | #include <asm/imx-common/gpio.h> |
| 14 | #include <asm/sizes.h> |
| 15 | |
| 16 | #define CONFIG_MX6 |
| 17 | #define CONFIG_DISPLAY_CPUINFO |
| 18 | #define CONFIG_DISPLAY_BOARDINFO |
| 19 | |
| 20 | #define MACH_TYPE_WANDBOARD 4412 |
| 21 | #define CONFIG_MACH_TYPE MACH_TYPE_WANDBOARD |
| 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 */ |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 29 | #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 30 | |
| 31 | #define CONFIG_BOARD_EARLY_INIT_F |
Otavio Salvador | eaffaa2 | 2013-04-19 03:42:03 +0000 | [diff] [blame] | 32 | #define CONFIG_BOARD_LATE_INIT |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 33 | #define CONFIG_MXC_GPIO |
| 34 | |
| 35 | #define CONFIG_MXC_UART |
| 36 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 37 | |
| 38 | /* allow to overwrite serial and ethaddr */ |
| 39 | #define CONFIG_ENV_OVERWRITE |
| 40 | #define CONFIG_CONS_INDEX 1 |
| 41 | #define CONFIG_BAUDRATE 115200 |
| 42 | |
| 43 | /* Command definition */ |
| 44 | #include <config_cmd_default.h> |
| 45 | |
| 46 | #undef CONFIG_CMD_IMLS |
| 47 | |
Otavio Salvador | eaffaa2 | 2013-04-19 03:42:03 +0000 | [diff] [blame] | 48 | #define CONFIG_CMD_BMODE |
Otavio Salvador | 0798d57 | 2013-04-19 03:42:00 +0000 | [diff] [blame] | 49 | #define CONFIG_CMD_SETEXPR |
| 50 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 51 | #define CONFIG_BOOTDELAY 5 |
| 52 | |
| 53 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
| 54 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) |
| 55 | #define CONFIG_LOADADDR 0x12000000 |
| 56 | #define CONFIG_SYS_TEXT_BASE 0x17800000 |
| 57 | |
| 58 | /* MMC Configuration */ |
| 59 | #define CONFIG_FSL_ESDHC |
| 60 | #define CONFIG_FSL_USDHC |
Otavio Salvador | 5ed1573 | 2013-04-19 03:42:02 +0000 | [diff] [blame] | 61 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 62 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 63 | |
| 64 | #define CONFIG_MMC |
| 65 | #define CONFIG_CMD_MMC |
| 66 | #define CONFIG_GENERIC_MMC |
| 67 | #define CONFIG_BOUNCE_BUFFER |
| 68 | #define CONFIG_CMD_EXT2 |
| 69 | #define CONFIG_CMD_FAT |
| 70 | #define CONFIG_DOS_PARTITION |
| 71 | |
| 72 | /* Ethernet Configuration */ |
| 73 | #define CONFIG_CMD_PING |
| 74 | #define CONFIG_CMD_DHCP |
| 75 | #define CONFIG_CMD_MII |
| 76 | #define CONFIG_CMD_NET |
| 77 | #define CONFIG_FEC_MXC |
| 78 | #define CONFIG_MII |
| 79 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 80 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 81 | #define CONFIG_ETHPRIME "FEC" |
| 82 | #define CONFIG_FEC_MXC_PHYADDR 1 |
| 83 | #define CONFIG_PHYLIB |
| 84 | #define CONFIG_PHY_ATHEROS |
| 85 | |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 86 | /* Framebuffer */ |
| 87 | #define CONFIG_VIDEO |
| 88 | #define CONFIG_VIDEO_IPUV3 |
| 89 | #define CONFIG_CFB_CONSOLE |
| 90 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
| 91 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 92 | #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE |
| 93 | #define CONFIG_VIDEO_BMP_RLE8 |
| 94 | #define CONFIG_SPLASH_SCREEN |
Otavio Salvador | a7efb02 | 2013-05-27 12:18:44 +0000 | [diff] [blame] | 95 | #define CONFIG_SPLASH_SCREEN_ALIGN |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 96 | #define CONFIG_BMP_16BPP |
| 97 | #define CONFIG_VIDEO_LOGO |
Otavio Salvador | a7efb02 | 2013-05-27 12:18:44 +0000 | [diff] [blame] | 98 | #define CONFIG_VIDEO_BMP_LOGO |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 99 | #define CONFIG_IPUV3_CLK 260000000 |
Pardeep Kumar Singla | 5ea7f0e | 2013-07-25 12:12:13 -0500 | [diff] [blame] | 100 | #define CONFIG_IMX_HDMI |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 101 | |
Fabio Estevam | f62cd00 | 2013-09-09 18:28:07 -0300 | [diff] [blame] | 102 | #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S) |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 103 | #define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb" |
Tapani Utriainen | 491f294 | 2013-06-26 17:51:49 +0800 | [diff] [blame] | 104 | #elif defined(CONFIG_MX6Q) |
| 105 | #define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb" |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 106 | #endif |
| 107 | |
| 108 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 109 | "script=boot.scr\0" \ |
| 110 | "uimage=uImage\0" \ |
| 111 | "console=ttymxc0\0" \ |
Otavio Salvador | d727ab3 | 2013-07-20 17:21:19 -0300 | [diff] [blame] | 112 | "splashpos=m,m\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 113 | "fdt_high=0xffffffff\0" \ |
| 114 | "initrd_high=0xffffffff\0" \ |
| 115 | "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
| 116 | "fdt_addr=0x11000000\0" \ |
| 117 | "boot_fdt=try\0" \ |
| 118 | "ip_dyn=yes\0" \ |
Otavio Salvador | 1e1cbde | 2013-04-19 03:41:59 +0000 | [diff] [blame] | 119 | "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ |
Otavio Salvador | 86812c4 | 2013-06-28 18:52:42 -0300 | [diff] [blame] | 120 | "mmcpart=1\0" \ |
| 121 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Otavio Salvador | 0798d57 | 2013-04-19 03:42:00 +0000 | [diff] [blame] | 122 | "update_sd_firmware_filename=u-boot.imx\0" \ |
| 123 | "update_sd_firmware=" \ |
| 124 | "if test ${ip_dyn} = yes; then " \ |
| 125 | "setenv get_cmd dhcp; " \ |
| 126 | "else " \ |
| 127 | "setenv get_cmd tftp; " \ |
| 128 | "fi; " \ |
| 129 | "if mmc dev ${mmcdev}; then " \ |
| 130 | "if ${get_cmd} ${update_sd_firmware_filename}; then " \ |
| 131 | "setexpr fw_sz ${filesize} / 0x200; " \ |
| 132 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 133 | "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ |
| 134 | "fi; " \ |
| 135 | "fi\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 136 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 137 | "root=${mmcroot}\0" \ |
| 138 | "loadbootscript=" \ |
| 139 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 140 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 141 | "source\0" \ |
| 142 | "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ |
| 143 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 144 | "mmcboot=echo Booting from mmc ...; " \ |
| 145 | "run mmcargs; " \ |
| 146 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 147 | "if run loadfdt; then " \ |
| 148 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 149 | "else " \ |
| 150 | "if test ${boot_fdt} = try; then " \ |
| 151 | "bootm; " \ |
| 152 | "else " \ |
| 153 | "echo WARN: Cannot load the DT; " \ |
| 154 | "fi; " \ |
| 155 | "fi; " \ |
| 156 | "else " \ |
| 157 | "bootm; " \ |
| 158 | "fi;\0" \ |
| 159 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 160 | "root=/dev/nfs " \ |
| 161 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 162 | "netboot=echo Booting from net ...; " \ |
| 163 | "run netargs; " \ |
| 164 | "if test ${ip_dyn} = yes; then " \ |
| 165 | "setenv get_cmd dhcp; " \ |
| 166 | "else " \ |
| 167 | "setenv get_cmd tftp; " \ |
| 168 | "fi; " \ |
| 169 | "${get_cmd} ${uimage}; " \ |
| 170 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 171 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 172 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 173 | "else " \ |
| 174 | "if test ${boot_fdt} = try; then " \ |
| 175 | "bootm; " \ |
| 176 | "else " \ |
| 177 | "echo WARN: Cannot load the DT; " \ |
| 178 | "fi; " \ |
| 179 | "fi; " \ |
| 180 | "else " \ |
| 181 | "bootm; " \ |
| 182 | "fi;\0" |
| 183 | |
| 184 | #define CONFIG_BOOTCOMMAND \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 185 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 186 | "if run loadbootscript; then " \ |
| 187 | "run bootscript; " \ |
| 188 | "else " \ |
| 189 | "if run loaduimage; then " \ |
| 190 | "run mmcboot; " \ |
| 191 | "else run netboot; " \ |
| 192 | "fi; " \ |
| 193 | "fi; " \ |
| 194 | "else run netboot; fi" |
| 195 | |
| 196 | /* Miscellaneous configurable options */ |
| 197 | #define CONFIG_SYS_LONGHELP |
| 198 | #define CONFIG_SYS_HUSH_PARSER |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 199 | #define CONFIG_AUTO_COMPLETE |
| 200 | #define CONFIG_SYS_CBSIZE 256 |
| 201 | |
| 202 | /* Print Buffer Size */ |
| 203 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 204 | #define CONFIG_SYS_MAXARGS 16 |
| 205 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 206 | |
| 207 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 208 | |
| 209 | #define CONFIG_CMDLINE_EDITING |
| 210 | |
| 211 | /* Physical Memory Map */ |
| 212 | #define CONFIG_NR_DRAM_BANKS 1 |
| 213 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 214 | |
| 215 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 216 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 217 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 218 | |
| 219 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 220 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 221 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 222 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 223 | |
| 224 | /* FLASH and environment organization */ |
| 225 | #define CONFIG_SYS_NO_FLASH |
| 226 | |
| 227 | #define CONFIG_ENV_SIZE (8 * 1024) |
| 228 | |
| 229 | #define CONFIG_ENV_IS_IN_MMC |
| 230 | #define CONFIG_ENV_OFFSET (6 * 64 * 1024) |
| 231 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 232 | |
| 233 | #define CONFIG_OF_LIBFDT |
| 234 | #define CONFIG_CMD_BOOTZ |
| 235 | |
| 236 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 237 | #define CONFIG_CMD_CACHE |
| 238 | #endif |
| 239 | |
| 240 | #endif /* __CONFIG_H * */ |