[PATCH 4/4] cpufreq: add an Amlogic speed-bin driver
Chuan Liu
chuan.liu686 at gmail.com
Tue Oct 27 02:31:44 PDT 2026
Hi Jerome,
On 10/26/2026 4:57 PM, Jerome Brunet wrote:
> On lun. 26 oct. 2026 at 11:00, Viresh Kumar <viresh.kumar at linaro.org> wrote:
>
>> On 25-10-26, 20:22, christian.koever-draxl at student.uibk.ac.at wrote:
>>> From: Christian Stefan Kövér-Draxl <ckoever at outlook.de>
>>>
>>> Every S4 speed bin runs the same CPU frequencies but needs its own
>>> voltage curve, and the bin can only be read through the secure monitor.
>>>
>>> Read the bin from the firmware, select the matching
>>> "opp-microvolt-speed<bin>" property for all CPUs, then register
>>> cpufreq-dt. Bins outside the known range fall back to bin 0, which
>>> has the highest voltages. Like sun50i-cpufreq-nvmem, the driver binds
>>> on the SoC compatible and needs no node of its own, and S4 is added to
>>> the cpufreq-dt-platdev blocklist so cpufreq-dt is only created after
>>> the bin has been applied.
>>>
>>> Signed-off-by: Christian Stefan Kövér-Draxl <ckoever at outlook.de>
>>> ---
>>> MAINTAINERS | 1 +
>>> drivers/cpufreq/Kconfig.arm | 14 ++
>>> drivers/cpufreq/Makefile | 1 +
>>> drivers/cpufreq/amlogic-cpufreq.c | 184 +++++++++++++++++++++++++++
>>> drivers/cpufreq/cpufreq-dt-platdev.c | 2 +
>>> 5 files changed, 202 insertions(+)
>>> create mode 100644 drivers/cpufreq/amlogic-cpufreq.c
>>
>> Is it safe to apply just this one ? I can take this via the PM tree then.
>
> I would advise to wait a little for Amlogic to chime in.>
> Patch 2 is something I already rejected back when S4 support was
> initially introduced. I suppose AI just unearthed it and did not bother
> to mention it.
>
> Amlogic was supposed to migrate to SCMI at that point, and possibly
> handle CPU frequency scaling through the secure fw entirely.
Yes, starting from the C3 clock upstream submission, we replaced the
SMCs implementation of the secure-clock with SCMI. For the latest
released Amlogic SoCs (S7 and later), secure-clock is implemented
uniformly through SCMI.
>
> They did on later SoCs, I don't know where their FW stands on the S4.
Most S4 customers receive a secure firmware (bl31.bin) that sets
secure-clock via SMCs (because the S4 SDK had already been released by
the time we added SCMI support). We have also provided an SCMI-capable
bl31.bin to some customers.
>
>>
>> --
>> viresh
>
--
Best regards,
Chuan
More information about the linux-arm-kernel
mailing list