Repository navigation
arm64: dts: exynos: google: gs201: CPU frequency scaling and thermal zones (Pixel 7 Pro) - #169
Merged
Merged
Conversation
The Tensor G2 (gs201) reads its SoC temperatures through the same ACPM TMU service as gs101, on channel 9, with a seventh sensor, AUR, after the six gs101 has (Google's gs201 device tree lists BIG, MID, LITTLE, G3D, ISP, TPU and AUR as TMU ids 0-6). Add google,gs201-acpm-tmu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
The Tensor G2 (gs201) reads its SoC temperatures through the same ACPM TMU service on channel 9 as gs101 (Google's gs201 device tree gives the acpm_tmu node acpm-ipc-channel = <9>), with the same sensor order plus a seventh, AUR (tmuctrl_6 in Google's gs201-b0.dts). Add google,gs201-acpm-tmu with seven sensors. gs101 and zumapro keep their match data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
Add the ACPM TMU sensor under acpm_ipc and a thermal zone for each of the six sensors that gs101 also has (big, mid and little CPU clusters, GPU, ISP, TPU), in the order of Google's gs201 tmuctrl ids. The driver only reads temperatures and programs no hardware thresholds. Every zone is critical at 110 C. Stock's own trips are higher: its CPU and GPU zones start throttling at 100 C and are "hot" at 120 C (Google's gs201-b0.dts). The CPU zones poll every 250 ms, and every 100 ms once a passive trip is crossed, as on gs101, where a big cluster burst outran slower polling; the cooling maps come with CPU DVFS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
Run the three CPU clusters on their ACPM DVFS clocks (cpucl0-2) through cpufreq-dt, with the CPUs as cooling devices of their thermal zones. Until now every core stayed at the bootloader's rate: about 1.2 GHz little, 0.9-1.2 GHz mid and 1.0-1.1 GHz big. - The operating points are the ACPM firmware's own levels, from the ECT the bootloader leaves at 0x90000000, up to each cluster's max-freq in stock's exynos-acme domains (Google's gs201-cpu.dtsi): 300-1803 MHz little (11 levels), 400-2348 MHz mid (15) and 500-2850 MHz big (18). These are also the levels of stock's pixel-em table. The ECT's levels above those maximums are listed in comments and left out, as stock leaves them out. The firmware sets the rail voltages from its fused ASV tables, so there is no opp-microvolt. - Stock's battery current limiter caps the mid and big clusters at 1999 and 2252 MHz while the battery voltage droops (Google's gs201-cloudripper-bcl.dtsi). Without a BCL driver, the levels above those caps (2130-2348 MHz mid, 2401-2850 MHz big) are turbo-mode, so they stay off until boost is enabled in sysfs. - opp-suspend is stock's resume-freq for each cluster (1197, 1491 and 1826 MHz), the level stock's cpufreq driver holds through suspend. - The dynamic power coefficients are stock's (89, 513 and 757). - The CPU zones throttle from 75 C, as on gs101: at 75 C the mid and big clusters leave their turbo levels at once, and at 85 C each cluster drops to stock's battery-overcurrent caps (930, 1197 and 1426 MHz). Every zone stays critical at 110 C. Stock throttles from 100 C. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Derek Ross <derekross@gmail.com>
derekross
force-pushed
the
omamobile-cpufreq
branch
from
November 1, 2026 01:19
093f0f1 to
6baafd6
Compare
derekross
marked this pull request as ready for review
November 1, 2026 01:20
Owner
Author
|
Booted on the Pixel 7 Pro (7.3.0-rc6-omamobile-push1-g63c35fb0c871, the same changes before your sign-off): 6 thermal zones and 3 CPU policies up, Whisper transcription ~2x faster, a 180 s all-core load settled at 78-80 C under throttling with no errors, and one s2idle cycle resumed cleanly. Merged. Boost (the turbo levels) stays off for now; device/cheetah/CPUFREQ-PLAN.md (omarchy-mobile #239) has the runbook and results. |
This was referenced Nov 1, 2026
derekross
added a commit
that referenced
this pull request
Nov 8, 2026
…s apart The MAX77759 model load waits twice after setting Config2.LdMdl: for the gauge to clear LdMdl, and for RepCap, which the load procedure zeroes first, to become non-zero again. Both timeouts print the same "model load did not complete: -110". On a Pixel 7 Pro (gs201) that message appears only on the first boot after the battery ran flat (issue #169: at 3.26 V it failed, two hours later at 3.87 V on the same kernel it loaded). The cheetah model's VEmpty is 0xa561, an empty voltage of 3.30 V, so on such a cell the model's RepCap is 0 and the second wait can time out even when the load itself completed. Keep the message for LdMdl and give the RepCap wait its own, with the cell voltage, so that a log tells which of the two it was. Assisted-by: Claude Opus 5.5 Signed-off-by: Derek Ross <derekross@gmail.com>
derekross
added a commit
that referenced
this pull request
Nov 8, 2026
When the MAX77759 model load fails at probe, the driver keeps POR set so that the next probe tries again, and until then reports from the gauge's default model: on a Pixel 7 Pro (gs201) half the design capacity, 0 %, and a charge_now that means nothing (issue #169). The next probe is the next boot. The failure is seen on the first boot after the battery ran flat, and the same kernel loads the model on a later boot once the cell has charged. Try again from the init work instead. A retry waits for the cell voltage to rise 100 mV above the model's VEmpty (3.30 V on the 7 Pro), reading VCell once a minute, since the load waits for a RepCap that an empty cell does not have. Then it loads the model again, with 30 s between attempts doubling to at most 5 minutes, and gives up after 8 attempts; POR stays set, so the next probe still retries. The battery stays readable meanwhile: init_complete is set after the first attempt as before, so voltage, current and temperature keep coming from the gauge, which the charger's temperature guard needs. power_supply_changed() is sent after the first attempt and after the load that succeeds. The retries run on the freezable workqueue, so a load never overlaps system suspend. Only gauges with a battery model in the device tree (maxim,fg-model, the MAX77759 on gs201 phones) take this path; the others are unchanged, and a load that succeeds at probe behaves as before. Assisted-by: Claude Opus 5.5 Signed-off-by: Derek Ross <derekross@gmail.com>
derekross
added a commit
that referenced
this pull request
Nov 8, 2026
The temperature guard inhibits charging when it cannot read the battery: without a temperature it can't tell whether charging is safe. It then looks again a guard period, 30 s, later. At boot that is the usual case: the charger probes about a second before the MAX77759 fuel gauge answers (it returns -EAGAIN until its battery model is loaded), so every boot of a Pixel 7 Pro (gs201) starts with max77759-charger: no reading from max170xx_battery: charging inhibited max17042 5-0036: battery model loaded (...) (+0.9 s) max77759-charger: battery 29.4 C, 3747 mV: band 20-42 C, ... (+31 s) and the battery is not charged for those 30 s. On a flat battery with the screen on, the phone draws more than the 500 mA input limit, the battery supplies the rest, and the phone browned out at 3.14 V (issue #169). Keep the rule, no reading, no charging, but while there is no reading look again every 2 s, and at once when the battery named by guard_psy reports a change, as the gauge does when its initialization ends. The guard period, the bands and their hysteresis are unchanged once there is a reading, as is the inhibit for a reading out of band. The guard work is set up before the power supply notifier now, so that on unbind the notifier, which can queue it, is removed before the work is cancelled. This applies wherever temp_guard is on (the Pixel 7 Pro and the Pixel 6 Pro use it); it changes only how soon a missing reading is read again. Assisted-by: Claude Opus 5.5 Signed-off-by: Derek Ross <derekross@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Base:
omamobile. The four commits need nothing from the curated 7 Pro stack (#140-#147).omamobilealready has the gs201 ACPM nodes,clk-acpm's gs201 variant andgs101_acpm_tmu. The changes are identical, line for line, to the ones the Pixel 7 Pro booted on the test kernel.What
CPU frequency scaling and thermal zones for gs201 (Tensor G2, Pixel 7 Pro):
dt-bindings: firmware: google,gs101-acpm-ipc: Add the Tensor G2 TMUaddsgoogle,gs201-acpm-tmu.thermal: samsung: gs101_acpm_tmu: Add the Tensor G2adds match data for the gs201 compatible only (ACPM channel 9, 7 sensors, with AUR after gs101's six). gs101 and zumapro keep theirs.arm64: dts: exynos: google: gs201: add the ACPM TMU and thermal zonesadds the sensor underacpm_ipcand zones for big, mid, little, GPU, ISP and TPU, each critical at 110 °C.arm64: dts: exynos: google: gs201: add CPU DVFS and CPU coolingadds:#cooling-cells;Why
Until now the 7 Pro had no cpufreq. Every core stayed at the bootloader's level: about 1.2 GHz little, 0.9-1.2 GHz mid and 1.0-1.1 GHz big, against stock's 1.8/2.35/2.85 GHz. On-device Whisper speech recognition ran at about real time.
Design
It follows the Pixel 6 (gs101) tree, the 9a (#87) and the 8 Pro (#158):
clk-acpm's DVFS clocks, with noopp-microvolt. ACPM sets the rail voltages from its fused ASV tables, and Google's gs201exynos-acmedoes nothing beyond the ACPM request.exynos-acmemax-freq(Google'sgs201-cpu.dtsi). The ECT levels above are listed in comments.Levels, ceiling and trips
The BCL caveat. Stock's battery current limiter caps mid and big at 1999 and 2252 MHz whenever the battery voltage droops (vdroop1/vdroop2/smpl_gm in Google's
gs201-cloudripper-bcl.dtsi). There is no BCL driver here, so the levels above those caps areturbo-mode. They stay off unless/sys/devices/system/cpu/cpufreq/boostis set, and boost stays off for now.opp-suspendis stock'sresume-freq.Trips:
Stock throttles from 100 °C and is "hot" at 120 °C.
Tested on the Pixel 7 Pro
Release
7.3.0-rc6-omamobile-push1-g63c35fb0c871, these four commits on the test kernel, 2026-10-31:cpufreq-cpu00/10,cpufreq-cpu40/14 andcpufreq-cpu60/17;Not tested: load on battery, boost, and the other gs201 boards (Pixel 7, 7a and Fold). They inherit this from
gs201.dtsi.Gates
tools/kernel-pr-check --merge --build OUT omamobile HEAD:Co-Authored-Byform warning;gs101_acpm_tmu.cbuilds with W=1 and no warnings in the project container. The host run lackedbc.The only failure is the missing human Signed-off-by.
Derek: before merging
Add your Signed-off-by to each commit (AI agents don't add one), then force-push:
git fetch github omamobile-cpufreq && git switch -c omamobile-cpufreq github/omamobile-cpufreq git rebase --signoff github/omamobile git push --force-with-lease github omamobile-cpufreq🤖 Generated with Claude Code