topic_miami.h 3.6 KB

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