blob: 6e3953835d15bee877c25198b411dcfd3ac77af1 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Mike Looijmans2d48caa2016-09-30 08:13:13 +02002/*
3 * (C) Copyright 2014 Topic Embedded Products
4 *
5 * Configuration for Zynq Evaluation and Development Board - Miami
6 * See zynq-common.h for Zynq common configs
Mike Looijmans2d48caa2016-09-30 08:13:13 +02007 */
8
9#ifndef __CONFIG_TOPIC_MIAMI_H
10#define __CONFIG_TOPIC_MIAMI_H
11
Mike Looijmans2d48caa2016-09-30 08:13:13 +020012
13/* Speed up boot time by ignoring the environment which we never used */
Mike Looijmans2d48caa2016-09-30 08:13:13 +020014
15#include "zynq-common.h"
16
17/* Fixup settings */
Mike Looijmans2d48caa2016-09-30 08:13:13 +020018
19/* SPL settings */
20#undef CONFIG_SPL_ETH_SUPPORT
Mike Looijmans2d48caa2016-09-30 08:13:13 +020021#undef CONFIG_SPL_MAX_FOOTPRINT
22#define CONFIG_SPL_MAX_FOOTPRINT CONFIG_SYS_SPI_U_BOOT_OFFS
23#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
24
Mike Looijmans2d48caa2016-09-30 08:13:13 +020025/* No falcon support */
26#undef CONFIG_SPL_OS_BOOT
27#undef CONFIG_SPL_FPGA_SUPPORT
28
29/* FPGA commands that we don't use */
Mike Looijmans2d48caa2016-09-30 08:13:13 +020030
31/* Extras */
Mike Looijmans2d48caa2016-09-30 08:13:13 +020032
33/* Faster flash, ours may run at 108 MHz */
Mike Looijmans2d48caa2016-09-30 08:13:13 +020034#undef CONFIG_SPI_FLASH_WINBOND
Mike Looijmans2d48caa2016-09-30 08:13:13 +020035
36/* Setup proper boot sequences for Miami boards */
37
38#if defined(CONFIG_USB)
39# define EXTRA_ENV_USB \
40 "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
41 "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
42 "usbboot=run usbreset && if usb start; then " \
43 "echo Booting from USB... && " \
44 "if load usb 0 0x1900000 ${bootscript}; then "\
45 "source 0x1900000; fi; " \
46 "load usb 0 ${kernel_addr} ${kernel_image} && " \
47 "load usb 0 ${devicetree_addr} ${devicetree_image} && " \
48 "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \
49 "bootm ${kernel_addr} ${ramdisk_load_address} "\
50 "${devicetree_addr}; " \
51 "fi\0"
52 /* Note that addresses here should match the addresses in the env */
53# undef DFU_ALT_INFO
54# define DFU_ALT_INFO \
55 "dfu_alt_info=" \
56 "uImage ram 0x2080000 0x500000;" \
57 "devicetree.dtb ram 0x2000000 0x20000;" \
58 "uramdisk.image.gz ram 0x4000000 0x10000000\0" \
59 "dfu_ram=run usbreset && dfu 0 ram 0\0" \
60 "thor_ram=run usbreset && thordown 0 ram 0\0"
61#else
62# define EXTRA_ENV_USB
63#endif
64
Mike Looijmans2d48caa2016-09-30 08:13:13 +020065#undef CONFIG_EXTRA_ENV_SETTINGS
66#define CONFIG_EXTRA_ENV_SETTINGS \
67 "kernel_image=uImage\0" \
68 "kernel_addr=0x2080000\0" \
69 "ramdisk_image=uramdisk.image.gz\0" \
70 "ramdisk_load_address=0x4000000\0" \
71 "devicetree_image=devicetree.dtb\0" \
72 "devicetree_addr=0x2000000\0" \
73 "bitstream_image=fpga.bin\0" \
74 "bootscript=autorun.scr\0" \
75 "loadbit_addr=0x100000\0" \
76 "loadbootenv_addr=0x2000000\0" \
Mike Looijmans1520fe62017-01-17 15:28:24 +010077 "kernel_size=0x440000\0" \
Mike Looijmans2d48caa2016-09-30 08:13:13 +020078 "devicetree_size=0x10000\0" \
79 "boot_size=0xF00000\0" \
80 "fdt_high=0x20000000\0" \
81 "initrd_high=0x20000000\0" \
82 "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
83 "mmcinfo && " \
84 "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \
85 "fpga load 0 ${loadbit_addr} ${filesize}\0" \
86 "qspiboot=echo Booting from QSPI flash... && " \
87 "sf probe && " \
88 "sf read ${devicetree_addr} 0xA0000 ${devicetree_size} && " \
89 "sf read ${kernel_addr} 0xC0000 ${kernel_size} && " \
90 "bootm ${kernel_addr} - ${devicetree_addr}\0" \
91 "sdboot=if mmcinfo; then " \
92 "setenv bootargs console=ttyPS0,115200 " \
93 "root=/dev/mmcblk0p2 rw rootfstype=ext4 " \
94 "rootwait quiet ; " \
95 "load mmc 0 ${kernel_addr} ${kernel_image}&& " \
96 "load mmc 0 ${devicetree_addr} ${devicetree_image}&& " \
97 "bootm ${kernel_addr} - ${devicetree_addr}; " \
98 "fi\0" \
99 EXTRA_ENV_USB \
100 DFU_ALT_INFO
101
102#undef CONFIG_BOOTCOMMAND
103#define CONFIG_BOOTCOMMAND "if mmcinfo; then " \
104 "if fatload mmc 0 0x1900000 ${bootscript}; then source 0x1900000; " \
105 "fi; fi; run $modeboot"
106#undef CONFIG_DISPLAY_BOARDINFO
107
Mike Looijmans2d48caa2016-09-30 08:13:13 +0200108#endif /* __CONFIG_TOPIC_MIAMI_H */