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 | |
Fabio Estevam | 0d1ea05 | 2015-05-11 20:50:22 -0300 | [diff] [blame] | 14 | #define CONFIG_SPL_LIBCOMMON_SUPPORT |
| 15 | #define CONFIG_SPL_MMC_SUPPORT |
| 16 | #include "imx6_spl.h" |
| 17 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 18 | #define MACH_TYPE_WANDBOARD 4412 |
| 19 | #define CONFIG_MACH_TYPE MACH_TYPE_WANDBOARD |
| 20 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 21 | /* Size of malloc() pool */ |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 22 | #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 23 | |
| 24 | #define CONFIG_BOARD_EARLY_INIT_F |
Otavio Salvador | eaffaa2 | 2013-04-19 03:42:03 +0000 | [diff] [blame] | 25 | #define CONFIG_BOARD_LATE_INIT |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 26 | |
| 27 | #define CONFIG_MXC_UART |
| 28 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 29 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 30 | /* Command definition */ |
Otavio Salvador | eaffaa2 | 2013-04-19 03:42:03 +0000 | [diff] [blame] | 31 | #define CONFIG_CMD_BMODE |
Otavio Salvador | 0798d57 | 2013-04-19 03:42:00 +0000 | [diff] [blame] | 32 | #define CONFIG_CMD_SETEXPR |
| 33 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 34 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
| 35 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 36 | |
Otavio Salvador | 8bc7c48 | 2014-05-01 19:02:31 -0300 | [diff] [blame] | 37 | /* I2C Configs */ |
| 38 | #define CONFIG_CMD_I2C |
| 39 | #define CONFIG_SYS_I2C |
| 40 | #define CONFIG_SYS_I2C_MXC |
York Sun | f8cb101 | 2015-03-20 10:20:40 -0700 | [diff] [blame] | 41 | #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ |
Otavio Salvador | 8bc7c48 | 2014-05-01 19:02:31 -0300 | [diff] [blame] | 42 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 43 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 44 | /* MMC Configuration */ |
Otavio Salvador | 5ed1573 | 2013-04-19 03:42:02 +0000 | [diff] [blame] | 45 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 46 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 47 | |
Jeroen Hofstee | 9df4757 | 2014-10-23 23:02:01 +0200 | [diff] [blame] | 48 | /* USB Configs */ |
| 49 | #define CONFIG_CMD_USB |
| 50 | #define CONFIG_USB_EHCI |
| 51 | #define CONFIG_USB_EHCI_MX6 |
| 52 | #define CONFIG_USB_STORAGE |
| 53 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 54 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 55 | #define CONFIG_MXC_USB_FLAGS 0 |
| 56 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 57 | /* Ethernet Configuration */ |
| 58 | #define CONFIG_CMD_PING |
| 59 | #define CONFIG_CMD_DHCP |
| 60 | #define CONFIG_CMD_MII |
| 61 | #define CONFIG_CMD_NET |
| 62 | #define CONFIG_FEC_MXC |
| 63 | #define CONFIG_MII |
| 64 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 65 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 66 | #define CONFIG_ETHPRIME "FEC" |
| 67 | #define CONFIG_FEC_MXC_PHYADDR 1 |
| 68 | #define CONFIG_PHYLIB |
| 69 | #define CONFIG_PHY_ATHEROS |
| 70 | |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 71 | /* Framebuffer */ |
| 72 | #define CONFIG_VIDEO |
| 73 | #define CONFIG_VIDEO_IPUV3 |
| 74 | #define CONFIG_CFB_CONSOLE |
| 75 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
| 76 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 77 | #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE |
| 78 | #define CONFIG_VIDEO_BMP_RLE8 |
| 79 | #define CONFIG_SPLASH_SCREEN |
Otavio Salvador | a7efb02 | 2013-05-27 12:18:44 +0000 | [diff] [blame] | 80 | #define CONFIG_SPLASH_SCREEN_ALIGN |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 81 | #define CONFIG_BMP_16BPP |
| 82 | #define CONFIG_VIDEO_LOGO |
Otavio Salvador | a7efb02 | 2013-05-27 12:18:44 +0000 | [diff] [blame] | 83 | #define CONFIG_VIDEO_BMP_LOGO |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 84 | #define CONFIG_IPUV3_CLK 260000000 |
Otavio Salvador | 0ef797a | 2014-05-01 19:02:32 -0300 | [diff] [blame] | 85 | #define CONFIG_CMD_HDMIDETECT |
Pardeep Kumar Singla | 5ea7f0e | 2013-07-25 12:12:13 -0500 | [diff] [blame] | 86 | #define CONFIG_IMX_HDMI |
Otavio Salvador | 8bc7c48 | 2014-05-01 19:02:31 -0300 | [diff] [blame] | 87 | #define CONFIG_IMX_VIDEO_SKIP |
Fabio Estevam | 7bcb983 | 2013-05-23 07:50:23 +0000 | [diff] [blame] | 88 | |
Fabio Estevam | 9f87640c | 2014-09-24 15:21:58 -0300 | [diff] [blame] | 89 | #define CONFIG_CMD_FUSE |
| 90 | #ifdef CONFIG_CMD_FUSE |
| 91 | #define CONFIG_MXC_OCOTP |
| 92 | #endif |
| 93 | |
Fabio Estevam | 0d1ea05 | 2015-05-11 20:50:22 -0300 | [diff] [blame] | 94 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 95 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 96 | "script=boot.scr\0" \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 97 | "image=zImage\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 98 | "console=ttymxc0\0" \ |
Otavio Salvador | d727ab3 | 2013-07-20 17:21:19 -0300 | [diff] [blame] | 99 | "splashpos=m,m\0" \ |
Fabio Estevam | 0d1ea05 | 2015-05-11 20:50:22 -0300 | [diff] [blame] | 100 | "fdtfile=undefined\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 101 | "fdt_high=0xffffffff\0" \ |
| 102 | "initrd_high=0xffffffff\0" \ |
Otavio Salvador | 6584a1b | 2013-12-16 20:44:04 -0200 | [diff] [blame] | 103 | "fdt_addr=0x18000000\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 104 | "boot_fdt=try\0" \ |
| 105 | "ip_dyn=yes\0" \ |
Otavio Salvador | 1e1cbde | 2013-04-19 03:41:59 +0000 | [diff] [blame] | 106 | "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ |
Otavio Salvador | 86812c4 | 2013-06-28 18:52:42 -0300 | [diff] [blame] | 107 | "mmcpart=1\0" \ |
| 108 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Otavio Salvador | 0798d57 | 2013-04-19 03:42:00 +0000 | [diff] [blame] | 109 | "update_sd_firmware_filename=u-boot.imx\0" \ |
| 110 | "update_sd_firmware=" \ |
| 111 | "if test ${ip_dyn} = yes; then " \ |
| 112 | "setenv get_cmd dhcp; " \ |
| 113 | "else " \ |
| 114 | "setenv get_cmd tftp; " \ |
| 115 | "fi; " \ |
| 116 | "if mmc dev ${mmcdev}; then " \ |
| 117 | "if ${get_cmd} ${update_sd_firmware_filename}; then " \ |
| 118 | "setexpr fw_sz ${filesize} / 0x200; " \ |
| 119 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 120 | "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ |
| 121 | "fi; " \ |
| 122 | "fi\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 123 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
Otavio Salvador | 0ef797a | 2014-05-01 19:02:32 -0300 | [diff] [blame] | 124 | "root=${mmcroot}; run videoargs\0" \ |
| 125 | "videoargs=" \ |
| 126 | "setenv nextcon 0; " \ |
| 127 | "if hdmidet; then " \ |
| 128 | "setenv bootargs ${bootargs} " \ |
| 129 | "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \ |
| 130 | "if=RGB24; " \ |
| 131 | "setenv fbmen fbmem=28M; " \ |
| 132 | "setexpr nextcon ${nextcon} + 1; " \ |
| 133 | "else " \ |
| 134 | "echo - no HDMI monitor;" \ |
| 135 | "fi; " \ |
| 136 | "i2c dev 1; " \ |
| 137 | "if i2c probe 0x10; then " \ |
| 138 | "setenv bootargs ${bootargs} " \ |
| 139 | "video=mxcfb${nextcon}:dev=lcd,800x480@60," \ |
Otavio Salvador | 99c618f | 2015-01-15 13:32:29 -0200 | [diff] [blame] | 140 | "if=RGB666,bpp=32; " \ |
Otavio Salvador | 0ef797a | 2014-05-01 19:02:32 -0300 | [diff] [blame] | 141 | "if test 0 -eq ${nextcon}; then " \ |
| 142 | "setenv fbmem fbmem=10M; " \ |
| 143 | "else " \ |
| 144 | "setenv fbmem ${fbmem},10M; " \ |
| 145 | "fi; " \ |
| 146 | "setexpr nextcon ${nextcon} + 1; " \ |
| 147 | "else " \ |
| 148 | "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \ |
| 149 | "fi; " \ |
| 150 | "setenv bootargs ${bootargs} ${fbmem}\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 151 | "loadbootscript=" \ |
| 152 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 153 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 154 | "source\0" \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 155 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
Fabio Estevam | 0d1ea05 | 2015-05-11 20:50:22 -0300 | [diff] [blame] | 156 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 157 | "mmcboot=echo Booting from mmc ...; " \ |
| 158 | "run mmcargs; " \ |
| 159 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 160 | "if run loadfdt; then " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 161 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 162 | "else " \ |
| 163 | "if test ${boot_fdt} = try; then " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 164 | "bootz; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 165 | "else " \ |
| 166 | "echo WARN: Cannot load the DT; " \ |
| 167 | "fi; " \ |
| 168 | "fi; " \ |
| 169 | "else " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 170 | "bootz; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 171 | "fi;\0" \ |
| 172 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 173 | "root=/dev/nfs " \ |
| 174 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 175 | "netboot=echo Booting from net ...; " \ |
| 176 | "run netargs; " \ |
| 177 | "if test ${ip_dyn} = yes; then " \ |
| 178 | "setenv get_cmd dhcp; " \ |
| 179 | "else " \ |
| 180 | "setenv get_cmd tftp; " \ |
| 181 | "fi; " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 182 | "${get_cmd} ${image}; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 183 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
Fabio Estevam | 0d1ea05 | 2015-05-11 20:50:22 -0300 | [diff] [blame] | 184 | "if ${get_cmd} ${fdt_addr} ${fdtfile}; then " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 185 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 186 | "else " \ |
| 187 | "if test ${boot_fdt} = try; then " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 188 | "bootz; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 189 | "else " \ |
| 190 | "echo WARN: Cannot load the DT; " \ |
| 191 | "fi; " \ |
| 192 | "fi; " \ |
| 193 | "else " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 194 | "bootz; " \ |
Fabio Estevam | 0d1ea05 | 2015-05-11 20:50:22 -0300 | [diff] [blame] | 195 | "fi;\0" \ |
| 196 | "findfdt="\ |
| 197 | "if test $board_rev = MX6Q ; then " \ |
| 198 | "setenv fdtfile imx6q-wandboard.dtb; fi; " \ |
| 199 | "if test $board_rev = MX6DL ; then " \ |
| 200 | "setenv fdtfile imx6dl-wandboard.dtb; fi; " \ |
| 201 | "if test $fdtfile = undefined; then " \ |
| 202 | "echo WARNING: Could not determine dtb to use; fi; \0" \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 203 | |
| 204 | #define CONFIG_BOOTCOMMAND \ |
Fabio Estevam | 0d1ea05 | 2015-05-11 20:50:22 -0300 | [diff] [blame] | 205 | "run findfdt; " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 206 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 207 | "if run loadbootscript; then " \ |
| 208 | "run bootscript; " \ |
| 209 | "else " \ |
John Weber | f353397 | 2014-01-06 13:27:22 -0200 | [diff] [blame] | 210 | "if run loadimage; then " \ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 211 | "run mmcboot; " \ |
| 212 | "else run netboot; " \ |
| 213 | "fi; " \ |
| 214 | "fi; " \ |
| 215 | "else run netboot; fi" |
| 216 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 217 | /* Physical Memory Map */ |
| 218 | #define CONFIG_NR_DRAM_BANKS 1 |
| 219 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 220 | |
| 221 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 222 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 223 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 224 | |
| 225 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 226 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 227 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 228 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 229 | |
Peter Robinson | 056845c | 2015-05-22 17:30:45 +0100 | [diff] [blame] | 230 | /* Environment organization */ |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 231 | #define CONFIG_ENV_SIZE (8 * 1024) |
| 232 | |
| 233 | #define CONFIG_ENV_IS_IN_MMC |
| 234 | #define CONFIG_ENV_OFFSET (6 * 64 * 1024) |
| 235 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 236 | |
Fabio Estevam | e2d282a | 2013-03-15 10:43:48 +0000 | [diff] [blame] | 237 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 238 | #define CONFIG_CMD_CACHE |
| 239 | #endif |
| 240 | |
| 241 | #endif /* __CONFIG_H * */ |