syzygy_hub.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2012 Xilinx
  4. * (C) Copyright 2017 Opal Kelly Inc.
  5. *
  6. * Configuration settings for the SYZYGY Hub development board
  7. * See zynq-common.h for Zynq common configs
  8. */
  9. #ifndef __CONFIG_SYZYGY_HUB_H
  10. #define __CONFIG_SYZYGY_HUB_H
  11. #define CONFIG_EXTRA_ENV_SETTINGS \
  12. "fit_image=fit.itb\0" \
  13. "bitstream_image=download.bit\0" \
  14. "loadbit_addr=0x1000000\0" \
  15. "load_addr=0x2000000\0" \
  16. "fit_size=0x800000\0" \
  17. "flash_off=0x100000\0" \
  18. "nor_flash_off=0xE2100000\0" \
  19. "fdt_high=0x20000000\0" \
  20. "initrd_high=0x20000000\0" \
  21. "loadbootenv_addr=0x2000000\0" \
  22. "fdt_addr_r=0x1f00000\0" \
  23. "pxefile_addr_r=0x2000000\0" \
  24. "kernel_addr_r=0x2000000\0" \
  25. "scriptaddr=0x3000000\0" \
  26. "ramdisk_addr_r=0x3100000\0" \
  27. "bootenv=uEnv.txt\0" \
  28. "bootenv_dev=mmc\0" \
  29. "loadbootenv=load ${bootenv_dev} 0 ${loadbootenv_addr} ${bootenv}\0" \
  30. "importbootenv=echo Importing environment from ${bootenv_dev} ...; " \
  31. "env import -t ${loadbootenv_addr} $filesize\0" \
  32. "bootenv_existence_test=test -e ${bootenv_dev} 0 /${bootenv}\0" \
  33. "setbootenv=if env run bootenv_existence_test; then " \
  34. "if env run loadbootenv; then " \
  35. "env run importbootenv; " \
  36. "fi; " \
  37. "fi; \0" \
  38. "sd_loadbootenv=set bootenv_dev mmc && " \
  39. "run setbootenv \0" \
  40. "usb_loadbootenv=set bootenv_dev usb && usb start && run setbootenv\0" \
  41. "preboot=if test $modeboot = sdboot; then " \
  42. "run sd_loadbootenv; " \
  43. "echo Checking if uenvcmd is set ...; " \
  44. "if test -n $uenvcmd; then " \
  45. "echo Running uenvcmd ...; " \
  46. "run uenvcmd; " \
  47. "fi; " \
  48. "fi; \0" \
  49. "sdboot=echo Copying FPGA Bitstream from SD to RAM... && " \
  50. "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \
  51. "echo Programming FPGA... && " \
  52. "fpga loadb 0 ${loadbit_addr} ${filesize} && " \
  53. "echo Copying FIT from SD to RAM... && " \
  54. "load mmc 0 ${load_addr} ${fit_image} && " \
  55. "bootm ${load_addr}\0" \
  56. "jtagboot=echo TFTPing FIT to RAM... && " \
  57. "tftpboot ${load_addr} ${fit_image} && " \
  58. "bootm ${load_addr}\0" \
  59. DFU_ALT_INFO \
  60. BOOTENV
  61. #include <configs/zynq-common.h>
  62. #endif /* __CONFIG_SYZYGY_HUB_H */