imx_sip_svc.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /*
  2. * Copyright (c) 2015-2024, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef __IMX_SIP_SVC_H__
  7. #define __IMX_SIP_SVC_H__
  8. /* SMC function IDs for SiP Service queries */
  9. #define IMX_SIP_GPC 0xC2000000
  10. #define IMX_SIP_CPUFREQ 0xC2000001
  11. #define IMX_SIP_SET_CPUFREQ 0x00
  12. #define IMX_SIP_SRTC 0xC2000002
  13. #define IMX_SIP_SRTC_SET_TIME 0x00
  14. #define IMX_SIP_BUILDINFO 0xC2000003
  15. #define IMX_SIP_BUILDINFO_GET_COMMITHASH 0x00
  16. #define IMX_SIP_DDR_DVFS 0xc2000004
  17. #define IMX_SIP_SRC 0xC2000005
  18. #define IMX_SIP_SRC_SET_SECONDARY_BOOT 0x10
  19. #define IMX_SIP_SRC_IS_SECONDARY_BOOT 0x11
  20. #define IMX_SIP_GET_SOC_INFO 0xC2000006
  21. #define IMX_SIP_HAB 0xC2000007
  22. #define IMX_SIP_HAB_AUTH_IMG 0x00
  23. #define IMX_SIP_HAB_ENTRY 0x01
  24. #define IMX_SIP_HAB_EXIT 0x02
  25. #define IMX_SIP_HAB_REPORT_EVENT 0x03
  26. #define IMX_SIP_HAB_REPORT_STATUS 0x04
  27. #define IMX_SIP_HAB_FAILSAFE 0x05
  28. #define IMX_SIP_HAB_CHECK_TARGET 0x06
  29. #define IMX_SIP_HAB_GET_VERSION 0x07
  30. #define IMX_SIP_HAB_AUTH_IMG_NO_DCD 0x08
  31. #define IMX_SIP_WAKEUP_SRC 0xC2000009
  32. #define IMX_SIP_WAKEUP_SRC_SCU 0x1
  33. #define IMX_SIP_WAKEUP_SRC_IRQSTEER 0x2
  34. #define IMX_SIP_OTP_READ 0xC200000A
  35. #define IMX_SIP_OTP_WRITE 0xC200000B
  36. #define IMX_SIP_MISC_SET_TEMP 0xC200000C
  37. #define IMX_SIP_AARCH32 0xC20000FD
  38. int imx_kernel_entry_handler(uint32_t smc_fid, u_register_t x1,
  39. u_register_t x2, u_register_t x3,
  40. u_register_t x4);
  41. #define IMX_SIP_SCMI 0xC20000FE
  42. #define IMX_SIP_HIFI_XRDC 0xC200000E
  43. #if defined(PLAT_imx8mq)
  44. int imx_soc_info_handler(uint32_t smc_fid, u_register_t x1,
  45. u_register_t x2, u_register_t x3);
  46. int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
  47. u_register_t x2, u_register_t x3);
  48. #if IMX_DRAM_RETENTION
  49. int dram_dvfs_handler(uint32_t smc_fid, void *handle,
  50. u_register_t x1, u_register_t x2, u_register_t x3);
  51. #else
  52. static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
  53. u_register_t x1, u_register_t x2, u_register_t x3)
  54. {
  55. SMC_RET1(handle, SMC_UNK);
  56. }
  57. #endif
  58. #endif
  59. #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
  60. int dram_dvfs_handler(uint32_t smc_fid, void *handle,
  61. u_register_t x1, u_register_t x2, u_register_t x3);
  62. int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
  63. u_register_t x2, u_register_t x3);
  64. #endif
  65. #if defined(PLAT_imx8mm) || defined(PLAT_imx8mq) || defined(PLAT_imx8mn) || \
  66. defined(PLAT_imx8mp)
  67. int imx_src_handler(uint32_t smc_fid, u_register_t x1,
  68. u_register_t x2, u_register_t x3, void *handle);
  69. #endif
  70. #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
  71. int imx_hab_handler(uint32_t smc_fid, u_register_t x1,
  72. u_register_t x2, u_register_t x3, u_register_t x4);
  73. #endif
  74. #if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx))
  75. int imx_cpufreq_handler(uint32_t smc_fid, u_register_t x1,
  76. u_register_t x2, u_register_t x3);
  77. int imx_srtc_handler(uint32_t smc_fid, void *handle, u_register_t x1,
  78. u_register_t x2, u_register_t x3, u_register_t x4);
  79. int imx_wakeup_src_handler(uint32_t smc_fid, u_register_t x1,
  80. u_register_t x2, u_register_t x3);
  81. int imx_otp_handler(uint32_t smc_fid, void *handle,
  82. u_register_t x1, u_register_t x2);
  83. int imx_misc_set_temp_handler(uint32_t smc_fid, u_register_t x1,
  84. u_register_t x2, u_register_t x3,
  85. u_register_t x4);
  86. #endif
  87. uint64_t imx_buildinfo_handler(uint32_t smc_fid, u_register_t x1,
  88. u_register_t x2, u_register_t x3,
  89. u_register_t x4);
  90. int scmi_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2, u_register_t x3);
  91. int imx_hifi_xrdc(uint32_t smc_fid);
  92. #if defined(PLAT_imx8ulp)
  93. int dram_dvfs_handler(uint32_t smc_fid, void *handle,
  94. u_register_t x1, u_register_t x2, u_register_t x3);
  95. #endif
  96. #endif /* __IMX_SIP_SVC_H__ */