rk3568_def.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Copyright (c) 2023, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef __PLAT_DEF_H__
  7. #define __PLAT_DEF_H__
  8. #define MAJOR_VERSION (1)
  9. #define MINOR_VERSION (0)
  10. #define SIZE_K(n) ((n) * 1024)
  11. /* Special value used to verify platform parameters from BL2 to BL3-1 */
  12. #define RK_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL
  13. #define GIC600_BASE 0xfd400000
  14. #define GIC600_SIZE SIZE_K(64)
  15. #define PMUSGRF_BASE 0xfdc00000
  16. #define SYSSGRF_BASE 0xfdc10000
  17. #define PMUGRF_BASE 0xfdc20000
  18. #define CPUGRF_BASE 0xfdc30000
  19. #define DDRGRF_BASE 0xfdc40000
  20. #define PIPEGRF_BASE 0xfdc50000
  21. #define GRF_BASE 0xfdc60000
  22. #define PIPEPHY_GRF0 0xfdc70000
  23. #define PIPEPHY_GRF1 0xfdc80000
  24. #define PIPEPHY_GRF2 0xfdc90000
  25. #define USBPHY_U3_GRF 0xfdca0000
  26. #define USB2PHY_U2_GRF 0xfdca8000
  27. #define EDPPHY_GRF 0xfdcb0000
  28. #define SYSSRAM_BASE 0xfdcc0000
  29. #define PCIE30PHY_GRF 0xfdcb8000
  30. #define USBGRF_BASE 0xfdcf0000
  31. #define PMUCRU_BASE 0xfdd00000
  32. #define SCRU_BASE 0xfdd10000
  33. #define SGRF_BASE 0xfdd18000
  34. #define STIME_BASE 0xfdd1c000
  35. #define CRU_BASE 0xfdd20000
  36. #define PMUSCRU_BASE 0xfdd30000
  37. #define I2C0_BASE 0xfdd40000
  38. #define UART0_BASE 0xfdd50000
  39. #define GPIO0_BASE 0xfdd60000
  40. #define PMUPVTM_BASE 0xfdd80000
  41. #define PMU_BASE 0xfdd90000
  42. #define PMUSRAM_BASE 0xfdcd0000
  43. #define PMUSRAM_SIZE SIZE_K(128)
  44. #define PMUSRAM_RSIZE SIZE_K(8)
  45. #define DDRSGRF_BASE 0xfe200000
  46. #define UART1_BASE 0xfe650000
  47. #define UART2_BASE 0xfe660000
  48. #define GPIO1_BASE 0xfe740000
  49. #define GPIO2_BASE 0xfe750000
  50. #define GPIO3_BASE 0xfe760000
  51. #define GPIO4_BASE 0xfe770000
  52. #define REMAP_BASE 0xffff0000
  53. #define REMAP_SIZE SIZE_K(64)
  54. /**************************************************************************
  55. * UART related constants
  56. **************************************************************************/
  57. #define FPGA_UART_BASE UART2_BASE
  58. #define FPGA_BAUDRATE 1500000
  59. #define FPGA_UART_CLOCK 24000000
  60. /******************************************************************************
  61. * System counter frequency related constants
  62. ******************************************************************************/
  63. #define SYS_COUNTER_FREQ_IN_TICKS 24000000
  64. #define SYS_COUNTER_FREQ_IN_MHZ 24
  65. /******************************************************************************
  66. * GIC-600 & interrupt handling related constants
  67. ******************************************************************************/
  68. /* Base rk_platform compatible GIC memory map */
  69. #define PLAT_GICD_BASE GIC600_BASE
  70. #define PLAT_GICC_BASE 0
  71. #define PLAT_GICR_BASE (GIC600_BASE + 0x60000)
  72. /******************************************************************************
  73. * sgi, ppi
  74. ******************************************************************************/
  75. #define RK_IRQ_SEC_PHY_TIMER 29
  76. #define RK_IRQ_SEC_SGI_0 8
  77. #define RK_IRQ_SEC_SGI_1 9
  78. #define RK_IRQ_SEC_SGI_2 10
  79. #define RK_IRQ_SEC_SGI_3 11
  80. #define RK_IRQ_SEC_SGI_4 12
  81. #define RK_IRQ_SEC_SGI_5 13
  82. #define RK_IRQ_SEC_SGI_6 14
  83. #define RK_IRQ_SEC_SGI_7 15
  84. #define SHARE_MEM_BASE 0x100000/* [1MB, 1MB+60K]*/
  85. #define SHARE_MEM_PAGE_NUM 15
  86. #define SHARE_MEM_SIZE SIZE_K(SHARE_MEM_PAGE_NUM * 4)
  87. #endif /* __PLAT_DEF_H__ */