blob: 76cfef123cd13d5adc5f2b51579eb5023980c3c4 [file] [log] [blame]
Jason Liu02591102011-11-25 00:18:05 +00001/*
2 * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale i.MX6Q Armadillo2 board.
5 *
Wolfgang Denkbd8ec7e2013-10-07 13:07:26 +02006 * SPDX-License-Identifier: GPL-2.0+
Jason Liu02591102011-11-25 00:18:05 +00007 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
Troy Kiskyd8c2fd02012-10-23 10:57:47 +000012#define CONFIG_MX6
Stephen Warren57ab23f2013-02-26 12:28:29 +000013
14#include "mx6_common.h"
15
Jason Liu02591102011-11-25 00:18:05 +000016#define CONFIG_DISPLAY_CPUINFO
17#define CONFIG_DISPLAY_BOARDINFO
18
19#include <asm/arch/imx-regs.h>
20
21#define CONFIG_CMDLINE_TAG
22#define CONFIG_SETUP_MEMORY_TAGS
23#define CONFIG_INITRD_TAG
24
Ye.Li21435be2014-09-09 14:51:57 +080025#define CONFIG_SYS_GENERIC_BOARD
26
Jason Liu02591102011-11-25 00:18:05 +000027/* Size of malloc() pool */
28#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
29
Jason Liu02591102011-11-25 00:18:05 +000030#define CONFIG_BOARD_EARLY_INIT_F
31#define CONFIG_MXC_GPIO
32
33#define CONFIG_MXC_UART
34#define CONFIG_MXC_UART_BASE UART4_BASE
35
36/* MMC Configs */
37#define CONFIG_FSL_ESDHC
38#define CONFIG_FSL_USDHC
Peng Fanf8e35cc2014-09-15 14:59:17 +080039#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR
Jason Liu02591102011-11-25 00:18:05 +000040#define CONFIG_SYS_FSL_USDHC_NUM 2
41
42#define CONFIG_MMC
43#define CONFIG_CMD_MMC
44#define CONFIG_GENERIC_MMC
Stephen Warrend9117752012-11-06 11:27:27 +000045#define CONFIG_BOUNCE_BUFFER
Jason Liu02591102011-11-25 00:18:05 +000046#define CONFIG_CMD_FAT
47#define CONFIG_DOS_PARTITION
48
Jason Liu0cdd1232011-12-16 05:17:08 +000049#define CONFIG_CMD_PING
50#define CONFIG_CMD_DHCP
51#define CONFIG_CMD_MII
52#define CONFIG_CMD_NET
53#define CONFIG_FEC_MXC
54#define CONFIG_MII
55#define IMX_FEC_BASE ENET_BASE_ADDR
56#define CONFIG_FEC_XCV_TYPE RGMII
57#define CONFIG_FEC_MXC_PHYADDR 0
58
Jason Liu02591102011-11-25 00:18:05 +000059/* allow to overwrite serial and ethaddr */
60#define CONFIG_ENV_OVERWRITE
61#define CONFIG_CONS_INDEX 1
62#define CONFIG_BAUDRATE 115200
Jason Liu02591102011-11-25 00:18:05 +000063
64/* Command definition */
65#include <config_cmd_default.h>
66
67#undef CONFIG_CMD_IMLS
Jason Liu02591102011-11-25 00:18:05 +000068
69#define CONFIG_BOOTDELAY 3
70
Ye.Li33c43962014-09-09 10:16:57 +080071#define CONFIG_LOADADDR 0x12000000
Jason Liu02591102011-11-25 00:18:05 +000072#define CONFIG_SYS_TEXT_BASE 0x17800000
73
74#define CONFIG_EXTRA_ENV_SETTINGS \
75 "script=boot.scr\0" \
Otavio Salvadorcb6e0bd2014-01-16 19:58:02 -020076 "image=zImage\0" \
Jason Liu02591102011-11-25 00:18:05 +000077 "console=ttymxc3\0" \
Ye.Li33c43962014-09-09 10:16:57 +080078 "fdt_file=imx6q-arm2.dtb\0" \
79 "fdt_addr=0x18000000\0" \
Dirk Behme10a78bf2012-01-12 23:49:24 +000080 "fdt_high=0xffffffff\0" \
81 "initrd_high=0xffffffff\0" \
Ye.Li33c43962014-09-09 10:16:57 +080082 "boot_fdt=try\0" \
83 "ip_dyn=yes\0" \
Jason Liu02591102011-11-25 00:18:05 +000084 "mmcdev=1\0" \
Ye.Lie57dcf62014-09-09 10:16:58 +080085 "mmcpart=1\0" \
86 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Jason Liu02591102011-11-25 00:18:05 +000087 "mmcargs=setenv bootargs console=${console},${baudrate} " \
88 "root=${mmcroot}\0" \
89 "loadbootscript=" \
90 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
91 "bootscript=echo Running bootscript from mmc ...; " \
92 "source\0" \
Otavio Salvadorcb6e0bd2014-01-16 19:58:02 -020093 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
Ye.Li33c43962014-09-09 10:16:57 +080094 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
Jason Liu02591102011-11-25 00:18:05 +000095 "mmcboot=echo Booting from mmc ...; " \
96 "run mmcargs; " \
Ye.Li33c43962014-09-09 10:16:57 +080097 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
98 "if run loadfdt; then " \
99 "bootz ${loadaddr} - ${fdt_addr}; " \
100 "else " \
101 "if test ${boot_fdt} = try; then " \
102 "bootz; " \
103 "else " \
104 "echo WARN: Cannot load the DT; " \
105 "fi; " \
106 "fi; " \
107 "else " \
108 "bootz; " \
109 "fi;\0" \
Jason Liu02591102011-11-25 00:18:05 +0000110 "netargs=setenv bootargs console=${console},${baudrate} " \
111 "root=/dev/nfs " \
112 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
113 "netboot=echo Booting from net ...; " \
114 "run netargs; " \
Ye.Li33c43962014-09-09 10:16:57 +0800115 "if test ${ip_dyn} = yes; then " \
116 "setenv get_cmd dhcp; " \
117 "else " \
118 "setenv get_cmd tftp; " \
119 "fi; " \
120 "${get_cmd} ${image}; " \
121 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
122 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
123 "bootz ${loadaddr} - ${fdt_addr}; " \
124 "else " \
125 "if test ${boot_fdt} = try; then " \
126 "bootz; " \
127 "else " \
128 "echo WARN: Cannot load the DT; " \
129 "fi; " \
130 "fi; " \
131 "else " \
132 "bootz; " \
133 "fi;\0"
Jason Liu02591102011-11-25 00:18:05 +0000134
135#define CONFIG_BOOTCOMMAND \
136 "mmc dev ${mmcdev};" \
Andrew Bradforde1c7c8a2012-10-01 05:06:52 +0000137 "mmc dev ${mmcdev}; if mmc rescan; then " \
Jason Liu02591102011-11-25 00:18:05 +0000138 "if run loadbootscript; then " \
139 "run bootscript; " \
140 "else " \
Otavio Salvadorcb6e0bd2014-01-16 19:58:02 -0200141 "if run loadimage; then " \
Jason Liu02591102011-11-25 00:18:05 +0000142 "run mmcboot; " \
143 "else run netboot; " \
144 "fi; " \
145 "fi; " \
146 "else run netboot; fi"
147
148#define CONFIG_ARP_TIMEOUT 200UL
149
150/* Miscellaneous configurable options */
151#define CONFIG_SYS_LONGHELP
152#define CONFIG_SYS_HUSH_PARSER
Jason Liu02591102011-11-25 00:18:05 +0000153#define CONFIG_AUTO_COMPLETE
154#define CONFIG_SYS_CBSIZE 256
155
156/* Print Buffer Size */
157#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
158#define CONFIG_SYS_MAXARGS 16
159#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
160
161#define CONFIG_SYS_MEMTEST_START 0x10000000
162#define CONFIG_SYS_MEMTEST_END 0x10010000
163
164#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Jason Liu02591102011-11-25 00:18:05 +0000165
166#define CONFIG_CMDLINE_EDITING
Jason Liu02591102011-11-25 00:18:05 +0000167
168/* Physical Memory Map */
169#define CONFIG_NR_DRAM_BANKS 1
170#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
Jason Liu02591102011-11-25 00:18:05 +0000171
172#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
173#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
174#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
175
176#define CONFIG_SYS_INIT_SP_OFFSET \
177 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
178#define CONFIG_SYS_INIT_SP_ADDR \
179 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
180
181/* FLASH and environment organization */
182#define CONFIG_SYS_NO_FLASH
183
184#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
185#define CONFIG_ENV_SIZE (8 * 1024)
186#define CONFIG_ENV_IS_IN_MMC
187#define CONFIG_SYS_MMC_ENV_DEV 1
188
189#define CONFIG_OF_LIBFDT
Fabio Estevam3368a942012-04-23 06:31:17 +0000190#define CONFIG_CMD_BOOTZ
Jason Liu02591102011-11-25 00:18:05 +0000191
Peng Fan076d2db2014-12-02 09:55:28 +0800192/* USB Configs */
193#define CONFIG_CMD_USB
194#ifdef CONFIG_CMD_USB
195#define CONFIG_USB_EHCI
196#define CONFIG_USB_EHCI_MX6
197#define CONFIG_USB_STORAGE
198#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
199#define CONFIG_USB_HOST_ETHER
200#define CONFIG_USB_ETHER_ASIX
201#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
202#define CONFIG_MXC_USB_FLAGS 0
203#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
204#endif
205
Jason Liu02591102011-11-25 00:18:05 +0000206#endif /* __CONFIG_H */