blob: 3795e6152fa9b3df6429f04fdd2f20310f60f596 [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
Mike Looijmans2d48caa2016-09-30 08:13:13 +020019/* Setup proper boot sequences for Miami boards */
20
Tom Rinie8d3eaa2021-07-09 10:11:55 -040021#if defined(CONFIG_USB_HOST)
Mike Looijmans2d48caa2016-09-30 08:13:13 +020022# define EXTRA_ENV_USB \
23 "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
24 "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
25 "usbboot=run usbreset && if usb start; then " \
26 "echo Booting from USB... && " \
27 "if load usb 0 0x1900000 ${bootscript}; then "\
28 "source 0x1900000; fi; " \
29 "load usb 0 ${kernel_addr} ${kernel_image} && " \
30 "load usb 0 ${devicetree_addr} ${devicetree_image} && " \
31 "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \
32 "bootm ${kernel_addr} ${ramdisk_load_address} "\
33 "${devicetree_addr}; " \
34 "fi\0"
35 /* Note that addresses here should match the addresses in the env */
Mike Looijmans2d48caa2016-09-30 08:13:13 +020036# define DFU_ALT_INFO \
37 "dfu_alt_info=" \
38 "uImage ram 0x2080000 0x500000;" \
39 "devicetree.dtb ram 0x2000000 0x20000;" \
40 "uramdisk.image.gz ram 0x4000000 0x10000000\0" \
41 "dfu_ram=run usbreset && dfu 0 ram 0\0" \
42 "thor_ram=run usbreset && thordown 0 ram 0\0"
43#else
44# define EXTRA_ENV_USB
45#endif
46
Tom Rini0613c362022-12-04 10:03:50 -050047#undef CFG_EXTRA_ENV_SETTINGS
48#define CFG_EXTRA_ENV_SETTINGS \
Mike Looijmans2d48caa2016-09-30 08:13:13 +020049 "kernel_image=uImage\0" \
50 "kernel_addr=0x2080000\0" \
51 "ramdisk_image=uramdisk.image.gz\0" \
52 "ramdisk_load_address=0x4000000\0" \
53 "devicetree_image=devicetree.dtb\0" \
54 "devicetree_addr=0x2000000\0" \
55 "bitstream_image=fpga.bin\0" \
56 "bootscript=autorun.scr\0" \
57 "loadbit_addr=0x100000\0" \
58 "loadbootenv_addr=0x2000000\0" \
Mike Looijmans1520fe62017-01-17 15:28:24 +010059 "kernel_size=0x440000\0" \
Mike Looijmans2d48caa2016-09-30 08:13:13 +020060 "devicetree_size=0x10000\0" \
61 "boot_size=0xF00000\0" \
62 "fdt_high=0x20000000\0" \
63 "initrd_high=0x20000000\0" \
64 "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
65 "mmcinfo && " \
66 "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \
67 "fpga load 0 ${loadbit_addr} ${filesize}\0" \
68 "qspiboot=echo Booting from QSPI flash... && " \
69 "sf probe && " \
70 "sf read ${devicetree_addr} 0xA0000 ${devicetree_size} && " \
71 "sf read ${kernel_addr} 0xC0000 ${kernel_size} && " \
72 "bootm ${kernel_addr} - ${devicetree_addr}\0" \
73 "sdboot=if mmcinfo; then " \
74 "setenv bootargs console=ttyPS0,115200 " \
75 "root=/dev/mmcblk0p2 rw rootfstype=ext4 " \
76 "rootwait quiet ; " \
77 "load mmc 0 ${kernel_addr} ${kernel_image}&& " \
78 "load mmc 0 ${devicetree_addr} ${devicetree_image}&& " \
79 "bootm ${kernel_addr} - ${devicetree_addr}; " \
80 "fi\0" \
81 EXTRA_ENV_USB \
82 DFU_ALT_INFO
83
Mike Looijmans2d48caa2016-09-30 08:13:13 +020084#endif /* __CONFIG_TOPIC_MIAMI_H */