rk3368_def.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef RK3368_DEF_H
  7. #define RK3368_DEF_H
  8. /* Special value used to verify platform parameters from BL2 to BL3-1 */
  9. #define RK_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL
  10. #define CCI400_BASE 0xffb90000
  11. #define CCI400_SIZE 0x10000
  12. #define GIC400_BASE 0xffb70000
  13. #define GIC400_SIZE 0x10000
  14. #define STIME_BASE 0xff830000
  15. #define STIME_SIZE 0x10000
  16. #define CRU_BASE 0xff760000
  17. #define CRU_SIZE 0x10000
  18. #define GRF_BASE 0xff770000
  19. #define GRF_SIZE 0x10000
  20. #define SGRF_BASE 0xff740000
  21. #define SGRF_SIZE 0x10000
  22. #define PMU_BASE 0xff730000
  23. #define PMU_GRF_BASE 0xff738000
  24. #define PMU_SIZE 0x10000
  25. #define RK_INTMEM_BASE 0xff8c0000
  26. #define RK_INTMEM_SIZE 0x10000
  27. #define UART0_BASE 0xff180000
  28. #define UART0_SIZE 0x10000
  29. #define UART1_BASE 0xff190000
  30. #define UART1_SIZE 0x10000
  31. #define UART2_BASE 0xff690000
  32. #define UART2_SIZE 0x10000
  33. #define UART3_BASE 0xff1b0000
  34. #define UART3_SIZE 0x10000
  35. #define UART4_BASE 0xff1c0000
  36. #define UART4_SIZE 0x10000
  37. #define CRU_BASE 0xff760000
  38. #define PMUSRAM_BASE 0xff720000
  39. #define PMUSRAM_SIZE 0x10000
  40. #define PMUSRAM_RSIZE 0x1000
  41. #define DDR_PCTL_BASE 0xff610000
  42. #define DDR_PCTL_SIZE 0x10000
  43. #define DDR_PHY_BASE 0xff620000
  44. #define DDR_PHY_SIZE 0x10000
  45. #define SERVICE_BUS_BASE 0xffac0000
  46. #define SERVICE_BUS_SISE 0x50000
  47. #define COLD_BOOT_BASE 0xffff0000
  48. /**************************************************************************
  49. * UART related constants
  50. **************************************************************************/
  51. #define RK3368_BAUDRATE 115200
  52. #define RK3368_UART_CLOCK 24000000
  53. /******************************************************************************
  54. * System counter frequency related constants
  55. ******************************************************************************/
  56. #define SYS_COUNTER_FREQ_IN_TICKS 24000000
  57. /******************************************************************************
  58. * GIC-400 & interrupt handling related constants
  59. ******************************************************************************/
  60. /* Base rk_platform compatible GIC memory map */
  61. #define RK3368_GICD_BASE (GIC400_BASE + 0x1000)
  62. #define RK3368_GICC_BASE (GIC400_BASE + 0x2000)
  63. #define RK3368_GICR_BASE 0 /* no GICR in GIC-400 */
  64. /*****************************************************************************
  65. * CCI-400 related constants
  66. ******************************************************************************/
  67. #define PLAT_RK_CCI_CLUSTER0_SL_IFACE_IX 3
  68. #define PLAT_RK_CCI_CLUSTER1_SL_IFACE_IX 4
  69. /******************************************************************************
  70. * sgi, ppi
  71. ******************************************************************************/
  72. #define RK_IRQ_SEC_PHY_TIMER 29
  73. #define RK_IRQ_SEC_SGI_0 8
  74. #define RK_IRQ_SEC_SGI_1 9
  75. #define RK_IRQ_SEC_SGI_2 10
  76. #define RK_IRQ_SEC_SGI_3 11
  77. #define RK_IRQ_SEC_SGI_4 12
  78. #define RK_IRQ_SEC_SGI_5 13
  79. #define RK_IRQ_SEC_SGI_6 14
  80. #define RK_IRQ_SEC_SGI_7 15
  81. /*
  82. * Define a list of Group 0 interrupts.
  83. */
  84. #define PLAT_RK_GICV2_G0_IRQS \
  85. INTR_PROP_DESC(RK_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, \
  86. GICV2_INTR_GROUP0, GIC_INTR_CFG_LEVEL)
  87. #endif /* RK3368_DEF_H */