blob: dad49f96df4cd75e9eac4eff55c1ec2607597b2a [file] [log] [blame]
Fabio Estevam57ca4322013-04-10 09:32:58 +00001/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale i.MX6SL EVK board.
5 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Fabio Estevam57ca4322013-04-10 09:32:58 +00007 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12#include <asm/arch/imx-regs.h>
Fabio Estevam694c3bc2014-04-11 08:39:43 -030013#include <asm/imx-common/gpio.h>
Alexey Brodkin1ace4022014-02-26 17:47:58 +040014#include <linux/sizes.h>
Fabio Estevama6bbee62014-01-09 08:57:12 -020015#include "mx6_common.h"
Fabio Estevam57ca4322013-04-10 09:32:58 +000016
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.Li4c97f162014-09-09 14:51:58 +080029#define CONFIG_SYS_GENERIC_BOARD
30
Fabio Estevam57ca4322013-04-10 09:32:58 +000031/* 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 Fan08129d62014-09-15 14:59:18 +080043#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
Fabio Estevam57ca4322013-04-10 09:32:58 +000044
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 Fanc8200902015-02-12 09:36:28 +080051/* I2C Configs */
52#define CONFIG_CMD_I2C
53#define CONFIG_SYS_I2C
54#define CONFIG_SYS_I2C_MXC
55#define CONFIG_SYS_I2C_SPEED 100000
56
57/* PMIC */
58#define CONFIG_POWER
59#define CONFIG_POWER_I2C
60#define CONFIG_POWER_PFUZE100
61#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
62
Fabio Estevam31f07962013-09-13 00:36:28 -030063#define CONFIG_CMD_PING
64#define CONFIG_CMD_DHCP
65#define CONFIG_CMD_MII
66#define CONFIG_CMD_NET
67#define CONFIG_FEC_MXC
68#define CONFIG_MII
69#define IMX_FEC_BASE ENET_BASE_ADDR
70#define CONFIG_FEC_XCV_TYPE RMII
71#define CONFIG_ETHPRIME "FEC"
72#define CONFIG_FEC_MXC_PHYADDR 0
73
74#define CONFIG_PHYLIB
75#define CONFIG_PHY_SMSC
76
Fabio Estevam57ca4322013-04-10 09:32:58 +000077/* allow to overwrite serial and ethaddr */
78#define CONFIG_ENV_OVERWRITE
79#define CONFIG_CONS_INDEX 1
80#define CONFIG_BAUDRATE 115200
81
82/* Command definition */
83#include <config_cmd_default.h>
84
85#undef CONFIG_CMD_IMLS
86
87#define CONFIG_BOOTDELAY 3
88
Fabio Estevamaf0a37f2013-05-23 13:57:18 +000089#define CONFIG_LOADADDR 0x82000000
Fabio Estevam57ca4322013-04-10 09:32:58 +000090#define CONFIG_SYS_TEXT_BASE 0x87800000
91
92#define CONFIG_EXTRA_ENV_SETTINGS \
93 "script=boot.scr\0" \
Otavio Salvador8e184a52014-01-16 19:58:04 -020094 "image=zImage\0" \
Fabio Estevam57ca4322013-04-10 09:32:58 +000095 "console=ttymxc0\0" \
96 "fdt_high=0xffffffff\0" \
97 "initrd_high=0xffffffff\0" \
98 "fdt_file=imx6sl-evk.dtb\0" \
Fabio Estevam6fc049b2014-01-22 12:23:32 -020099 "fdt_addr=0x88000000\0" \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000100 "boot_fdt=try\0" \
101 "ip_dyn=yes\0" \
Ye.Liadc5a662014-11-04 15:26:04 +0800102 "mmcdev=1\0" \
Otavio Salvador94aeb8a2013-06-28 18:52:41 -0300103 "mmcpart=1\0" \
104 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000105 "mmcargs=setenv bootargs console=${console},${baudrate} " \
106 "root=${mmcroot}\0" \
107 "loadbootscript=" \
108 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
109 "bootscript=echo Running bootscript from mmc ...; " \
110 "source\0" \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200111 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000112 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
113 "mmcboot=echo Booting from mmc ...; " \
114 "run mmcargs; " \
115 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
116 "if run loadfdt; then " \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200117 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000118 "else " \
119 "if test ${boot_fdt} = try; then " \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200120 "bootz; " \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000121 "else " \
122 "echo WARN: Cannot load the DT; " \
123 "fi; " \
124 "fi; " \
125 "else " \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200126 "bootz; " \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000127 "fi;\0" \
128 "netargs=setenv bootargs console=${console},${baudrate} " \
129 "root=/dev/nfs " \
130 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
131 "netboot=echo Booting from net ...; " \
132 "run netargs; " \
133 "if test ${ip_dyn} = yes; then " \
134 "setenv get_cmd dhcp; " \
135 "else " \
136 "setenv get_cmd tftp; " \
137 "fi; " \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200138 "${get_cmd} ${image}; " \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000139 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
140 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200141 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000142 "else " \
143 "if test ${boot_fdt} = try; then " \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200144 "bootz; " \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000145 "else " \
146 "echo WARN: Cannot load the DT; " \
147 "fi; " \
148 "fi; " \
149 "else " \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200150 "bootz; " \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000151 "fi;\0"
152
153#define CONFIG_BOOTCOMMAND \
154 "mmc dev ${mmcdev};" \
155 "mmc dev ${mmcdev}; if mmc rescan; then " \
156 "if run loadbootscript; then " \
157 "run bootscript; " \
158 "else " \
Otavio Salvador8e184a52014-01-16 19:58:04 -0200159 "if run loadimage; then " \
Fabio Estevam57ca4322013-04-10 09:32:58 +0000160 "run mmcboot; " \
161 "else run netboot; " \
162 "fi; " \
163 "fi; " \
164 "else run netboot; fi"
165
166/* Miscellaneous configurable options */
167#define CONFIG_SYS_LONGHELP
168#define CONFIG_SYS_HUSH_PARSER
Fabio Estevam57ca4322013-04-10 09:32:58 +0000169#define CONFIG_AUTO_COMPLETE
170#define CONFIG_SYS_CBSIZE 256
171
Fabio Estevam57ca4322013-04-10 09:32:58 +0000172#define CONFIG_SYS_MAXARGS 16
173#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
174
175#define CONFIG_SYS_MEMTEST_START 0x80000000
176#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M)
177
178#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Fabio Estevam57ca4322013-04-10 09:32:58 +0000179
180#define CONFIG_CMDLINE_EDITING
181#define CONFIG_STACKSIZE SZ_128K
182
183/* Physical Memory Map */
184#define CONFIG_NR_DRAM_BANKS 1
185#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
186#define PHYS_SDRAM_SIZE SZ_1G
187
188#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
189#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
190#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
191
192#define CONFIG_SYS_INIT_SP_OFFSET \
193 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
194#define CONFIG_SYS_INIT_SP_ADDR \
195 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
196
197/* FLASH and environment organization */
198#define CONFIG_SYS_NO_FLASH
199
Fabio Estevam57ca4322013-04-10 09:32:58 +0000200#define CONFIG_ENV_SIZE SZ_8K
Peng Fanbe2fde62014-12-30 11:14:51 +0800201
202#if defined CONFIG_SYS_BOOT_SPINOR
203#define CONFIG_ENV_IS_IN_SPI_FLASH
204#define CONFIG_ENV_OFFSET (768 * 1024)
205#define CONFIG_ENV_SECT_SIZE (64 * 1024)
206#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
207#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
208#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
209#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
210#else
Ye.Li0da040b2015-01-16 16:47:44 +0800211#define CONFIG_ENV_OFFSET (8 * SZ_64K)
Fabio Estevam57ca4322013-04-10 09:32:58 +0000212#define CONFIG_ENV_IS_IN_MMC
Peng Fanbe2fde62014-12-30 11:14:51 +0800213#endif
Fabio Estevam57ca4322013-04-10 09:32:58 +0000214
215#define CONFIG_OF_LIBFDT
216#define CONFIG_CMD_BOOTZ
217
218#ifndef CONFIG_SYS_DCACHE_OFF
219#define CONFIG_CMD_CACHE
220#endif
221
Fabio Estevam694c3bc2014-04-11 08:39:43 -0300222#define CONFIG_CMD_SF
223#ifdef CONFIG_CMD_SF
224#define CONFIG_SPI_FLASH
225#define CONFIG_SPI_FLASH_STMICRO
226#define CONFIG_MXC_SPI
227#define CONFIG_SF_DEFAULT_BUS 0
Nikita Kiryanov155fa9a2014-08-20 15:08:50 +0300228#define CONFIG_SF_DEFAULT_CS 0
Fabio Estevam694c3bc2014-04-11 08:39:43 -0300229#define CONFIG_SF_DEFAULT_SPEED 20000000
230#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
231#endif
232
Peng Fan3b9c1a52014-11-10 08:50:41 +0800233/* USB Configs */
234#define CONFIG_CMD_USB
235#ifdef CONFIG_CMD_USB
236#define CONFIG_USB_EHCI
237#define CONFIG_USB_EHCI_MX6
238#define CONFIG_USB_STORAGE
239#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
240#define CONFIG_USB_HOST_ETHER
241#define CONFIG_USB_ETHER_ASIX
242#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
243#define CONFIG_MXC_USB_FLAGS 0
244#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
245#endif
246
Ye.Li36255d62014-10-30 18:30:54 +0800247#define CONFIG_SYS_FSL_USDHC_NUM 3
248#if defined(CONFIG_ENV_IS_IN_MMC)
249#define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC2*/
250#endif
251
Peng Fan27d36082015-03-10 15:33:25 +0800252#define CONFIG_IMX6_THERMAL
253
254#define CONFIG_CMD_FUSE
255#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
256#define CONFIG_MXC_OCOTP
257#endif
258
Fabio Estevam57ca4322013-04-10 09:32:58 +0000259#endif /* __CONFIG_H */