From: Philip Radford <philip.radford@arm.com>
To: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org,
linux-pm@vger.kernel.org
Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com,
f.fainelli@gmail.com, vincent.guittot@linaro.org,
etienne.carriere@st.com, peng.fan@oss.nxp.com,
michal.simek@amd.com, quic_sibis@quicinc.com,
dan.carpenter@linaro.org, d-gole@ti.com,
souvik.chakravarty@arm.com,
Cristian Marussi <cristian.marussi@arm.com>,
Philip Radford <philip.radford@arm.com>
Subject: [PATCH v5 05/12] firmware: arm_scmi: Add SCMIV4.0 Powercap notifications support
Date: Tue, 28 Apr 2026 10:09:14 +0100 [thread overview]
Message-ID: <20260428090922.346069-6-philip.radford@arm.com> (raw)
In-Reply-To: <20260428090922.346069-1-philip.radford@arm.com>
From: Cristian Marussi <cristian.marussi@arm.com>
Extend notification support to the new SCMIv4.0 Powercap format that carry
also a CPL identifier where specified.
Since this addition completes SCMIv4.0 Powercap support bump also the
protocol version define.
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Philip Radford <philip.radford@arm.com>
---
drivers/firmware/arm_scmi/powercap.c | 13 +++++++++----
include/linux/scmi_protocol.h | 3 ++-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/firmware/arm_scmi/powercap.c b/drivers/firmware/arm_scmi/powercap.c
index db5bc4f38ea4..1d1188e98d49 100644
--- a/drivers/firmware/arm_scmi/powercap.c
+++ b/drivers/firmware/arm_scmi/powercap.c
@@ -18,7 +18,7 @@
#include "notify.h"
/* Updated only after ALL the mandatory features for that version are merged */
-#define SCMI_PROTOCOL_SUPPORTED_VERSION 0x20000
+#define SCMI_PROTOCOL_SUPPORTED_VERSION 0x30000
#define CPL0 0
@@ -156,7 +156,8 @@ struct scmi_powercap_cap_changed_notify_payld {
__le32 agent_id;
__le32 domain_id;
__le32 power_cap;
- __le32 pai;
+ __le32 avg_ivl;
+ __le32 cpli;
};
struct scmi_powercap_meas_changed_notify_payld {
@@ -1312,14 +1313,18 @@ scmi_powercap_fill_custom_report(const struct scmi_protocol_handle *ph,
const struct scmi_powercap_cap_changed_notify_payld *p = payld;
struct scmi_powercap_cap_changed_report *r = report;
- if (sizeof(*p) != payld_sz)
+ if (sizeof(*p) > payld_sz)
break;
r->timestamp = timestamp;
r->agent_id = le32_to_cpu(p->agent_id);
r->domain_id = le32_to_cpu(p->domain_id);
r->power_cap = le32_to_cpu(p->power_cap);
- r->pai = le32_to_cpu(p->pai);
+ r->avg_ivl = le32_to_cpu(p->avg_ivl);
+ if (sizeof(*p) == payld_sz)
+ r->cpli = le32_to_cpu(p->cpli);
+ else
+ r->cpli = 0;
*src_id = r->domain_id;
rep = r;
break;
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index 547ab4763a63..299fa8499b3f 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -1125,7 +1125,8 @@ struct scmi_powercap_cap_changed_report {
unsigned int agent_id;
unsigned int domain_id;
unsigned int power_cap;
- unsigned int pai;
+ unsigned int avg_ivl;
+ unsigned int cpli;
};
struct scmi_powercap_meas_changed_report {
--
2.47.3
next prev parent reply other threads:[~2026-04-28 9:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 9:09 [PATCH v5 00/12] Add support for SCMIv4.0 Powercap Extensions Philip Radford
2026-04-28 9:09 ` [PATCH v5 01/12] firmware: arm_scmi: Add an optional custom parameter to fastchannel helpers Philip Radford
2026-04-28 9:09 ` [PATCH v5 02/12] firmware: arm_scmi: Refactor powercap domain layout Philip Radford
2026-04-28 9:09 ` [PATCH v5 03/12] firmware: arm_scmi: Add SCMIv4.0 Powercap basic support Philip Radford
2026-04-28 9:09 ` [PATCH v5 04/12] firmware: arm_scmi: Add SCMIv4.0 Powercap FCs support Philip Radford
2026-04-28 9:09 ` Philip Radford [this message]
2026-04-28 9:09 ` [PATCH v5 06/12] firmware: arm_scmi: Extend powercap report to include MAI Philip Radford
2026-04-28 9:09 ` [PATCH v5 07/12] include: trace: Add new parameter to trace_scmi_fc_call Philip Radford
2026-04-28 9:09 ` [PATCH v5 08/12] powercap: arm_scmi: Enable multiple constraints support Philip Radford
2026-04-28 9:09 ` [PATCH v5 09/12] firmware: arm_scmi: add Powercap MAI get/set support Philip Radford
2026-04-28 9:09 ` [PATCH v5 10/12] powercap: arm_scmi: Create synthetic parent node for multi-instance Philip Radford
2026-04-28 9:09 ` [PATCH v5 11/12] powercap: arm_scmi: Add get_power_uw to synthetic node Philip Radford
2026-04-28 9:09 ` [PATCH v5 12/12] powercap: arm_scmi: Synthetic zone enable/disable Philip Radford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260428090922.346069-6-philip.radford@arm.com \
--to=philip.radford@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=d-gole@ti.com \
--cc=dan.carpenter@linaro.org \
--cc=etienne.carriere@st.com \
--cc=f.fainelli@gmail.com \
--cc=james.quinlan@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=peng.fan@oss.nxp.com \
--cc=quic_sibis@quicinc.com \
--cc=souvik.chakravarty@arm.com \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox