12#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_CLK_H_
13#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_CLK_H_
17#define SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK GENMASK(1, 0)
18#define SCMI_CLK_CONFIG_ENABLE_DISABLE(x)\
19 ((uint32_t)(x) & SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK)
21#define SCMI_CLK_ATTRIBUTES_CLK_NUM(x) ((x) & GENMASK(15, 0))
23#define SCMI_CLK_RATE_SET_FLAGS_ASYNC BIT(0)
24#define SCMI_CLK_RATE_SET_FLAGS_IGNORE_DELEAYED_RESP BIT(1)
25#define SCMI_CLK_RATE_SET_FLAGS_ROUNDS_UP_DOWN BIT(2)
26#define SCMI_CLK_RATE_SET_FLAGS_ROUNDS_AUTO BIT(3)
scmi_clock_message
Clock protocol command message IDs.
Definition clk.h:55
@ SCMI_CLK_MSG_CLOCK_NAME_GET
Definition clk.h:64
@ SCMI_CLK_MSG_CLOCK_CONFIG_GET
Definition clk.h:67
@ SCMI_CLK_MSG_CLOCK_RATE_CHANGE_REQUESTED_NOTIFY
Definition clk.h:66
@ SCMI_CLK_MSG_PROTOCOL_ATTRIBUTES
Definition clk.h:57
@ SCMI_CLK_MSG_CLOCK_ATTRIBUTES
Definition clk.h:59
@ SCMI_CLK_MSG_CLOCK_DESCRIBE_RATES
Definition clk.h:60
@ SCMI_CLK_MSG_NEGOTIATE_PROTOCOL_VERSION
Definition clk.h:72
@ SCMI_CLK_MSG_CLOCK_POSSIBLE_PARENTS_GET
Definition clk.h:68
@ SCMI_CLK_MSG_CLOCK_RATE_SET
Definition clk.h:61
@ SCMI_CLK_MSG_CLOCK_RATE_GET
Definition clk.h:62
@ SCMI_CLK_MSG_CLOCK_CONFIG_SET
Definition clk.h:63
@ SCMI_CLK_MSG_CLOCK_PARENT_GET
Definition clk.h:70
@ SCMI_CLK_MSG_CLOCK_RATE_NOTIFY
Definition clk.h:65
@ SCMI_CLK_MSG_PROTOCOL_VERSION
Definition clk.h:56
@ SCMI_CLK_MSG_CLOCK_PARENT_SET
Definition clk.h:69
@ SCMI_CLK_MSG_CLOCK_GET_PERMISSIONS
Definition clk.h:71
@ SCMI_CLK_MSG_PROTOCOL_MESSAGE_ATTRIBUTES
Definition clk.h:58
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 protocol generic functions and structures.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Describes the parameters for the CLOCK_CONFIG_SET command.
Definition clk.h:34
uint32_t clk_id
Definition clk.h:35
uint32_t extended_cfg_val
Definition clk.h:37
uint32_t attributes
Definition clk.h:36
Describes the parameters for the CLOCK_RATE_SET command.
Definition clk.h:46
uint32_t rate[2]
Definition clk.h:49
uint32_t flags
Definition clk.h:47
uint32_t clk_id
Definition clk.h:48
SCMI protocol structure.
Definition protocol.h:74