Re: [PATCH 1/2] arm64: dts: exynos850: Add ACPM firmware node

From: Peter Griffin

Date: Fri Nov 13 2026 - 12:18:46 EST


Hi Alexey,

> >> Eventually to have some sensible/working ->recalc_rate() for ACPM
> >> cpucl{0,1} clocks.
> >>
> >> Which is needed, for instance, for cpufreq_dt because it registers with:
> >>
> >> static struct cpufreq_driver dt_cpufreq_driver = {
> >> .flags = CPUFREQ_NEED_INITIAL_FREQ_CHECK |
> >> CPUFREQ_IS_COOLING_DEV,
> >>
> >> Don't know if it answers the question (if I understood it correctly)?
> >>
> >
> > Thanks, Alexey. I see now that clk-acpm.c uses pdata.fw_name on the
> > parent (acpm_ipc) DT node to link the ACPM clocks to the CMU PLLs for
> > ->recalc_rate(). Could you please clarify a few things in the commit
> > message (and below):
>
> Thanks for the good questions. You hit the exact pain points we have been
> debugging on hardware with cpufreq-dt and Panfrost devfreq.
>
> > 1. Physically, CLK_FOUT_CPUCL{0,1}_PLL are not input clocks feeding the
> > APM hardware, they are the PLLs that ACPM reconfigures behind the
> > scenes. Meanwhile, acpm_clk_register() sets num_parents = 1 and
> > pdata.fw_name = name for all 9 clocks in exynos850_acpm_clks[].
> > Since the DT node only lists "cpucl0" and "cpucl1", won't the other
> > 7 ACPM clocks (mif, int, g3d, aud, cam, disp, cp) remain permanently
> > orphaned in CCF with rate = 0?
>
> Correct. Is it a problem now since there are no "clients" or consumers or
> users of these clocks?
>
> Or do you suggest to link them all to parents clocks to have a sensible
> rate?

Since your implementation relies on CCF to get the clock rates I think
you have two options:
1) Only register ACPM clocks that have a corresponding CCF implementation.
2) Add the missing CCF clocks for the ACPM clocks you are registerring

Should CCF's ability to set the rate for these ACPM-managed clocks
also be restricted? It seems undesirable to have two entities (Linux
and ACPM) able to set the clock rate, with the possible exception of
it being useful for debugging. These limitations should also be
clearly mentioned in the commit message or cover letter.

>
> > 2. Does bypass_acpm_exynos850_get_rate() actually return the updated rate
> > after clk_set_rate()? When ACPM changes the PLL frequency via IPC,
> > CCF is unaware that the parent clock (fout_cpucl0_pll) changed in
> > hardware. Even with CLK_GET_RATE_NOCACHE on the ACPM clock,
> > __clk_recalc_rates() only reads the cached core->parent->rate without
> > calling ->recalc_rate() on the parent itself. Won't parent_rate remain
> > stuck at the initial boot frequency?
>
> This was already asked and seems there are no answers. The problem with
> stale rate is present.
> https://lore.kernel.org/linux-samsung-soc/DLAZXSNZK6QC.1VFAX37XCXBOV@xxxxxxxxxx/

The question was sent on September 9th, but the series adding support
into ACPM was sent on September 15th
(https://lore.kernel.org/lkml/20260915-exynos850-acpm-clk-v2-0-ffad4a6b3fb1@xxxxxxxxxx/).
The limitation about get_rate returning stale values should have been
clearly stated in the cover letter or commit messages.

>
> Any suggestions?

For the benefit of the ML, we discussed this topic off list. The
consensus was to try and make CCF walk the clock tree, recalculating
clock rates from the SFRs without using any cached values (as ACPM
could have changed the SFRs of PLLs, dividers, etc., behind Linux's
back).

That should in theory mean that clk_summary will always report the
correct clock rates for everything in the clock tree and we won't
report (or make decisions) based on stale values.

> > 3. In drivers/clk/samsung/clk-exynos850.c, cpucl0_cmu_info and
> > cpucl1_cmu_info still set `.manual_plls = true`.
> > Does that conflict with ACPM firmware managing the CPU PLLs?
>
> I don't know yet what to do with that. I didn't encounter any problems
> yet because of this. Is it related to early initialisation only?
> I thought that exynos CMU driver doesn't touch PLL clocks after init.

You should check this with downstream sources and the TRM.

regards,

Peter