Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1
/*
2
* Copyright 2025 NXP
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_DRIVERS_FIRMWARE_SCMI_SYSTEM_H_
8
#define ZEPHYR_INCLUDE_DRIVERS_FIRMWARE_SCMI_SYSTEM_H_
9
15
16
#include <
zephyr/device.h
>
17
#include <
zephyr/drivers/firmware/scmi/protocol.h
>
18
#include <
stdint.h
>
19
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
32
#define SCMI_SYSTEM_POWER_PROTOCOL_SUPPORTED_VERSION 0x20001
33
38
40
#define SCMI_SYSTEM_POWER_STATE_SHUTDOWN 0x00000000U
42
#define SCMI_SYSTEM_POWER_STATE_COLD_RESET 0x00000001U
44
#define SCMI_SYSTEM_POWER_STATE_WARM_RESET 0x00000002U
46
#define SCMI_SYSTEM_POWER_STATE_POWER_UP 0x00000003U
48
#define SCMI_SYSTEM_POWER_STATE_SUSPEND 0x00000004U
49
51
56
58
#define SCMI_SYSTEM_POWER_FLAG_SHIFT (0)
60
62
#define SCMI_SYSTEM_POWER_FLAG_FORCEFUL (0 << SCMI_SYSTEM_POWER_FLAG_SHIFT)
64
#define SCMI_SYSTEM_POWER_FLAG_GRACEFUL (1 << SCMI_SYSTEM_POWER_FLAG_SHIFT)
65
67
72
74
#define SCMI_SYSTEM_MSG_ATTR_SUSPEND_SHIFT (30U)
75
#define SCMI_SYSTEM_MSG_ATTR_WARM_RESET_SHIFT (31U)
77
79
#define SCMI_SYSTEM_MSG_ATTR_SUSPEND (1 << SCMI_SYSTEM_MSG_ATTR_SUSPEND_SHIFT)
81
#define SCMI_SYSTEM_MSG_ATTR_WARM_RESET (1 << SCMI_SYSTEM_MSG_ATTR_WARM_RESET_SHIFT)
82
84
89
struct
scmi_system_power_state_config
{
91
uint32_t
flags
;
93
uint32_t
system_state
;
94
};
95
103
int
scmi_system_protocol_version
(
uint32_t
*version);
104
112
int
scmi_system_protocol_attributes
(
uint32_t
*attributes);
113
122
int
scmi_system_protocol_message_attributes
(
uint32_t
message_id,
uint32_t
*attributes);
123
131
int
scmi_system_protocol_version_negotiate
(
uint32_t
version);
132
140
int
scmi_system_power_state_set
(
struct
scmi_system_power_state_config
*cfg);
141
142
#ifdef __cplusplus
143
}
144
#endif
145
149
150
#endif
/* ZEPHYR_INCLUDE_DRIVERS_FIRMWARE_SCMI_SYSTEM_H_ */
device.h
protocol.h
Header file for the SCMI (System Control and Management Interface) driver API.
scmi_system_protocol_version_negotiate
int scmi_system_protocol_version_negotiate(uint32_t version)
Negotiate protocol version.
scmi_system_protocol_version
int scmi_system_protocol_version(uint32_t *version)
Get protocol version.
scmi_system_protocol_attributes
int scmi_system_protocol_attributes(uint32_t *attributes)
Get protocol attributes.
scmi_system_power_state_set
int scmi_system_power_state_set(struct scmi_system_power_state_config *cfg)
Set system power state.
scmi_system_protocol_message_attributes
int scmi_system_protocol_message_attributes(uint32_t message_id, uint32_t *attributes)
Get protocol message attributes.
stdint.h
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
scmi_system_power_state_config
System power state configuration.
Definition
system.h:89
scmi_system_power_state_config::flags
uint32_t flags
Request flags (see SCMI_SYSTEM_POWER_FLAG_*).
Definition
system.h:91
scmi_system_power_state_config::system_state
uint32_t system_state
Target system power state (see SCMI_SYSTEM_POWER_STATE_*).
Definition
system.h:93
zephyr
drivers
firmware
scmi
system.h
Generated on
for Zephyr API by
1.17.0