f859656b396cabfe571d5960af1b8a06ba5e84a9
[platform/kernel/u-boot.git] / include / configs / topic_miami.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
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
7  */
8
9 #ifndef __CONFIG_TOPIC_MIAMI_H
10 #define __CONFIG_TOPIC_MIAMI_H
11
12
13 /* Speed up boot time by ignoring the environment which we never used */
14
15 #include "zynq-common.h"
16
17 /* Fixup settings */
18
19 /* SPL settings */
20 #undef CONFIG_SPL_MAX_FOOTPRINT
21 #define CONFIG_SPL_MAX_FOOTPRINT        CONFIG_SYS_SPI_U_BOOT_OFFS
22 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME     "u-boot.img"
23
24 /* Setup proper boot sequences for Miami boards */
25
26 #if defined(CONFIG_USB_HOST)
27 # define EXTRA_ENV_USB \
28         "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
29                 "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
30         "usbboot=run usbreset && if usb start; then " \
31                 "echo Booting from USB... && " \
32                 "if load usb 0 0x1900000 ${bootscript}; then "\
33                 "source 0x1900000; fi; " \
34                 "load usb 0 ${kernel_addr} ${kernel_image} && " \
35                 "load usb 0 ${devicetree_addr} ${devicetree_image} && " \
36                 "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \
37                 "bootm ${kernel_addr} ${ramdisk_load_address} "\
38                         "${devicetree_addr}; " \
39         "fi\0"
40   /* Note that addresses here should match the addresses in the env */
41 # define DFU_ALT_INFO \
42         "dfu_alt_info=" \
43         "uImage ram 0x2080000 0x500000;" \
44         "devicetree.dtb ram 0x2000000 0x20000;" \
45         "uramdisk.image.gz ram 0x4000000 0x10000000\0" \
46         "dfu_ram=run usbreset && dfu 0 ram 0\0" \
47         "thor_ram=run usbreset && thordown 0 ram 0\0"
48 #else
49 # define EXTRA_ENV_USB
50 #endif
51
52 #undef CONFIG_EXTRA_ENV_SETTINGS
53 #define CONFIG_EXTRA_ENV_SETTINGS       \
54         "kernel_image=uImage\0" \
55         "kernel_addr=0x2080000\0" \
56         "ramdisk_image=uramdisk.image.gz\0"     \
57         "ramdisk_load_address=0x4000000\0"      \
58         "devicetree_image=devicetree.dtb\0"     \
59         "devicetree_addr=0x2000000\0"   \
60         "bitstream_image=fpga.bin\0"    \
61         "bootscript=autorun.scr\0" \
62         "loadbit_addr=0x100000\0"       \
63         "loadbootenv_addr=0x2000000\0" \
64         "kernel_size=0x440000\0"        \
65         "devicetree_size=0x10000\0"     \
66         "boot_size=0xF00000\0"  \
67         "fdt_high=0x20000000\0" \
68         "initrd_high=0x20000000\0"      \
69         "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
70                 "mmcinfo && " \
71                 "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \
72                 "fpga load 0 ${loadbit_addr} ${filesize}\0" \
73         "qspiboot=echo Booting from QSPI flash... && " \
74                 "sf probe && " \
75                 "sf read ${devicetree_addr} 0xA0000 ${devicetree_size} && " \
76                 "sf read ${kernel_addr} 0xC0000 ${kernel_size} && " \
77                 "bootm ${kernel_addr} - ${devicetree_addr}\0" \
78         "sdboot=if mmcinfo; then " \
79                         "setenv bootargs console=ttyPS0,115200 " \
80                                 "root=/dev/mmcblk0p2 rw rootfstype=ext4 " \
81                                 "rootwait quiet ; " \
82                         "load mmc 0 ${kernel_addr} ${kernel_image}&& " \
83                         "load mmc 0 ${devicetree_addr} ${devicetree_image}&& " \
84                         "bootm ${kernel_addr} - ${devicetree_addr}; " \
85                 "fi\0" \
86         EXTRA_ENV_USB \
87         DFU_ALT_INFO
88
89 #endif /* __CONFIG_TOPIC_MIAMI_H */