Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Mike Looijmans | 5ae48b1 | 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 | 5ae48b1 | 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 | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 12 | /* Speed up boot time by ignoring the environment which we never used */ |
Mike Looijmans | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 13 | |
| 14 | #include "zynq-common.h" |
| 15 | |
| 16 | /* Fixup settings */ |
Mike Looijmans | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 17 | |
Mike Looijmans | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 18 | /* Setup proper boot sequences for Miami boards */ |
| 19 | |
Tom Rini | 8a09162 | 2021-07-09 10:11:55 -0400 | [diff] [blame] | 20 | #if defined(CONFIG_USB_HOST) |
Mike Looijmans | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 21 | # 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 Looijmans | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 35 | # 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 Rini | c9edebe | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 46 | #undef CFG_EXTRA_ENV_SETTINGS |
| 47 | #define CFG_EXTRA_ENV_SETTINGS \ |
Mike Looijmans | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 48 | "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 Looijmans | 9c365d5 | 2017-01-17 15:28:24 +0100 | [diff] [blame] | 58 | "kernel_size=0x440000\0" \ |
Mike Looijmans | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 59 | "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 Looijmans | 5ae48b1 | 2016-09-30 08:13:13 +0200 | [diff] [blame] | 83 | #endif /* __CONFIG_TOPIC_MIAMI_H */ |