Fabio Estevam | 57ca432 | 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 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __CONFIG_H |
| 10 | #define __CONFIG_H |
| 11 | |
| 12 | #include <asm/arch/imx-regs.h> |
Fabio Estevam | 694c3bc | 2014-04-11 08:39:43 -0300 | [diff] [blame] | 13 | #include <asm/imx-common/gpio.h> |
Alexey Brodkin | 1ace402 | 2014-02-26 17:47:58 +0400 | [diff] [blame] | 14 | #include <linux/sizes.h> |
Fabio Estevam | a6bbee6 | 2014-01-09 08:57:12 -0200 | [diff] [blame] | 15 | #include "mx6_common.h" |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 16 | |
| 17 | #define CONFIG_MX6 |
| 18 | #define CONFIG_DISPLAY_CPUINFO |
| 19 | #define CONFIG_DISPLAY_BOARDINFO |
| 20 | |
| 21 | #define MACH_TYPE_MX6SLEVK 4307 |
| 22 | #define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK |
| 23 | |
| 24 | #define CONFIG_CMDLINE_TAG |
| 25 | #define CONFIG_SETUP_MEMORY_TAGS |
| 26 | #define CONFIG_INITRD_TAG |
| 27 | #define CONFIG_REVISION_TAG |
| 28 | |
Ye.Li | 4c97f16 | 2014-09-09 14:51:58 +0800 | [diff] [blame] | 29 | #define CONFIG_SYS_GENERIC_BOARD |
| 30 | |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 31 | /* Size of malloc() pool */ |
| 32 | #define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M) |
| 33 | |
| 34 | #define CONFIG_BOARD_EARLY_INIT_F |
| 35 | #define CONFIG_MXC_GPIO |
| 36 | |
| 37 | #define CONFIG_MXC_UART |
| 38 | #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR |
| 39 | |
| 40 | /* MMC Configs */ |
| 41 | #define CONFIG_FSL_ESDHC |
| 42 | #define CONFIG_FSL_USDHC |
Peng Fan | 08129d6 | 2014-09-15 14:59:18 +0800 | [diff] [blame] | 43 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 44 | |
| 45 | #define CONFIG_MMC |
| 46 | #define CONFIG_CMD_MMC |
| 47 | #define CONFIG_GENERIC_MMC |
| 48 | #define CONFIG_CMD_FAT |
| 49 | #define CONFIG_DOS_PARTITION |
| 50 | |
Peng Fan | c820090 | 2015-02-12 09:36:28 +0800 | [diff] [blame] | 51 | /* I2C Configs */ |
| 52 | #define CONFIG_CMD_I2C |
| 53 | #define CONFIG_SYS_I2C |
| 54 | #define CONFIG_SYS_I2C_MXC |
York Sun | f8cb101 | 2015-03-20 10:20:40 -0700 | [diff] [blame^] | 55 | #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ |
Peng Fan | c820090 | 2015-02-12 09:36:28 +0800 | [diff] [blame] | 56 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 57 | |
| 58 | /* PMIC */ |
| 59 | #define CONFIG_POWER |
| 60 | #define CONFIG_POWER_I2C |
| 61 | #define CONFIG_POWER_PFUZE100 |
| 62 | #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 |
| 63 | |
Fabio Estevam | 31f0796 | 2013-09-13 00:36:28 -0300 | [diff] [blame] | 64 | #define CONFIG_CMD_PING |
| 65 | #define CONFIG_CMD_DHCP |
| 66 | #define CONFIG_CMD_MII |
| 67 | #define CONFIG_CMD_NET |
| 68 | #define CONFIG_FEC_MXC |
| 69 | #define CONFIG_MII |
| 70 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 71 | #define CONFIG_FEC_XCV_TYPE RMII |
| 72 | #define CONFIG_ETHPRIME "FEC" |
| 73 | #define CONFIG_FEC_MXC_PHYADDR 0 |
| 74 | |
| 75 | #define CONFIG_PHYLIB |
| 76 | #define CONFIG_PHY_SMSC |
| 77 | |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 78 | /* allow to overwrite serial and ethaddr */ |
| 79 | #define CONFIG_ENV_OVERWRITE |
| 80 | #define CONFIG_CONS_INDEX 1 |
| 81 | #define CONFIG_BAUDRATE 115200 |
| 82 | |
| 83 | /* Command definition */ |
| 84 | #include <config_cmd_default.h> |
| 85 | |
| 86 | #undef CONFIG_CMD_IMLS |
| 87 | |
| 88 | #define CONFIG_BOOTDELAY 3 |
| 89 | |
Fabio Estevam | af0a37f | 2013-05-23 13:57:18 +0000 | [diff] [blame] | 90 | #define CONFIG_LOADADDR 0x82000000 |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 91 | #define CONFIG_SYS_TEXT_BASE 0x87800000 |
| 92 | |
| 93 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 94 | "script=boot.scr\0" \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 95 | "image=zImage\0" \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 96 | "console=ttymxc0\0" \ |
| 97 | "fdt_high=0xffffffff\0" \ |
| 98 | "initrd_high=0xffffffff\0" \ |
| 99 | "fdt_file=imx6sl-evk.dtb\0" \ |
Fabio Estevam | 6fc049b | 2014-01-22 12:23:32 -0200 | [diff] [blame] | 100 | "fdt_addr=0x88000000\0" \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 101 | "boot_fdt=try\0" \ |
| 102 | "ip_dyn=yes\0" \ |
Ye.Li | adc5a66 | 2014-11-04 15:26:04 +0800 | [diff] [blame] | 103 | "mmcdev=1\0" \ |
Otavio Salvador | 94aeb8a | 2013-06-28 18:52:41 -0300 | [diff] [blame] | 104 | "mmcpart=1\0" \ |
| 105 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 106 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 107 | "root=${mmcroot}\0" \ |
| 108 | "loadbootscript=" \ |
| 109 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 110 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 111 | "source\0" \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 112 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 113 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 114 | "mmcboot=echo Booting from mmc ...; " \ |
| 115 | "run mmcargs; " \ |
| 116 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 117 | "if run loadfdt; then " \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 118 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 119 | "else " \ |
| 120 | "if test ${boot_fdt} = try; then " \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 121 | "bootz; " \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 122 | "else " \ |
| 123 | "echo WARN: Cannot load the DT; " \ |
| 124 | "fi; " \ |
| 125 | "fi; " \ |
| 126 | "else " \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 127 | "bootz; " \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 128 | "fi;\0" \ |
| 129 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 130 | "root=/dev/nfs " \ |
| 131 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 132 | "netboot=echo Booting from net ...; " \ |
| 133 | "run netargs; " \ |
| 134 | "if test ${ip_dyn} = yes; then " \ |
| 135 | "setenv get_cmd dhcp; " \ |
| 136 | "else " \ |
| 137 | "setenv get_cmd tftp; " \ |
| 138 | "fi; " \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 139 | "${get_cmd} ${image}; " \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 140 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 141 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 142 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 143 | "else " \ |
| 144 | "if test ${boot_fdt} = try; then " \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 145 | "bootz; " \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 146 | "else " \ |
| 147 | "echo WARN: Cannot load the DT; " \ |
| 148 | "fi; " \ |
| 149 | "fi; " \ |
| 150 | "else " \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 151 | "bootz; " \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 152 | "fi;\0" |
| 153 | |
| 154 | #define CONFIG_BOOTCOMMAND \ |
| 155 | "mmc dev ${mmcdev};" \ |
| 156 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 157 | "if run loadbootscript; then " \ |
| 158 | "run bootscript; " \ |
| 159 | "else " \ |
Otavio Salvador | 8e184a5 | 2014-01-16 19:58:04 -0200 | [diff] [blame] | 160 | "if run loadimage; then " \ |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 161 | "run mmcboot; " \ |
| 162 | "else run netboot; " \ |
| 163 | "fi; " \ |
| 164 | "fi; " \ |
| 165 | "else run netboot; fi" |
| 166 | |
| 167 | /* Miscellaneous configurable options */ |
| 168 | #define CONFIG_SYS_LONGHELP |
| 169 | #define CONFIG_SYS_HUSH_PARSER |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 170 | #define CONFIG_AUTO_COMPLETE |
| 171 | #define CONFIG_SYS_CBSIZE 256 |
| 172 | |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 173 | #define CONFIG_SYS_MAXARGS 16 |
| 174 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 175 | |
| 176 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
| 177 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M) |
| 178 | |
| 179 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 180 | |
| 181 | #define CONFIG_CMDLINE_EDITING |
| 182 | #define CONFIG_STACKSIZE SZ_128K |
| 183 | |
| 184 | /* Physical Memory Map */ |
| 185 | #define CONFIG_NR_DRAM_BANKS 1 |
| 186 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 187 | #define PHYS_SDRAM_SIZE SZ_1G |
| 188 | |
| 189 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 190 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 191 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 192 | |
| 193 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 194 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 195 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 196 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 197 | |
| 198 | /* FLASH and environment organization */ |
| 199 | #define CONFIG_SYS_NO_FLASH |
| 200 | |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 201 | #define CONFIG_ENV_SIZE SZ_8K |
Peng Fan | be2fde6 | 2014-12-30 11:14:51 +0800 | [diff] [blame] | 202 | |
| 203 | #if defined CONFIG_SYS_BOOT_SPINOR |
| 204 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 205 | #define CONFIG_ENV_OFFSET (768 * 1024) |
| 206 | #define CONFIG_ENV_SECT_SIZE (64 * 1024) |
| 207 | #define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS |
| 208 | #define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS |
| 209 | #define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE |
| 210 | #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED |
| 211 | #else |
Ye.Li | 0da040b | 2015-01-16 16:47:44 +0800 | [diff] [blame] | 212 | #define CONFIG_ENV_OFFSET (8 * SZ_64K) |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 213 | #define CONFIG_ENV_IS_IN_MMC |
Peng Fan | be2fde6 | 2014-12-30 11:14:51 +0800 | [diff] [blame] | 214 | #endif |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 215 | |
| 216 | #define CONFIG_OF_LIBFDT |
| 217 | #define CONFIG_CMD_BOOTZ |
| 218 | |
| 219 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 220 | #define CONFIG_CMD_CACHE |
| 221 | #endif |
| 222 | |
Fabio Estevam | 694c3bc | 2014-04-11 08:39:43 -0300 | [diff] [blame] | 223 | #define CONFIG_CMD_SF |
| 224 | #ifdef CONFIG_CMD_SF |
| 225 | #define CONFIG_SPI_FLASH |
| 226 | #define CONFIG_SPI_FLASH_STMICRO |
| 227 | #define CONFIG_MXC_SPI |
| 228 | #define CONFIG_SF_DEFAULT_BUS 0 |
Nikita Kiryanov | 155fa9a | 2014-08-20 15:08:50 +0300 | [diff] [blame] | 229 | #define CONFIG_SF_DEFAULT_CS 0 |
Fabio Estevam | 694c3bc | 2014-04-11 08:39:43 -0300 | [diff] [blame] | 230 | #define CONFIG_SF_DEFAULT_SPEED 20000000 |
| 231 | #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 |
| 232 | #endif |
| 233 | |
Peng Fan | 3b9c1a5 | 2014-11-10 08:50:41 +0800 | [diff] [blame] | 234 | /* USB Configs */ |
| 235 | #define CONFIG_CMD_USB |
| 236 | #ifdef CONFIG_CMD_USB |
| 237 | #define CONFIG_USB_EHCI |
| 238 | #define CONFIG_USB_EHCI_MX6 |
| 239 | #define CONFIG_USB_STORAGE |
| 240 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 241 | #define CONFIG_USB_HOST_ETHER |
| 242 | #define CONFIG_USB_ETHER_ASIX |
| 243 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 244 | #define CONFIG_MXC_USB_FLAGS 0 |
| 245 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 246 | #endif |
| 247 | |
Ye.Li | 36255d6 | 2014-10-30 18:30:54 +0800 | [diff] [blame] | 248 | #define CONFIG_SYS_FSL_USDHC_NUM 3 |
| 249 | #if defined(CONFIG_ENV_IS_IN_MMC) |
| 250 | #define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC2*/ |
| 251 | #endif |
| 252 | |
Peng Fan | 27d3608 | 2015-03-10 15:33:25 +0800 | [diff] [blame] | 253 | #define CONFIG_IMX6_THERMAL |
| 254 | |
| 255 | #define CONFIG_CMD_FUSE |
| 256 | #if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL) |
| 257 | #define CONFIG_MXC_OCOTP |
| 258 | #endif |
| 259 | |
Fabio Estevam | 57ca432 | 2013-04-10 09:32:58 +0000 | [diff] [blame] | 260 | #endif /* __CONFIG_H */ |