blob: 06276175455092cacf29cd1f3eb1f253eece5be8 [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/* Speed up boot time by ignoring the environment which we never used */
Mike Looijmans5ae48b12016-09-30 08:13:13 +020013
14#include "zynq-common.h"
15
16/* Fixup settings */
Mike Looijmans5ae48b12016-09-30 08:13:13 +020017
Mike Looijmans5ae48b12016-09-30 08:13:13 +020018/* Setup proper boot sequences for Miami boards */
19
Tom Rini8a091622021-07-09 10:11:55 -040020#if defined(CONFIG_USB_HOST)
Mike Looijmans5ae48b12016-09-30 08:13:13 +020021# define EXTRA_ENV_USB \
22 "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
23 "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
24 "usbboot=run usbreset && if usb start; then " \
25 "echo Booting from USB... && " \
26 "if load usb 0 0x1900000 ${bootscript}; then "\
27 "source 0x1900000; fi; " \
28 "load usb 0 ${kernel_addr} ${kernel_image} && " \
29 "load usb 0 ${devicetree_addr} ${devicetree_image} && " \
30 "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \
31 "bootm ${kernel_addr} ${ramdisk_load_address} "\
32 "${devicetree_addr}; " \
33 "fi\0"
34 /* Note that addresses here should match the addresses in the env */
Mike Looijmans5ae48b12016-09-30 08:13:13 +020035# define DFU_ALT_INFO \
36 "dfu_alt_info=" \
37 "uImage ram 0x2080000 0x500000;" \
38 "devicetree.dtb ram 0x2000000 0x20000;" \
39 "uramdisk.image.gz ram 0x4000000 0x10000000\0" \
40 "dfu_ram=run usbreset && dfu 0 ram 0\0" \
41 "thor_ram=run usbreset && thordown 0 ram 0\0"
42#else
43# define EXTRA_ENV_USB
44#endif
45
Tom Rinic9edebe2022-12-04 10:03:50 -050046#undef CFG_EXTRA_ENV_SETTINGS
47#define CFG_EXTRA_ENV_SETTINGS \
Mike Looijmans5ae48b12016-09-30 08:13:13 +020048 "kernel_image=uImage\0" \
49 "kernel_addr=0x2080000\0" \
50 "ramdisk_image=uramdisk.image.gz\0" \
51 "ramdisk_load_address=0x4000000\0" \
52 "devicetree_image=devicetree.dtb\0" \
53 "devicetree_addr=0x2000000\0" \
54 "bitstream_image=fpga.bin\0" \
55 "bootscript=autorun.scr\0" \
56 "loadbit_addr=0x100000\0" \
57 "loadbootenv_addr=0x2000000\0" \
Mike Looijmans9c365d52017-01-17 15:28:24 +010058 "kernel_size=0x440000\0" \
Mike Looijmans5ae48b12016-09-30 08:13:13 +020059 "devicetree_size=0x10000\0" \
60 "boot_size=0xF00000\0" \
61 "fdt_high=0x20000000\0" \
62 "initrd_high=0x20000000\0" \
63 "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
64 "mmcinfo && " \
65 "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \
66 "fpga load 0 ${loadbit_addr} ${filesize}\0" \
67 "qspiboot=echo Booting from QSPI flash... && " \
68 "sf probe && " \
69 "sf read ${devicetree_addr} 0xA0000 ${devicetree_size} && " \
70 "sf read ${kernel_addr} 0xC0000 ${kernel_size} && " \
71 "bootm ${kernel_addr} - ${devicetree_addr}\0" \
72 "sdboot=if mmcinfo; then " \
73 "setenv bootargs console=ttyPS0,115200 " \
74 "root=/dev/mmcblk0p2 rw rootfstype=ext4 " \
75 "rootwait quiet ; " \
76 "load mmc 0 ${kernel_addr} ${kernel_image}&& " \
77 "load mmc 0 ${devicetree_addr} ${devicetree_image}&& " \
78 "bootm ${kernel_addr} - ${devicetree_addr}; " \
79 "fi\0" \
80 EXTRA_ENV_USB \
81 DFU_ALT_INFO
82
Mike Looijmans5ae48b12016-09-30 08:13:13 +020083#endif /* __CONFIG_TOPIC_MIAMI_H */