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
11
12#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_
13#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_
14
16
17#define SCMI_POWER_STATE_SET_FLAGS_ASYNC BIT(0)
18
19#define SCMI_POWER_DOMAIN_PROTOCOL_SUPPORTED_VERSION 0x30001
20
25
27#define SCMI_POWER_STATE_TYPE_SHIFT 30U
28
30#define SCMI_POWER_STATE_ID_MASK (BIT(28) - 1)
31
38#define SCMI_POWER_STATE_PARAM(type, id) \
39 ((((type) & BIT(0)) << SCMI_POWER_STATE_TYPE_SHIFT) | \
40 ((id) & SCMI_POWER_STATE_ID_MASK))
41
43
48
50#define SCMI_POWER_STATE_GENERIC_ON SCMI_POWER_STATE_PARAM(0, 0)
51
53#define SCMI_POWER_STATE_GENERIC_OFF SCMI_POWER_STATE_PARAM(1, 0)
54
56
68
84
104int scmi_power_state_get(uint32_t domain_id, uint32_t *power_state);
105
106#endif /* _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_POWER_H_ */
SCMI protocol generic functions and structures.
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:72
@ SCMI_POWER_DOMAIN_MSG_PROTOCOL_MESSAGE_ATTRIBUTES
Definition power.h:75
@ SCMI_POWER_DOMAIN_MSG_POWER_DOMAIN_NAME_GET
Definition power.h:81
@ SCMI_POWER_DOMAIN_MSG_PROTOCOL_ATTRIBUTES
Definition power.h:74
@ SCMI_POWER_DOMAIN_MSG_PROTOCOL_VERSION
Definition power.h:73
@ SCMI_POWER_DOMAIN_MSG_POWER_STATE_GET
Definition power.h:78
@ SCMI_POWER_DOMAIN_MSG_POWER_STATE_NOTIFY
Definition power.h:79
@ SCMI_POWER_DOMAIN_MSG_POWER_STATE_SET
Definition power.h:77
@ SCMI_POWER_DOMAIN_MSG_POWER_STATE_CHANGE_REQEUSTED_NOTIFY
Definition power.h:80
@ SCMI_POWER_DOMAIN_MSG_NEGOTIATE_PROTOCOL_VERSION
Definition power.h:82
@ SCMI_POWER_DOMAIN_MSG_POWER_DOMAIN_ATTRIBUTES
Definition power.h:76
int scmi_power_state_get(uint32_t domain_id, uint32_t *power_state)
Query the power domain state.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Describes the parameters for the POWER_STATE_SET command.
Definition power.h:63
uint32_t power_state
Definition power.h:66
uint32_t flags
Definition power.h:64
uint32_t domain_id
Definition power.h:65