[PATCH 0/2] ACPM cpufreq with fast_switch support, fast path xfer in ACPM
Alexey Klimov
alexey.klimov at linaro.org
Thu Jun 11 21:34:00 PDT 2026
The series implements acpm_do_xfer_fast() that does as little
as possible to make it usabe in atomic context to eventually
use it in cpufreq path with ->fast_switch(). That's basically it.
Cpufreq deals directly with ACPM dvfs instead of going through
clk framework.
This series is Work-In-Progress / RFC.
This is currently a working prototype, but I am sending it as an RFC to
get feedback on the approach — specifically the ACPM fast path of sending
messages. If ACPM part is no-go then cpufreq is not needed.
Known TODO items:
-- rx/tx channels locks rework;
-- initial frequency fetching: Exynos850 firmware currently lacks a
clean get_rate, so the driver falls back to dump defaults until the
first freq transition.
-- potential mailbox channels re-implementation.
Any thoughts, testing, or feedback on the architecture would be greatly
appreciated.
This was tested on Exynos850 with example of DT nodes described
in [1] and [2].
Dependencies are different series that adds Exynos850 ACPM support:
-- ACPM mailbox support for Exynos850:
https://lore.kernel.org/linux-samsung-soc/20260429-exynos850-mbox-dts-v1-1-7f3ad27ed4f4@linaro.org/
-- sram DT node:
https://lore.kernel.org/linux-samsung-soc/20260413-exynos850_sram-v1-1-7fda5b7fb7d4@linaro.org/
-- ACPM support on Exynos850:
https://lore.kernel.org/linux-samsung-soc/20260513-exynos850-acpm-firmware-support-v1-0-3858d097e433@linaro.org/
(the above dependencies pull some other series as well)
[1]:
cpu0: cpu at 0 {
device_type = "cpu";
compatible = "arm,cortex-a55";
reg = <0x0>;
clocks = <&acpm_ipc E850_CLK_ACPM_DVFS_CPUCL0>;
enable-method = "psci";
operating-points-v2 = <&cpucl0_opp_table>;
capacity-dmips-mhz = <250>;
dynamic-power-coefficient = <70>;
};
[2]:
cpucl0_opp_table: opp-table-0 {
compatible = "operating-points-v2";
opp-shared;
opp-130000000 {
opp-hz = /bits/ 64 <130000000>;
opp-microvolt = <625000>;
clock-latency-ns = <500000>;
};
opp-182000000 {
opp-hz = /bits/ 64 <182000000>;
opp-microvolt = <625000>;
clock-latency-ns = <500000>;
};
opp-247000000 {
opp-hz = /bits/ 64 <247000000>;
opp-microvolt = <625000>;
clock-latency-ns = <500000>;
};
opp-351000000 {
opp-hz = /bits/ 64 <351000000>;
opp-microvolt = <625000>;
clock-latency-ns = <500000>;
};
opp-442000000 {
opp-hz = /bits/ 64 <442000000>;
opp-microvolt = <625000>;
clock-latency-ns = <500000>;
};
opp-546000000 {
opp-hz = /bits/ 64 <546000000>;
opp-microvolt = <625000>;
clock-latency-ns = <500000>;
};
opp-650000000 {
opp-hz = /bits/ 64 <650000000>;
opp-microvolt = <625000>;
clock-latency-ns = <500000>;
};
opp-806000000 {
opp-hz = /bits/ 64 <806000000>;
opp-microvolt = <656250>;
clock-latency-ns = <500000>;
};
opp-949000000 {
opp-hz = /bits/ 64 <949000000>;
opp-microvolt = <681250>;
clock-latency-ns = <500000>;
};
opp-1053000000 {
opp-hz = /bits/ 64 <1053000000>;
opp-microvolt = <706250>;
clock-latency-ns = <500000>;
};
opp-1157000000 {
opp-hz = /bits/ 64 <1157000000>;
opp-microvolt = <737500>;
clock-latency-ns = <500000>;
};
opp-1300000000 {
opp-hz = /bits/ 64 <1300000000>;
opp-microvolt = <781250>;
clock-latency-ns = <500000>;
};
opp-1456000000 {
opp-hz = /bits/ 64 <1456000000>;
opp-microvolt = <825000>;
clock-latency-ns = <500000>;
};
opp-1586000000 {
opp-hz = /bits/ 64 <1586000000>;
opp-microvolt = <875000>;
clock-latency-ns = <500000>;
};
opp-1742000000 {
opp-hz = /bits/ 64 <1742000000>;
opp-microvolt = <937500>;
clock-latency-ns = <500000>;
};
opp-1846000000 {
opp-hz = /bits/ 64 <1846000000>;
opp-microvolt = <981250>;
clock-latency-ns = <500000>;
};
opp-2002000000 {
opp-hz = /bits/ 64 <2002000000>;
opp-microvolt = <1050000>;
clock-latency-ns = <500000>;
};
opp-2106000000 {
opp-hz = /bits/ 64 <2106000000>;
opp-microvolt = <1106250>;
clock-latency-ns = <500000>;
};
opp-2210000000 {
opp-hz = /bits/ 64 <2210000000>;
opp-microvolt = <1181250>;
clock-latency-ns = <500000>;
};
};
Signed-off-by: Alexey Klimov <alexey.klimov at linaro.org>
---
Alexey Klimov (2):
firmware: samsung: acpm: add fire-and-forget xfer support
cpufreq: add ACPM-based CPU DVFS driver for Exynos SoCs
drivers/cpufreq/Kconfig.arm | 8 +
drivers/cpufreq/Makefile | 1 +
drivers/cpufreq/acpm-cpufreq.c | 195 +++++++++++++++++++++
drivers/cpufreq/cpufreq-dt-platdev.c | 3 +
drivers/firmware/samsung/exynos-acpm-dvfs.c | 14 ++
drivers/firmware/samsung/exynos-acpm-dvfs.h | 3 +
drivers/firmware/samsung/exynos-acpm.c | 142 +++++++++++++--
drivers/firmware/samsung/exynos-acpm.h | 3 +
.../linux/firmware/samsung/exynos-acpm-protocol.h | 2 +
9 files changed, 361 insertions(+), 10 deletions(-)
---
base-commit: ec039126b7fac4e3af35ebccaa7c6f9b6875ba81
change-id: 20260612-acpm-fast-xfer-86c4de78c20b
Best regards,
--
Alexey Klimov <alexey.klimov at linaro.org>
More information about the linux-arm-kernel
mailing list