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 | |
Eric Nelson | 02824dc | 2013-11-26 17:40:30 -0700 | [diff] [blame] | 12 | #include "mx6_common.h" |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 13 | #include <asm/arch/imx-regs.h> |
| 14 | #include <asm/imx-common/gpio.h> |
Alexey Brodkin | 1ace402 | 2014-02-26 17:47:58 +0400 | [diff] [blame] | 15 | #include <linux/sizes.h> |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 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 | |
Fabio Estevam | 7f5d0af | 2014-04-22 15:34:53 -0300 | [diff] [blame] | 29 | #define CONFIG_SYS_GENERIC_BOARD |
| 30 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 31 | /* Size of malloc() pool */ |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 32 | #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 33 | |
| 34 | #define CONFIG_BOARD_EARLY_INIT_F |
Otavio Salvador | eaffaa2 | 2013-04-19 03:42:03 +0000 | [diff] [blame] | 35 | #define CONFIG_BOARD_LATE_INIT |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 36 | #define CONFIG_MXC_GPIO |
| 37 | |
| 38 | #define CONFIG_MXC_UART |
| 39 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 40 | |
| 41 | /* allow to overwrite serial and ethaddr */ |
| 42 | #define CONFIG_ENV_OVERWRITE |
| 43 | #define CONFIG_CONS_INDEX 1 |
| 44 | #define CONFIG_BAUDRATE 115200 |
| 45 | |
| 46 | /* Command definition */ |
| 47 | #include <config_cmd_default.h> |
| 48 | |
| 49 | #undef CONFIG_CMD_IMLS |
| 50 | |
Otavio Salvador | eaffaa2 | 2013-04-19 03:42:03 +0000 | [diff] [blame] | 51 | #define CONFIG_CMD_BMODE |
Otavio Salvador | 0798d57 | 2013-04-19 03:42:00 +0000 | [diff] [blame] | 52 | #define CONFIG_CMD_SETEXPR |
| 53 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 54 | #define CONFIG_BOOTDELAY 5 |
| 55 | |
| 56 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
| 57 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) |
| 58 | #define CONFIG_LOADADDR 0x12000000 |
| 59 | #define CONFIG_SYS_TEXT_BASE 0x17800000 |
| 60 | |
Otavio Salvador | 8bc7c48 | 2014-05-01 19:02:31 -0300 | [diff] [blame] | 61 | /* I2C Configs */ |
| 62 | #define CONFIG_CMD_I2C |
| 63 | #define CONFIG_SYS_I2C |
| 64 | #define CONFIG_SYS_I2C_MXC |
| 65 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 66 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 67 | /* MMC Configuration */ |
| 68 | #define CONFIG_FSL_ESDHC |
| 69 | #define CONFIG_FSL_USDHC |
Otavio Salvador | 5ed1573 | 2013-04-19 03:42:02 +0000 | [diff] [blame] | 70 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 71 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 72 | |
| 73 | #define CONFIG_MMC |
| 74 | #define CONFIG_CMD_MMC |
| 75 | #define CONFIG_GENERIC_MMC |
| 76 | #define CONFIG_BOUNCE_BUFFER |
| 77 | #define CONFIG_CMD_EXT2 |
| 78 | #define CONFIG_CMD_FAT |
| 79 | #define CONFIG_DOS_PARTITION |
| 80 | |
Jeroen Hofstee | 9df4757 | 2014-10-23 23:02:01 +0200 | [diff] [blame] | 81 | /* USB Configs */ |
| 82 | #define CONFIG_CMD_USB |
| 83 | #define CONFIG_USB_EHCI |
| 84 | #define CONFIG_USB_EHCI_MX6 |
| 85 | #define CONFIG_USB_STORAGE |
| 86 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 87 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 88 | #define CONFIG_MXC_USB_FLAGS 0 |
| 89 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 90 | /* Ethernet Configuration */ |
| 91 | #define CONFIG_CMD_PING |
| 92 | #define CONFIG_CMD_DHCP |
| 93 | #define CONFIG_CMD_MII |
| 94 | #define CONFIG_CMD_NET |
| 95 | #define CONFIG_FEC_MXC |
| 96 | #define CONFIG_MII |
| 97 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 98 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 99 | #define CONFIG_ETHPRIME "FEC" |
| 100 | #define CONFIG_FEC_MXC_PHYADDR 1 |
| 101 | #define CONFIG_PHYLIB |
| 102 | #define CONFIG_PHY_ATHEROS |
| 103 | |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 104 | /* Framebuffer */ |
| 105 | #define CONFIG_VIDEO |
| 106 | #define CONFIG_VIDEO_IPUV3 |
| 107 | #define CONFIG_CFB_CONSOLE |
| 108 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
| 109 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 110 | #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE |
| 111 | #define CONFIG_VIDEO_BMP_RLE8 |
| 112 | #define CONFIG_SPLASH_SCREEN |
Otavio Salvador | a7efb02 | 2013-05-27 12:18:44 +0000 | [diff] [blame] | 113 | #define CONFIG_SPLASH_SCREEN_ALIGN |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 114 | #define CONFIG_BMP_16BPP |
| 115 | #define CONFIG_VIDEO_LOGO |
Otavio Salvador | a7efb02 | 2013-05-27 12:18:44 +0000 | [diff] [blame] | 116 | #define CONFIG_VIDEO_BMP_LOGO |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 117 | #define CONFIG_IPUV3_CLK 260000000 |
Otavio Salvador | 0ef797a | 2014-05-01 19:02:32 -0300 | [diff] [blame] | 118 | #define CONFIG_CMD_HDMIDETECT |
Pardeep Kumar Singla | 5ea7f0e | 2013-07-25 12:12:13 -0500 | [diff] [blame] | 119 | #define CONFIG_IMX_HDMI |
Otavio Salvador | 8bc7c48 | 2014-05-01 19:02:31 -0300 | [diff] [blame] | 120 | #define CONFIG_IMX_VIDEO_SKIP |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 121 | |
Fabio Estevam | 9f87640c | 2014-09-24 15:21:58 -0300 | [diff] [blame] | 122 | #define CONFIG_CMD_FUSE |
| 123 | #ifdef CONFIG_CMD_FUSE |
| 124 | #define CONFIG_MXC_OCOTP |
| 125 | #endif |
| 126 | |
Fabio Estevam | f62cd00 | 2013-09-09 18:28:07 -0300 | [diff] [blame] | 127 | #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S) |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 128 | #define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb" |
Tapani Utriainen | 491f294 | 2013-06-26 17:51:49 +0800 | [diff] [blame] | 129 | #elif defined(CONFIG_MX6Q) |
| 130 | #define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb" |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 131 | #endif |
| 132 | |
| 133 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 134 | "script=boot.scr\0" \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 135 | "image=zImage\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 136 | "console=ttymxc0\0" \ |
Otavio Salvador | d727ab3 | 2013-07-20 17:21:19 -0300 | [diff] [blame] | 137 | "splashpos=m,m\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 138 | "fdt_high=0xffffffff\0" \ |
| 139 | "initrd_high=0xffffffff\0" \ |
| 140 | "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
Otavio Salvador | 6584a1b | 2013-12-16 20:44:04 -0200 | [diff] [blame] | 141 | "fdt_addr=0x18000000\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 142 | "boot_fdt=try\0" \ |
| 143 | "ip_dyn=yes\0" \ |
Otavio Salvador | 1e1cbde | 2013-04-19 03:41:59 +0000 | [diff] [blame] | 144 | "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ |
Otavio Salvador | 86812c4 | 2013-06-28 18:52:42 -0300 | [diff] [blame] | 145 | "mmcpart=1\0" \ |
| 146 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Otavio Salvador | 0798d57 | 2013-04-19 03:42:00 +0000 | [diff] [blame] | 147 | "update_sd_firmware_filename=u-boot.imx\0" \ |
| 148 | "update_sd_firmware=" \ |
| 149 | "if test ${ip_dyn} = yes; then " \ |
| 150 | "setenv get_cmd dhcp; " \ |
| 151 | "else " \ |
| 152 | "setenv get_cmd tftp; " \ |
| 153 | "fi; " \ |
| 154 | "if mmc dev ${mmcdev}; then " \ |
| 155 | "if ${get_cmd} ${update_sd_firmware_filename}; then " \ |
| 156 | "setexpr fw_sz ${filesize} / 0x200; " \ |
| 157 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 158 | "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ |
| 159 | "fi; " \ |
| 160 | "fi\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 161 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
Otavio Salvador | 0ef797a | 2014-05-01 19:02:32 -0300 | [diff] [blame] | 162 | "root=${mmcroot}; run videoargs\0" \ |
| 163 | "videoargs=" \ |
| 164 | "setenv nextcon 0; " \ |
| 165 | "if hdmidet; then " \ |
| 166 | "setenv bootargs ${bootargs} " \ |
| 167 | "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \ |
| 168 | "if=RGB24; " \ |
| 169 | "setenv fbmen fbmem=28M; " \ |
| 170 | "setexpr nextcon ${nextcon} + 1; " \ |
| 171 | "else " \ |
| 172 | "echo - no HDMI monitor;" \ |
| 173 | "fi; " \ |
| 174 | "i2c dev 1; " \ |
| 175 | "if i2c probe 0x10; then " \ |
| 176 | "setenv bootargs ${bootargs} " \ |
| 177 | "video=mxcfb${nextcon}:dev=lcd,800x480@60," \ |
| 178 | "if=RGB666; " \ |
| 179 | "if test 0 -eq ${nextcon}; then " \ |
| 180 | "setenv fbmem fbmem=10M; " \ |
| 181 | "else " \ |
| 182 | "setenv fbmem ${fbmem},10M; " \ |
| 183 | "fi; " \ |
| 184 | "setexpr nextcon ${nextcon} + 1; " \ |
| 185 | "else " \ |
| 186 | "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \ |
| 187 | "fi; " \ |
| 188 | "setenv bootargs ${bootargs} ${fbmem}\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 189 | "loadbootscript=" \ |
| 190 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 191 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 192 | "source\0" \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 193 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 194 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 195 | "mmcboot=echo Booting from mmc ...; " \ |
| 196 | "run mmcargs; " \ |
| 197 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 198 | "if run loadfdt; then " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 199 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 200 | "else " \ |
| 201 | "if test ${boot_fdt} = try; then " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 202 | "bootz; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 203 | "else " \ |
| 204 | "echo WARN: Cannot load the DT; " \ |
| 205 | "fi; " \ |
| 206 | "fi; " \ |
| 207 | "else " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 208 | "bootz; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 209 | "fi;\0" \ |
| 210 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 211 | "root=/dev/nfs " \ |
| 212 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 213 | "netboot=echo Booting from net ...; " \ |
| 214 | "run netargs; " \ |
| 215 | "if test ${ip_dyn} = yes; then " \ |
| 216 | "setenv get_cmd dhcp; " \ |
| 217 | "else " \ |
| 218 | "setenv get_cmd tftp; " \ |
| 219 | "fi; " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 220 | "${get_cmd} ${image}; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 221 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 222 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 223 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 224 | "else " \ |
| 225 | "if test ${boot_fdt} = try; then " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 226 | "bootz; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 227 | "else " \ |
| 228 | "echo WARN: Cannot load the DT; " \ |
| 229 | "fi; " \ |
| 230 | "fi; " \ |
| 231 | "else " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 232 | "bootz; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 233 | "fi;\0" |
| 234 | |
| 235 | #define CONFIG_BOOTCOMMAND \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 236 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 237 | "if run loadbootscript; then " \ |
| 238 | "run bootscript; " \ |
| 239 | "else " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 240 | "if run loadimage; then " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 241 | "run mmcboot; " \ |
| 242 | "else run netboot; " \ |
| 243 | "fi; " \ |
| 244 | "fi; " \ |
| 245 | "else run netboot; fi" |
| 246 | |
| 247 | /* Miscellaneous configurable options */ |
| 248 | #define CONFIG_SYS_LONGHELP |
| 249 | #define CONFIG_SYS_HUSH_PARSER |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 250 | #define CONFIG_AUTO_COMPLETE |
| 251 | #define CONFIG_SYS_CBSIZE 256 |
| 252 | |
| 253 | /* Print Buffer Size */ |
| 254 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 255 | #define CONFIG_SYS_MAXARGS 16 |
| 256 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 257 | |
| 258 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 259 | |
| 260 | #define CONFIG_CMDLINE_EDITING |
| 261 | |
| 262 | /* Physical Memory Map */ |
| 263 | #define CONFIG_NR_DRAM_BANKS 1 |
| 264 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 265 | |
| 266 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 267 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 268 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 269 | |
| 270 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 271 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 272 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 273 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 274 | |
| 275 | /* FLASH and environment organization */ |
| 276 | #define CONFIG_SYS_NO_FLASH |
| 277 | |
| 278 | #define CONFIG_ENV_SIZE (8 * 1024) |
| 279 | |
| 280 | #define CONFIG_ENV_IS_IN_MMC |
| 281 | #define CONFIG_ENV_OFFSET (6 * 64 * 1024) |
| 282 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 283 | |
| 284 | #define CONFIG_OF_LIBFDT |
| 285 | #define CONFIG_CMD_BOOTZ |
| 286 | |
| 287 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 288 | #define CONFIG_CMD_CACHE |
| 289 | #endif |
| 290 | |
| 291 | #endif /* __CONFIG_H * */ |