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 | |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 19 | /* Setup proper boot sequences for Miami boards */ |
| 20 | |
Tom Rini | e8d3eaa | 2021-07-09 10:11:55 -0400 | [diff] [blame] | 21 | #if defined(CONFIG_USB_HOST) |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 22 | # 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 Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 36 | # 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 Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 47 | #undef CFG_EXTRA_ENV_SETTINGS |
| 48 | #define CFG_EXTRA_ENV_SETTINGS \ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 49 | "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 Looijmans | 1520fe6 | 2017-01-17 15:28:24 +0100 | [diff] [blame] | 59 | "kernel_size=0x440000\0" \ |
Mike Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 60 | "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 Looijmans | 2d48caa | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 84 | #endif /* __CONFIG_TOPIC_MIAMI_H */ |