1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2019-2021, Linaro Limited
4  */
5 #ifndef PTA_SCMI_CLIENT_H
6 #define PTA_SCMI_CLIENT_H
7 
8 #define PTA_SCMI_UUID { 0xa8cfe406, 0xd4f5, 0x4a2e, \
9 		{ 0x9f, 0x8d, 0xa2, 0x5d, 0xc7, 0x54, 0xc0, 0x99 } }
10 
11 #define PTA_SCMI_NAME "PTA-SCMI"
12 
13 /*
14  * PTA_SCMI_CMD_CAPABILITIES - Get channel capabilities
15  *
16  * [out]    value[0].a: Capabilities bit mask (PTA_SCMI_CAPS_*)
17  * [out]    value[0].b: Extended capabilities or 0
18  */
19 #define PTA_SCMI_CMD_CAPABILITIES	0
20 
21 /*
22  * PTA_SCMI_CMD_PROCESS_SMT_CHANNEL - Process SCMI message in SMT buffer
23  *
24  * [in]     value[0].a: Channel handle
25  *
26  * Shared memory used for SCMI message/response exhange is expected
27  * already identified and bound to channel handle in both SCMI agent
28  * and SCMI server (OP-TEE) parts.
29  * The memory uses SMT header to carry SCMI meta-data (protocol ID and
30  * protocol message ID).
31  */
32 #define PTA_SCMI_CMD_PROCESS_SMT_CHANNEL	1
33 
34 /*
35  * PTA_SCMI_CMD_PROCESS_SMT_CHANNEL_MESSAGE - Process SCMI message in
36  *				SMT buffer pointed by memref parameters
37  *
38  * [in]     value[0].a: Channel handle
39  * [in/out] memref[1]: Message/response buffer (SMT and SCMI payload)
40  *
41  * Shared memory used for SCMI message/response is a SMT buffer
42  * referenced by param[1]. It shall be 128 bytes large to fit response
43  * payload whatever message playload size.
44  * The memory uses SMT header to carry SCMI meta-data (protocol ID and
45  * protocol message ID).
46  */
47 #define PTA_SCMI_CMD_PROCESS_SMT_CHANNEL_MESSAGE	2
48 
49 /*
50  * PTA_SCMI_CMD_GET_CHANNEL_HANDLE - Get handle for an SCMI channel
51  *
52  * Get a handle for the SCMI channel. This handle value is to be passed
53  * as argument to some commands as PTA_SCMI_CMD_PROCESS_*.
54  *
55  * [in]     value[0].a: Channel identifier or 0 if no assigned ID
56  * [in]     value[0].b: Requested capabilities mask (PTA_SCMI_CAPS_*)
57  * [out]    value[0].a: Returned channel handle
58  */
59 #define PTA_SCMI_CMD_GET_CHANNEL_HANDLE		3
60 
61 /*
62  * Capabilities
63  */
64 
65 /* Channel supports shared memory using the SMT header protocol */
66 #define PTA_SCMI_CAPS_SMT_HEADER			BIT32(0)
67 
68 #endif /* SCMI_PTA_SCMI_CLIENT_H */
69