13#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_CLK_H_
14#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_CLK_H_
25#define SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK GENMASK(1, 0)
26#define SCMI_CLK_CONFIG_ENABLE_DISABLE(x)\
27 ((uint32_t)(x) & SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK)
29#define SCMI_CLK_ATTRIBUTES_CLK_NUM(x) ((x) & GENMASK(15, 0))
31#define SCMI_CLK_RATE_SET_FLAGS_ASYNC BIT(0)
32#define SCMI_CLK_RATE_SET_FLAGS_IGNORE_DELEAYED_RESP BIT(1)
33#define SCMI_CLK_RATE_SET_FLAGS_ROUNDS_UP_DOWN BIT(2)
34#define SCMI_CLK_RATE_SET_FLAGS_ROUNDS_AUTO BIT(3)
36#define SCMI_CLK_PROTOCOL_SUPPORTED_VERSION 0x30000
Header file for the SCMI (System Control and Management Interface) driver API.
scmi_clock_message
Clock protocol command message IDs.
Definition clk.h:65
int scmi_clock_parent_get(struct scmi_protocol *proto, uint32_t clk_id, uint32_t *parent_id)
Query the parent of a clock.
int scmi_clock_parent_set(struct scmi_protocol *proto, uint32_t clk_id, uint32_t parent_id)
Send the CLOCK_PARENT_SET command and get its reply.
int scmi_clock_rate_set(struct scmi_protocol *proto, struct scmi_clock_rate_config *cfg)
Send the CLOCK_RATE_SET command and get its reply.
int scmi_clock_protocol_attributes(struct scmi_protocol *proto, uint32_t *attributes)
Send the PROTOCOL_ATTRIBUTES command and get its reply.
int scmi_clock_rate_get(struct scmi_protocol *proto, uint32_t clk_id, uint32_t *rate)
Query the rate of a clock.
int scmi_clock_config_set(struct scmi_protocol *proto, struct scmi_clock_config *cfg)
Send the CLOCK_CONFIG_SET command and get its reply.
@ SCMI_CLK_MSG_CLOCK_NAME_GET
Definition clk.h:74
@ SCMI_CLK_MSG_CLOCK_CONFIG_GET
Definition clk.h:77
@ SCMI_CLK_MSG_CLOCK_RATE_CHANGE_REQUESTED_NOTIFY
Definition clk.h:76
@ SCMI_CLK_MSG_PROTOCOL_ATTRIBUTES
Definition clk.h:67
@ SCMI_CLK_MSG_CLOCK_ATTRIBUTES
Definition clk.h:69
@ SCMI_CLK_MSG_CLOCK_DESCRIBE_RATES
Definition clk.h:70
@ SCMI_CLK_MSG_NEGOTIATE_PROTOCOL_VERSION
Definition clk.h:82
@ SCMI_CLK_MSG_CLOCK_POSSIBLE_PARENTS_GET
Definition clk.h:78
@ SCMI_CLK_MSG_CLOCK_RATE_SET
Definition clk.h:71
@ SCMI_CLK_MSG_CLOCK_RATE_GET
Definition clk.h:72
@ SCMI_CLK_MSG_CLOCK_CONFIG_SET
Definition clk.h:73
@ SCMI_CLK_MSG_CLOCK_PARENT_GET
Definition clk.h:80
@ SCMI_CLK_MSG_CLOCK_RATE_NOTIFY
Definition clk.h:75
@ SCMI_CLK_MSG_PROTOCOL_VERSION
Definition clk.h:66
@ SCMI_CLK_MSG_CLOCK_PARENT_SET
Definition clk.h:79
@ SCMI_CLK_MSG_CLOCK_GET_PERMISSIONS
Definition clk.h:81
@ SCMI_CLK_MSG_PROTOCOL_MESSAGE_ATTRIBUTES
Definition clk.h:68
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Describes the parameters for the CLOCK_CONFIG_SET command.
Definition clk.h:44
uint32_t clk_id
Definition clk.h:45
uint32_t extended_cfg_val
Definition clk.h:47
uint32_t attributes
Definition clk.h:46
Describes the parameters for the CLOCK_RATE_SET command.
Definition clk.h:56
uint32_t rate[2]
Definition clk.h:59
uint32_t flags
Definition clk.h:57
uint32_t clk_id
Definition clk.h:58
SCMI protocol structure.
Definition protocol.h:92