Anson Huang | f753d46 | 2019-01-15 10:34:04 +0800 | [diff] [blame] | 1 | /* |
| 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 Huang | 922c45f | 2019-01-15 10:56:36 +0800 | [diff] [blame] | 11 | #define IMX_SIP_CPUFREQ 0xC2000001 |
| 12 | #define IMX_SIP_SET_CPUFREQ 0x00 |
| 13 | |
Anson Huang | f753d46 | 2019-01-15 10:34:04 +0800 | [diff] [blame] | 14 | #define IMX_SIP_SRTC 0xC2000002 |
| 15 | #define IMX_SIP_SRTC_SET_TIME 0x00 |
| 16 | |
Anson Huang | 971392d | 2019-01-18 10:43:59 +0800 | [diff] [blame] | 17 | #define IMX_SIP_BUILDINFO 0xC2000003 |
| 18 | #define IMX_SIP_BUILDINFO_GET_COMMITHASH 0x00 |
| 19 | |
Igor Opaniuk | f2de681 | 2021-03-10 13:42:55 +0200 | [diff] [blame] | 20 | #define IMX_SIP_SRC 0xC2000005 |
| 21 | #define IMX_SIP_SRC_SET_SECONDARY_BOOT 0x10 |
| 22 | #define IMX_SIP_SRC_IS_SECONDARY_BOOT 0x11 |
| 23 | |
Leonard Crestez | 5511908 | 2019-05-10 13:07:41 +0300 | [diff] [blame] | 24 | #define IMX_SIP_GET_SOC_INFO 0xC2000006 |
| 25 | |
Anson Huang | e1d418c | 2019-01-18 10:01:50 +0800 | [diff] [blame] | 26 | #define IMX_SIP_WAKEUP_SRC 0xC2000009 |
| 27 | #define IMX_SIP_WAKEUP_SRC_SCU 0x1 |
| 28 | #define IMX_SIP_WAKEUP_SRC_IRQSTEER 0x2 |
| 29 | |
Anson Huang | 6e47de5 | 2019-01-18 10:27:48 +0800 | [diff] [blame] | 30 | #define IMX_SIP_OTP_READ 0xC200000A |
| 31 | #define IMX_SIP_OTP_WRITE 0xC200000B |
| 32 | |
Anson Huang | e708bfb | 2019-01-18 10:35:54 +0800 | [diff] [blame] | 33 | #define IMX_SIP_MISC_SET_TEMP 0xC200000C |
| 34 | |
Peng Fan | dd860d1 | 2020-07-10 14:18:01 +0800 | [diff] [blame] | 35 | #define IMX_SIP_AARCH32 0xC20000FD |
| 36 | |
| 37 | int imx_kernel_entry_handler(uint32_t smc_fid, u_register_t x1, |
| 38 | u_register_t x2, u_register_t x3, |
| 39 | u_register_t x4); |
Leonard Crestez | 5511908 | 2019-05-10 13:07:41 +0300 | [diff] [blame] | 40 | #if defined(PLAT_imx8mq) |
| 41 | int imx_soc_info_handler(uint32_t smc_fid, u_register_t x1, |
| 42 | u_register_t x2, u_register_t x3); |
| 43 | #endif |
| 44 | |
Igor Opaniuk | f2de681 | 2021-03-10 13:42:55 +0200 | [diff] [blame] | 45 | #if defined(PLAT_imx8mm) || defined(PLAT_imx8mq) |
| 46 | int imx_src_handler(uint32_t smc_fid, u_register_t x1, |
| 47 | u_register_t x2, u_register_t x3, void *handle); |
| 48 | #endif |
| 49 | |
Leonard Crestez | d62c161 | 2019-05-20 11:28:50 +0300 | [diff] [blame] | 50 | #if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx)) |
Anson Huang | 922c45f | 2019-01-15 10:56:36 +0800 | [diff] [blame] | 51 | int imx_cpufreq_handler(uint32_t smc_fid, u_register_t x1, |
| 52 | u_register_t x2, u_register_t x3); |
Anson Huang | f753d46 | 2019-01-15 10:34:04 +0800 | [diff] [blame] | 53 | int imx_srtc_handler(uint32_t smc_fid, void *handle, u_register_t x1, |
| 54 | u_register_t x2, u_register_t x3, u_register_t x4); |
Anson Huang | e1d418c | 2019-01-18 10:01:50 +0800 | [diff] [blame] | 55 | int imx_wakeup_src_handler(uint32_t smc_fid, u_register_t x1, |
| 56 | u_register_t x2, u_register_t x3); |
Anson Huang | 6e47de5 | 2019-01-18 10:27:48 +0800 | [diff] [blame] | 57 | int imx_otp_handler(uint32_t smc_fid, void *handle, |
| 58 | u_register_t x1, u_register_t x2); |
Anson Huang | e708bfb | 2019-01-18 10:35:54 +0800 | [diff] [blame] | 59 | int imx_misc_set_temp_handler(uint32_t smc_fid, u_register_t x1, |
| 60 | u_register_t x2, u_register_t x3, |
| 61 | u_register_t x4); |
Leonard Crestez | 402bd52 | 2019-05-08 22:29:21 +0300 | [diff] [blame] | 62 | #endif |
Anson Huang | 971392d | 2019-01-18 10:43:59 +0800 | [diff] [blame] | 63 | uint64_t imx_buildinfo_handler(uint32_t smc_fid, u_register_t x1, |
| 64 | u_register_t x2, u_register_t x3, |
| 65 | u_register_t x4); |
Anson Huang | f753d46 | 2019-01-15 10:34:04 +0800 | [diff] [blame] | 66 | |
| 67 | #endif /* __IMX_SIP_SVC_H__ */ |