plat_def.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright 2018-2021 NXP
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef PLAT_DEF_H
  7. #define PLAT_DEF_H
  8. #include <arch.h>
  9. #include <cortex_a72.h>
  10. /*
  11. * Required without TBBR.
  12. * To include the defines for DDR PHY
  13. * Images.
  14. */
  15. #include <tbbr_img_def.h>
  16. #include <policy.h>
  17. #include <soc.h>
  18. #define NXP_SYSCLK_FREQ 100000000
  19. #define NXP_DDRCLK_FREQ 100000000
  20. /* UART related definition */
  21. #define NXP_CONSOLE_ADDR NXP_UART_ADDR
  22. #define NXP_CONSOLE_BAUDRATE 115200
  23. #define NXP_SPD_EEPROM0 0x51
  24. /* Size of cacheable stacks */
  25. #if defined(IMAGE_BL2)
  26. #if defined(TRUSTED_BOARD_BOOT)
  27. #define PLATFORM_STACK_SIZE 0x2000
  28. #else
  29. #define PLATFORM_STACK_SIZE 0x1000
  30. #endif
  31. #elif defined(IMAGE_BL31)
  32. #define PLATFORM_STACK_SIZE 0x1000
  33. #endif
  34. /* SD block buffer */
  35. #define NXP_SD_BLOCK_BUF_SIZE (0xC000)
  36. #ifdef SD_BOOT
  37. #define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE \
  38. - NXP_SD_BLOCK_BUF_SIZE)
  39. #else
  40. #define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE)
  41. #endif
  42. #define BL2_TEXT_LIMIT (BL2_LIMIT)
  43. /* IO defines as needed by IO driver framework */
  44. #define MAX_IO_DEVICES 4
  45. #define MAX_IO_BLOCK_DEVICES 1
  46. #define MAX_IO_HANDLES 4
  47. #define BL31_WDOG_SEC 89
  48. /*
  49. * Define properties of Group 1 Secure and Group 0 interrupts as per GICv3
  50. * terminology. On a GICv2 system or mode, the lists will be merged and treated
  51. * as Group 0 interrupts.
  52. */
  53. #define PLAT_LS_G1S_IRQ_PROPS(grp) \
  54. INTR_PROP_DESC(BL32_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, grp, \
  55. GIC_INTR_CFG_EDGE)
  56. /* SGI 15 and Secure watchdog interrupts assigned to Group 0 */
  57. #define PLAT_LS_G0_IRQ_PROPS(grp) \
  58. INTR_PROP_DESC(BL31_WDOG_SEC, GIC_HIGHEST_SEC_PRIORITY, grp, \
  59. GIC_INTR_CFG_EDGE), \
  60. INTR_PROP_DESC(15, GIC_HIGHEST_SEC_PRIORITY, grp, \
  61. GIC_INTR_CFG_LEVEL)
  62. #endif /* PLAT_DEF_H */