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