soc.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * Copyright 2018-2022 NXP
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. *
  6. */
  7. #ifndef SOC_H
  8. #define SOC_H
  9. /* Chassis specific defines - common across SoC's of a particular platform */
  10. #include <dcfg_lsch2.h>
  11. #include <soc_default_base_addr.h>
  12. #include <soc_default_helper_macros.h>
  13. /* DDR Regions Info */
  14. #define NUM_DRAM_REGIONS U(3)
  15. #define NXP_DRAM0_ADDR ULL(0x80000000)
  16. #define NXP_DRAM0_MAX_SIZE ULL(0x80000000) /* 2 GB */
  17. #define NXP_DRAM1_ADDR ULL(0x880000000)
  18. #define NXP_DRAM1_MAX_SIZE ULL(0x780000000) /* 30 GB */
  19. #define NXP_DRAM2_ADDR ULL(0x8800000000)
  20. #define NXP_DRAM2_MAX_SIZE ULL(0x7800000000) /* 480 GB */
  21. /*DRAM0 Size defined in platform_def.h */
  22. #define NXP_DRAM0_SIZE PLAT_DEF_DRAM0_SIZE
  23. /*
  24. * SVR Definition (not include major and minor rev)
  25. * A: without security
  26. * AE: with security
  27. */
  28. #define SVR_LS1026A 0x870709
  29. #define SVR_LS1026AE 0x870708
  30. #define SVR_LS1046A 0x870701
  31. #define SVR_LS1046AE 0x870700
  32. /* Number of cores in platform */
  33. /* Used by common code for array initialization */
  34. #define NUMBER_OF_CLUSTERS U(1)
  35. #define CORES_PER_CLUSTER U(4)
  36. #define PLATFORM_CORE_COUNT (NUMBER_OF_CLUSTERS * CORES_PER_CLUSTER)
  37. /*
  38. * Required LS standard platform porting definitions
  39. * for CCI-400
  40. */
  41. #define NXP_CCI_CLUSTER0_SL_IFACE_IX 4
  42. /* Defines required for using XLAT tables from ARM common code */
  43. #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 40)
  44. #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 40)
  45. /* Clock Divisors */
  46. #define NXP_PLATFORM_CLK_DIVIDER U(1)
  47. #define NXP_UART_CLK_DIVIDER U(2)
  48. /* set to 0 if the clusters are not symmetrical */
  49. #define SYMMETRICAL_CLUSTERS U(1)
  50. /*
  51. * set this switch to 1 if you need to keep the debug block
  52. * clocked during system power-down
  53. */
  54. #define DEBUG_ACTIVE 0
  55. /*
  56. * pwr mgmt features supported in the soc-specific code:
  57. * value == 0x0 the soc code does not support this feature
  58. * value != 0x0 the soc code supports this feature
  59. */
  60. #define SOC_CORE_RELEASE 0x1
  61. #define SOC_CORE_RESTART 0x1
  62. #define SOC_CORE_OFF 0x1
  63. #define SOC_CORE_STANDBY 0x1
  64. #define SOC_CORE_PWR_DWN 0x1
  65. #define SOC_CLUSTER_STANDBY 0x1
  66. #define SOC_CLUSTER_PWR_DWN 0x1
  67. #define SOC_SYSTEM_STANDBY 0x1
  68. #define SOC_SYSTEM_PWR_DWN 0x1
  69. #define SOC_SYSTEM_OFF 0x1
  70. #define SOC_SYSTEM_RESET 0x1
  71. /* Start: Macros used by lib/psci files */
  72. #define SYSTEM_PWR_DOMAINS 1
  73. #define PLAT_NUM_PWR_DOMAINS (PLATFORM_CORE_COUNT + \
  74. NUMBER_OF_CLUSTERS + \
  75. SYSTEM_PWR_DOMAINS)
  76. /* Power state coordination occurs at the system level */
  77. #define PLAT_MAX_PWR_LVL MPIDR_AFFLVL2
  78. /* define retention state */
  79. #define PLAT_MAX_RET_STATE (PSCI_LOCAL_STATE_RUN + 1)
  80. /* define power-down state */
  81. #define PLAT_MAX_OFF_STATE (PLAT_MAX_RET_STATE + 1)
  82. /*
  83. * Some data must be aligned on the biggest cache line size in the platform.
  84. * This is known only to the platform as it might have a combination of
  85. * integrated and external caches.
  86. *
  87. * CACHE_WRITEBACK_GRANULE is defined in soc.def
  88. */
  89. /* One cache line needed for bakery locks on ARM platforms */
  90. #define PLAT_PERCPU_BAKERY_LOCK_SIZE (1 * CACHE_WRITEBACK_GRANULE)
  91. #ifndef __ASSEMBLER__
  92. /* CCI slave interfaces */
  93. static const int cci_map[] = {
  94. NXP_CCI_CLUSTER0_SL_IFACE_IX,
  95. };
  96. void soc_init_lowlevel(void);
  97. void soc_init_percpu(void);
  98. void _soc_set_start_addr(unsigned long addr);
  99. #endif
  100. #endif /* SOC_H */