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_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" 24 25 /* No falcon support */ 26 #undef CONFIG_SPL_OS_BOOT 27 28 /* FPGA commands that we don't use */ 29 30 /* Extras */ 31 32 /* Faster flash, ours may run at 108 MHz */ 33 #undef CONFIG_SPI_FLASH_WINBOND 34 35 /* Setup proper boot sequences for Miami boards */ 36 37 #if defined(CONFIG_USB) 38 # define EXTRA_ENV_USB \ 39 "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\ 40 "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \ 41 "usbboot=run usbreset && if usb start; then " \ 42 "echo Booting from USB... && " \ 43 "if load usb 0 0x1900000 ${bootscript}; then "\ 44 "source 0x1900000; fi; " \ 45 "load usb 0 ${kernel_addr} ${kernel_image} && " \ 46 "load usb 0 ${devicetree_addr} ${devicetree_image} && " \ 47 "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \ 48 "bootm ${kernel_addr} ${ramdisk_load_address} "\ 49 "${devicetree_addr}; " \ 50 "fi\0" 51 /* Note that addresses here should match the addresses in the env */ 52 # undef DFU_ALT_INFO 53 # define DFU_ALT_INFO \ 54 "dfu_alt_info=" \ 55 "uImage ram 0x2080000 0x500000;" \ 56 "devicetree.dtb ram 0x2000000 0x20000;" \ 57 "uramdisk.image.gz ram 0x4000000 0x10000000\0" \ 58 "dfu_ram=run usbreset && dfu 0 ram 0\0" \ 59 "thor_ram=run usbreset && thordown 0 ram 0\0" 60 #else 61 # define EXTRA_ENV_USB 62 #endif 63 64 #undef CONFIG_EXTRA_ENV_SETTINGS 65 #define CONFIG_EXTRA_ENV_SETTINGS \ 66 "kernel_image=uImage\0" \ 67 "kernel_addr=0x2080000\0" \ 68 "ramdisk_image=uramdisk.image.gz\0" \ 69 "ramdisk_load_address=0x4000000\0" \ 70 "devicetree_image=devicetree.dtb\0" \ 71 "devicetree_addr=0x2000000\0" \ 72 "bitstream_image=fpga.bin\0" \ 73 "bootscript=autorun.scr\0" \ 74 "loadbit_addr=0x100000\0" \ 75 "loadbootenv_addr=0x2000000\0" \ 76 "kernel_size=0x440000\0" \ 77 "devicetree_size=0x10000\0" \ 78 "boot_size=0xF00000\0" \ 79 "fdt_high=0x20000000\0" \ 80 "initrd_high=0x20000000\0" \ 81 "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \ 82 "mmcinfo && " \ 83 "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \ 84 "fpga load 0 ${loadbit_addr} ${filesize}\0" \ 85 "qspiboot=echo Booting from QSPI flash... && " \ 86 "sf probe && " \ 87 "sf read ${devicetree_addr} 0xA0000 ${devicetree_size} && " \ 88 "sf read ${kernel_addr} 0xC0000 ${kernel_size} && " \ 89 "bootm ${kernel_addr} - ${devicetree_addr}\0" \ 90 "sdboot=if mmcinfo; then " \ 91 "setenv bootargs console=ttyPS0,115200 " \ 92 "root=/dev/mmcblk0p2 rw rootfstype=ext4 " \ 93 "rootwait quiet ; " \ 94 "load mmc 0 ${kernel_addr} ${kernel_image}&& " \ 95 "load mmc 0 ${devicetree_addr} ${devicetree_image}&& " \ 96 "bootm ${kernel_addr} - ${devicetree_addr}; " \ 97 "fi\0" \ 98 EXTRA_ENV_USB \ 99 DFU_ALT_INFO 100 101 #undef CONFIG_BOOTCOMMAND 102 #define CONFIG_BOOTCOMMAND "if mmcinfo; then " \ 103 "if fatload mmc 0 0x1900000 ${bootscript}; then source 0x1900000; " \ 104 "fi; fi; run $modeboot" 105 #undef CONFIG_DISPLAY_BOARDINFO 106 107 #endif /* __CONFIG_TOPIC_MIAMI_H */ 108