dfu.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com
  4. *
  5. * Environment variable definitions for DFU on TI boards.
  6. */
  7. #ifndef __TI_DFU_H
  8. #define __TI_DFU_H
  9. #define DFU_ALT_INFO_MMC \
  10. "dfu_alt_info_mmc=" \
  11. "boot part 0 1;" \
  12. "rootfs part 0 2;" \
  13. "MLO fat 0 1;" \
  14. "MLO.raw raw 0x100 0x100;" \
  15. "u-boot.img.raw raw 0x300 0x1000;" \
  16. "u-env.raw raw 0x1300 0x200;" \
  17. "spl-os-args.raw raw 0x1500 0x200;" \
  18. "spl-os-image.raw raw 0x1700 0x6900;" \
  19. "spl-os-args fat 0 1;" \
  20. "spl-os-image fat 0 1;" \
  21. "u-boot.img fat 0 1;" \
  22. "uEnv.txt fat 0 1\0"
  23. #define DFU_ALT_INFO_EMMC \
  24. "dfu_alt_info_emmc=" \
  25. "rawemmc raw 0 3751936;" \
  26. "boot part 1 1;" \
  27. "rootfs part 1 2;" \
  28. "MLO fat 1 1;" \
  29. "MLO.raw raw 0x100 0x100;" \
  30. "u-boot.img.raw raw 0x300 0x1000;" \
  31. "u-env.raw raw 0x1300 0x200;" \
  32. "spl-os-args.raw raw 0x1500 0x200;" \
  33. "spl-os-image.raw raw 0x1700 0x6900;" \
  34. "spl-os-args fat 1 1;" \
  35. "spl-os-image fat 1 1;" \
  36. "u-boot.img fat 1 1;" \
  37. "uEnv.txt fat 1 1\0"
  38. #ifdef CONFIG_MTD_RAW_NAND
  39. #define DFU_ALT_INFO_NAND \
  40. "dfu_alt_info_nand=" \
  41. "SPL part 0 1;" \
  42. "SPL.backup1 part 0 2;" \
  43. "SPL.backup2 part 0 3;" \
  44. "SPL.backup3 part 0 4;" \
  45. "u-boot part 0 5;" \
  46. "u-boot-spl-os part 0 6;" \
  47. "kernel part 0 8;" \
  48. "rootfs part 0 9\0"
  49. #else
  50. #define DFU_ALT_INFO_NAND ""
  51. #endif
  52. #define DFU_ALT_INFO_RAM \
  53. "dfu_alt_info_ram=" \
  54. "kernel ram 0x80200000 0x4000000;" \
  55. "fdt ram 0x80f80000 0x80000;" \
  56. "ramdisk ram 0x81000000 0x4000000\0"
  57. #define DFU_ALT_INFO_QSPI_XIP \
  58. "dfu_alt_info_qspi=" \
  59. "u-boot.bin raw 0x0 0x080000;" \
  60. "u-boot.backup raw 0x080000 0x080000;" \
  61. "u-boot-spl-os raw 0x100000 0x010000;" \
  62. "u-boot-env raw 0x110000 0x010000;" \
  63. "u-boot-env.backup raw 0x120000 0x010000;" \
  64. "kernel raw 0x130000 0x800000\0"
  65. #define DFU_ALT_INFO_QSPI \
  66. "dfu_alt_info_qspi=" \
  67. "MLO raw 0x0 0x040000;" \
  68. "u-boot.img raw 0x040000 0x0100000;" \
  69. "u-boot-spl-os raw 0x140000 0x080000;" \
  70. "u-boot-env raw 0x1C0000 0x010000;" \
  71. "u-boot-env.backup raw 0x1D0000 0x010000;" \
  72. "kernel raw 0x1E0000 0x800000\0"
  73. #endif /* __TI_DFU_H */