total_compute.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Configuration for Total Compute platform. Parts were derived from other ARM
  4. * configurations.
  5. * (C) Copyright 2020 Arm Limited
  6. * Usama Arif <usama.arif@arm.com>
  7. */
  8. #ifndef __TOTAL_COMPUTE_H
  9. #define __TOTAL_COMPUTE_H
  10. #define CONFIG_REMAKE_ELF
  11. /* Link Definitions */
  12. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
  13. #define CONFIG_SYS_BOOTM_LEN (64 << 20)
  14. #define UART0_BASE 0x7ff80000
  15. /* Size of malloc() pool */
  16. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 << 20))
  17. /* PL011 Serial Configuration */
  18. #define CONFIG_PL011_CLOCK 7372800
  19. /* Miscellaneous configurable options */
  20. #define CONFIG_SYS_LOAD_ADDR 0x90000000
  21. /* Physical Memory Map */
  22. #define PHYS_SDRAM_1 0x80000000
  23. /* Top 48MB reserved for secure world use */
  24. #define DRAM_SEC_SIZE 0x03000000
  25. #define PHYS_SDRAM_1_SIZE 0x80000000 - DRAM_SEC_SIZE
  26. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  27. #define CONFIG_ARM_PL180_MMCI_BASE 0x001c050000
  28. #define CONFIG_SYS_MMC_MAX_BLK_COUNT 127
  29. #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 12000000
  30. #define CONFIG_EXTRA_ENV_SETTINGS \
  31. "bootm_size=0x20000000\0" \
  32. "load_addr=0xa0000000\0" \
  33. "kernel_addr_r=0x80080000\0" \
  34. "initrd_addr_r=0x88000000\0" \
  35. "fdt_addr_r=0x83000000\0"
  36. /*
  37. * If vbmeta partition is present, boot Android with verification using AVB.
  38. * Else if system partition is present (no vbmeta partition), boot Android
  39. * without verification (for development purposes).
  40. * Else boot FIT image.
  41. */
  42. #define CONFIG_BOOTCOMMAND \
  43. "if part number mmc 0 vbmeta is_avb; then" \
  44. " echo MMC with vbmeta partition detected.;" \
  45. " echo starting Android Verified boot.;" \
  46. " avb init 0; " \
  47. " if avb verify; then " \
  48. " set bootargs $bootargs $avb_bootargs; " \
  49. " part start mmc 0 boot boot_start; " \
  50. " part size mmc 0 boot boot_size; " \
  51. " mmc read ${load_addr} ${boot_start} ${boot_size}; " \
  52. " bootm ${load_addr} ${load_addr} ${fdt_addr_r}; " \
  53. " else; " \
  54. " echo AVB verification failed.; " \
  55. " exit; " \
  56. " fi; " \
  57. "elif part number mmc 0 system is_non_avb_android; then " \
  58. " booti ${kernel_addr_r} ${initrd_addr_r} ${fdt_addr_r};" \
  59. "else;" \
  60. " echo Booting FIT image.;" \
  61. " bootm ${load_addr} ${load_addr} ${fdt_addr_r}; " \
  62. "fi;"
  63. /* Monitor Command Prompt */
  64. #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
  65. #define CONFIG_SYS_MAXARGS 64 /* max command args */
  66. #define CONFIG_SYS_FLASH_BASE 0x0C000000
  67. /* 256 x 256KiB sectors */
  68. #define CONFIG_SYS_MAX_FLASH_SECT 256
  69. #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_32BIT
  70. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  71. #define CONFIG_SYS_FLASH_EMPTY_INFO /* flinfo indicates empty blocks */
  72. #define FLASH_MAX_SECTOR_SIZE 0x00040000
  73. #endif /* __TOTAL_COMPUTE_H */