Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 Marek Vasut <marex@denx.de> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
Marek Vasut | a548bc5 | 2017-04-05 13:17:03 +0200 | [diff] [blame] | 6 | #ifndef __CONFIG_ARIES_MCVEVK_H__ |
| 7 | #define __CONFIG_ARIES_MCVEVK_H__ |
Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 8 | |
Dinh Nguyen | 871c24b | 2015-11-23 17:27:17 -0600 | [diff] [blame] | 9 | #include <asm/arch/base_addr_ac5.h> |
Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 10 | |
Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 11 | #define CONFIG_HW_WATCHDOG |
| 12 | |
Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 13 | /* Memory configurations */ |
| 14 | #define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on MCV */ |
| 15 | |
| 16 | /* Booting Linux */ |
Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 17 | #define CONFIG_BOOTFILE "fitImage" |
| 18 | #define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE) |
| 19 | #define CONFIG_PREBOOT "run try_bootscript" |
| 20 | #define CONFIG_BOOTCOMMAND "run mmc_mmc" |
| 21 | #define CONFIG_LOADADDR 0x01000000 |
| 22 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 23 | |
Marek Vasut | aad604a | 2015-09-24 09:06:06 +0200 | [diff] [blame] | 24 | /* Environment is in MMC */ |
| 25 | #define CONFIG_ENV_OVERWRITE |
Dinh Nguyen | 68a3e32 | 2015-09-23 15:38:01 -0500 | [diff] [blame] | 26 | |
Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 27 | /* Extra Environment */ |
Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 28 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 29 | "consdev=ttyS0\0" \ |
| 30 | "baudrate=115200\0" \ |
| 31 | "bootscript=boot.scr\0" \ |
| 32 | "bootdev=/dev/mmcblk0p2\0" \ |
| 33 | "rootdev=/dev/mmcblk0p3\0" \ |
| 34 | "netdev=eth0\0" \ |
| 35 | "hostname=mcvevk\0" \ |
| 36 | "kernel_addr_r=0x10000000\0" \ |
Marek Vasut | d70b338 | 2016-10-29 22:08:39 +0200 | [diff] [blame] | 37 | "dfu_alt_info=mmc raw 0 3867148288\0" \ |
Simon Glass | bd7dc38 | 2016-01-31 18:10:53 -0700 | [diff] [blame] | 38 | "update_filename=u-boot-with-spl.sfp\0" \ |
Marek Vasut | d88995a | 2015-08-03 01:37:28 +0200 | [diff] [blame] | 39 | "update_sd_offset=0x800\0" \ |
| 40 | "update_sd=" /* Update the SD firmware partition */ \ |
| 41 | "if mmc rescan ; then " \ |
| 42 | "if tftp ${update_filename} ; then " \ |
| 43 | "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \ |
| 44 | "setexpr fw_sz ${fw_sz} + 1 ; " \ |
| 45 | "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \ |
| 46 | "fi ; " \ |
| 47 | "fi\0" \ |
| 48 | "update_qspi_offset=0x0\0" \ |
| 49 | "update_qspi=" /* Update the QSPI firmware */ \ |
| 50 | "if sf probe ; then " \ |
| 51 | "if tftp ${update_filename} ; then " \ |
| 52 | "sf update ${loadaddr} ${update_qspi_offset} ${filesize} ; " \ |
| 53 | "fi ; " \ |
| 54 | "fi\0" \ |
| 55 | "fpga_filename=output_file.rbf\0" \ |
| 56 | "load_fpga=" /* Load FPGA bitstream */ \ |
| 57 | "if tftp ${fpga_filename} ; then " \ |
| 58 | "fpga load 0 $loadaddr $filesize ; " \ |
| 59 | "bridge enable ; " \ |
| 60 | "fi\0" \ |
| 61 | "addcons=" \ |
| 62 | "setenv bootargs ${bootargs} " \ |
| 63 | "console=${consdev},${baudrate}\0" \ |
| 64 | "addip=" \ |
| 65 | "setenv bootargs ${bootargs} " \ |
| 66 | "ip=${ipaddr}:${serverip}:${gatewayip}:" \ |
| 67 | "${netmask}:${hostname}:${netdev}:off\0" \ |
| 68 | "addmisc=" \ |
| 69 | "setenv bootargs ${bootargs} ${miscargs}\0" \ |
| 70 | "addargs=run addcons addmisc\0" \ |
| 71 | "mmcload=" \ |
| 72 | "mmc rescan ; " \ |
| 73 | "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \ |
| 74 | "netload=" \ |
| 75 | "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \ |
| 76 | "miscargs=nohlt panic=1\0" \ |
| 77 | "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \ |
| 78 | "nfsargs=" \ |
| 79 | "setenv bootargs root=/dev/nfs rw " \ |
| 80 | "nfsroot=${serverip}:${rootpath},v3,tcp\0" \ |
| 81 | "mmc_mmc=" \ |
| 82 | "run mmcload mmcargs addargs ; " \ |
| 83 | "bootm ${kernel_addr_r}\0" \ |
| 84 | "mmc_nfs=" \ |
| 85 | "run mmcload nfsargs addip addargs ; " \ |
| 86 | "bootm ${kernel_addr_r}\0" \ |
| 87 | "net_mmc=" \ |
| 88 | "run netload mmcargs addargs ; " \ |
| 89 | "bootm ${kernel_addr_r}\0" \ |
| 90 | "net_nfs=" \ |
| 91 | "run netload nfsargs addip addargs ; " \ |
| 92 | "bootm ${kernel_addr_r}\0" \ |
| 93 | "try_bootscript=" \ |
| 94 | "mmc rescan;" \ |
| 95 | "if test -e mmc 0:2 ${bootscript} ; then " \ |
| 96 | "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \ |
| 97 | "then ; " \ |
| 98 | "echo Running bootscript... ; " \ |
| 99 | "source ${kernel_addr_r} ; " \ |
| 100 | "fi ; " \ |
| 101 | "fi\0" |
| 102 | |
| 103 | /* The rest of the configuration is shared */ |
| 104 | #include <configs/socfpga_common.h> |
| 105 | |
Marek Vasut | a548bc5 | 2017-04-05 13:17:03 +0200 | [diff] [blame] | 106 | #endif /* __CONFIG_ARIES_MCVEVK_H__ */ |