1 /* 2 * Copyright (C) 2013 Freescale Semiconductor, Inc. 3 * 4 * Configuration settings for the Wandboard. 5 * 6 * SPDX-License-Identifier: GPL-2.0+ 7 */ 8 9 #ifndef __CONFIG_H 10 #define __CONFIG_H 11 12 #include "mx6_common.h" 13 #include <asm/arch/imx-regs.h> 14 #include <asm/imx-common/gpio.h> 15 #include <linux/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 #define CONFIG_SYS_GENERIC_BOARD 30 31 /* Size of malloc() pool */ 32 #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) 33 34 #define CONFIG_BOARD_EARLY_INIT_F 35 #define CONFIG_BOARD_LATE_INIT 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 51 #define CONFIG_CMD_BMODE 52 #define CONFIG_CMD_SETEXPR 53 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 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 67 /* MMC Configuration */ 68 #define CONFIG_FSL_ESDHC 69 #define CONFIG_FSL_USDHC 70 #define CONFIG_SYS_FSL_USDHC_NUM 2 71 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 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 81 /* Ethernet Configuration */ 82 #define CONFIG_CMD_PING 83 #define CONFIG_CMD_DHCP 84 #define CONFIG_CMD_MII 85 #define CONFIG_CMD_NET 86 #define CONFIG_FEC_MXC 87 #define CONFIG_MII 88 #define IMX_FEC_BASE ENET_BASE_ADDR 89 #define CONFIG_FEC_XCV_TYPE RGMII 90 #define CONFIG_ETHPRIME "FEC" 91 #define CONFIG_FEC_MXC_PHYADDR 1 92 #define CONFIG_PHYLIB 93 #define CONFIG_PHY_ATHEROS 94 95 /* Framebuffer */ 96 #define CONFIG_VIDEO 97 #define CONFIG_VIDEO_IPUV3 98 #define CONFIG_CFB_CONSOLE 99 #define CONFIG_VGA_AS_SINGLE_DEVICE 100 #define CONFIG_SYS_CONSOLE_IS_IN_ENV 101 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE 102 #define CONFIG_VIDEO_BMP_RLE8 103 #define CONFIG_SPLASH_SCREEN 104 #define CONFIG_SPLASH_SCREEN_ALIGN 105 #define CONFIG_BMP_16BPP 106 #define CONFIG_VIDEO_LOGO 107 #define CONFIG_VIDEO_BMP_LOGO 108 #define CONFIG_IPUV3_CLK 260000000 109 #define CONFIG_CMD_HDMIDETECT 110 #define CONFIG_IMX_HDMI 111 #define CONFIG_IMX_VIDEO_SKIP 112 113 #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S) 114 #define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb" 115 #elif defined(CONFIG_MX6Q) 116 #define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb" 117 #endif 118 119 #define CONFIG_EXTRA_ENV_SETTINGS \ 120 "script=boot.scr\0" \ 121 "image=zImage\0" \ 122 "console=ttymxc0\0" \ 123 "splashpos=m,m\0" \ 124 "fdt_high=0xffffffff\0" \ 125 "initrd_high=0xffffffff\0" \ 126 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ 127 "fdt_addr=0x18000000\0" \ 128 "boot_fdt=try\0" \ 129 "ip_dyn=yes\0" \ 130 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ 131 "mmcpart=1\0" \ 132 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ 133 "update_sd_firmware_filename=u-boot.imx\0" \ 134 "update_sd_firmware=" \ 135 "if test ${ip_dyn} = yes; then " \ 136 "setenv get_cmd dhcp; " \ 137 "else " \ 138 "setenv get_cmd tftp; " \ 139 "fi; " \ 140 "if mmc dev ${mmcdev}; then " \ 141 "if ${get_cmd} ${update_sd_firmware_filename}; then " \ 142 "setexpr fw_sz ${filesize} / 0x200; " \ 143 "setexpr fw_sz ${fw_sz} + 1; " \ 144 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ 145 "fi; " \ 146 "fi\0" \ 147 "mmcargs=setenv bootargs console=${console},${baudrate} " \ 148 "root=${mmcroot}; run videoargs\0" \ 149 "videoargs=" \ 150 "setenv nextcon 0; " \ 151 "if hdmidet; then " \ 152 "setenv bootargs ${bootargs} " \ 153 "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \ 154 "if=RGB24; " \ 155 "setenv fbmen fbmem=28M; " \ 156 "setexpr nextcon ${nextcon} + 1; " \ 157 "else " \ 158 "echo - no HDMI monitor;" \ 159 "fi; " \ 160 "i2c dev 1; " \ 161 "if i2c probe 0x10; then " \ 162 "setenv bootargs ${bootargs} " \ 163 "video=mxcfb${nextcon}:dev=lcd,800x480@60," \ 164 "if=RGB666; " \ 165 "if test 0 -eq ${nextcon}; then " \ 166 "setenv fbmem fbmem=10M; " \ 167 "else " \ 168 "setenv fbmem ${fbmem},10M; " \ 169 "fi; " \ 170 "setexpr nextcon ${nextcon} + 1; " \ 171 "else " \ 172 "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \ 173 "fi; " \ 174 "setenv bootargs ${bootargs} ${fbmem}\0" \ 175 "loadbootscript=" \ 176 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ 177 "bootscript=echo Running bootscript from mmc ...; " \ 178 "source\0" \ 179 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ 180 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ 181 "mmcboot=echo Booting from mmc ...; " \ 182 "run mmcargs; " \ 183 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 184 "if run loadfdt; then " \ 185 "bootz ${loadaddr} - ${fdt_addr}; " \ 186 "else " \ 187 "if test ${boot_fdt} = try; then " \ 188 "bootz; " \ 189 "else " \ 190 "echo WARN: Cannot load the DT; " \ 191 "fi; " \ 192 "fi; " \ 193 "else " \ 194 "bootz; " \ 195 "fi;\0" \ 196 "netargs=setenv bootargs console=${console},${baudrate} " \ 197 "root=/dev/nfs " \ 198 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ 199 "netboot=echo Booting from net ...; " \ 200 "run netargs; " \ 201 "if test ${ip_dyn} = yes; then " \ 202 "setenv get_cmd dhcp; " \ 203 "else " \ 204 "setenv get_cmd tftp; " \ 205 "fi; " \ 206 "${get_cmd} ${image}; " \ 207 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 208 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ 209 "bootz ${loadaddr} - ${fdt_addr}; " \ 210 "else " \ 211 "if test ${boot_fdt} = try; then " \ 212 "bootz; " \ 213 "else " \ 214 "echo WARN: Cannot load the DT; " \ 215 "fi; " \ 216 "fi; " \ 217 "else " \ 218 "bootz; " \ 219 "fi;\0" 220 221 #define CONFIG_BOOTCOMMAND \ 222 "mmc dev ${mmcdev}; if mmc rescan; then " \ 223 "if run loadbootscript; then " \ 224 "run bootscript; " \ 225 "else " \ 226 "if run loadimage; then " \ 227 "run mmcboot; " \ 228 "else run netboot; " \ 229 "fi; " \ 230 "fi; " \ 231 "else run netboot; fi" 232 233 /* Miscellaneous configurable options */ 234 #define CONFIG_SYS_LONGHELP 235 #define CONFIG_SYS_HUSH_PARSER 236 #define CONFIG_AUTO_COMPLETE 237 #define CONFIG_SYS_CBSIZE 256 238 239 /* Print Buffer Size */ 240 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) 241 #define CONFIG_SYS_MAXARGS 16 242 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 243 244 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 245 246 #define CONFIG_CMDLINE_EDITING 247 248 /* Physical Memory Map */ 249 #define CONFIG_NR_DRAM_BANKS 1 250 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 251 252 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 253 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 254 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 255 256 #define CONFIG_SYS_INIT_SP_OFFSET \ 257 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 258 #define CONFIG_SYS_INIT_SP_ADDR \ 259 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 260 261 /* FLASH and environment organization */ 262 #define CONFIG_SYS_NO_FLASH 263 264 #define CONFIG_ENV_SIZE (8 * 1024) 265 266 #define CONFIG_ENV_IS_IN_MMC 267 #define CONFIG_ENV_OFFSET (6 * 64 * 1024) 268 #define CONFIG_SYS_MMC_ENV_DEV 0 269 270 #define CONFIG_OF_LIBFDT 271 #define CONFIG_CMD_BOOTZ 272 273 #ifndef CONFIG_SYS_DCACHE_OFF 274 #define CONFIG_CMD_CACHE 275 #endif 276 277 #endif /* __CONFIG_H * */ 278