blob: 9b1f753b4c5e786ea1324d6c430a2ab0d32beeb6 [file] [log] [blame]
Marek Vasut69295472014-12-30 18:16:08 +01001/*
2 * Copyright (C) 2014 Marek Vasut <marex@denx.de>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6#ifndef __CONFIG_SOCFPGA_ARRIA5_H__
7#define __CONFIG_SOCFPGA_ARRIA5_H__
8
Dinh Nguyeneca8b5c2015-11-23 17:27:17 -06009#include <asm/arch/base_addr_ac5.h>
Marek Vasut69295472014-12-30 18:16:08 +010010
11/* U-Boot Commands */
Marek Vasut69295472014-12-30 18:16:08 +010012#define CONFIG_FAT_WRITE
13#define CONFIG_HW_WATCHDOG
14
Marek Vasut69295472014-12-30 18:16:08 +010015/* Memory configurations */
16#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on SoCDK */
17
18/* Booting Linux */
Marek Vasut69295472014-12-30 18:16:08 +010019#define CONFIG_BOOTFILE "zImage"
20#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)
21#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
22#define CONFIG_BOOTCOMMAND "run ramboot"
23#else
24#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"
25#endif
Marek Vasut2bff5402015-07-22 06:18:19 +020026#define CONFIG_LOADADDR 0x01000000
Marek Vasut69295472014-12-30 18:16:08 +010027#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
28
29/* Ethernet on SoC (EMAC) */
30#if defined(CONFIG_CMD_NET)
Marek Vasut69295472014-12-30 18:16:08 +010031#define CONFIG_PHY_MICREL
32#define CONFIG_PHY_MICREL_KSZ9021
Marek Vasut69295472014-12-30 18:16:08 +010033#endif
34
Dinh Nguyen813e7e62015-09-23 15:38:01 -050035#define CONFIG_ENV_IS_IN_MMC
Dinh Nguyen813e7e62015-09-23 15:38:01 -050036
Marek Vasut69295472014-12-30 18:16:08 +010037/* Extra Environment */
Marek Vasut69295472014-12-30 18:16:08 +010038#define CONFIG_EXTRA_ENV_SETTINGS \
39 "verify=n\0" \
Marek Vasut950c10c2016-04-03 19:11:12 +020040 "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Marek Vasut69295472014-12-30 18:16:08 +010041 "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
42 "bootm ${loadaddr} - ${fdt_addr}\0" \
43 "bootimage=zImage\0" \
44 "fdt_addr=100\0" \
45 "fdtimage=socfpga.dtb\0" \
Marek Vasut69295472014-12-30 18:16:08 +010046 "bootm ${loadaddr} - ${fdt_addr}\0" \
47 "mmcroot=/dev/mmcblk0p2\0" \
48 "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
49 " root=${mmcroot} rw rootwait;" \
50 "bootz ${loadaddr} - ${fdt_addr}\0" \
51 "mmcload=mmc rescan;" \
52 "load mmc 0:1 ${loadaddr} ${bootimage};" \
53 "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
Chin Liang Seeaf53ff92015-12-22 15:32:36 +080054 "qspiload=sf probe && mtdparts default && run ubiload\0" \
Marek Vasut69295472014-12-30 18:16:08 +010055 "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
Chin Liang See31f32d62015-12-22 15:32:40 +080056 " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\
57 "bootz ${loadaddr} - ${fdt_addr}\0" \
Chin Liang See62e2a9a2015-12-22 15:32:32 +080058 "ubiload=ubi part UBI && ubifsmount ubi0 && " \
59 "ubifsload ${loadaddr} /boot/${bootimage} && " \
60 "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
Marek Vasut69295472014-12-30 18:16:08 +010061
62/* The rest of the configuration is shared */
63#include <configs/socfpga_common.h>
64
65#endif /* __CONFIG_SOCFPGA_ARRIA5_H__ */