Fabio Estevam | 26e9c97 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * Configuration settings for the Freescale i.MX6SL EVK board. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; either version 2 of |
| 9 | * the License, or (at your option) any later version. |
| 10 | */ |
| 11 | |
| 12 | #ifndef __CONFIG_H |
| 13 | #define __CONFIG_H |
| 14 | |
| 15 | #include <asm/arch/imx-regs.h> |
| 16 | #include <asm/sizes.h> |
| 17 | |
| 18 | #define CONFIG_MX6 |
| 19 | #define CONFIG_DISPLAY_CPUINFO |
| 20 | #define CONFIG_DISPLAY_BOARDINFO |
| 21 | |
| 22 | #define MACH_TYPE_MX6SLEVK 4307 |
| 23 | #define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK |
| 24 | |
| 25 | #define CONFIG_CMDLINE_TAG |
| 26 | #define CONFIG_SETUP_MEMORY_TAGS |
| 27 | #define CONFIG_INITRD_TAG |
| 28 | #define CONFIG_REVISION_TAG |
| 29 | |
| 30 | /* Size of malloc() pool */ |
| 31 | #define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M) |
| 32 | |
| 33 | #define CONFIG_BOARD_EARLY_INIT_F |
| 34 | #define CONFIG_MXC_GPIO |
| 35 | |
| 36 | #define CONFIG_MXC_UART |
| 37 | #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR |
| 38 | |
| 39 | /* MMC Configs */ |
| 40 | #define CONFIG_FSL_ESDHC |
| 41 | #define CONFIG_FSL_USDHC |
| 42 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 43 | |
| 44 | #define CONFIG_MMC |
| 45 | #define CONFIG_CMD_MMC |
| 46 | #define CONFIG_GENERIC_MMC |
| 47 | #define CONFIG_CMD_FAT |
| 48 | #define CONFIG_DOS_PARTITION |
| 49 | |
| 50 | /* allow to overwrite serial and ethaddr */ |
| 51 | #define CONFIG_ENV_OVERWRITE |
| 52 | #define CONFIG_CONS_INDEX 1 |
| 53 | #define CONFIG_BAUDRATE 115200 |
| 54 | |
| 55 | /* Command definition */ |
| 56 | #include <config_cmd_default.h> |
| 57 | |
| 58 | #undef CONFIG_CMD_IMLS |
| 59 | |
| 60 | #define CONFIG_BOOTDELAY 3 |
| 61 | |
Fabio Estevam | a0c2b8a | 2013-05-23 13:57:18 +0000 | [diff] [blame] | 62 | #define CONFIG_LOADADDR 0x82000000 |
Fabio Estevam | 26e9c97 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 63 | #define CONFIG_SYS_TEXT_BASE 0x87800000 |
| 64 | |
| 65 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 66 | "script=boot.scr\0" \ |
| 67 | "uimage=uImage\0" \ |
| 68 | "console=ttymxc0\0" \ |
| 69 | "fdt_high=0xffffffff\0" \ |
| 70 | "initrd_high=0xffffffff\0" \ |
| 71 | "fdt_file=imx6sl-evk.dtb\0" \ |
| 72 | "fdt_addr=0x81000000\0" \ |
| 73 | "boot_fdt=try\0" \ |
| 74 | "ip_dyn=yes\0" \ |
| 75 | "mmcdev=0\0" \ |
| 76 | "mmcpart=2\0" \ |
| 77 | "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ |
| 78 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 79 | "root=${mmcroot}\0" \ |
| 80 | "loadbootscript=" \ |
| 81 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 82 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 83 | "source\0" \ |
| 84 | "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ |
| 85 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 86 | "mmcboot=echo Booting from mmc ...; " \ |
| 87 | "run mmcargs; " \ |
| 88 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 89 | "if run loadfdt; then " \ |
| 90 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 91 | "else " \ |
| 92 | "if test ${boot_fdt} = try; then " \ |
| 93 | "bootm; " \ |
| 94 | "else " \ |
| 95 | "echo WARN: Cannot load the DT; " \ |
| 96 | "fi; " \ |
| 97 | "fi; " \ |
| 98 | "else " \ |
| 99 | "bootm; " \ |
| 100 | "fi;\0" \ |
| 101 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 102 | "root=/dev/nfs " \ |
| 103 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 104 | "netboot=echo Booting from net ...; " \ |
| 105 | "run netargs; " \ |
| 106 | "if test ${ip_dyn} = yes; then " \ |
| 107 | "setenv get_cmd dhcp; " \ |
| 108 | "else " \ |
| 109 | "setenv get_cmd tftp; " \ |
| 110 | "fi; " \ |
| 111 | "${get_cmd} ${uimage}; " \ |
| 112 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 113 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 114 | "bootm ${loadaddr} - ${fdt_addr}; " \ |
| 115 | "else " \ |
| 116 | "if test ${boot_fdt} = try; then " \ |
| 117 | "bootm; " \ |
| 118 | "else " \ |
| 119 | "echo WARN: Cannot load the DT; " \ |
| 120 | "fi; " \ |
| 121 | "fi; " \ |
| 122 | "else " \ |
| 123 | "bootm; " \ |
| 124 | "fi;\0" |
| 125 | |
| 126 | #define CONFIG_BOOTCOMMAND \ |
| 127 | "mmc dev ${mmcdev};" \ |
| 128 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 129 | "if run loadbootscript; then " \ |
| 130 | "run bootscript; " \ |
| 131 | "else " \ |
| 132 | "if run loaduimage; then " \ |
| 133 | "run mmcboot; " \ |
| 134 | "else run netboot; " \ |
| 135 | "fi; " \ |
| 136 | "fi; " \ |
| 137 | "else run netboot; fi" |
| 138 | |
| 139 | /* Miscellaneous configurable options */ |
| 140 | #define CONFIG_SYS_LONGHELP |
| 141 | #define CONFIG_SYS_HUSH_PARSER |
| 142 | #define CONFIG_SYS_PROMPT "=> " |
| 143 | #define CONFIG_AUTO_COMPLETE |
| 144 | #define CONFIG_SYS_CBSIZE 256 |
| 145 | |
| 146 | /* Print Buffer Size */ |
| 147 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 148 | #define CONFIG_SYS_MAXARGS 16 |
| 149 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 150 | |
| 151 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
| 152 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M) |
| 153 | |
| 154 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 155 | #define CONFIG_SYS_HZ 1000 |
| 156 | |
| 157 | #define CONFIG_CMDLINE_EDITING |
| 158 | #define CONFIG_STACKSIZE SZ_128K |
| 159 | |
| 160 | /* Physical Memory Map */ |
| 161 | #define CONFIG_NR_DRAM_BANKS 1 |
| 162 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 163 | #define PHYS_SDRAM_SIZE SZ_1G |
| 164 | |
| 165 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 166 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 167 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 168 | |
| 169 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 170 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 171 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 172 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 173 | |
| 174 | /* FLASH and environment organization */ |
| 175 | #define CONFIG_SYS_NO_FLASH |
| 176 | |
| 177 | #define CONFIG_ENV_OFFSET (6 * SZ_64K) |
| 178 | #define CONFIG_ENV_SIZE SZ_8K |
| 179 | #define CONFIG_ENV_IS_IN_MMC |
| 180 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
| 181 | |
| 182 | #define CONFIG_OF_LIBFDT |
| 183 | #define CONFIG_CMD_BOOTZ |
| 184 | |
| 185 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 186 | #define CONFIG_CMD_CACHE |
| 187 | #endif |
| 188 | |
| 189 | #endif /* __CONFIG_H */ |