blob: 5bea0d11847d912bbbd68730f2e8ea1a071008b3 [file] [log] [blame]
Anson Huangf753d462019-01-15 10:34:04 +08001/*
Jacky Bai4d93d1d2020-07-02 14:39:58 +08002 * Copyright (c) 2015-2024, ARM Limited and Contributors. All rights reserved.
Anson Huangf753d462019-01-15 10:34:04 +08003 *
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 */
Jacky Bai31f02322019-12-11 16:26:59 +080011#define IMX_SIP_GPC 0xC2000000
12
Anson Huang922c45f2019-01-15 10:56:36 +080013#define IMX_SIP_CPUFREQ 0xC2000001
14#define IMX_SIP_SET_CPUFREQ 0x00
15
Anson Huangf753d462019-01-15 10:34:04 +080016#define IMX_SIP_SRTC 0xC2000002
17#define IMX_SIP_SRTC_SET_TIME 0x00
18
Anson Huang971392d2019-01-18 10:43:59 +080019#define IMX_SIP_BUILDINFO 0xC2000003
20#define IMX_SIP_BUILDINFO_GET_COMMITHASH 0x00
21
Jacky Baid746daa12019-11-25 13:19:37 +080022#define IMX_SIP_DDR_DVFS 0xc2000004
23
Igor Opaniukf2de6812021-03-10 13:42:55 +020024#define IMX_SIP_SRC 0xC2000005
25#define IMX_SIP_SRC_SET_SECONDARY_BOOT 0x10
26#define IMX_SIP_SRC_IS_SECONDARY_BOOT 0x11
27
Leonard Crestez55119082019-05-10 13:07:41 +030028#define IMX_SIP_GET_SOC_INFO 0xC2000006
29
Andrey Zhizhikin10a4d862022-09-26 22:25:33 +020030#define IMX_SIP_HAB 0xC2000007
31#define IMX_SIP_HAB_AUTH_IMG 0x00
32#define IMX_SIP_HAB_ENTRY 0x01
33#define IMX_SIP_HAB_EXIT 0x02
34#define IMX_SIP_HAB_REPORT_EVENT 0x03
35#define IMX_SIP_HAB_REPORT_STATUS 0x04
36#define IMX_SIP_HAB_FAILSAFE 0x05
37#define IMX_SIP_HAB_CHECK_TARGET 0x06
38#define IMX_SIP_HAB_GET_VERSION 0x07
39#define IMX_SIP_HAB_AUTH_IMG_NO_DCD 0x08
40
Anson Huange1d418c2019-01-18 10:01:50 +080041#define IMX_SIP_WAKEUP_SRC 0xC2000009
42#define IMX_SIP_WAKEUP_SRC_SCU 0x1
43#define IMX_SIP_WAKEUP_SRC_IRQSTEER 0x2
44
Anson Huang6e47de52019-01-18 10:27:48 +080045#define IMX_SIP_OTP_READ 0xC200000A
46#define IMX_SIP_OTP_WRITE 0xC200000B
47
Anson Huange708bfb2019-01-18 10:35:54 +080048#define IMX_SIP_MISC_SET_TEMP 0xC200000C
49
Peng Fandd860d12020-07-10 14:18:01 +080050#define IMX_SIP_AARCH32 0xC20000FD
51
52int imx_kernel_entry_handler(uint32_t smc_fid, u_register_t x1,
53 u_register_t x2, u_register_t x3,
54 u_register_t x4);
Jacky Bai4d93d1d2020-07-02 14:39:58 +080055
56#define IMX_SIP_SCMI 0xC20000FE
57
Leonard Crestez55119082019-05-10 13:07:41 +030058#if defined(PLAT_imx8mq)
59int imx_soc_info_handler(uint32_t smc_fid, u_register_t x1,
60 u_register_t x2, u_register_t x3);
Jacky Baia9407992020-01-08 16:56:01 +080061int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
62 u_register_t x2, u_register_t x3);
Jacky Baia51b11a2020-01-14 14:19:05 +080063int dram_dvfs_handler(uint32_t smc_fid, void *handle,
64 u_register_t x1, u_register_t x2, u_register_t x3);
Leonard Crestez55119082019-05-10 13:07:41 +030065#endif
Jacky Baid746daa12019-11-25 13:19:37 +080066#if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
67int dram_dvfs_handler(uint32_t smc_fid, void *handle,
68 u_register_t x1, u_register_t x2, u_register_t x3);
Jacky Bai31f02322019-12-11 16:26:59 +080069
70int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
71 u_register_t x2, u_register_t x3);
Jacky Baid746daa12019-11-25 13:19:37 +080072#endif
Leonard Crestez55119082019-05-10 13:07:41 +030073
Igor Opaniuke1ff4602023-10-31 17:10:35 +010074#if defined(PLAT_imx8mm) || defined(PLAT_imx8mq) || defined(PLAT_imx8mn) || \
75 defined(PLAT_imx8mp)
76
Igor Opaniukf2de6812021-03-10 13:42:55 +020077int imx_src_handler(uint32_t smc_fid, u_register_t x1,
78 u_register_t x2, u_register_t x3, void *handle);
79#endif
80
Andrey Zhizhikin10a4d862022-09-26 22:25:33 +020081#if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
82int imx_hab_handler(uint32_t smc_fid, u_register_t x1,
83 u_register_t x2, u_register_t x3, u_register_t x4);
84#endif
85
Leonard Crestezd62c1612019-05-20 11:28:50 +030086#if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx))
Anson Huang922c45f2019-01-15 10:56:36 +080087int imx_cpufreq_handler(uint32_t smc_fid, u_register_t x1,
88 u_register_t x2, u_register_t x3);
Anson Huangf753d462019-01-15 10:34:04 +080089int imx_srtc_handler(uint32_t smc_fid, void *handle, u_register_t x1,
90 u_register_t x2, u_register_t x3, u_register_t x4);
Anson Huange1d418c2019-01-18 10:01:50 +080091int imx_wakeup_src_handler(uint32_t smc_fid, u_register_t x1,
92 u_register_t x2, u_register_t x3);
Anson Huang6e47de52019-01-18 10:27:48 +080093int imx_otp_handler(uint32_t smc_fid, void *handle,
94 u_register_t x1, u_register_t x2);
Anson Huange708bfb2019-01-18 10:35:54 +080095int imx_misc_set_temp_handler(uint32_t smc_fid, u_register_t x1,
96 u_register_t x2, u_register_t x3,
97 u_register_t x4);
Leonard Crestez402bd522019-05-08 22:29:21 +030098#endif
Anson Huang971392d2019-01-18 10:43:59 +080099uint64_t imx_buildinfo_handler(uint32_t smc_fid, u_register_t x1,
100 u_register_t x2, u_register_t x3,
101 u_register_t x4);
Jacky Bai4d93d1d2020-07-02 14:39:58 +0800102int scmi_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2, u_register_t x3);
Anson Huangf753d462019-01-15 10:34:04 +0800103
104#endif /* __IMX_SIP_SVC_H__ */