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