blob: b98656dd4c176c29ceaf8184c72d0f97a08bdfb8 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Mike Looijmans5ae48b12016-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 Looijmans5ae48b12016-09-30 08:13:13 +02007 */
8
9#ifndef __CONFIG_TOPIC_MIAMI_H
10#define __CONFIG_TOPIC_MIAMI_H
11
Mike Looijmans5ae48b12016-09-30 08:13:13 +020012
13/* Speed up boot time by ignoring the environment which we never used */
Mike Looijmans5ae48b12016-09-30 08:13:13 +020014
15#include "zynq-common.h"
16
17/* Fixup settings */
18#undef CONFIG_ENV_SIZE
19#define CONFIG_ENV_SIZE 0x8000
20#undef CONFIG_ENV_OFFSET
21#define CONFIG_ENV_OFFSET 0x80000
22
23/* SPL settings */
24#undef CONFIG_SPL_ETH_SUPPORT
Mike Looijmans5ae48b12016-09-30 08:13:13 +020025#undef CONFIG_SPL_MAX_FOOTPRINT
26#define CONFIG_SPL_MAX_FOOTPRINT CONFIG_SYS_SPI_U_BOOT_OFFS
27#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
28
29/* sspi command isn't useful */
30#undef CONFIG_CMD_SPI
31
32/* No useful gpio */
33#undef CONFIG_ZYNQ_GPIO
34#undef CONFIG_CMD_GPIO
35
36/* No falcon support */
37#undef CONFIG_SPL_OS_BOOT
38#undef CONFIG_SPL_FPGA_SUPPORT
39
40/* FPGA commands that we don't use */
Mike Looijmans5ae48b12016-09-30 08:13:13 +020041
42/* Extras */
Mike Looijmans5ae48b12016-09-30 08:13:13 +020043#undef CONFIG_SYS_MEMTEST_START
44#define CONFIG_SYS_MEMTEST_START 0
45#undef CONFIG_SYS_MEMTEST_END
46#define CONFIG_SYS_MEMTEST_END 0x18000000
47
48/* Faster flash, ours may run at 108 MHz */
Mike Looijmans5ae48b12016-09-30 08:13:13 +020049#undef CONFIG_SPI_FLASH_WINBOND
Mike Looijmans5ae48b12016-09-30 08:13:13 +020050
51/* Setup proper boot sequences for Miami boards */
52
53#if defined(CONFIG_USB)
54# define EXTRA_ENV_USB \
55 "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
56 "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
57 "usbboot=run usbreset && if usb start; then " \
58 "echo Booting from USB... && " \
59 "if load usb 0 0x1900000 ${bootscript}; then "\
60 "source 0x1900000; fi; " \
61 "load usb 0 ${kernel_addr} ${kernel_image} && " \
62 "load usb 0 ${devicetree_addr} ${devicetree_image} && " \
63 "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \
64 "bootm ${kernel_addr} ${ramdisk_load_address} "\
65 "${devicetree_addr}; " \
66 "fi\0"
67 /* Note that addresses here should match the addresses in the env */
68# undef DFU_ALT_INFO
69# define DFU_ALT_INFO \
70 "dfu_alt_info=" \
71 "uImage ram 0x2080000 0x500000;" \
72 "devicetree.dtb ram 0x2000000 0x20000;" \
73 "uramdisk.image.gz ram 0x4000000 0x10000000\0" \
74 "dfu_ram=run usbreset && dfu 0 ram 0\0" \
75 "thor_ram=run usbreset && thordown 0 ram 0\0"
76#else
77# define EXTRA_ENV_USB
78#endif
79
Mike Looijmans5ae48b12016-09-30 08:13:13 +020080#undef CONFIG_EXTRA_ENV_SETTINGS
81#define CONFIG_EXTRA_ENV_SETTINGS \
82 "kernel_image=uImage\0" \
83 "kernel_addr=0x2080000\0" \
84 "ramdisk_image=uramdisk.image.gz\0" \
85 "ramdisk_load_address=0x4000000\0" \
86 "devicetree_image=devicetree.dtb\0" \
87 "devicetree_addr=0x2000000\0" \
88 "bitstream_image=fpga.bin\0" \
89 "bootscript=autorun.scr\0" \
90 "loadbit_addr=0x100000\0" \
91 "loadbootenv_addr=0x2000000\0" \
Mike Looijmans9c365d52017-01-17 15:28:24 +010092 "kernel_size=0x440000\0" \
Mike Looijmans5ae48b12016-09-30 08:13:13 +020093 "devicetree_size=0x10000\0" \
94 "boot_size=0xF00000\0" \
95 "fdt_high=0x20000000\0" \
96 "initrd_high=0x20000000\0" \
97 "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
98 "mmcinfo && " \
99 "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \
100 "fpga load 0 ${loadbit_addr} ${filesize}\0" \
101 "qspiboot=echo Booting from QSPI flash... && " \
102 "sf probe && " \
103 "sf read ${devicetree_addr} 0xA0000 ${devicetree_size} && " \
104 "sf read ${kernel_addr} 0xC0000 ${kernel_size} && " \
105 "bootm ${kernel_addr} - ${devicetree_addr}\0" \
106 "sdboot=if mmcinfo; then " \
107 "setenv bootargs console=ttyPS0,115200 " \
108 "root=/dev/mmcblk0p2 rw rootfstype=ext4 " \
109 "rootwait quiet ; " \
110 "load mmc 0 ${kernel_addr} ${kernel_image}&& " \
111 "load mmc 0 ${devicetree_addr} ${devicetree_image}&& " \
112 "bootm ${kernel_addr} - ${devicetree_addr}; " \
113 "fi\0" \
114 EXTRA_ENV_USB \
115 DFU_ALT_INFO
116
117#undef CONFIG_BOOTCOMMAND
118#define CONFIG_BOOTCOMMAND "if mmcinfo; then " \
119 "if fatload mmc 0 0x1900000 ${bootscript}; then source 0x1900000; " \
120 "fi; fi; run $modeboot"
121#undef CONFIG_DISPLAY_BOARDINFO
122
Mike Looijmans5ae48b12016-09-30 08:13:13 +0200123#endif /* __CONFIG_TOPIC_MIAMI_H */