[PATCH 0/1] PM / devfreq: add SCMI performance protocol bridge
From: Li Mingzhe
Date: Wed Nov 18 2026 - 03:57:35 EST
Hi,
This patch adds a bridge module that owns the SCMI performance-protocol
scmi_device binding on behalf of devfreq drivers, mirroring the design
of drivers/cpufreq/scmi-cpufreq.c.
Motivation
==========
A SoC may have several devfreq consumers (NOC/DMU interconnects, GPU,
...) whose performance domains are managed by the SCMI performance
protocol. Each consumer needs:
- the perf-domain id parsed from its DT "clocks" phandle
- the domain OPP table imported from PERFORMANCE_DESCRIBE_LEVELS
- PERFORMANCE_LEVEL_GET/SET wrappers for freq transitions
Binding the perf-protocol scmi_device in every driver would race and
multiply the dummy-clock-provider workarounds needed by the OPP core.
Instead, this single built-in bridge binds the scmi_device, registers
the clock provider on the protocol node, and exposes a small public
API in include/linux/scmi-devfreq.h:
scmi_devfreq_ready() bound check for early probe deferral
scmi_devfreq_domain_id() DT clocks phandle -> perf domain id
scmi_devfreq_opps_add() import PERFORMANCE_DESCRIBE_LEVELS
scmi_devfreq_freq_get/set() PERFORMANCE_LEVEL_GET/SET wrappers
All functions return -EPROBE_DEFER until the bridge is bound, so
consumers are retried automatically during probe.
Tested on we platform with the NOC/DMU devfreq drivers, verifying
that the OPP table is imported and freq_set transitions are applied.
Li Mingzhe (1):
PM / devfreq: add SCMI performance protocol bridge
drivers/devfreq/Kconfig | 9 ++
drivers/devfreq/Makefile | 1 +
drivers/devfreq/scmi_devfreq.c | 205 +++++++++++++++++++++++++++++++++
include/linux/scmi-devfreq.h | 30 +++++
4 files changed, 245 insertions(+)
create mode 100644 drivers/devfreq/scmi_devfreq.c
create mode 100644 include/linux/scmi-devfreq.h
--
2.43.0