hikey960_def.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef HIKEY960_DEF_H
  7. #define HIKEY960_DEF_H
  8. #include <common/tbbr/tbbr_img_def.h>
  9. #include <plat/common/common_def.h>
  10. #define DDR_BASE 0x0
  11. #define DDR_SIZE 0xE0000000
  12. #define DEVICE_BASE 0xE0000000
  13. #define DEVICE_SIZE 0x20000000
  14. /* Memory location options for TSP */
  15. #define HIKEY960_SRAM_ID 0
  16. #define HIKEY960_DRAM_ID 1
  17. /*
  18. * DDR for TEE (80MB from 0x3E00000-0x43000FFF) is divided into several
  19. * regions:
  20. * - SPMC manifest (4KB at the top) used by SPMC_AT_EL3 and the TEE
  21. * - Datastore for SPMC_AT_EL3 (4MB at the top) used by BL31
  22. * - Secure DDR (default is the top 60MB) used by OP-TEE
  23. * - Non-secure DDR used by OP-TEE (shared memory and padding) (4MB)
  24. * - Secure DDR (4MB aligned on 4MB) for OP-TEE's "Secure Data Path" feature
  25. * - Non-secure DDR (8MB) reserved for OP-TEE's future use
  26. */
  27. #define DDR_SEC_SIZE 0x03C00000 /* reserve 60MB secure memory */
  28. #define DDR_SEC_BASE 0x3F000000
  29. #define DDR2_SEC_SIZE 0x00400000 /* SPMC_AT_EL3: 4MB for BL31 RAM2 */
  30. #define DDR2_SEC_BASE 0x42C00000
  31. #define DDR_SEC_CONFIG_SIZE 0x00001000 /* SPMC_AT_EL3: SPMC manifest */
  32. #define DDR_SEC_CONFIG_BASE 0x43000000
  33. #define DDR_SDP_SIZE 0x00400000
  34. #define DDR_SDP_BASE (DDR_SEC_BASE - 0x400000 /* align */ - \
  35. DDR_SDP_SIZE)
  36. /*
  37. * PL011 related constants
  38. */
  39. #define PL011_UART5_BASE 0xFDF05000
  40. #define PL011_UART6_BASE 0xFFF32000
  41. #define PL011_BAUDRATE 115200
  42. #define PL011_UART_CLK_IN_HZ 19200000
  43. #define UFS_BASE 0
  44. #define HIKEY960_UFS_DESC_BASE 0x20000000
  45. #define HIKEY960_UFS_DESC_SIZE 0x00200000 /* 2MB */
  46. #define HIKEY960_UFS_DATA_BASE 0x10000000
  47. #define HIKEY960_UFS_DATA_SIZE 0x0A000000 /* 160MB */
  48. #if defined(SPMC_AT_EL3)
  49. /*
  50. * Number of Secure Partitions supported.
  51. * SPMC at EL3, uses this count to configure the maximum number of supported
  52. * secure partitions.
  53. */
  54. #define SECURE_PARTITION_COUNT 1
  55. /*
  56. * Number of Nwld Partitions supported.
  57. * SPMC at EL3, uses this count to configure the maximum number of supported
  58. * nwld partitions.
  59. */
  60. #define NS_PARTITION_COUNT 1
  61. /*
  62. * Number of Logical Partitions supported.
  63. * SPMC at EL3, uses this count to configure the maximum number of supported
  64. * logical partitions.
  65. */
  66. #define MAX_EL3_LP_DESCS_COUNT 1
  67. #endif /* SPMC_AT_EL3 */
  68. #endif /* HIKEY960_DEF_H */