Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
power.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_
14#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_
15
17
24
25#define SCMI_POWER_STATE_SET_FLAGS_ASYNC BIT(0)
26
27#define SCMI_POWER_DOMAIN_PROTOCOL_SUPPORTED_VERSION 0x30001
28
33
35#define SCMI_POWER_STATE_TYPE_SHIFT 30U
36
38#define SCMI_POWER_STATE_ID_MASK (BIT(28) - 1)
39
46#define SCMI_POWER_STATE_PARAM(type, id) \
47 ((((type) & BIT(0)) << SCMI_POWER_STATE_TYPE_SHIFT) | \
48 ((id) & SCMI_POWER_STATE_ID_MASK))
49
51
56
58#define SCMI_POWER_STATE_GENERIC_ON SCMI_POWER_STATE_PARAM(0, 0)
59
61#define SCMI_POWER_STATE_GENERIC_OFF SCMI_POWER_STATE_PARAM(1, 0)
62
64
76
92
112int scmi_power_state_get(uint32_t domain_id, uint32_t *power_state);
113
117
118#endif /* _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_ */
Header file for the SCMI (System Control and Management Interface) driver API.
int scmi_power_state_set(struct scmi_power_state_config *cfg)
Send the POWER_STATE_SET command and get its reply.
scmi_power_domain_message
Power domain protocol command message IDs.
Definition power.h:80
int scmi_power_state_get(uint32_t domain_id, uint32_t *power_state)
Query the power domain state.
@ SCMI_POWER_DOMAIN_MSG_PROTOCOL_MESSAGE_ATTRIBUTES
Definition power.h:83
@ SCMI_POWER_DOMAIN_MSG_POWER_DOMAIN_NAME_GET
Definition power.h:89
@ SCMI_POWER_DOMAIN_MSG_PROTOCOL_ATTRIBUTES
Definition power.h:82
@ SCMI_POWER_DOMAIN_MSG_PROTOCOL_VERSION
Definition power.h:81
@ SCMI_POWER_DOMAIN_MSG_POWER_STATE_GET
Definition power.h:86
@ SCMI_POWER_DOMAIN_MSG_POWER_STATE_NOTIFY
Definition power.h:87
@ SCMI_POWER_DOMAIN_MSG_POWER_STATE_SET
Definition power.h:85
@ SCMI_POWER_DOMAIN_MSG_POWER_STATE_CHANGE_REQEUSTED_NOTIFY
Definition power.h:88
@ SCMI_POWER_DOMAIN_MSG_NEGOTIATE_PROTOCOL_VERSION
Definition power.h:90
@ SCMI_POWER_DOMAIN_MSG_POWER_DOMAIN_ATTRIBUTES
Definition power.h:84
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Describes the parameters for the POWER_STATE_SET command.
Definition power.h:71
uint32_t power_state
Definition power.h:74
uint32_t flags
Definition power.h:72
uint32_t domain_id
Definition power.h:73