Skip to content

arm64: dts: exynos: google: zumapro: CPU DVFS, thermal zones and the GPU's top levels - #87

Closed
W4HO-ham wants to merge 3 commits into
derekross:omamobilefrom
W4HO-ham:tegu-dt-dvfs
Closed

W4HO-ham wants to merge 3 commits into
derekross:omamobilefrom
W4HO-ham:tegu-dt-dvfs

Conversation

@W4HO-ham

@W4HO-ham W4HO-ham commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #85, #81 and #80. It needs #84 (clk-acpm zumapro) and #86 (merged). Only the last two commits are new.

  • zumapro.dtsi:
    • the three CPU clusters on their ACPM DVFS clocks (cpucl0-2), with operating points for cpufreq-dt and capacities and power coefficients for the energy model;
    • the ACPM TMU sensor under acpm_ipc (google,zumapro-acpm-tmu);
    • the big, mid, little and GPU thermal zones. A CPU zone throttles its cluster from 80 C, forces the lowest levels from 95 C and shuts down at 105 C, all below the firmware's own 120 C trips. gpu-thermal throttles panthor's devfreq from 85 C.
  • zumapro-tegu.dts: with that throttle in place, the GPU levels 723-890 MHz.

The CPU tables stop at each cluster's thermal headroom on the 9a: 1954 MHz little, 2367 MHz mid, 2687 MHz big. The higher ACPM levels are listed in a comment. Unthrottled, eight loaded cores took the X4 to 105 C in 4 s at 3105 MHz. The GPU's 940 MHz top level stays out until it has run on the 9a.

Against the palmtop: the CPU nodes, the three CPU tables, the sensor and all four zones match the DTB it boots now, property for property, with phandles resolved. That DTB already has the TMU node under ACPM, round th1 for #86. The GPU table is the one it runs, minus the bootloader's 159.744 MHz point. It runs all of this through #84's clk-acpm and #86's TMU driver: cpufreq on three policies, four zones with their cooling maps, and the GPU moving through 150-890 MHz under load.

CHECK_DTBS=y W=1 for zumapro-tegu.dtb is clean (with #86's binding), and checkpatch --strict is clean on both commits.

@derekross

Copy link
Copy Markdown
Owner

Thanks for this. Thermal zones and CPU DVFS together make the 9a properly usable. I checked it against Google's zumapro-cpu.dtsi and the zumapro board files:

One change before merging:

  • The little table's 1951, 1952, 1953 and 1954 MHz points. Google's zumapro-cpu.dtsi caps the little cluster at max-freq = <1950000>, and its DSU/BCI constraint table also stops at 1950000. Four points 1 MHz apart above that aren't really separate frequencies; they look like other entries in the firmware's table, perhaps voltage or DSU/BCI variants. clk-acpm passes the rate straight to the firmware, so cpufreq will sit on 1954000 under load, a level stock never asks for. Could you drop them and stop at 1950 MHz, unless you can point to a public source for what they are and show that stock uses them?

And on the order: this needs #86 and #84 in first. Once #84 has its id header, please use the names for <&acpm_ipc 2>-4 and 17.

Smaller things:

  • "below the firmware's own 120 C hardware trips": where does 120 °C come from? Our read-only driver leaves the hardware thresholds as the bootloader (or the TMU init) set them, so either the thresholds decoded on the 9a, as we did for the Pixel 6 Pro, or "below stock's 112/115 °C trips" would make the claim checkable.
  • The little table starts at 324 and 610 MHz, below stock's min-freq = <820000>. Lower is normally harmless, but one line on where those two come from would help.
  • The caps are the 9a's thermal headroom, but they live in the SoC dtsi, so a Pixel 9 board would inherit them. A comment saying so, or the caps in the board file, would avoid a surprise later.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Thanks. Pushed:

  • Little table: it now stops at 1950 MHz (Google's max-freq), without the 1951-1954 points. The little cluster's lowest-level cooling map moves from state 15 to 11 with it.
  • Clock names: the three clusters use ZUMAPRO_CLK_ACPM_DVFS_CPUCL0-2 from clk: samsung: acpm: Add Tensor G4 (zumapro) with a paired GPU clock #84's header.
  • The 120 C claim: gone. The message now says the trips are below stock's 112 C (CPU) and 115 C (GPU) hot trips.
  • 324 and 610 MHz: a comment and the message say they're the APM firmware's own levels, read on the 9a from its DVFS table, and below stock's 820 MHz floor.
  • The caps: the comment says each table's top is the 9a's thermal headroom, and that a board with more can add the levels above, which are listed in the table.

#86 is merged and #84 is under the stack, so this builds on its own now. With #89's and #95's bindings added, CHECK_DTBS=y for zumapro-tegu.dtb is clean.

@derekross

Copy link
Copy Markdown
Owner

Thanks for working through all of these. I think the last push didn't reach this branch, though. #80, #81 and #85 were force-pushed at 20:19Z, but this PR's head is still c2ce1fd7c62f from 20:06Z. That push was a plain rebase of the earlier version: the little table still runs to opp-1954000000, the CPUs still use <&acpm_ipc 2>-4 and the GPU <&acpm_ipc 17>, the message still says "1954 MHz little" and "120 C", and it sits on the 20:06 copies of #80-#85, without the header commit or mem_sleep_default.

The commits you describe do exist: they're c0163bf6de52 and 3a64a1c254e8, under #90 and #96. I checked those, and they're right:

  • The little table stops at 1950 MHz, and each lowest-level cooling map points at the last OPP of its table (little 11, mid 14, big 11). The mid and big tables sit inside stock's min-freq/max-freq too.
  • The clusters use ZUMAPRO_CLK_ACPM_DVFS_CPUCL0-2, and the message now compares the trips with stock's 112 and 115 °C, and says where 324 and 610 MHz come from.
  • With clk: samsung: acpm: Add Tensor G4 (zumapro) with a paired GPU clock #84 merged in, the whole stack up to 3a64a1c254e8 builds commit by commit, the Pixel 6, 6 Pro, 7 Pro, Fold, 7a and 8 Pro DTBs are byte-identical to the base, and zumapro-tegu.dtb validates with no messages.

So it only needs git push --force-with-lease <your remote> 3a64a1c254e8:<this PR's branch>.

For landing the stack, I'll merge #84 now. Once the 9a has booted this tree (see #80), please rebase onto omamobile (git will drop your copy of the header commit, since it's already in), add the "Tested on" line to the board commit, and push the top here. Then I'll rebase-merge this PR on its own, which lands #80, #81 and #85 with it, and close those three as landed here.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

A correction: the branch head I pushed for this at 13:18 was the stack from before the rebase onto the Tensor G4 clock ids (#84), with numeric ACPM clock ids. The version my earlier reply describes (named ZUMAPRO_CLK_ACPM_DVFS_* ids, little cluster capped at 1950 MHz, the comment block and the reworded message) only reached the display branch. It's pushed here now as 3a64a1c, on top of #85.

@derekross

Copy link
Copy Markdown
Owner

Thanks, this branch has the right commits now: the little table stops at 1950 MHz, the clusters use ZUMAPRO_CLK_ACPM_DVFS_CPUCL0-2, and the message compares the trips with stock's 112 and 115 °C. Both commits are the ones I checked yesterday, only rebased, and the whole stack builds and validates on today's omamobile.

Since #84 and #89 are merged, the stack can now land in one go from its top, #96. The plan is on #80; nothing more is needed on this PR itself.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

The stack is rebased on today's omamobile (6beaf6d62, unchanged since yesterday) and pushed here: #87's head is now 463e1f8. The only change from the previous heads is the board commit's message. It now carries a "Tested on the Pixel 9a" paragraph with this morning's #80 boot (details on #80). No file differs from the heads you reviewed (git diff between the old and new heads is empty for every branch). #90, #96, #105, #106, #118 and #119 moved with it.

@derekross

Copy link
Copy Markdown
Owner

Thanks. I checked it: the only change across the stack is the board commit's message, and every tree is the same as before. One correction, though: omamobile had already moved past 6beaf6d62 (the Pixel 7 board and the soc_id binding landed around 14:30Z), so the branches now conflict in the google DTS Makefile and CI didn't run. The resolution and the remaining boot are on #80.

Turn on CMU_G3D and the Mali-G715 for the Pixel 9a, with its core clock
on ACPM's paired "gpu" clock (index 17), which sets the shader (G3D) and
L2 (G3DL2) domains together, and coregroup and stacks on CMU_G3D's gates.

The operating points are the shader rates of the 9a's GPU DVFS table up
to 649 MHz. The levels above it, to 940 MHz, wait for a GPU thermal
zone, since nothing throttles the GPU yet.

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Give the three CPU clusters their ACPM DVFS clocks (cpucl0-2, by the
zumapro ACPM clock ids) and operating points for cpufreq-dt, with
capacities and power coefficients for the energy model from Google's
zumapro-cpu.dtsi, and add the ACPM TMU sensor and the big, mid, little
and GPU thermal zones.

The CPU levels are the APM firmware's own (its DVFS table, read on the
Pixel 9a), up to the 9a's thermal headroom: 1950 MHz little (Google's
max-freq for that cluster), 2367 MHz mid and 2687 MHz big. The little
cluster's 324 and 610 MHz lie below stock's 820 MHz floor. Each CPU zone
throttles its cluster from 80 C, forces the cluster's lowest levels
from 95 C and shuts down at 105 C, all below stock's 112 C (CPU) and
115 C (GPU) hot trips. gpu-thermal throttles panthor's devfreq from
85 C.

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
… MHz

With gpu-thermal throttling the GPU, add the 9a's GPU levels above 649
MHz: 723, 807, 850 and 890 MHz. The table's top, 940 MHz, stays out
until it has run on the 9a.

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Rebased onto today's omamobile: the SoC, board, binding and touchscreen commits below this one are all in your branch now, so what remains is the GPU enable, the CPU DVFS and thermal zones, and the GPU's levels to 890 MHz. The board device tree compiles and checkpatch --strict is clean on all three.

@derekross

Copy link
Copy Markdown
Owner

Thanks for the rebase. Same patches and trees as before, and the gate passes on today's omamobile. This still lands through #96 once its display and GPU boot is in.

greenbrettmichael added a commit to greenbrettmichael/linux-omarchy-mobile that referenced this pull request Nov 1, 2026
…zone

Add zuma's TMU sensor under acpm_ipc and a gpu-thermal zone on its G3D
sensor (3). It throttles panthor's devfreq from 85 C and shuts down at
105 C, as derekross#87 proposes for zumapro, below the stock Pixel 8 Pro's own
GPU trips (passive from 100 C, hot at 115 C). For that, the GPU node
gets #cooling-cells.

Assisted-by: LLM
Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
greenbrettmichael added a commit to greenbrettmichael/linux-omarchy-mobile that referenced this pull request Nov 1, 2026
Run the three CPU clusters on their ACPM DVFS clocks (cpucl0-2) through
cpufreq-dt, and add thermal zones for them on the ACPM TMU's big, mid
and little sensors (0-2):

- the operating points are the ACPM firmware's own levels, read from
  the ECT the bootloader leaves at 0x90000000, up to each cluster's
  max-freq in stock's exynos-acme domains: 1704 MHz little, 2367 MHz
  mid and 2914 MHz big. The ECT's little levels up to 1704 MHz are the
  ones stock's cpufreq statistics list;
- the dynamic power coefficients are stock's (70, 513 and 757), with
  #cooling-cells for cpufreq cooling;
- the levels above stock's battery current limiter caps (1945 MHz mid,
  2294 MHz big, from Google's zuma-shusky-bcl.dtsi) are turbo-mode, as
  on gs201: with no BCL driver nothing pulls the clusters down when the
  battery voltage droops, so they are only used with boost enabled;
- a CPU zone throttles its cluster from 80 C, forces its lowest level
  from 95 C and is critical at 105 C, as derekross#87 proposes for zumapro.

The ACPM clock ids header moves from the board to zuma.dtsi.

Assisted-by: LLM
Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
greenbrettmichael added a commit to greenbrettmichael/linux-omarchy-mobile that referenced this pull request Nov 1, 2026
Run the three CPU clusters on their ACPM DVFS clocks (cpucl0-2) through
cpufreq-dt, and add thermal zones for them on the ACPM TMU's big, mid
and little sensors (0-2):

- the operating points are the ACPM firmware's own levels, read from
  the ECT the bootloader leaves at 0x90000000, up to each cluster's
  max-freq in stock's exynos-acme domains: 1704 MHz little, 2367 MHz
  mid and 2914 MHz big. The ECT's little levels up to 1704 MHz are the
  ones stock's cpufreq statistics list;
- the energy model is stock's: each level's opp-microwatt is its power
  in the default pixel-em profile of Google's zuma-b0-ipop.dts, which
  the Pixel 8 Pro's own device tree has too. A dynamic power
  coefficient can't be used, since the firmware sets the voltages and
  there is no opp-microvolt: with one, the energy model fails to
  register ("EM: invalid perf. state: -22"). The CPUs get #cooling-cells
  for cpufreq cooling;
- the levels above stock's battery current limiter caps (1945 MHz mid,
  2294 MHz big, from Google's zuma-shusky-bcl.dtsi) are turbo-mode, as
  on gs201: with no BCL driver nothing pulls the clusters down when the
  battery voltage droops, so they are only used with boost enabled;
- a CPU zone throttles its cluster from 80 C, forces its lowest level
  from 95 C and is critical at 105 C, as derekross#87 proposes for zumapro.

The ACPM clock ids header moves from the board to zuma.dtsi.

Assisted-by: LLM
Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
@derekross

Copy link
Copy Markdown
Owner

Its patches landed unchanged through #96, so I'm closing this one. Thanks!

@derekross derekross closed this Nov 1, 2026
greenbrettmichael added a commit to greenbrettmichael/linux-omarchy-mobile that referenced this pull request Nov 9, 2026
Run the three CPU clusters on their ACPM DVFS clocks (cpucl0-2) through
cpufreq-dt, and add thermal zones for them on the ACPM TMU's big, mid
and little sensors (0-2):

- the operating points are the ACPM firmware's own levels, read from
  the ECT the bootloader leaves at 0x90000000, up to each cluster's
  max-freq in stock's exynos-acme domains: 1704 MHz little, 2367 MHz
  mid and 2914 MHz big. The ECT's little levels up to 1704 MHz are the
  ones stock's cpufreq statistics list;
- the energy model is stock's: each level's opp-microwatt is its power
  in the default pixel-em profile of Google's zuma-b0-ipop.dts, which
  the Pixel 8 Pro's own device tree has too. A dynamic power
  coefficient can't be used, since the firmware sets the voltages and
  there is no opp-microvolt: with one, the energy model fails to
  register ("EM: invalid perf. state: -22"). The CPUs get #cooling-cells
  for cpufreq cooling;
- the levels above stock's battery current limiter caps (1945 MHz mid,
  2294 MHz big, from Google's zuma-shusky-bcl.dtsi) are turbo-mode, as
  on gs201: with no BCL driver nothing pulls the clusters down when the
  battery voltage droops, so they are only used with boost enabled;
- a CPU zone throttles its cluster from 80 C, forces its lowest level
  from 95 C and is critical at 105 C, as derekross#87 proposes for zumapro.

The ACPM clock ids header moves from the board to zuma.dtsi.

Assisted-by: LLM
Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants