1 /* 2 * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef __IMX_SIP_SVC_H__ 8 #define __IMX_SIP_SVC_H__ 9 10 /* SMC function IDs for SiP Service queries */ 11 #define IMX_SIP_GPC 0xC2000000 12 13 #define IMX_SIP_CPUFREQ 0xC2000001 14 #define IMX_SIP_SET_CPUFREQ 0x00 15 16 #define IMX_SIP_SRTC 0xC2000002 17 #define IMX_SIP_SRTC_SET_TIME 0x00 18 19 #define IMX_SIP_BUILDINFO 0xC2000003 20 #define IMX_SIP_BUILDINFO_GET_COMMITHASH 0x00 21 22 #define IMX_SIP_DDR_DVFS 0xc2000004 23 24 #define IMX_SIP_SRC 0xC2000005 25 #define IMX_SIP_SRC_SET_SECONDARY_BOOT 0x10 26 #define IMX_SIP_SRC_IS_SECONDARY_BOOT 0x11 27 28 #define IMX_SIP_GET_SOC_INFO 0xC2000006 29 30 #define IMX_SIP_WAKEUP_SRC 0xC2000009 31 #define IMX_SIP_WAKEUP_SRC_SCU 0x1 32 #define IMX_SIP_WAKEUP_SRC_IRQSTEER 0x2 33 34 #define IMX_SIP_OTP_READ 0xC200000A 35 #define IMX_SIP_OTP_WRITE 0xC200000B 36 37 #define IMX_SIP_MISC_SET_TEMP 0xC200000C 38 39 #define IMX_SIP_AARCH32 0xC20000FD 40 41 int imx_kernel_entry_handler(uint32_t smc_fid, u_register_t x1, 42 u_register_t x2, u_register_t x3, 43 u_register_t x4); 44 #if defined(PLAT_imx8mq) 45 int imx_soc_info_handler(uint32_t smc_fid, u_register_t x1, 46 u_register_t x2, u_register_t x3); 47 #endif 48 #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp) 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 52 int imx_gpc_handler(uint32_t smc_fid, u_register_t x1, 53 u_register_t x2, u_register_t x3); 54 #endif 55 56 #if defined(PLAT_imx8mm) || defined(PLAT_imx8mq) 57 int imx_src_handler(uint32_t smc_fid, u_register_t x1, 58 u_register_t x2, u_register_t x3, void *handle); 59 #endif 60 61 #if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx)) 62 int imx_cpufreq_handler(uint32_t smc_fid, u_register_t x1, 63 u_register_t x2, u_register_t x3); 64 int imx_srtc_handler(uint32_t smc_fid, void *handle, u_register_t x1, 65 u_register_t x2, u_register_t x3, u_register_t x4); 66 int imx_wakeup_src_handler(uint32_t smc_fid, u_register_t x1, 67 u_register_t x2, u_register_t x3); 68 int imx_otp_handler(uint32_t smc_fid, void *handle, 69 u_register_t x1, u_register_t x2); 70 int imx_misc_set_temp_handler(uint32_t smc_fid, u_register_t x1, 71 u_register_t x2, u_register_t x3, 72 u_register_t x4); 73 #endif 74 uint64_t imx_buildinfo_handler(uint32_t smc_fid, u_register_t x1, 75 u_register_t x2, u_register_t x3, 76 u_register_t x4); 77 78 #endif /* __IMX_SIP_SVC_H__ */ 79