1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2014 Topic Embedded Products
5 * Configuration for Zynq Evaluation and Development Board - Miami
6 * See zynq-common.h for Zynq common configs
9 #ifndef __CONFIG_TOPIC_MIAMI_H
10 #define __CONFIG_TOPIC_MIAMI_H
13 /* Speed up boot time by ignoring the environment which we never used */
15 #include "zynq-common.h"
20 #undef CONFIG_SPL_ETH_SUPPORT
21 #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"
25 /* sspi command isn't useful */
28 /* No falcon support */
29 #undef CONFIG_SPL_OS_BOOT
30 #undef CONFIG_SPL_FPGA_SUPPORT
32 /* FPGA commands that we don't use */
36 /* Faster flash, ours may run at 108 MHz */
37 #undef CONFIG_SPI_FLASH_WINBOND
39 /* Setup proper boot sequences for Miami boards */
41 #if defined(CONFIG_USB)
42 # define EXTRA_ENV_USB \
43 "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
44 "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
45 "usbboot=run usbreset && if usb start; then " \
46 "echo Booting from USB... && " \
47 "if load usb 0 0x1900000 ${bootscript}; then "\
48 "source 0x1900000; fi; " \
49 "load usb 0 ${kernel_addr} ${kernel_image} && " \
50 "load usb 0 ${devicetree_addr} ${devicetree_image} && " \
51 "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \
52 "bootm ${kernel_addr} ${ramdisk_load_address} "\
53 "${devicetree_addr}; " \
55 /* Note that addresses here should match the addresses in the env */
57 # define DFU_ALT_INFO \
59 "uImage ram 0x2080000 0x500000;" \
60 "devicetree.dtb ram 0x2000000 0x20000;" \
61 "uramdisk.image.gz ram 0x4000000 0x10000000\0" \
62 "dfu_ram=run usbreset && dfu 0 ram 0\0" \
63 "thor_ram=run usbreset && thordown 0 ram 0\0"
65 # define EXTRA_ENV_USB
68 #undef CONFIG_EXTRA_ENV_SETTINGS
69 #define CONFIG_EXTRA_ENV_SETTINGS \
70 "kernel_image=uImage\0" \
71 "kernel_addr=0x2080000\0" \
72 "ramdisk_image=uramdisk.image.gz\0" \
73 "ramdisk_load_address=0x4000000\0" \
74 "devicetree_image=devicetree.dtb\0" \
75 "devicetree_addr=0x2000000\0" \
76 "bitstream_image=fpga.bin\0" \
77 "bootscript=autorun.scr\0" \
78 "loadbit_addr=0x100000\0" \
79 "loadbootenv_addr=0x2000000\0" \
80 "kernel_size=0x440000\0" \
81 "devicetree_size=0x10000\0" \
82 "boot_size=0xF00000\0" \
83 "fdt_high=0x20000000\0" \
84 "initrd_high=0x20000000\0" \
85 "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
87 "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \
88 "fpga load 0 ${loadbit_addr} ${filesize}\0" \
89 "qspiboot=echo Booting from QSPI flash... && " \
91 "sf read ${devicetree_addr} 0xA0000 ${devicetree_size} && " \
92 "sf read ${kernel_addr} 0xC0000 ${kernel_size} && " \
93 "bootm ${kernel_addr} - ${devicetree_addr}\0" \
94 "sdboot=if mmcinfo; then " \
95 "setenv bootargs console=ttyPS0,115200 " \
96 "root=/dev/mmcblk0p2 rw rootfstype=ext4 " \
98 "load mmc 0 ${kernel_addr} ${kernel_image}&& " \
99 "load mmc 0 ${devicetree_addr} ${devicetree_image}&& " \
100 "bootm ${kernel_addr} - ${devicetree_addr}; " \
105 #undef CONFIG_BOOTCOMMAND
106 #define CONFIG_BOOTCOMMAND "if mmcinfo; then " \
107 "if fatload mmc 0 0x1900000 ${bootscript}; then source 0x1900000; " \
108 "fi; fi; run $modeboot"
109 #undef CONFIG_DISPLAY_BOARDINFO
111 #endif /* __CONFIG_TOPIC_MIAMI_H */