aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Yeong <joshua.yeong@starfivetech.com>2025-10-13 23:31:37 +0800
committerAnup Patel <anup@brainfault.org>2025-11-04 10:34:01 +0530
commita28e51016e7715f2baeea18a07cef93a7cb603af (patch)
treec6e1603fd44b54b3d87652761f915c6b1645bbfa /include
parentfa911ebe72ec9f8b82947ebc99daf1d0ec2f53e2 (diff)
downloadopensbi-a28e51016e7715f2baeea18a07cef93a7cb603af.tar.gz
opensbi-a28e51016e7715f2baeea18a07cef93a7cb603af.tar.bz2
opensbi-a28e51016e7715f2baeea18a07cef93a7cb603af.zip
lib: utils: Add MPXY RPMI mailbox driver for device power
Add MPXY RPMI mailbox driver for device power. Signed-off-by: Joshua Yeong <joshua.yeong@starfivetech.com> Reviewed-by: Rahul Pathak <rpathak@ventanamicro.com> Link: https://lore.kernel.org/r/20251013153138.1574512-3-joshua.yeong@starfivetech.com Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
-rw-r--r--include/sbi_utils/mailbox/rpmi_msgprot.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/sbi_utils/mailbox/rpmi_msgprot.h b/include/sbi_utils/mailbox/rpmi_msgprot.h
index 6b5a553c..4e915a08 100644
--- a/include/sbi_utils/mailbox/rpmi_msgprot.h
+++ b/include/sbi_utils/mailbox/rpmi_msgprot.h
@@ -218,6 +218,7 @@ enum rpmi_servicegroup_id {
RPMI_SRVGRP_CPPC = 0x0006,
RPMI_SRVGRP_VOLTAGE = 0x00007,
RPMI_SRVGRP_CLOCK = 0x0008,
+ RPMI_SRVGRP_DEVICE_POWER = 0x0009,
RPMI_SRVGRP_ID_MAX_COUNT,
/* Reserved range for service groups */
@@ -784,4 +785,48 @@ struct rpmi_clock_get_rate_resp {
u32 clock_rate_high;
};
+/** RPMI Device Power ServiceGroup Service IDs */
+enum rpmi_dpwr_service_id {
+ RPMI_DPWR_SRV_ENABLE_NOTIFICATION = 0x01,
+ RPMI_DPWR_SRV_GET_NUM_DOMAINS = 0x02,
+ RPMI_DPWR_SRV_GET_ATTRIBUTES = 0x03,
+ RPMI_DPWR_SRV_SET_STATE = 0x04,
+ RPMI_DPWR_SRV_GET_STATE = 0x05,
+ RPMI_DPWR_SRV_MAX_COUNT,
+};
+
+struct rpmi_dpwr_get_num_domain_resp {
+ s32 status;
+ u32 num_domain;
+};
+
+struct rpmi_dpwr_get_attrs_req {
+ u32 domain_id;
+};
+
+struct rpmi_dpwr_get_attrs_resp {
+ s32 status;
+ u32 flags;
+ u32 transition_latency;
+ u8 name[16];
+};
+
+struct rpmi_dpwr_set_state_req {
+ u32 domain_id;
+ u32 state;
+};
+
+struct rpmi_dpwr_set_state_resp {
+ s32 status;
+};
+
+struct rpmi_dpwr_get_state_req {
+ u32 domain_id;
+};
+
+struct rpmi_dpwr_get_state_resp {
+ s32 status;
+ u32 state;
+};
+
#endif /* !__RPMI_MSGPROT_H__ */