rk3399_def.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef RK3399_DEF_H
  7. #define RK3399_DEF_H
  8. #include <addressmap.h>
  9. #define RK3399_PRIMARY_CPU 0x0
  10. /* Special value used to verify platform parameters from BL2 to BL3-1 */
  11. #define RK_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL
  12. /**************************************************************************
  13. * UART related constants
  14. **************************************************************************/
  15. #define RK3399_BAUDRATE 115200
  16. #define RK3399_UART_CLOCK 24000000
  17. /******************************************************************************
  18. * System counter frequency related constants
  19. ******************************************************************************/
  20. #define SYS_COUNTER_FREQ_IN_TICKS 24000000
  21. /* Base rockchip_platform compatible GIC memory map */
  22. #define BASE_GICD_BASE (GIC500_BASE)
  23. #define BASE_GICR_BASE (GIC500_BASE + SIZE_M(1))
  24. /*****************************************************************************
  25. * CCI-400 related constants
  26. ******************************************************************************/
  27. #define PLAT_RK_CCI_CLUSTER0_SL_IFACE_IX 0
  28. #define PLAT_RK_CCI_CLUSTER1_SL_IFACE_IX 1
  29. /******************************************************************************
  30. * sgi, ppi
  31. ******************************************************************************/
  32. #define ARM_IRQ_SEC_PHY_TIMER 29
  33. #define ARM_IRQ_SEC_SGI_0 8
  34. #define ARM_IRQ_SEC_SGI_1 9
  35. #define ARM_IRQ_SEC_SGI_2 10
  36. #define ARM_IRQ_SEC_SGI_3 11
  37. #define ARM_IRQ_SEC_SGI_4 12
  38. #define ARM_IRQ_SEC_SGI_5 13
  39. #define ARM_IRQ_SEC_SGI_6 14
  40. #define ARM_IRQ_SEC_SGI_7 15
  41. /*
  42. * Define a list of Group 1 Secure and Group 0 interrupts as per GICv3
  43. * terminology. On a GICv2 system or mode, the lists will be merged and treated
  44. * as Group 0 interrupts.
  45. */
  46. #define PLAT_RK_GICV3_G1S_IRQS \
  47. INTR_PROP_DESC(ARM_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, \
  48. INTR_GROUP1S, GIC_INTR_CFG_LEVEL)
  49. #define PLAT_RK_GICV3_G0_IRQS \
  50. INTR_PROP_DESC(ARM_IRQ_SEC_SGI_6, GIC_HIGHEST_SEC_PRIORITY, \
  51. INTR_GROUP0, GIC_INTR_CFG_LEVEL)
  52. #endif /* RK3399_DEF_H */