blob: ca4c88d4f33d2567cc8f088c8a794711aa756b45 [file] [log] [blame]
Yann Gautier05be8d82019-01-17 14:51:25 +01001/*
Yann Gautierd592e692022-10-27 17:52:41 +02002 * Copyright (c) 2016-2024, STMicroelectronics - All Rights Reserved
Yann Gautier05be8d82019-01-17 14:51:25 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef STM32MP1_SMC_H
8#define STM32MP1_SMC_H
9
10/*
11 * SMC function IDs for STM32 Service queries
12 * STM32 SMC services use the space between 0x82000000 and 0x8200FFFF
13 * like this is defined in SMC calling Convention by ARM
14 * for SiP (silicon Partner)
15 * https://developer.arm.com/docs/den0028/latest
16 */
17
Yann Gautier52448ab2019-01-17 14:53:24 +010018/* Secure Service access from Non-secure */
19
20/*
21 * STM32_SMC_BSEC call API
22 *
23 * Argument a0: (input) SMCC ID
24 * (output) status return code
25 * Argument a1: (input) Service ID (STM32_SMC_BSEC_xxx)
26 * Argument a2: (input) OTP index
27 * (output) OTP read value, if applicable
28 * Argument a3: (input) OTP value if applicable
29 */
30#define STM32_SMC_BSEC 0x82001003
31
Etienne Carriere34f0e932020-07-16 17:36:18 +020032/*
33 * STM32_SIP_SMC_SCMI_AGENT0
34 * STM32_SIP_SMC_SCMI_AGENT1
35 * Process SCMI message pending in SCMI shared memory buffer.
36 *
37 * Argument a0: (input) SMCC ID
38 */
39#define STM32_SIP_SMC_SCMI_AGENT0 0x82002000
40#define STM32_SIP_SMC_SCMI_AGENT1 0x82002001
41
Yann Gautier05be8d82019-01-17 14:51:25 +010042/* Number of STM32 SiP Calls implemented */
Etienne Carriere34f0e932020-07-16 17:36:18 +020043#define STM32_COMMON_SIP_NUM_CALLS 3
Yann Gautier52448ab2019-01-17 14:53:24 +010044
45/* Service for BSEC */
46#define STM32_SMC_READ_SHADOW 0x01
47#define STM32_SMC_PROG_OTP 0x02
48#define STM32_SMC_WRITE_SHADOW 0x03
49#define STM32_SMC_READ_OTP 0x04
Yann Gautier05be8d82019-01-17 14:51:25 +010050
Yann Gautier05be8d82019-01-17 14:51:25 +010051#endif /* STM32MP1_SMC_H */