Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * Configuration settings for the Boundary Devices Nitrogen6X |
| 5 | * and Freescale i.MX6Q Sabre Lite boards. |
| 6 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __CONFIG_H |
| 11 | #define __CONFIG_H |
| 12 | |
Eric Nelson | 02824dc | 2013-11-26 17:40:30 -0700 | [diff] [blame] | 13 | #include "mx6_common.h" |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 14 | #define CONFIG_MX6 |
| 15 | #define CONFIG_DISPLAY_CPUINFO |
| 16 | #define CONFIG_DISPLAY_BOARDINFO |
| 17 | |
| 18 | #define CONFIG_MACH_TYPE 3769 |
| 19 | |
| 20 | #include <asm/arch/imx-regs.h> |
| 21 | #include <asm/imx-common/gpio.h> |
| 22 | |
| 23 | #define CONFIG_CMDLINE_TAG |
| 24 | #define CONFIG_SETUP_MEMORY_TAGS |
| 25 | #define CONFIG_INITRD_TAG |
| 26 | #define CONFIG_REVISION_TAG |
Eric Nelson | f7155fa | 2014-04-25 16:15:46 -0700 | [diff] [blame] | 27 | #define CONFIG_SYS_GENERIC_BOARD |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 28 | |
| 29 | /* Size of malloc() pool */ |
| 30 | #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) |
| 31 | |
| 32 | #define CONFIG_BOARD_EARLY_INIT_F |
| 33 | #define CONFIG_MISC_INIT_R |
| 34 | #define CONFIG_MXC_GPIO |
Marek Vasut | f016f8c | 2014-02-06 02:43:45 +0100 | [diff] [blame] | 35 | #define CONFIG_CI_UDC |
Troy Kisky | f3d7cff | 2013-09-25 18:41:18 -0700 | [diff] [blame] | 36 | #define CONFIG_USBD_HS |
| 37 | #define CONFIG_USB_GADGET_DUALSPEED |
| 38 | #define CONFIG_USB_ETHER |
| 39 | #define CONFIG_USB_ETH_CDC |
| 40 | #define CONFIG_NETCONSOLE |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 41 | |
Benoît Thébaudeau | 70a5ef2 | 2013-04-23 10:17:46 +0000 | [diff] [blame] | 42 | #define CONFIG_CMD_FUSE |
| 43 | #ifdef CONFIG_CMD_FUSE |
| 44 | #define CONFIG_MXC_OCOTP |
| 45 | #endif |
| 46 | |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 47 | #define CONFIG_MXC_UART |
| 48 | #define CONFIG_MXC_UART_BASE UART2_BASE |
| 49 | |
| 50 | #define CONFIG_CMD_SF |
| 51 | #ifdef CONFIG_CMD_SF |
| 52 | #define CONFIG_SPI_FLASH |
| 53 | #define CONFIG_SPI_FLASH_SST |
| 54 | #define CONFIG_MXC_SPI |
| 55 | #define CONFIG_SF_DEFAULT_BUS 0 |
| 56 | #define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(3, 19)<<8)) |
| 57 | #define CONFIG_SF_DEFAULT_SPEED 25000000 |
| 58 | #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) |
| 59 | #endif |
| 60 | |
| 61 | /* I2C Configs */ |
| 62 | #define CONFIG_CMD_I2C |
trem | b089d03 | 2013-09-21 18:13:36 +0200 | [diff] [blame] | 63 | #define CONFIG_SYS_I2C |
| 64 | #define CONFIG_SYS_I2C_MXC |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 65 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 66 | |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 67 | /* MMC Configs */ |
| 68 | #define CONFIG_FSL_ESDHC |
| 69 | #define CONFIG_FSL_USDHC |
| 70 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 71 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 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 | #ifdef CONFIG_MX6Q |
| 82 | #define CONFIG_CMD_SATA |
| 83 | #endif |
| 84 | |
| 85 | /* |
| 86 | * SATA Configs |
| 87 | */ |
| 88 | #ifdef CONFIG_CMD_SATA |
| 89 | #define CONFIG_DWC_AHSATA |
| 90 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 |
| 91 | #define CONFIG_DWC_AHSATA_PORT_ID 0 |
| 92 | #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR |
| 93 | #define CONFIG_LBA48 |
| 94 | #define CONFIG_LIBATA |
| 95 | #endif |
| 96 | |
| 97 | #define CONFIG_CMD_PING |
| 98 | #define CONFIG_CMD_DHCP |
| 99 | #define CONFIG_CMD_MII |
| 100 | #define CONFIG_CMD_NET |
| 101 | #define CONFIG_FEC_MXC |
| 102 | #define CONFIG_MII |
| 103 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 104 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 105 | #define CONFIG_ETHPRIME "FEC" |
| 106 | #define CONFIG_FEC_MXC_PHYADDR 6 |
| 107 | #define CONFIG_PHYLIB |
| 108 | #define CONFIG_PHY_MICREL |
| 109 | #define CONFIG_PHY_MICREL_KSZ9021 |
| 110 | |
| 111 | /* USB Configs */ |
| 112 | #define CONFIG_CMD_USB |
| 113 | #define CONFIG_CMD_FAT |
| 114 | #define CONFIG_USB_EHCI |
| 115 | #define CONFIG_USB_EHCI_MX6 |
| 116 | #define CONFIG_USB_STORAGE |
| 117 | #define CONFIG_USB_HOST_ETHER |
| 118 | #define CONFIG_USB_ETHER_ASIX |
Gerhard Sittig | a743415 | 2014-03-08 19:46:16 +0100 | [diff] [blame] | 119 | #define CONFIG_USB_ETHER_MCS7830 |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 120 | #define CONFIG_USB_ETHER_SMSC95XX |
Troy Kisky | d1a5286 | 2013-10-10 15:27:59 -0700 | [diff] [blame] | 121 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 122 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 123 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 124 | #define CONFIG_MXC_USB_FLAGS 0 |
| 125 | |
| 126 | /* Miscellaneous commands */ |
| 127 | #define CONFIG_CMD_BMODE |
| 128 | #define CONFIG_CMD_SETEXPR |
| 129 | |
| 130 | /* Framebuffer and LCD */ |
| 131 | #define CONFIG_VIDEO |
| 132 | #define CONFIG_VIDEO_IPUV3 |
| 133 | #define CONFIG_CFB_CONSOLE |
| 134 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
| 135 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 136 | #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE |
| 137 | #define CONFIG_VIDEO_BMP_RLE8 |
| 138 | #define CONFIG_SPLASH_SCREEN |
| 139 | #define CONFIG_BMP_16BPP |
| 140 | #define CONFIG_VIDEO_LOGO |
| 141 | #define CONFIG_IPUV3_CLK 260000000 |
| 142 | #define CONFIG_CMD_HDMIDETECT |
| 143 | #define CONFIG_CONSOLE_MUX |
Pardeep Kumar Singla | 5ea7f0e | 2013-07-25 12:12:13 -0500 | [diff] [blame] | 144 | #define CONFIG_IMX_HDMI |
Eric Benard | a47e449 | 2014-04-04 19:05:53 +0200 | [diff] [blame] | 145 | #define CONFIG_IMX_VIDEO_SKIP |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 146 | |
| 147 | /* allow to overwrite serial and ethaddr */ |
| 148 | #define CONFIG_ENV_OVERWRITE |
| 149 | #define CONFIG_CONS_INDEX 1 |
| 150 | #define CONFIG_BAUDRATE 115200 |
| 151 | |
| 152 | /* Command definition */ |
| 153 | #include <config_cmd_default.h> |
| 154 | |
| 155 | #undef CONFIG_CMD_IMLS |
| 156 | |
| 157 | #define CONFIG_BOOTDELAY 1 |
| 158 | |
| 159 | #define CONFIG_PREBOOT "" |
| 160 | |
| 161 | #define CONFIG_LOADADDR 0x12000000 |
| 162 | #define CONFIG_SYS_TEXT_BASE 0x17800000 |
| 163 | |
| 164 | #ifdef CONFIG_CMD_SATA |
| 165 | #define CONFIG_DRIVE_SATA "sata " |
| 166 | #else |
| 167 | #define CONFIG_DRIVE_SATA |
| 168 | #endif |
| 169 | |
| 170 | #ifdef CONFIG_CMD_MMC |
| 171 | #define CONFIG_DRIVE_MMC "mmc " |
| 172 | #else |
| 173 | #define CONFIG_DRIVE_MMC |
| 174 | #endif |
| 175 | |
| 176 | #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC |
| 177 | |
Fabio Estevam | f8b1e86 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 178 | #if defined(CONFIG_SABRELITE) |
| 179 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 180 | "script=boot.scr\0" \ |
| 181 | "uimage=uImage\0" \ |
| 182 | "console=ttymxc1\0" \ |
| 183 | "fdt_high=0xffffffff\0" \ |
| 184 | "initrd_high=0xffffffff\0" \ |
| 185 | "fdt_file=imx6q-sabrelite.dtb\0" \ |
Otavio Salvador | 6584a1b | 2013-12-16 20:44:04 -0200 | [diff] [blame] | 186 | "fdt_addr=0x18000000\0" \ |
Fabio Estevam | f8b1e86 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 187 | "boot_fdt=try\0" \ |
| 188 | "ip_dyn=yes\0" \ |
| 189 | "mmcdev=0\0" \ |
| 190 | "mmcpart=1\0" \ |
| 191 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
| 192 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 193 | "root=${mmcroot}\0" \ |
| 194 | "loadbootscript=" \ |
| 195 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 196 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 197 | "source\0" \ |
| 198 | "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ |
| 199 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 200 | "mmcboot=echo Booting from mmc ...; " \ |
| 201 | "run mmcargs; " \ |
| 202 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 203 | "if run loadfdt; then " \ |
| 204 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 205 | "else " \ |
| 206 | "if test ${boot_fdt} = try; then " \ |
| 207 | "bootm; " \ |
| 208 | "else " \ |
| 209 | "echo WARN: Cannot load the DT; " \ |
| 210 | "fi; " \ |
| 211 | "fi; " \ |
| 212 | "else " \ |
| 213 | "bootm; " \ |
| 214 | "fi;\0" \ |
| 215 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 216 | "root=/dev/nfs " \ |
| 217 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 218 | "netboot=echo Booting from net ...; " \ |
| 219 | "run netargs; " \ |
| 220 | "if test ${ip_dyn} = yes; then " \ |
| 221 | "setenv get_cmd dhcp; " \ |
| 222 | "else " \ |
| 223 | "setenv get_cmd tftp; " \ |
| 224 | "fi; " \ |
| 225 | "${get_cmd} ${uimage}; " \ |
| 226 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 227 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 228 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 229 | "else " \ |
| 230 | "if test ${boot_fdt} = try; then " \ |
| 231 | "bootm; " \ |
| 232 | "else " \ |
| 233 | "echo WARN: Cannot load the DT; " \ |
| 234 | "fi; " \ |
| 235 | "fi; " \ |
| 236 | "else " \ |
| 237 | "bootm; " \ |
| 238 | "fi;\0" |
| 239 | |
| 240 | #define CONFIG_BOOTCOMMAND \ |
| 241 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 242 | "if run loadbootscript; then " \ |
| 243 | "run bootscript; " \ |
| 244 | "else " \ |
| 245 | "if run loaduimage; then " \ |
| 246 | "run mmcboot; " \ |
| 247 | "else run netboot; " \ |
| 248 | "fi; " \ |
| 249 | "fi; " \ |
| 250 | "else run netboot; fi" |
| 251 | #else |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 252 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 253 | "console=ttymxc1\0" \ |
| 254 | "clearenv=if sf probe || sf probe || sf probe 1 ; then " \ |
| 255 | "sf erase 0xc0000 0x2000 && " \ |
| 256 | "echo restored environment to factory default ; fi\0" \ |
| 257 | "bootcmd=for dtype in " CONFIG_DRIVE_TYPES \ |
| 258 | "; do " \ |
| 259 | "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ |
| 260 | "for fs in fat ext2 ; do " \ |
| 261 | "${fs}load " \ |
| 262 | "${dtype} ${disk}:1 " \ |
| 263 | "10008000 " \ |
| 264 | "/6x_bootscript" \ |
| 265 | "&& source 10008000 ; " \ |
| 266 | "done ; " \ |
| 267 | "done ; " \ |
| 268 | "done; " \ |
| 269 | "setenv stdout serial,vga ; " \ |
| 270 | "echo ; echo 6x_bootscript not found ; " \ |
| 271 | "echo ; echo serial console at 115200, 8N1 ; echo ; " \ |
| 272 | "echo details at http://boundarydevices.com/6q_bootscript ; " \ |
| 273 | "setenv stdout serial\0" \ |
| 274 | "upgradeu=for dtype in " CONFIG_DRIVE_TYPES \ |
| 275 | "; do " \ |
| 276 | "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ |
| 277 | "for fs in fat ext2 ; do " \ |
| 278 | "${fs}load ${dtype} ${disk}:1 10008000 " \ |
| 279 | "/6x_upgrade " \ |
| 280 | "&& source 10008000 ; " \ |
| 281 | "done ; " \ |
| 282 | "done ; " \ |
| 283 | "done\0" \ |
| 284 | |
Fabio Estevam | f8b1e86 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 285 | #endif |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 286 | /* Miscellaneous configurable options */ |
| 287 | #define CONFIG_SYS_LONGHELP |
| 288 | #define CONFIG_SYS_HUSH_PARSER |
| 289 | #define CONFIG_SYS_PROMPT "U-Boot > " |
| 290 | #define CONFIG_AUTO_COMPLETE |
| 291 | #define CONFIG_SYS_CBSIZE 1024 |
| 292 | |
| 293 | /* Print Buffer Size */ |
| 294 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 295 | #define CONFIG_SYS_MAXARGS 16 |
| 296 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 297 | |
| 298 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
| 299 | #define CONFIG_SYS_MEMTEST_END 0x10010000 |
| 300 | #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000 |
| 301 | |
| 302 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 303 | |
| 304 | #define CONFIG_CMDLINE_EDITING |
| 305 | |
| 306 | /* Physical Memory Map */ |
| 307 | #define CONFIG_NR_DRAM_BANKS 1 |
| 308 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 309 | |
| 310 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 311 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 312 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 313 | |
| 314 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 315 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 316 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 317 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 318 | |
| 319 | /* FLASH and environment organization */ |
| 320 | #define CONFIG_SYS_NO_FLASH |
| 321 | |
| 322 | #define CONFIG_ENV_SIZE (8 * 1024) |
| 323 | |
Fabio Estevam | f8b1e86 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 324 | #if defined(CONFIG_SABRELITE) |
| 325 | #define CONFIG_ENV_IS_IN_MMC |
| 326 | #else |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 327 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
Fabio Estevam | f8b1e86 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 328 | #endif |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 329 | |
| 330 | #if defined(CONFIG_ENV_IS_IN_MMC) |
| 331 | #define CONFIG_ENV_OFFSET (6 * 64 * 1024) |
| 332 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
| 333 | #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH) |
| 334 | #define CONFIG_ENV_OFFSET (768 * 1024) |
| 335 | #define CONFIG_ENV_SECT_SIZE (8 * 1024) |
| 336 | #define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS |
| 337 | #define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS |
| 338 | #define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE |
| 339 | #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED |
| 340 | #endif |
| 341 | |
| 342 | #define CONFIG_OF_LIBFDT |
| 343 | #define CONFIG_CMD_BOOTZ |
| 344 | |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 345 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 346 | #define CONFIG_CMD_CACHE |
| 347 | #endif |
| 348 | |
| 349 | #define CONFIG_CMD_BMP |
| 350 | |
| 351 | #define CONFIG_CMD_TIME |
| 352 | #define CONFIG_SYS_ALT_MEMTEST |
| 353 | |
Robert Winkler | 9b9ba6f | 2013-06-06 10:39:26 -0700 | [diff] [blame] | 354 | #define CONFIG_CMD_BOOTZ |
Robert Winkler | 3655829 | 2013-06-06 10:39:27 -0700 | [diff] [blame] | 355 | #define CONFIG_SUPPORT_RAW_INITRD |
Robert Winkler | 262326b | 2013-06-06 10:39:28 -0700 | [diff] [blame] | 356 | #define CONFIG_CMD_FS_GENERIC |
Robert Winkler | 9b9ba6f | 2013-06-06 10:39:26 -0700 | [diff] [blame] | 357 | |
Marek Vasut | 147f8fa | 2013-12-14 05:55:29 +0100 | [diff] [blame] | 358 | /* |
| 359 | * PCI express |
| 360 | */ |
Marek Vasut | 147f8fa | 2013-12-14 05:55:29 +0100 | [diff] [blame] | 361 | #ifdef CONFIG_CMD_PCI |
| 362 | #define CONFIG_PCI |
| 363 | #define CONFIG_PCI_PNP |
| 364 | #define CONFIG_PCI_SCAN_SHOW |
| 365 | #define CONFIG_PCIE_IMX |
| 366 | #endif |
| 367 | |
Eric Nelson | d67b0d9 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 368 | #endif /* __CONFIG_H */ |