blob: 0f3621a41b24bc17b5ceffa6139eaee0dc999741 [file] [log] [blame]
Marek Vasut408368f2014-10-24 23:39:07 +02001/*
2 * Configuration settings for the Novena U-boot.
3 *
4 * Copyright (C) 2014 Marek Vasut <marex@denx.de>
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12/* System configurations */
13#define CONFIG_MX6
14#define CONFIG_BOARD_EARLY_INIT_F
15#define CONFIG_MISC_INIT_R
16#define CONFIG_DISPLAY_BOARDINFO
17#define CONFIG_DISPLAY_CPUINFO
18#define CONFIG_DOS_PARTITION
19#define CONFIG_FAT_WRITE
20#define CONFIG_FIT
21#define CONFIG_KEYBOARD
22#define CONFIG_MXC_GPIO
23#define CONFIG_OF_LIBFDT
24#define CONFIG_REGEX
25#define CONFIG_SYS_GENERIC_BOARD
26#define CONFIG_SYS_NO_FLASH
27
28#include "configs/mx6_common.h"
29#include <asm/arch/imx-regs.h>
30#include <asm/imx-common/gpio.h>
31#include <config_cmd_default.h>
32
33/* U-Boot Commands */
34#define CONFIG_CMD_ASKENV
35#define CONFIG_CMD_BMODE
36#define CONFIG_CMD_BOOTZ
37#define CONFIG_CMD_CACHE
38#define CONFIG_CMD_DHCP
39#define CONFIG_CMD_EEPROM
40#define CONFIG_CMD_EXT4
41#define CONFIG_CMD_EXT4_WRITE
42#define CONFIG_CMD_FAT
43#define CONFIG_CMD_FS_GENERIC
44#define CONFIG_CMD_I2C
45#define CONFIG_CMD_FUSE
46#define CONFIG_CMD_MII
47#define CONFIG_CMD_MMC
48#define CONFIG_CMD_NET
49#define CONFIG_CMD_PCI
50#define CONFIG_CMD_PING
51#define CONFIG_CMD_SATA
52#define CONFIG_CMD_SETEXPR
53#define CONFIG_CMD_TIME
54#define CONFIG_CMD_USB
55#define CONFIG_VIDEO
56
57/* U-Boot general configurations */
58#define CONFIG_SYS_LONGHELP
59#define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */
60#define CONFIG_SYS_PBSIZE \
61 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
62 /* Print buffer size */
63#define CONFIG_SYS_MAXARGS 32 /* Max number of command args */
64#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
65 /* Boot argument buffer size */
66#define CONFIG_VERSION_VARIABLE /* U-BOOT version */
67#define CONFIG_AUTO_COMPLETE /* Command auto complete */
68#define CONFIG_CMDLINE_EDITING /* Command history etc */
69#define CONFIG_SYS_HUSH_PARSER
70
71/* U-Boot environment */
72#define CONFIG_ENV_OVERWRITE
73#define CONFIG_ENV_SIZE (16 * 1024)
74/*
75 * Environment is on MMC, starting at offset 512KiB from start of the card.
76 * Please place first partition at offset 1MiB from the start of the card
77 * as recommended by GNU/fdisk. See below for details:
78 * http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/disc-partition-alignment.html
79 */
80#ifdef CONFIG_CMD_MMC
81#define CONFIG_ENV_IS_IN_MMC
82#define CONFIG_SYS_MMC_ENV_DEV 0
83#define CONFIG_ENV_OFFSET (512 * 1024)
84#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
85#define CONFIG_ENV_OFFSET_REDUND \
86 (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
87#else
88#define CONFIG_ENV_IS_NOWHERE
89#endif
90
91/* Booting Linux */
92#define CONFIG_BOOTDELAY 5
93#define CONFIG_BOOTFILE "fitImage"
94#define CONFIG_BOOTARGS "console=ttymxc1,115200 "
95#define CONFIG_BOOTCOMMAND "run net_nfs"
96#define CONFIG_LOADADDR 0x18000000
97#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
98#define CONFIG_HOSTNAME novena
99
100/* Physical Memory Map */
101#define CONFIG_NR_DRAM_BANKS 1
102#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
103#define PHYS_SDRAM_SIZE 0xF0000000
104
105#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
106#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
107#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
108
109#define CONFIG_SYS_INIT_SP_OFFSET \
110 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
111#define CONFIG_SYS_INIT_SP_ADDR \
112 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
113
114#define CONFIG_SYS_MEMTEST_START 0x10000000
115#define CONFIG_SYS_MEMTEST_END 0x20000000
116
117#define CONFIG_SYS_MALLOC_LEN (64 * 1024 * 1024)
Marek Vasutc3b43932014-12-16 14:09:18 +0100118#define CONFIG_SYS_MALLOC_F_LEN (1 << 10)
Marek Vasut408368f2014-10-24 23:39:07 +0200119
120/* SPL */
121#define CONFIG_SPL_FAT_SUPPORT
122#define CONFIG_SPL_MMC_SUPPORT
123#include "imx6_spl.h" /* common IMX6 SPL configuration */
124
125#define CONFIG_CMDLINE_TAG
126#define CONFIG_SETUP_MEMORY_TAGS
127#define CONFIG_INITRD_TAG
128#define CONFIG_REVISION_TAG
129
130/* Ethernet Configuration */
131#ifdef CONFIG_CMD_NET
132#define CONFIG_FEC_MXC
133#define CONFIG_MII
134#define IMX_FEC_BASE ENET_BASE_ADDR
135#define CONFIG_FEC_XCV_TYPE RGMII
136#define CONFIG_ETHPRIME "FEC"
137#define CONFIG_FEC_MXC_PHYADDR 0x7
138#define CONFIG_PHYLIB
139#define CONFIG_PHY_MICREL
140#define CONFIG_PHY_MICREL_KSZ9021
141#define CONFIG_ARP_TIMEOUT 200UL
142#endif
143
144/* I2C */
145#define CONFIG_SYS_I2C
146#define CONFIG_SYS_I2C_MXC
147#define CONFIG_I2C_MULTI_BUS
148#define CONFIG_I2C_MXC
149#define CONFIG_SYS_I2C_SPEED 100000
150
151/* I2C EEPROM */
152#ifdef CONFIG_CMD_EEPROM
153#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
154#define CONFIG_SYS_SPD_BUS_NUM 2
155#endif
156
157/* MMC Configs */
158#ifdef CONFIG_CMD_MMC
159#define CONFIG_MMC
160#define CONFIG_GENERIC_MMC
161#define CONFIG_BOUNCE_BUFFER
162#define CONFIG_FSL_ESDHC
163#define CONFIG_FSL_USDHC
164#define CONFIG_SYS_FSL_ESDHC_ADDR 0
165#define CONFIG_SYS_FSL_USDHC_NUM 2
166#endif
167
168/* OCOTP Configs */
169#ifdef CONFIG_CMD_FUSE
170#define CONFIG_MXC_OCOTP
171#endif
172
173/* PCI express */
174#ifdef CONFIG_CMD_PCI
175#define CONFIG_PCI
176#define CONFIG_PCI_PNP
177#define CONFIG_PCI_SCAN_SHOW
178#define CONFIG_PCIE_IMX
179#define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(3, 29)
180#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(7, 12)
181#endif
182
183/* PMIC */
184#define CONFIG_POWER
185#define CONFIG_POWER_I2C
186#define CONFIG_POWER_PFUZE100
187#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
188
189/* SATA Configs */
190#ifdef CONFIG_CMD_SATA
191#define CONFIG_DWC_AHSATA
192#define CONFIG_SYS_SATA_MAX_DEVICE 1
193#define CONFIG_DWC_AHSATA_PORT_ID 0
194#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
195#define CONFIG_LBA48
196#define CONFIG_LIBATA
197#endif
198
199/* UART */
200#define CONFIG_MXC_UART
201#define CONFIG_MXC_UART_BASE UART2_BASE
202#define CONFIG_BAUDRATE 115200
203#define CONFIG_CONS_INDEX 1
204
205/* USB Configs */
206#ifdef CONFIG_CMD_USB
207#define CONFIG_USB_EHCI
208#define CONFIG_USB_EHCI_MX6
209#define CONFIG_USB_STORAGE
210#define CONFIG_USB_KEYBOARD
211#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
212#define CONFIG_USB_HOST_ETHER
213#define CONFIG_USB_ETHER_ASIX
214#define CONFIG_USB_ETHER_SMSC95XX
215#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
216#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
217#define CONFIG_MXC_USB_FLAGS 0
218/* Gadget part */
219#define CONFIG_CI_UDC
220#define CONFIG_USBD_HS
221#define CONFIG_USB_GADGET_DUALSPEED
222#define CONFIG_USB_ETHER
223#define CONFIG_USB_ETH_CDC
224#define CONFIG_NETCONSOLE
225#endif
226
227/* Video output */
228#ifdef CONFIG_VIDEO
229#define CONFIG_VIDEO
230#define CONFIG_VIDEO_IPUV3
231#define CONFIG_CFB_CONSOLE
232#define CONFIG_VGA_AS_SINGLE_DEVICE
233#define CONFIG_SYS_CONSOLE_IS_IN_ENV
234#define CONFIG_VIDEO_BMP_RLE8
235#define CONFIG_SPLASH_SCREEN
236#define CONFIG_BMP_16BPP
237#define CONFIG_VIDEO_LOGO
238#define CONFIG_IPUV3_CLK 260000000
239#define CONFIG_CMD_HDMIDETECT
240#define CONFIG_CONSOLE_MUX
241#define CONFIG_IMX_HDMI
242#define CONFIG_IMX_VIDEO_SKIP
243#endif
244
245/* Extra U-Boot environment. */
246#define CONFIG_EXTRA_ENV_SETTINGS \
247 "fdt_high=0xffffffff\0" \
248 "initrd_high=0xffffffff\0" \
249 "consdev=ttymxc1\0" \
250 "baudrate=115200\0" \
251 "bootdev=/dev/mmcblk0p1\0" \
252 "rootdev=/dev/mmcblk0p2\0" \
253 "netdev=eth0\0" \
254 "kernel_addr_r=0x18000000\0" \
255 "addcons=" \
256 "setenv bootargs ${bootargs} " \
257 "console=${consdev},${baudrate}\0" \
258 "addip=" \
259 "setenv bootargs ${bootargs} " \
260 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
261 "${netmask}:${hostname}:${netdev}:off\0" \
262 "addmisc=" \
263 "setenv bootargs ${bootargs} ${miscargs}\0" \
264 "addargs=run addcons addmisc\0" \
265 "mmcload=" \
266 "mmc rescan ; " \
267 "ext4load mmc 0:1 ${kernel_addr_r} ${bootfile}\0" \
268 "netload=" \
269 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
270 "miscargs=nohlt panic=1\0" \
271 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
272 "nfsargs=" \
273 "setenv bootargs root=/dev/nfs rw " \
274 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
275 "mmc_mmc=" \
276 "run mmcload mmcargs addargs ; " \
277 "bootm ${kernel_addr_r}\0" \
278 "mmc_nfs=" \
279 "run mmcload nfsargs addip addargs ; " \
280 "bootm ${kernel_addr_r}\0" \
281 "net_mmc=" \
282 "run netload mmcargs addargs ; " \
283 "bootm ${kernel_addr_r}\0" \
284 "net_nfs=" \
285 "run netload nfsargs addip addargs ; " \
286 "bootm ${kernel_addr_r}\0" \
287 "update_sd_spl_filename=SPL\0" \
288 "update_sd_uboot_filename=u-boot.img\0" \
289 "update_sd_firmware=" /* Update the SD firmware partition */ \
290 "if mmc rescan ; then " \
291 "if dhcp ${update_sd_spl_filename} ; then " \
292 "mmc write ${loadaddr} 2 0x200 ; " \
293 "fi ; " \
294 "if dhcp ${update_sd_uboot_filename} ; then " \
295 "fatwrite mmc 0:1 ${loadaddr} u-boot.img ${filesize} ; "\
296 "fi ; " \
297 "fi\0" \
298
299#endif /* __CONFIG_H */