blob: 5898f7a81ec5c375e76ba6c3e49b9e18a396aabf [file] [log] [blame]
Anson Huangf753d462019-01-15 10:34:04 +08001/*
2 * Copyright (c) 2015-2019, 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 */
Anson Huang922c45f2019-01-15 10:56:36 +080011#define IMX_SIP_CPUFREQ 0xC2000001
12#define IMX_SIP_SET_CPUFREQ 0x00
13
Anson Huangf753d462019-01-15 10:34:04 +080014#define IMX_SIP_SRTC 0xC2000002
15#define IMX_SIP_SRTC_SET_TIME 0x00
16
Anson Huang971392d2019-01-18 10:43:59 +080017#define IMX_SIP_BUILDINFO 0xC2000003
18#define IMX_SIP_BUILDINFO_GET_COMMITHASH 0x00
19
Leonard Crestez55119082019-05-10 13:07:41 +030020#define IMX_SIP_GET_SOC_INFO 0xC2000006
21
Anson Huange1d418c2019-01-18 10:01:50 +080022#define IMX_SIP_WAKEUP_SRC 0xC2000009
23#define IMX_SIP_WAKEUP_SRC_SCU 0x1
24#define IMX_SIP_WAKEUP_SRC_IRQSTEER 0x2
25
Anson Huang6e47de52019-01-18 10:27:48 +080026#define IMX_SIP_OTP_READ 0xC200000A
27#define IMX_SIP_OTP_WRITE 0xC200000B
28
Anson Huange708bfb2019-01-18 10:35:54 +080029#define IMX_SIP_MISC_SET_TEMP 0xC200000C
30
Leonard Crestez55119082019-05-10 13:07:41 +030031#if defined(PLAT_imx8mq)
32int imx_soc_info_handler(uint32_t smc_fid, u_register_t x1,
33 u_register_t x2, u_register_t x3);
34#endif
35
Leonard Crestezd62c1612019-05-20 11:28:50 +030036#if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx))
Anson Huang922c45f2019-01-15 10:56:36 +080037int imx_cpufreq_handler(uint32_t smc_fid, u_register_t x1,
38 u_register_t x2, u_register_t x3);
Anson Huangf753d462019-01-15 10:34:04 +080039int imx_srtc_handler(uint32_t smc_fid, void *handle, u_register_t x1,
40 u_register_t x2, u_register_t x3, u_register_t x4);
Anson Huange1d418c2019-01-18 10:01:50 +080041int imx_wakeup_src_handler(uint32_t smc_fid, u_register_t x1,
42 u_register_t x2, u_register_t x3);
Anson Huang6e47de52019-01-18 10:27:48 +080043int imx_otp_handler(uint32_t smc_fid, void *handle,
44 u_register_t x1, u_register_t x2);
Anson Huange708bfb2019-01-18 10:35:54 +080045int imx_misc_set_temp_handler(uint32_t smc_fid, u_register_t x1,
46 u_register_t x2, u_register_t x3,
47 u_register_t x4);
Leonard Crestez402bd522019-05-08 22:29:21 +030048#endif
Anson Huang971392d2019-01-18 10:43:59 +080049uint64_t imx_buildinfo_handler(uint32_t smc_fid, u_register_t x1,
50 u_register_t x2, u_register_t x3,
51 u_register_t x4);
Anson Huangf753d462019-01-15 10:34:04 +080052
53#endif /* __IMX_SIP_SVC_H__ */