Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 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 |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __CONFIG_TOPIC_MIAMI_H |
| 10 | #define __CONFIG_TOPIC_MIAMI_H |
| 11 | |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 12 | |
| 13 | /* Speed up boot time by ignoring the environment which we never used */ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 14 | |
| 15 | #include "zynq-common.h" |
| 16 | |
| 17 | /* Fixup settings */ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 18 | |
| 19 | /* SPL settings */ |
| 20 | #undef CONFIG_SPL_ETH_SUPPORT |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 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 | /* sspi command isn't useful */ |
| 26 | #undef CONFIG_CMD_SPI |
| 27 | |
| 28 | /* No useful gpio */ |
| 29 | #undef CONFIG_ZYNQ_GPIO |
| 30 | #undef CONFIG_CMD_GPIO |
| 31 | |
| 32 | /* No falcon support */ |
| 33 | #undef CONFIG_SPL_OS_BOOT |
| 34 | #undef CONFIG_SPL_FPGA_SUPPORT |
| 35 | |
| 36 | /* FPGA commands that we don't use */ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 37 | |
| 38 | /* Extras */ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 39 | #undef CONFIG_SYS_MEMTEST_START |
| 40 | #define CONFIG_SYS_MEMTEST_START 0 |
| 41 | #undef CONFIG_SYS_MEMTEST_END |
| 42 | #define CONFIG_SYS_MEMTEST_END 0x18000000 |
| 43 | |
| 44 | /* Faster flash, ours may run at 108 MHz */ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 45 | #undef CONFIG_SPI_FLASH_WINBOND |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 46 | |
| 47 | /* Setup proper boot sequences for Miami boards */ |
| 48 | |
| 49 | #if defined(CONFIG_USB) |
| 50 | # define EXTRA_ENV_USB \ |
| 51 | "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\ |
| 52 | "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \ |
| 53 | "usbboot=run usbreset && if usb start; then " \ |
| 54 | "echo Booting from USB... && " \ |
| 55 | "if load usb 0 0x1900000 ${bootscript}; then "\ |
| 56 | "source 0x1900000; fi; " \ |
| 57 | "load usb 0 ${kernel_addr} ${kernel_image} && " \ |
| 58 | "load usb 0 ${devicetree_addr} ${devicetree_image} && " \ |
| 59 | "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \ |
| 60 | "bootm ${kernel_addr} ${ramdisk_load_address} "\ |
| 61 | "${devicetree_addr}; " \ |
| 62 | "fi\0" |
| 63 | /* Note that addresses here should match the addresses in the env */ |
| 64 | # undef DFU_ALT_INFO |
| 65 | # define DFU_ALT_INFO \ |
| 66 | "dfu_alt_info=" \ |
| 67 | "uImage ram 0x2080000 0x500000;" \ |
| 68 | "devicetree.dtb ram 0x2000000 0x20000;" \ |
| 69 | "uramdisk.image.gz ram 0x4000000 0x10000000\0" \ |
| 70 | "dfu_ram=run usbreset && dfu 0 ram 0\0" \ |
| 71 | "thor_ram=run usbreset && thordown 0 ram 0\0" |
| 72 | #else |
| 73 | # define EXTRA_ENV_USB |
| 74 | #endif |
| 75 | |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 76 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 77 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 78 | "kernel_image=uImage\0" \ |
| 79 | "kernel_addr=0x2080000\0" \ |
| 80 | "ramdisk_image=uramdisk.image.gz\0" \ |
| 81 | "ramdisk_load_address=0x4000000\0" \ |
| 82 | "devicetree_image=devicetree.dtb\0" \ |
| 83 | "devicetree_addr=0x2000000\0" \ |
| 84 | "bitstream_image=fpga.bin\0" \ |
| 85 | "bootscript=autorun.scr\0" \ |
| 86 | "loadbit_addr=0x100000\0" \ |
| 87 | "loadbootenv_addr=0x2000000\0" \ |
Mike Looijmans | 1520fe6 | 2017-01-17 15:28:24 +0100 | [diff] [blame] | 88 | "kernel_size=0x440000\0" \ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 89 | "devicetree_size=0x10000\0" \ |
| 90 | "boot_size=0xF00000\0" \ |
| 91 | "fdt_high=0x20000000\0" \ |
| 92 | "initrd_high=0x20000000\0" \ |
| 93 | "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \ |
| 94 | "mmcinfo && " \ |
| 95 | "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \ |
| 96 | "fpga load 0 ${loadbit_addr} ${filesize}\0" \ |
| 97 | "qspiboot=echo Booting from QSPI flash... && " \ |
| 98 | "sf probe && " \ |
| 99 | "sf read ${devicetree_addr} 0xA0000 ${devicetree_size} && " \ |
| 100 | "sf read ${kernel_addr} 0xC0000 ${kernel_size} && " \ |
| 101 | "bootm ${kernel_addr} - ${devicetree_addr}\0" \ |
| 102 | "sdboot=if mmcinfo; then " \ |
| 103 | "setenv bootargs console=ttyPS0,115200 " \ |
| 104 | "root=/dev/mmcblk0p2 rw rootfstype=ext4 " \ |
| 105 | "rootwait quiet ; " \ |
| 106 | "load mmc 0 ${kernel_addr} ${kernel_image}&& " \ |
| 107 | "load mmc 0 ${devicetree_addr} ${devicetree_image}&& " \ |
| 108 | "bootm ${kernel_addr} - ${devicetree_addr}; " \ |
| 109 | "fi\0" \ |
| 110 | EXTRA_ENV_USB \ |
| 111 | DFU_ALT_INFO |
| 112 | |
| 113 | #undef CONFIG_BOOTCOMMAND |
| 114 | #define CONFIG_BOOTCOMMAND "if mmcinfo; then " \ |
| 115 | "if fatload mmc 0 0x1900000 ${bootscript}; then source 0x1900000; " \ |
| 116 | "fi; fi; run $modeboot" |
| 117 | #undef CONFIG_DISPLAY_BOARDINFO |
| 118 | |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 119 | #endif /* __CONFIG_TOPIC_MIAMI_H */ |