Eric Nelson | e5b3a50 | 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 | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Eric Nelson | e5b3a50 | 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 |
| 33 | |
Benoît Thébaudeau | dfbc3b2 | 2013-04-23 10:17:46 +0000 | [diff] [blame] | 34 | #define CONFIG_CMD_FUSE |
| 35 | #ifdef CONFIG_CMD_FUSE |
| 36 | #define CONFIG_MXC_OCOTP |
| 37 | #endif |
| 38 | |
Eric Nelson | e5b3a50 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 39 | #define CONFIG_MXC_UART |
| 40 | #define CONFIG_MXC_UART_BASE UART2_BASE |
| 41 | |
| 42 | #define CONFIG_CMD_SF |
| 43 | #ifdef CONFIG_CMD_SF |
| 44 | #define CONFIG_SPI_FLASH |
| 45 | #define CONFIG_SPI_FLASH_SST |
| 46 | #define CONFIG_MXC_SPI |
| 47 | #define CONFIG_SF_DEFAULT_BUS 0 |
| 48 | #define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(3, 19)<<8)) |
| 49 | #define CONFIG_SF_DEFAULT_SPEED 25000000 |
| 50 | #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) |
| 51 | #endif |
| 52 | |
| 53 | /* I2C Configs */ |
| 54 | #define CONFIG_CMD_I2C |
| 55 | #define CONFIG_I2C_MULTI_BUS |
| 56 | #define CONFIG_I2C_MXC |
| 57 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 58 | |
| 59 | /* OCOTP Configs */ |
| 60 | #define CONFIG_CMD_IMXOTP |
| 61 | #ifdef CONFIG_CMD_IMXOTP |
| 62 | #define CONFIG_IMX_OTP |
| 63 | #define IMX_OTP_BASE OCOTP_BASE_ADDR |
| 64 | #define IMX_OTP_ADDR_MAX 0x7F |
| 65 | #define IMX_OTP_DATA_ERROR_VAL 0xBADABADA |
| 66 | #define IMX_OTPWRITE_ENABLED |
| 67 | #endif |
| 68 | |
| 69 | /* MMC Configs */ |
| 70 | #define CONFIG_FSL_ESDHC |
| 71 | #define CONFIG_FSL_USDHC |
| 72 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 73 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 74 | |
| 75 | #define CONFIG_MMC |
| 76 | #define CONFIG_CMD_MMC |
| 77 | #define CONFIG_GENERIC_MMC |
| 78 | #define CONFIG_BOUNCE_BUFFER |
| 79 | #define CONFIG_CMD_EXT2 |
| 80 | #define CONFIG_CMD_FAT |
| 81 | #define CONFIG_DOS_PARTITION |
| 82 | |
| 83 | #ifdef CONFIG_MX6Q |
| 84 | #define CONFIG_CMD_SATA |
| 85 | #endif |
| 86 | |
| 87 | /* |
| 88 | * SATA Configs |
| 89 | */ |
| 90 | #ifdef CONFIG_CMD_SATA |
| 91 | #define CONFIG_DWC_AHSATA |
| 92 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 |
| 93 | #define CONFIG_DWC_AHSATA_PORT_ID 0 |
| 94 | #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR |
| 95 | #define CONFIG_LBA48 |
| 96 | #define CONFIG_LIBATA |
| 97 | #endif |
| 98 | |
| 99 | #define CONFIG_CMD_PING |
| 100 | #define CONFIG_CMD_DHCP |
| 101 | #define CONFIG_CMD_MII |
| 102 | #define CONFIG_CMD_NET |
| 103 | #define CONFIG_FEC_MXC |
| 104 | #define CONFIG_MII |
| 105 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 106 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 107 | #define CONFIG_ETHPRIME "FEC" |
| 108 | #define CONFIG_FEC_MXC_PHYADDR 6 |
| 109 | #define CONFIG_PHYLIB |
| 110 | #define CONFIG_PHY_MICREL |
| 111 | #define CONFIG_PHY_MICREL_KSZ9021 |
| 112 | |
| 113 | /* USB Configs */ |
| 114 | #define CONFIG_CMD_USB |
| 115 | #define CONFIG_CMD_FAT |
| 116 | #define CONFIG_USB_EHCI |
| 117 | #define CONFIG_USB_EHCI_MX6 |
| 118 | #define CONFIG_USB_STORAGE |
| 119 | #define CONFIG_USB_HOST_ETHER |
| 120 | #define CONFIG_USB_ETHER_ASIX |
| 121 | #define CONFIG_USB_ETHER_SMSC95XX |
| 122 | #define CONFIG_MXC_USB_PORT 1 |
| 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 | c1fa130 | 2013-07-25 12:12:13 -0500 | [diff] [blame] | 144 | #define CONFIG_IMX_HDMI |
Eric Nelson | e5b3a50 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 145 | |
| 146 | /* allow to overwrite serial and ethaddr */ |
| 147 | #define CONFIG_ENV_OVERWRITE |
| 148 | #define CONFIG_CONS_INDEX 1 |
| 149 | #define CONFIG_BAUDRATE 115200 |
| 150 | |
| 151 | /* Command definition */ |
| 152 | #include <config_cmd_default.h> |
| 153 | |
| 154 | #undef CONFIG_CMD_IMLS |
| 155 | |
| 156 | #define CONFIG_BOOTDELAY 1 |
| 157 | |
| 158 | #define CONFIG_PREBOOT "" |
| 159 | |
| 160 | #define CONFIG_LOADADDR 0x12000000 |
| 161 | #define CONFIG_SYS_TEXT_BASE 0x17800000 |
| 162 | |
| 163 | #ifdef CONFIG_CMD_SATA |
| 164 | #define CONFIG_DRIVE_SATA "sata " |
| 165 | #else |
| 166 | #define CONFIG_DRIVE_SATA |
| 167 | #endif |
| 168 | |
| 169 | #ifdef CONFIG_CMD_MMC |
| 170 | #define CONFIG_DRIVE_MMC "mmc " |
| 171 | #else |
| 172 | #define CONFIG_DRIVE_MMC |
| 173 | #endif |
| 174 | |
| 175 | #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC |
| 176 | |
Fabio Estevam | 1fd6092 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 177 | #if defined(CONFIG_SABRELITE) |
Eric Nelson | e5b3a50 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 178 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Fabio Estevam | 1fd6092 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 179 | "script=boot.scr\0" \ |
| 180 | "uimage=uImage\0" \ |
| 181 | "console=ttymxc1\0" \ |
| 182 | "fdt_high=0xffffffff\0" \ |
| 183 | "initrd_high=0xffffffff\0" \ |
| 184 | "fdt_file=imx6q-sabrelite.dtb\0" \ |
| 185 | "fdt_addr=0x11000000\0" \ |
| 186 | "boot_fdt=try\0" \ |
| 187 | "ip_dyn=yes\0" \ |
| 188 | "mmcdev=0\0" \ |
| 189 | "mmcpart=1\0" \ |
| 190 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
| 191 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 192 | "root=${mmcroot}\0" \ |
| 193 | "loadbootscript=" \ |
| 194 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 195 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 196 | "source\0" \ |
| 197 | "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ |
| 198 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 199 | "mmcboot=echo Booting from mmc ...; " \ |
| 200 | "run mmcargs; " \ |
| 201 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 202 | "if run loadfdt; then " \ |
| 203 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 204 | "else " \ |
| 205 | "if test ${boot_fdt} = try; then " \ |
| 206 | "bootm; " \ |
| 207 | "else " \ |
| 208 | "echo WARN: Cannot load the DT; " \ |
| 209 | "fi; " \ |
| 210 | "fi; " \ |
| 211 | "else " \ |
| 212 | "bootm; " \ |
| 213 | "fi;\0" \ |
| 214 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 215 | "root=/dev/nfs " \ |
| 216 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 217 | "netboot=echo Booting from net ...; " \ |
| 218 | "run netargs; " \ |
| 219 | "if test ${ip_dyn} = yes; then " \ |
| 220 | "setenv get_cmd dhcp; " \ |
| 221 | "else " \ |
| 222 | "setenv get_cmd tftp; " \ |
| 223 | "fi; " \ |
| 224 | "${get_cmd} ${uimage}; " \ |
| 225 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 226 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 227 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 228 | "else " \ |
| 229 | "if test ${boot_fdt} = try; then " \ |
| 230 | "bootm; " \ |
| 231 | "else " \ |
| 232 | "echo WARN: Cannot load the DT; " \ |
| 233 | "fi; " \ |
| 234 | "fi; " \ |
| 235 | "else " \ |
| 236 | "bootm; " \ |
| 237 | "fi;\0" |
| 238 | |
| 239 | #define CONFIG_BOOTCOMMAND \ |
| 240 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 241 | "if run loadbootscript; then " \ |
| 242 | "run bootscript; " \ |
| 243 | "else " \ |
| 244 | "if run loaduimage; then " \ |
| 245 | "run mmcboot; " \ |
| 246 | "else run netboot; " \ |
| 247 | "fi; " \ |
| 248 | "fi; " \ |
| 249 | "else run netboot; fi" |
| 250 | #else |
| 251 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Eric Nelson | e5b3a50 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 252 | "console=ttymxc1\0" \ |
| 253 | "clearenv=if sf probe || sf probe || sf probe 1 ; then " \ |
| 254 | "sf erase 0xc0000 0x2000 && " \ |
| 255 | "echo restored environment to factory default ; fi\0" \ |
| 256 | "bootcmd=for dtype in " CONFIG_DRIVE_TYPES \ |
| 257 | "; do " \ |
| 258 | "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ |
| 259 | "for fs in fat ext2 ; do " \ |
| 260 | "${fs}load " \ |
| 261 | "${dtype} ${disk}:1 " \ |
| 262 | "10008000 " \ |
| 263 | "/6x_bootscript" \ |
| 264 | "&& source 10008000 ; " \ |
| 265 | "done ; " \ |
| 266 | "done ; " \ |
| 267 | "done; " \ |
| 268 | "setenv stdout serial,vga ; " \ |
| 269 | "echo ; echo 6x_bootscript not found ; " \ |
| 270 | "echo ; echo serial console at 115200, 8N1 ; echo ; " \ |
| 271 | "echo details at http://boundarydevices.com/6q_bootscript ; " \ |
| 272 | "setenv stdout serial\0" \ |
| 273 | "upgradeu=for dtype in " CONFIG_DRIVE_TYPES \ |
| 274 | "; do " \ |
| 275 | "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ |
| 276 | "for fs in fat ext2 ; do " \ |
| 277 | "${fs}load ${dtype} ${disk}:1 10008000 " \ |
| 278 | "/6x_upgrade " \ |
| 279 | "&& source 10008000 ; " \ |
| 280 | "done ; " \ |
| 281 | "done ; " \ |
| 282 | "done\0" \ |
| 283 | |
Fabio Estevam | 1fd6092 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 284 | #endif |
Eric Nelson | e5b3a50 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 285 | /* Miscellaneous configurable options */ |
| 286 | #define CONFIG_SYS_LONGHELP |
| 287 | #define CONFIG_SYS_HUSH_PARSER |
| 288 | #define CONFIG_SYS_PROMPT "U-Boot > " |
| 289 | #define CONFIG_AUTO_COMPLETE |
| 290 | #define CONFIG_SYS_CBSIZE 1024 |
| 291 | |
| 292 | /* Print Buffer Size */ |
| 293 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 294 | #define CONFIG_SYS_MAXARGS 16 |
| 295 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 296 | |
| 297 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
| 298 | #define CONFIG_SYS_MEMTEST_END 0x10010000 |
| 299 | #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000 |
| 300 | |
| 301 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 302 | #define CONFIG_SYS_HZ 1000 |
| 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 | 1fd6092 | 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 | e5b3a50 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 327 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
Fabio Estevam | 1fd6092 | 2013-07-26 11:37:17 -0300 | [diff] [blame] | 328 | #endif |
Eric Nelson | e5b3a50 | 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 | e5b3a50 | 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 | 9edd3ba | 2013-06-06 10:39:26 -0700 | [diff] [blame] | 354 | #define CONFIG_CMD_BOOTZ |
Robert Winkler | bd76bdd | 2013-06-06 10:39:27 -0700 | [diff] [blame] | 355 | #define CONFIG_SUPPORT_RAW_INITRD |
Robert Winkler | 6bced72 | 2013-06-06 10:39:28 -0700 | [diff] [blame] | 356 | #define CONFIG_CMD_FS_GENERIC |
Robert Winkler | 9edd3ba | 2013-06-06 10:39:26 -0700 | [diff] [blame] | 357 | |
Eric Nelson | e5b3a50 | 2013-03-11 08:44:53 +0000 | [diff] [blame] | 358 | #endif /* __CONFIG_H */ |