xref: /optee_os/core/include/drivers/scmi-msg.h (revision 48f04743e2e45bcccb7f6bedfc96b6b40aa0f9f2)
1ae8c8068SEtienne Carriere /* SPDX-License-Identifier: BSD-3-Clause */
2ae8c8068SEtienne Carriere /*
3ae8c8068SEtienne Carriere  * Copyright (c) 2015-2019, Arm Limited and Contributors. All rights reserved.
4659a1f88SEtienne Carriere  * Copyright (c) 2019-2021, Linaro Limited
5ae8c8068SEtienne Carriere  */
6ae8c8068SEtienne Carriere 
7ae8c8068SEtienne Carriere #ifndef SCMI_MSG_H
8ae8c8068SEtienne Carriere #define SCMI_MSG_H
9ae8c8068SEtienne Carriere 
10ae8c8068SEtienne Carriere #include <compiler.h>
11ae8c8068SEtienne Carriere #include <kernel/panic.h>
12ae8c8068SEtienne Carriere #include <mm/core_memprot.h>
13ae8c8068SEtienne Carriere #include <stdbool.h>
14ae8c8068SEtienne Carriere #include <stddef.h>
15ae8c8068SEtienne Carriere #include <stdint.h>
16ae8c8068SEtienne Carriere 
17ae8c8068SEtienne Carriere /* Minimum size expected for SMT based shared memory message buffers */
18ae8c8068SEtienne Carriere #define SMT_BUF_SLOT_SIZE	128
19ae8c8068SEtienne Carriere 
20c22983c9SEtienne Carriere /* Standard values for SCMI voltage domain protocol configuration state */
21c22983c9SEtienne Carriere #define SCMI_VOLTAGE_DOMAIN_CONFIG_ARCH_ON	0x7
22c22983c9SEtienne Carriere #define SCMI_VOLTAGE_DOMAIN_CONFIG_ARCH_OFF	0
23c22983c9SEtienne Carriere 
24ae8c8068SEtienne Carriere /* A channel abstract a communication path between agent and server */
25ae8c8068SEtienne Carriere struct scmi_msg_channel;
26ae8c8068SEtienne Carriere 
27ae8c8068SEtienne Carriere /*
28ae8c8068SEtienne Carriere  * struct scmi_msg_channel - Shared memory buffer for a agent-to-server channel
29ae8c8068SEtienne Carriere  *
30ae8c8068SEtienne Carriere  * @shm_addr: Address of the shared memory for the SCMI channel
31ae8c8068SEtienne Carriere  * @shm_size: Byte size of the shared memory for the SCMI channel
32ae8c8068SEtienne Carriere  * @busy: True when channel is busy, flase when channel is free
33ae8c8068SEtienne Carriere  * @threaded: True is executed in a threaded context, false otherwise
34ae8c8068SEtienne Carriere  */
35ae8c8068SEtienne Carriere struct scmi_msg_channel {
36ae8c8068SEtienne Carriere 	struct io_pa_va shm_addr;
37ae8c8068SEtienne Carriere 	size_t shm_size;
38ae8c8068SEtienne Carriere 	bool busy;
39ae8c8068SEtienne Carriere 	bool threaded;
40ae8c8068SEtienne Carriere };
41ae8c8068SEtienne Carriere 
429ed56ecdSEtienne Carriere #ifdef CFG_SCMI_MSG_SMT
43a58c4d70SEtienne Carriere /*
44a58c4d70SEtienne Carriere  * Initialize SMT memory buffer, called by platform at init for each
45a58c4d70SEtienne Carriere  * agent channel using the SMT header format.
46a58c4d70SEtienne Carriere  * This function depends on CFG_SCMI_MSG_SMT.
47a58c4d70SEtienne Carriere  *
48a58c4d70SEtienne Carriere  * @chan: Pointer to the channel shared memory to be initialized
49a58c4d70SEtienne Carriere  */
509ed56ecdSEtienne Carriere void scmi_smt_init_agent_channel(struct scmi_msg_channel *channel);
51*48f04743SEtienne Carriere 
52*48f04743SEtienne Carriere /*
53*48f04743SEtienne Carriere  * Set SMT shared buffer location
54*48f04743SEtienne Carriere  *
55*48f04743SEtienne Carriere  * @channel: SCMI channel reference
56*48f04743SEtienne Carriere  * @base: virtual address of the shared buffer or NULL to clear the reference
57*48f04743SEtienne Carriere  */
58*48f04743SEtienne Carriere void scmi_smt_set_shared_buffer(struct scmi_msg_channel *channel, void *base);
599ed56ecdSEtienne Carriere #else
609ed56ecdSEtienne Carriere static inline
619ed56ecdSEtienne Carriere void scmi_smt_init_agent_channel(struct scmi_msg_channel *channel __unused)
629ed56ecdSEtienne Carriere {
639ed56ecdSEtienne Carriere 	panic();
649ed56ecdSEtienne Carriere }
65*48f04743SEtienne Carriere 
66*48f04743SEtienne Carriere static inline
67*48f04743SEtienne Carriere void scmi_smt_set_shared_buffer(struct scmi_msg_channel *channel __unused,
68*48f04743SEtienne Carriere 				void *base __unused)
69*48f04743SEtienne Carriere {
70*48f04743SEtienne Carriere }
71*48f04743SEtienne Carriere #endif /* CFG_SCMI_MSG_SMT */
72a58c4d70SEtienne Carriere 
739ed56ecdSEtienne Carriere #ifdef CFG_SCMI_MSG_SMT_FASTCALL_ENTRY
74a58c4d70SEtienne Carriere /*
75064bf8dcSEtienne Carriere  * Process SMT formatted message in a fastcall SMC execution context.
76a58c4d70SEtienne Carriere  * Called by platform on SMC entry. When returning, output message is
77a58c4d70SEtienne Carriere  * available in shared memory for agent to read the response.
78a58c4d70SEtienne Carriere  * This function depends on CFG_SCMI_MSG_SMT_FASTCALL_ENTRY.
79a58c4d70SEtienne Carriere  *
80659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID the SMT belongs to
81a58c4d70SEtienne Carriere  */
82659a1f88SEtienne Carriere void scmi_smt_fastcall_smc_entry(unsigned int channel_id);
839ed56ecdSEtienne Carriere #else
849ed56ecdSEtienne Carriere static inline void scmi_smt_fastcall_smc_entry(unsigned int channel_id __unused)
859ed56ecdSEtienne Carriere {
869ed56ecdSEtienne Carriere }
879ed56ecdSEtienne Carriere #endif
88a58c4d70SEtienne Carriere 
899ed56ecdSEtienne Carriere #ifdef CFG_SCMI_MSG_SMT_INTERRUPT_ENTRY
90a58c4d70SEtienne Carriere /*
91a58c4d70SEtienne Carriere  * Process SMT formatted message in a secure interrupt execution context.
92a58c4d70SEtienne Carriere  * Called by platform interrupt handler. When returning, output message is
93a58c4d70SEtienne Carriere  * available in shared memory for agent to read the response.
94a58c4d70SEtienne Carriere  * This function depends on CFG_SCMI_MSG_SMT_INTERRUPT_ENTRY.
95a58c4d70SEtienne Carriere  *
96659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID the SMT belongs to
97a58c4d70SEtienne Carriere  */
98659a1f88SEtienne Carriere void scmi_smt_interrupt_entry(unsigned int channel_id);
999ed56ecdSEtienne Carriere #else
1009ed56ecdSEtienne Carriere static inline void scmi_smt_interrupt_entry(unsigned int channel_id __unused)
1019ed56ecdSEtienne Carriere {
1029ed56ecdSEtienne Carriere }
1039ed56ecdSEtienne Carriere #endif
104a58c4d70SEtienne Carriere 
1059ed56ecdSEtienne Carriere #ifdef CFG_SCMI_MSG_SMT_THREAD_ENTRY
106a58c4d70SEtienne Carriere /*
107a58c4d70SEtienne Carriere  * Process SMT formatted message in a TEE thread execution context.
108a58c4d70SEtienne Carriere  * When returning, output message is available in shared memory for
109a58c4d70SEtienne Carriere  * agent to read the response.
110a58c4d70SEtienne Carriere  * This function depends on CFG_SCMI_MSG_SMT_THREAD_ENTRY.
111a58c4d70SEtienne Carriere  *
112659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID the SMT belongs to
113a58c4d70SEtienne Carriere  */
114659a1f88SEtienne Carriere void scmi_smt_threaded_entry(unsigned int channel_id);
1159ed56ecdSEtienne Carriere #else
1169ed56ecdSEtienne Carriere static inline void scmi_smt_threaded_entry(unsigned int channel_id __unused)
1179ed56ecdSEtienne Carriere {
1189ed56ecdSEtienne Carriere }
1199ed56ecdSEtienne Carriere #endif
120a58c4d70SEtienne Carriere 
121ae8c8068SEtienne Carriere /* Platform callback functions */
122ae8c8068SEtienne Carriere 
123ae8c8068SEtienne Carriere /*
124ae8c8068SEtienne Carriere  * Return the SCMI channel related to an agent
125659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
126ae8c8068SEtienne Carriere  * Return a pointer to channel on success, NULL otherwise
127ae8c8068SEtienne Carriere  */
128659a1f88SEtienne Carriere struct scmi_msg_channel *plat_scmi_get_channel(unsigned int channel_id);
129ae8c8068SEtienne Carriere 
130ae8c8068SEtienne Carriere /*
131ae8c8068SEtienne Carriere  * Return how many SCMI protocols supported by the platform
132ae8c8068SEtienne Carriere  * According to the SCMI specification, this function does not target
133659a1f88SEtienne Carriere  * a specific channel ID and shall return all platform known capabilities.
134ae8c8068SEtienne Carriere  */
135ae8c8068SEtienne Carriere size_t plat_scmi_protocol_count(void);
136ae8c8068SEtienne Carriere 
137ae8c8068SEtienne Carriere /*
138ae8c8068SEtienne Carriere  * Get the count and list of SCMI protocols (but base) supported for an agent
139ae8c8068SEtienne Carriere  *
140659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
141ae8c8068SEtienne Carriere  * Return a pointer to a null terminated array supported protocol IDs.
142ae8c8068SEtienne Carriere  */
143659a1f88SEtienne Carriere const uint8_t *plat_scmi_protocol_list(unsigned int channel_id);
144ae8c8068SEtienne Carriere 
145ae8c8068SEtienne Carriere /* Get the name of the SCMI vendor for the platform */
146ae8c8068SEtienne Carriere const char *plat_scmi_vendor_name(void);
147ae8c8068SEtienne Carriere 
148ae8c8068SEtienne Carriere /* Get the name of the SCMI sub-vendor for the platform */
149ae8c8068SEtienne Carriere const char *plat_scmi_sub_vendor_name(void);
150ae8c8068SEtienne Carriere 
151a7a9e3baSEtienne Carriere /* Handlers for SCMI Clock protocol services */
152a7a9e3baSEtienne Carriere 
153a7a9e3baSEtienne Carriere /*
154a7a9e3baSEtienne Carriere  * Return number of clock controllers for an agent
155659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
156a7a9e3baSEtienne Carriere  * Return number of clock controllers
157a7a9e3baSEtienne Carriere  */
158659a1f88SEtienne Carriere size_t plat_scmi_clock_count(unsigned int channel_id);
159a7a9e3baSEtienne Carriere 
160a7a9e3baSEtienne Carriere /*
161a7a9e3baSEtienne Carriere  * Get clock controller string ID (aka name)
162659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
163a7a9e3baSEtienne Carriere  * @scmi_id: SCMI clock ID
164a7a9e3baSEtienne Carriere  * Return pointer to name or NULL
165a7a9e3baSEtienne Carriere  */
166659a1f88SEtienne Carriere const char *plat_scmi_clock_get_name(unsigned int channel_id,
167a7a9e3baSEtienne Carriere 				     unsigned int scmi_id);
168a7a9e3baSEtienne Carriere 
169a7a9e3baSEtienne Carriere /*
170a7a9e3baSEtienne Carriere  * Get clock possible rate as an array of frequencies in Hertz.
171a7a9e3baSEtienne Carriere  *
172659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
173a7a9e3baSEtienne Carriere  * @scmi_id: SCMI clock ID
174d9be1b35SEtienne Carriere  * @start_index: Requested start index for the exposed rates array
175ec8c2914SEtienne Carriere  * @rates: If NULL, function returns, else output rates array
176a7a9e3baSEtienne Carriere  * @nb_elts: Array size of @rates.
177a7a9e3baSEtienne Carriere  * Return an SCMI compliant error code
178a7a9e3baSEtienne Carriere  */
179659a1f88SEtienne Carriere int32_t plat_scmi_clock_rates_array(unsigned int channel_id,
180659a1f88SEtienne Carriere 				    unsigned int scmi_id, size_t start_index,
181659a1f88SEtienne Carriere 				    unsigned long *rates, size_t *nb_elts);
182a7a9e3baSEtienne Carriere 
183a7a9e3baSEtienne Carriere /*
184a7a9e3baSEtienne Carriere  * Get clock possible rate as range with regular steps in Hertz
185a7a9e3baSEtienne Carriere  *
186659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
187a7a9e3baSEtienne Carriere  * @scmi_id: SCMI clock ID
188a7a9e3baSEtienne Carriere  * @min_max_step: 3 cell array for min, max and step rate data
189a7a9e3baSEtienne Carriere  * Return an SCMI compliant error code
190a7a9e3baSEtienne Carriere  */
191659a1f88SEtienne Carriere int32_t plat_scmi_clock_rates_by_step(unsigned int channel_id,
192a7a9e3baSEtienne Carriere 				      unsigned int scmi_id,
193a7a9e3baSEtienne Carriere 				      unsigned long *min_max_step);
194a7a9e3baSEtienne Carriere 
195a7a9e3baSEtienne Carriere /*
196a7a9e3baSEtienne Carriere  * Get clock rate in Hertz
197659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
198a7a9e3baSEtienne Carriere  * @scmi_id: SCMI clock ID
199a7a9e3baSEtienne Carriere  * Return clock rate or 0 if not supported
200a7a9e3baSEtienne Carriere  */
201659a1f88SEtienne Carriere unsigned long plat_scmi_clock_get_rate(unsigned int channel_id,
202a7a9e3baSEtienne Carriere 				       unsigned int scmi_id);
203a7a9e3baSEtienne Carriere 
204a7a9e3baSEtienne Carriere /*
205a7a9e3baSEtienne Carriere  * Set clock rate in Hertz
206659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
207a7a9e3baSEtienne Carriere  * @scmi_id: SCMI clock ID
208a7a9e3baSEtienne Carriere  * @rate: Target clock frequency in Hertz
209a7a9e3baSEtienne Carriere  * Return a compliant SCMI error code
210a7a9e3baSEtienne Carriere  */
211659a1f88SEtienne Carriere int32_t plat_scmi_clock_set_rate(unsigned int channel_id, unsigned int scmi_id,
212a7a9e3baSEtienne Carriere 				 unsigned long rate);
213a7a9e3baSEtienne Carriere 
214a7a9e3baSEtienne Carriere /*
215a7a9e3baSEtienne Carriere  * Get clock state (enabled or disabled)
216659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
217a7a9e3baSEtienne Carriere  * @scmi_id: SCMI clock ID
218a7a9e3baSEtienne Carriere  * Return 1 if clock is enabled, 0 if disables, or a negative SCMI error code
219a7a9e3baSEtienne Carriere  */
220659a1f88SEtienne Carriere int32_t plat_scmi_clock_get_state(unsigned int channel_id,
221659a1f88SEtienne Carriere 				  unsigned int scmi_id);
222a7a9e3baSEtienne Carriere 
223a7a9e3baSEtienne Carriere /*
224a7a9e3baSEtienne Carriere  * Get clock state (enabled or disabled)
225659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
226a7a9e3baSEtienne Carriere  * @scmi_id: SCMI clock ID
227a7a9e3baSEtienne Carriere  * @enable_not_disable: Enable clock if true, disable clock otherwise
228a7a9e3baSEtienne Carriere  * Return a compliant SCMI error code
229a7a9e3baSEtienne Carriere  */
230659a1f88SEtienne Carriere int32_t plat_scmi_clock_set_state(unsigned int channel_id, unsigned int scmi_id,
231a7a9e3baSEtienne Carriere 				  bool enable_not_disable);
23256a1f10eSEtienne Carriere 
23356a1f10eSEtienne Carriere /* Handlers for SCMI Reset Domain protocol services */
23456a1f10eSEtienne Carriere 
23556a1f10eSEtienne Carriere /*
23656a1f10eSEtienne Carriere  * Return number of reset domains for the agent
237659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
23856a1f10eSEtienne Carriere  * Return number of reset domains
23956a1f10eSEtienne Carriere  */
240659a1f88SEtienne Carriere size_t plat_scmi_rd_count(unsigned int channel_id);
24156a1f10eSEtienne Carriere 
24256a1f10eSEtienne Carriere /*
24356a1f10eSEtienne Carriere  * Get reset domain string ID (aka name)
244659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
24556a1f10eSEtienne Carriere  * @scmi_id: SCMI reset domain ID
24656a1f10eSEtienne Carriere  * Return pointer to name or NULL
24756a1f10eSEtienne Carriere  */
248659a1f88SEtienne Carriere const char *plat_scmi_rd_get_name(unsigned int channel_id,
249659a1f88SEtienne Carriere 				  unsigned int scmi_id);
25056a1f10eSEtienne Carriere 
25156a1f10eSEtienne Carriere /*
25256a1f10eSEtienne Carriere  * Perform a reset cycle on a target reset domain
253659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
25456a1f10eSEtienne Carriere  * @scmi_id: SCMI reset domain ID
25556a1f10eSEtienne Carriere  * @state: Target reset state (see SCMI specification, 0 means context loss)
25656a1f10eSEtienne Carriere  * Return a compliant SCMI error code
25756a1f10eSEtienne Carriere  */
258659a1f88SEtienne Carriere int32_t plat_scmi_rd_autonomous(unsigned int channel_id, unsigned int scmi_id,
25956a1f10eSEtienne Carriere 				unsigned int state);
26056a1f10eSEtienne Carriere 
26156a1f10eSEtienne Carriere /*
26256a1f10eSEtienne Carriere  * Assert or deassert target reset domain
263659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
26456a1f10eSEtienne Carriere  * @scmi_id: SCMI reset domain ID
26556a1f10eSEtienne Carriere  * @assert_not_deassert: Assert domain if true, otherwise deassert domain
26656a1f10eSEtienne Carriere  * Return a compliant SCMI error code
26756a1f10eSEtienne Carriere  */
268659a1f88SEtienne Carriere int32_t plat_scmi_rd_set_state(unsigned int channel_id, unsigned int scmi_id,
26956a1f10eSEtienne Carriere 			       bool assert_not_deassert);
27056a1f10eSEtienne Carriere 
271006d89b8SEtienne Carriere /* Handlers for SCMI Voltage Domain protocol services */
272006d89b8SEtienne Carriere 
273006d89b8SEtienne Carriere /*
274006d89b8SEtienne Carriere  * Return number of voltage domain for an agent
275659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
276006d89b8SEtienne Carriere  * Return number of voltage domains
277006d89b8SEtienne Carriere  */
278659a1f88SEtienne Carriere size_t plat_scmi_voltd_count(unsigned int channel_id);
279006d89b8SEtienne Carriere 
280006d89b8SEtienne Carriere /*
281006d89b8SEtienne Carriere  * Get clock controller string ID (aka name)
282659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
283006d89b8SEtienne Carriere  * @scmi_id: SCMI voltage domain ID
284006d89b8SEtienne Carriere  * Return pointer to name or NULL
285006d89b8SEtienne Carriere  */
286659a1f88SEtienne Carriere const char *plat_scmi_voltd_get_name(unsigned int channel_id,
287006d89b8SEtienne Carriere 				     unsigned int scmi_id);
288006d89b8SEtienne Carriere 
289006d89b8SEtienne Carriere /*
290006d89b8SEtienne Carriere  * Get voltage domain possible levels as an array of voltages in microvolt.
291006d89b8SEtienne Carriere  *
292659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
293006d89b8SEtienne Carriere  * @scmi_id: SCMI voltage domain ID
294006d89b8SEtienne Carriere  * @start_index: Level index to start from.
295ec8c2914SEtienne Carriere  * @levels: If NULL, function returns, else output rates array
296006d89b8SEtienne Carriere  * @nb_elts: Array size of @levels.
297006d89b8SEtienne Carriere  * Return an SCMI compliant error code
298006d89b8SEtienne Carriere  */
299659a1f88SEtienne Carriere int32_t plat_scmi_voltd_levels_array(unsigned int channel_id,
300006d89b8SEtienne Carriere 				     unsigned int scmi_id, size_t start_index,
301006d89b8SEtienne Carriere 				     long *levels, size_t *nb_elts);
302006d89b8SEtienne Carriere 
303006d89b8SEtienne Carriere /*
304006d89b8SEtienne Carriere  * Get voltage domain possible levels as range with regular steps in microvolt
305006d89b8SEtienne Carriere  *
306659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
307006d89b8SEtienne Carriere  * @scmi_id: SCMI voltage domain ID
308006d89b8SEtienne Carriere  * @min_max_step: 3 cell array for min, max and step voltage data
309006d89b8SEtienne Carriere  * Return an SCMI compliant error code
310006d89b8SEtienne Carriere  */
311659a1f88SEtienne Carriere int32_t plat_scmi_voltd_levels_by_step(unsigned int channel_id,
312006d89b8SEtienne Carriere 				       unsigned int scmi_id,
313006d89b8SEtienne Carriere 				       long *min_max_step);
314006d89b8SEtienne Carriere 
315006d89b8SEtienne Carriere /*
316006d89b8SEtienne Carriere  * Get current voltage domain level in microvolt
317659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
318006d89b8SEtienne Carriere  * @scmi_id: SCMI voltage domain ID
319006d89b8SEtienne Carriere  * Return clock rate or 0 if not supported
320006d89b8SEtienne Carriere  */
321659a1f88SEtienne Carriere long plat_scmi_voltd_get_level(unsigned int channel_id, unsigned int scmi_id);
322006d89b8SEtienne Carriere 
323006d89b8SEtienne Carriere /*
324006d89b8SEtienne Carriere  * Set voltage domain level voltage domain
325659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
326006d89b8SEtienne Carriere  * @scmi_id: SCMI clock ID
327006d89b8SEtienne Carriere  * @level: Target voltage domain level in microvolt
328006d89b8SEtienne Carriere  * Return a compliant SCMI error code
329006d89b8SEtienne Carriere  */
330659a1f88SEtienne Carriere int32_t plat_scmi_voltd_set_level(unsigned int channel_id, unsigned int scmi_id,
331006d89b8SEtienne Carriere 				  long level);
332006d89b8SEtienne Carriere 
333006d89b8SEtienne Carriere /*
334006d89b8SEtienne Carriere  * Get voltage domain state configuration (enabled or disabled)
335659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
336006d89b8SEtienne Carriere  * @scmi_id: SCMI voltage domain ID
337ec8c2914SEtienne Carriere  * @config: output state configuration value SCMI_VOLTAGE_DOMAIN_CONFIG_*
338006d89b8SEtienne Carriere  * Return a compliant SCMI error code
339006d89b8SEtienne Carriere  */
340659a1f88SEtienne Carriere int32_t plat_scmi_voltd_get_config(unsigned int channel_id,
341659a1f88SEtienne Carriere 				   unsigned int scmi_id, uint32_t *config);
342006d89b8SEtienne Carriere 
343006d89b8SEtienne Carriere /*
344006d89b8SEtienne Carriere  * Get voltage domain state configuration (enabled or disabled)
345659a1f88SEtienne Carriere  * @channel_id: SCMI channel ID
346ec8c2914SEtienne Carriere  * @scmi_id: SCMI voltage domain ID
347ec8c2914SEtienne Carriere  * @config: Target state configuration value SCMI_VOLTAGE_DOMAIN_CONFIG_*
348006d89b8SEtienne Carriere  * Return a compliant SCMI error code
349006d89b8SEtienne Carriere  */
350659a1f88SEtienne Carriere int32_t plat_scmi_voltd_set_config(unsigned int channel_id,
351659a1f88SEtienne Carriere 				   unsigned int scmi_id, uint32_t config);
352006d89b8SEtienne Carriere 
353ae8c8068SEtienne Carriere #endif /* SCMI_MSG_H */
354