addressmap_shared.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef ADDRESSMAP_SHARED_H
  7. #define ADDRESSMAP_SHARED_H
  8. #define SIZE_K(n) ((n) * 1024)
  9. #define SIZE_M(n) ((n) * 1024 * 1024)
  10. #define SRAM_TEXT_LIMIT (4 * 1024)
  11. #define SRAM_DATA_LIMIT (4 * 1024)
  12. #define SRAM_BIN_LIMIT (4 * 1024)
  13. /*
  14. * The parts of the shared defined registers address with AP and M0,
  15. * let's note and mark the previous defines like this:
  16. */
  17. #define GIC500_BASE (MMIO_BASE + 0x06E00000)
  18. #define UART0_BASE (MMIO_BASE + 0x07180000)
  19. #define UART1_BASE (MMIO_BASE + 0x07190000)
  20. #define UART2_BASE (MMIO_BASE + 0x071A0000)
  21. #define UART3_BASE (MMIO_BASE + 0x071B0000)
  22. #define PMU_BASE (MMIO_BASE + 0x07310000)
  23. #define PMUGRF_BASE (MMIO_BASE + 0x07320000)
  24. #define SGRF_BASE (MMIO_BASE + 0x07330000)
  25. #define PMUSRAM_BASE (MMIO_BASE + 0x073B0000)
  26. #define PWM_BASE (MMIO_BASE + 0x07420000)
  27. #define CIC_BASE (MMIO_BASE + 0x07620000)
  28. #define PD_BUS0_BASE (MMIO_BASE + 0x07650000)
  29. #define DCF_BASE (MMIO_BASE + 0x076A0000)
  30. #define GPIO0_BASE (MMIO_BASE + 0x07720000)
  31. #define GPIO1_BASE (MMIO_BASE + 0x07730000)
  32. #define PMUCRU_BASE (MMIO_BASE + 0x07750000)
  33. #define CRU_BASE (MMIO_BASE + 0x07760000)
  34. #define GRF_BASE (MMIO_BASE + 0x07770000)
  35. #define GPIO2_BASE (MMIO_BASE + 0x07780000)
  36. #define GPIO3_BASE (MMIO_BASE + 0x07788000)
  37. #define GPIO4_BASE (MMIO_BASE + 0x07790000)
  38. #define WDT1_BASE (MMIO_BASE + 0x07840000)
  39. #define WDT0_BASE (MMIO_BASE + 0x07848000)
  40. #define TIMER_BASE (MMIO_BASE + 0x07850000)
  41. #define STIME_BASE (MMIO_BASE + 0x07860000)
  42. #define SRAM_BASE (MMIO_BASE + 0x078C0000)
  43. #define SERVICE_NOC_0_BASE (MMIO_BASE + 0x07A50000)
  44. #define DDRC0_BASE (MMIO_BASE + 0x07A80000)
  45. #define SERVICE_NOC_1_BASE (MMIO_BASE + 0x07A84000)
  46. #define DDRC1_BASE (MMIO_BASE + 0x07A88000)
  47. #define SERVICE_NOC_2_BASE (MMIO_BASE + 0x07A8C000)
  48. #define SERVICE_NOC_3_BASE (MMIO_BASE + 0x07A90000)
  49. #define CCI500_BASE (MMIO_BASE + 0x07B00000)
  50. #define COLD_BOOT_BASE (MMIO_BASE + 0x07FF0000)
  51. /* Registers size */
  52. #define GIC500_SIZE SIZE_M(2)
  53. #define UART0_SIZE SIZE_K(64)
  54. #define UART1_SIZE SIZE_K(64)
  55. #define UART2_SIZE SIZE_K(64)
  56. #define UART3_SIZE SIZE_K(64)
  57. #define PMU_SIZE SIZE_K(64)
  58. #define PMUGRF_SIZE SIZE_K(64)
  59. #define SGRF_SIZE SIZE_K(64)
  60. #define PMUSRAM_SIZE SIZE_K(64)
  61. #define PMUSRAM_RSIZE SIZE_K(8)
  62. #define PWM_SIZE SIZE_K(64)
  63. #define CIC_SIZE SIZE_K(4)
  64. #define DCF_SIZE SIZE_K(4)
  65. #define GPIO0_SIZE SIZE_K(64)
  66. #define GPIO1_SIZE SIZE_K(64)
  67. #define PMUCRU_SIZE SIZE_K(64)
  68. #define CRU_SIZE SIZE_K(64)
  69. #define GRF_SIZE SIZE_K(64)
  70. #define GPIO2_SIZE SIZE_K(32)
  71. #define GPIO3_SIZE SIZE_K(32)
  72. #define GPIO4_SIZE SIZE_K(32)
  73. #define STIME_SIZE SIZE_K(64)
  74. #define SRAM_SIZE SIZE_K(192)
  75. #define SERVICE_NOC_0_SIZE SIZE_K(192)
  76. #define DDRC0_SIZE SIZE_K(32)
  77. #define SERVICE_NOC_1_SIZE SIZE_K(16)
  78. #define DDRC1_SIZE SIZE_K(32)
  79. #define SERVICE_NOC_2_SIZE SIZE_K(16)
  80. #define SERVICE_NOC_3_SIZE SIZE_K(448)
  81. #define CCI500_SIZE SIZE_M(1)
  82. #define PD_BUS0_SIZE SIZE_K(448)
  83. /* DDR Registers address */
  84. #define CTL_BASE(ch) (DDRC0_BASE + (ch) * 0x8000)
  85. #define CTL_REG(ch, n) (CTL_BASE(ch) + (n) * 0x4)
  86. #define PI_OFFSET 0x800
  87. #define PI_BASE(ch) (CTL_BASE(ch) + PI_OFFSET)
  88. #define PI_REG(ch, n) (PI_BASE(ch) + (n) * 0x4)
  89. #define PHY_OFFSET 0x2000
  90. #define PHY_BASE(ch) (CTL_BASE(ch) + PHY_OFFSET)
  91. #define PHY_REG(ch, n) (PHY_BASE(ch) + (n) * 0x4)
  92. #define MSCH_BASE(ch) (SERVICE_NOC_1_BASE + (ch) * 0x8000)
  93. #endif /* ADDRESSMAP_SHARED_H */