plat_def.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Copyright 2022 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. /*
  10. * Required without TBBR.
  11. * To include the defines for DDR PHY
  12. * Images.
  13. */
  14. #include <tbbr_img_def.h>
  15. #include <policy.h>
  16. #include <soc.h>
  17. #define NXP_SPD_EEPROM0 0x51
  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. /* Size of cacheable stacks */
  24. #if defined(IMAGE_BL2)
  25. #if defined(TRUSTED_BOARD_BOOT)
  26. #define PLATFORM_STACK_SIZE 0x2000
  27. #else
  28. #define PLATFORM_STACK_SIZE 0x1000
  29. #endif
  30. #elif defined(IMAGE_BL31)
  31. #define PLATFORM_STACK_SIZE 0x1000
  32. #endif
  33. #define BL2_START NXP_OCRAM_ADDR
  34. #define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE)
  35. #define BL2_NOLOAD_START NXP_OCRAM_ADDR
  36. #define BL2_NOLOAD_LIMIT BL2_BASE
  37. /* IO defines as needed by IO driver framework */
  38. #define MAX_IO_DEVICES 4
  39. #define MAX_IO_BLOCK_DEVICES 1
  40. #define MAX_IO_HANDLES 4
  41. /*
  42. * FIP image defines - Offset at which FIP Image would be present
  43. * Image would include Bl31 , Bl33 and Bl32 (optional)
  44. */
  45. #ifdef POLICY_FUSE_PROVISION
  46. #define MAX_FIP_DEVICES 2
  47. #endif
  48. #ifndef MAX_FIP_DEVICES
  49. #define MAX_FIP_DEVICES 1
  50. #endif
  51. #define BL32_IRQ_SEC_PHY_TIMER 29
  52. #define BL31_WDOG_SEC 89
  53. /*
  54. * ID of the secure physical generic timer interrupt used by the BL32.
  55. */
  56. #define PLAT_LS_G1S_IRQ_PROPS(grp) \
  57. INTR_PROP_DESC(BL32_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, grp, \
  58. GIC_INTR_CFG_LEVEL)
  59. /* SGI 15 and Secure watchdog interrupts assigned to Group 0 */
  60. #define PLAT_LS_G0_IRQ_PROPS(grp) \
  61. INTR_PROP_DESC(BL31_WDOG_SEC, GIC_HIGHEST_SEC_PRIORITY, grp, \
  62. GIC_INTR_CFG_EDGE), \
  63. INTR_PROP_DESC(15, GIC_HIGHEST_SEC_PRIORITY, grp, \
  64. GIC_INTR_CFG_LEVEL)
  65. #endif /* PLAT_DEF_H */