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