summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVinh Nguyen <[email protected]>2025-11-05 04:42:26 +0100
committerPeng Fan <[email protected]>2025-11-10 20:57:42 +0800
commit0619cb32030b1d78379f3181d3e1103bb86124fb (patch)
tree1db6c99ef95717fe3919e3085868f2b7599e209f /include
parenta5a0134570c88cd49a6fc97256764cb7fbb93dff (diff)
firmware: scmi: Add clock v3.2 CONFIG_SET support
SCMI v3.2 introduces a new clock CONFIG_SET message format that can optionally carry also OEM specific configuration values beside the usual clock enable/disable requests. Add support to use such new format when talking to a v3.2 compliant SCMI platform. Support existing enable/disable operations across different clock protocol versions: this patch still does not add protocol operations to support the new OEM specific optional configuration capabilities. No functional change for the SCMI drivers users of the related enable and disable clock operations. [Marek: Remodel after Linux e49e314a2cf7 ("firmware: arm_scmi: Add clock v3.2 CONFIG_SET support") Support both old < 2.1 and new >= 2.1 protocol versions. Update commit message based on Linux one] Signed-off-by: Vinh Nguyen <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Alice Guo <[email protected]> Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/scmi_protocols.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/scmi_protocols.h b/include/scmi_protocols.h
index bcd8e671149..ecab021b472 100644
--- a/include/scmi_protocols.h
+++ b/include/scmi_protocols.h
@@ -733,6 +733,7 @@ int scmi_pwd_name_get(struct udevice *dev, u32 domain_id, u8 **name);
/*
* SCMI Clock Protocol
*/
+#define CLOCK_PROTOCOL_VERSION_2_1 0x20001
#define CLOCK_PROTOCOL_VERSION_3_0 0x30000
enum scmi_clock_message_id {
@@ -800,16 +801,28 @@ struct scmi_clk_attribute_out_v2 {
};
/**
- * struct scmi_clk_state_in - Message payload for CLOCK_CONFIG_SET command
+ * struct scmi_clk_state_in_v1 - Message payload for CLOCK_CONFIG_SET command for protocol < 2.1
* @clock_id: SCMI clock ID
* @attributes: Attributes of the targets clock state
*/
-struct scmi_clk_state_in {
+struct scmi_clk_state_in_v1 {
u32 clock_id;
u32 attributes;
};
/**
+ * struct scmi_clk_state_in_v2 - Message payload for CLOCK_CONFIG_SET command for protocol >= 2.1
+ * @clock_id: SCMI clock ID
+ * @attributes: Attributes of the targets clock state
+ * @extended_config_val: Extended and OEM specific configuration
+ */
+struct scmi_clk_state_in_v2 {
+ u32 clock_id;
+ u32 attributes;
+ u32 extended_config_val;
+};
+
+/**
* struct scmi_clk_state_out - Response payload for CLOCK_CONFIG_SET command
* @status: SCMI command status
*/