plat_def.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright 2018-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 Images.
  12. */
  13. #include <tbbr_img_def.h>
  14. #include "policy.h"
  15. #include <soc.h>
  16. #define NXP_SPD_EEPROM0 0x51
  17. #define NXP_SYSCLK_FREQ 100000000
  18. #define NXP_DDRCLK_FREQ 100000000
  19. /* UART related definition */
  20. #define NXP_CONSOLE_ADDR NXP_UART_ADDR
  21. #define NXP_CONSOLE_BAUDRATE 115200
  22. /* Size of cacheable stacks */
  23. #if defined(IMAGE_BL2)
  24. #if defined(TRUSTED_BOARD_BOOT)
  25. #define PLATFORM_STACK_SIZE 0x2000
  26. #else
  27. #define PLATFORM_STACK_SIZE 0x1000
  28. #endif
  29. #elif defined(IMAGE_BL31)
  30. #define PLATFORM_STACK_SIZE 0x1000
  31. #endif
  32. /* SD block buffer */
  33. #define NXP_SD_BLOCK_BUF_SIZE (0x8000)
  34. #define NXP_SD_BLOCK_BUF_ADDR ULL(0x80000000)
  35. #define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE)
  36. /* IO defines as needed by IO driver framework */
  37. #define MAX_IO_DEVICES U(3)
  38. #define MAX_IO_BLOCK_DEVICES U(1)
  39. #define MAX_IO_HANDLES U(4)
  40. /*
  41. * FIP image defines - Offset at which FIP Image would be present
  42. * Image would include Bl31 , Bl33 and Bl32 (optional)
  43. */
  44. #ifdef POLICY_FUSE_PROVISION
  45. #define MAX_FIP_DEVICES U(2)
  46. #endif
  47. #ifndef MAX_FIP_DEVICES
  48. #define MAX_FIP_DEVICES U(1)
  49. #endif
  50. /*
  51. * ID of the secure physical generic timer interrupt used by the BL32.
  52. */
  53. #define BL32_IRQ_SEC_PHY_TIMER 29
  54. /*
  55. * Define properties of Group 1 Secure and Group 0 interrupts as per GICv3
  56. * terminology. On a GICv2 system or mode, the lists will be merged and treated
  57. * as Group 0 interrupts.
  58. */
  59. #define PLAT_LS_G1S_IRQ_PROPS(grp) \
  60. INTR_PROP_DESC(BL32_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, grp, \
  61. GIC_INTR_CFG_LEVEL)
  62. #define PLAT_LS_G0_IRQ_PROPS(grp)
  63. #endif /* PLAT_DEF_H */