Repository navigation
Pixel 8 Pro CPU DVFS: zuma's CPU levels from the ECT and CPU thermal zones (stacked on #157) - #158
Conversation
|
Thanks, cpufreq on all three clusters with throttling that holds under 95 C is great to see. The limits and power coefficients match Google's zuma-cpu.dtsi, and the cooling states fit each table. Same request as on #157: push the c1 tag and paste |
|
Thanks Brett. Since this went up, my Pixel 7 Pro CPU scaling landed as #169, and I compared the two: same mechanism, and your limits and coefficients match Google's zuma-cpu.dtsi. The one place I'd like them to agree: on gs201 I marked the levels above stock's battery-current-limiter caps as |
6e4fa69 to
4cc3108
Compare
|
Thanks Derek. Rebased onto the updated #157 and force-pushed (
|
| Check | Result | Detail |
|---|---|---|
| boot (required) | ok | kernel 7.3.0-rc6-omamobile-husky-wifi, slot b, up 289s |
| storage guard (required) | ok | 62 partitions; only userdata and slot B's boot images writable |
| root (required) | ok | ext4 on userdata, 97G free |
| kernel health (required) | ok | no oops or BUG; 0 WARN, 0 error lines in dmesg |
| systemd units | ok | none failed |
| USB gadget (required) | ok | bound to 11210000.usb |
| display | ok | card2-DSI-1 connected, 1344x2992 |
| GPU | ok | render node on panthor |
| session (required) | ok | Hyprland and the Omarchy shell running |
| lock | ok | PAM file present, the shell can lock (passwordPam true, locked true) |
| touch | ok | SALIXP Touchscreen |
| buttons | ok | gpio-keys |
| Wi-Fi | ok | wlp1s0 on brcmfmac, link up |
| Bluetooth | skip | no controller |
| battery | skip | no battery power supply |
| sound cards | skip | none |
| sensors | skip | no sensor proxy |
| cameras | skip | no libcamera tools |
| thermal | ok | hottest zone 50 °C |
The "0 error lines" is only because I cleared the ring buffer with dmesg -C during the screen-off test on this boot. From journalctl -k -b -p err, the boot's error lines, leaving out brcmfmac's, are:
panthor: _opp_set_regulators: no regulator (mali) found, expected: ACPM sets the rail;- the HK3's one refused brightness write before
allow_tx(sending dcs data 51 02 bc failed: -1), whose level is kept and sent again; exynos-clkout: cannot match parent device, from the zuma PMU already onomamobile, and on the d3 boot too;- systemd's gpt-auto generator, and "unable to open an initial console".
|
Thanks Brett, and thanks for checking the caps in
CI is green, with dtbs_check, and every commit's husky device tree builds. Thanks too for the two notes about the Pixel 7 Pro side. You're right that The merge order: Lef's #163 first, then #160, then this one, which needs one rebase over both. The conflicts are in |
4cc3108 to
e00ab31
Compare
|
Thanks Derek. Rebased onto today's
I haven't booted this exact head. The code is the same as e1's except the new clock ids and the merged neighbours. #160 next: the two conflict only in |
|
A boot of the exact heads now, as promised:
What the two PRs do on this boot:
|
| Check | Result | Detail |
|---|---|---|
| boot (required) | ok | kernel 7.3.0-rc6-omamobile-push1-g54e10dcccd6b, slot b, up 57s |
| storage guard (required) | ok | 62 partitions; only userdata and slot B's boot images writable |
| root (required) | ok | ext4 on userdata, 97G free |
| kernel health (required) | ok | no oops or BUG; 0 WARN, 46 error lines in dmesg (34 known, 12 new) |
| new dmesg errors | not ok | N N: brcmf_msgbuf_rxbuf_data_post: No PKTID available !! x2; Bluetooth: N: BCM: '…' x2; exynos-clkout exynos-clkout: probe with driver exynos-clkout failed with error N x1 |
| systemd units | ok | none failed |
| USB gadget (required) | ok | bound to 11210000.usb |
| display | ok | card2-DSI-1 connected, 1344x2992 |
| GPU | ok | render node on panthor |
| session (required) | ok | Hyprland and the Omarchy shell running |
| lock | ok | PAM file present, the shell can lock (passwordPam true, locked true) |
| touch | ok | SALIXP Touchscreen |
| buttons | ok | gpio-keys |
| Wi-Fi | ok | wlp1s0 on brcmfmac, link up |
| Bluetooth | ok | hci0, powered true |
| battery | ok | 20% Charging, 22 °C |
| sound cards | skip | none |
| sensors | skip | no sensor proxy |
| cameras | skip | no libcamera tools |
| thermal | ok | hottest zone 49 °C |
The "new" dmesg lines, none from these PRs:
- brcmfmac's
No PKTID available(Somnius's one-line slack, still to land); - the BCM4398's Bluetooth ID lines, which the smoke script counts as errors;
exynos-clkout: cannot match parent device/ probe -22, the zuma PMU message already onomamobile(clk: samsung: exynos-clkout: NFC clock pad on the Pixel 8 Pro (zuma) #209 fixes it).
|
Thank you, Brett, and thanks for the boot of the exact pair; I fetched t1 and it is this head with One thing has changed since my 11-01 review, and it isn't something you could have seen then: the The simplest fix, I think: keep the OPP tables in The plan otherwise stands: #160 merges first (its CI run failed to start on GitHub's side, as did |
Document zuma's (Tensor G3) CMU_G3D, which clocks the GPU, and the CMU_TOP clocks it takes: the G3D GLB, NOCD and SWITCH paths and the shared PLL dividers behind them. The inputs and their order are those of zumapro's CMU_G3D, which has the same layout. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Describe the GPU's clocks on zuma (Tensor G3): CMU_TOP's G3D GLB, NOCD and SWITCH paths, with the shared PLL dividers they select from, and CMU_G3D at 0x1ee00000, with its two PLLs, muxes, dividers and the GPU's core, coregroup and stacks gates. As on zumapro, firmware sets these up and keeps G3D on, and the GPU's rate changes go through ACPM, so everything here is read-only. Google's zuma CMUCAL tables give the same offsets, field widths and parents as zumapro's CMU_G3D: the PLLs have PLL0822x's M/P/S layout, and the L2_GLB and STACKS dividers have no ratio field. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/refs/heads/android-gs-shusky-6.1-android16/drivers/soc/google/cal-if/zuma/cmucal-sfr.c Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
… ids The Tensor G3 (zuma) ACPM firmware numbers its DVFS domains as Google's enum acpm_dvfs_id for zuma: MIF, INT, CPUCL0-2, DSU, BCI, G3D, G3DL2, TPU, INTCAM, TNR, CAM, MFC, DISP, AOC and BW, the same 17 as the Tensor G4's. Add their clock ids, and the paired GPU clock after them (17), as the gs201 and zumapro headers do, so device trees can name them. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/refs/heads/android-gs-shusky-6.1-android16/drivers/soc/google/cal-if/zuma/acpm_dvfs_zuma.h Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The ACPM protocol driver creates zuma-acpm-clk for the Tensor G3, but clk-acpm had no match for it. Add the zuma variant, built like the zumapro one: - the DVFS domains as clocks. zuma's are zumapro's 17, in the same order (Google's enum acpm_dvfs_id is zuma's), so G3D is 7 and G3DL2 is 8, as the Pixel 8 Pro's stock GPU node names them (gpu1_cmu_cal_id 0xb040007, gpu0_cmu_cal_id 0xb040008); - a paired gpu clock (17) that moves G3D and G3DL2 together. The Pixel 8 Pro's stock gpu_dvfs_table_v2 is the Pixel 9a's, pair for pair, so zumapro's table is reused, without its 940 MHz level: zuma's gpu_dvfs_max_freq is 890 MHz; - zuma_gpu_max_khz, 0 (read-only) by default, as on gs201 and zumapro. The firmware's DVFS channel is 0, as stock's cal_if node has it. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Tensor G3 (zuma) has a Mali-G715, arch 11.8.10 r1p2 on the Pixel 8 Pro, like the Tensor G4's. Add its compatible, so that panthor can match its integration-specific cache hash, as it does zumapro's. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Tensor G3 (zuma) integrates the same Mali-G715 as the Tensor G4, with the same ASN hash values: the Pixel 8 Pro's stock device tree has l2-hash-values = <0x36db6d 0x5b6db6 0x00>, from Google's zuma-gpu.dtsi, the source zumapro's match already cites. On zumapro, CSF startup fails with a GPU bus fault without them. Match google,zuma-mali with zumapro's SoC data. Link: https://android.googlesource.com/kernel/devices/google/zuma/+/42395e8adcb880aa336f0da6bb2a19ed53929c40/dts/zuma-gpu.dtsi Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Describe CMU_G3D and the Mali-G715 at 0x1f000000, both disabled, as zumapro does: the GPU's registers, its JOB, MMU and GPU interrupts (SPI 347, 348 and 346) and its size come from the Pixel 8 Pro's stock mali node, and its core, coregroup and stacks clocks from CMU_G3D. There is no power domain: stock's own power-domain driver reports pd-g3d on at probe, so the bootloader leaves G3D powered. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Turn on CMU_G3D and the Mali-G715 on the Pixel 8 Pro: - core is ACPM's paired gpu clock (ZUMA_CLK_ACPM_GPU), which sets G3D and G3DL2 together through the GPU DVFS pairs; - coregroup and stacks stay on CMU_G3D's gates; - an OPP table with the shader rates 150-649 MHz. Stock goes up to 890 MHz. The levels from 723 MHz on are left out until a GPU thermal zone is in the device tree, as on the Pixel 9a, because nothing upstream throttles the GPU yet. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Tensor G3 (zuma) reads its SoC temperatures through the same ACPM TMU service as gs101 and zumapro, with zumapro's seven sensors in the same order: the Pixel 8 Pro's stock device tree names them BIG, MID, LITTLE, G3D, ISP, TPU and AUR (ids 0-6) on ACPM channel 9. Add its compatible. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Tensor G3 (zuma) TMU service is the Tensor G4's: ACPM channel 9 and seven sensors in the same order, BIG, MID, LITTLE, G3D, ISP, TPU and AUR, as the Pixel 8 Pro's stock device tree has them (acpm_tmu on channel 9, tmuctrl_0 to tmuctrl_6). Match google,zuma-acpm-tmu with zumapro's data. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
…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 zumapro.dtsi does, 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>
With gpu-thermal throttling panthor's devfreq, add the Pixel 8 Pro's GPU levels from 723 to 890 MHz, stock's top (gpu_dvfs_max_freq). Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
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.
Those caps are the Pixel 8 Pro's, so the tables stay in zuma.dtsi but
only zuma-husky.dts points its CPUs at them: the Pixel 8a's caps in
Google's zuma-akita-bcl.dtsi are lower, and it needs its own;
- a CPU zone throttles its cluster from 80 C, forces its lowest level
from 95 C and is critical at 105 C, as zumapro.dtsi does. The TMU
sensor and the zones are shared by all zuma boards.
The ACPM clock ids header moves from the board to zuma.dtsi.
Assisted-by: LLM
Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
e00ab31 to
6abc13c
Compare
|
Thanks Derek, good catch on the 8a. Rebased over #160 and onto today's
I haven't booted this head. Its code and the 8 Pro's CPU, GPU and display nodes are what t1 ran; what's new around them is |
|
Thank you, Brett, that is exactly the fix I had in mind, and the push is easy to check. The three tables stay in I also compared this head with your t1 tag, since you say plainly that the head itself hasn't booted: every driver file, binding and clock header is the same blob as in t1, and the two device-tree files differ from t1 only by what So this goes in as it is, and I'll close #157 when it lands, since its commits come with this one. If you get a chance to boot the merged One note for the 8a, not for you to do anything about: it shares the TMU sensor and the thermal zones from |
|
Booted merged
Recorded in the 8 Pro's notes in derekross/omarchy-mobile#741. |
Stacked on #157 (the GPU, for zuma's ACPM clocks and TMU). Only the last commit is new. Updated after review: turbo-mode above stock's battery-limiter caps, and the energy model from stock's per-level power.
This gives the Pixel 8 Pro CPU frequency scaling and CPU thermal zones. Until now every core ran at the bootloader's rate: the X3 at 1.16 GHz of 2.91, the A715s at 1.07 of 2.37 and the A510s at 1.43 of 1.70.
What it adds to
zuma.dtsi:ZUMA_CLK_ACPM_DVFS_CPUCL0-2, from Pixel 8 Pro GPU: zuma's CMU_G3D, ACPM GPU clock, panthor and a GPU thermal zone #157'sclk-acpmzuma variant), through cpufreq-dt.0x90000000(Google'sect_parser.cformat), up to each cluster'smax-freqin stock'sexynos-acmedomains (Google'szuma-cpu.dtsi):The ECT's levels above those maximums are listed in comments and left out, as stock leaves them out. The ECT's G3D list is the GPU table Pixel 8 Pro GPU: zuma's CMU_G3D, ACPM GPU clock, panthor and a GPU thermal zone #157 took from stock's DT, and its little list matches stock's cpufreq
time_in_state, which checks both the parser and the source.opp-microwattis its power in stock's defaultpixel-emprofile (Google'szuma-b0-ipop.dts, the same in the Pixel 8 Pro's own device tree), with#cooling-cells. A power coefficient can't be used: there is noopp-microvolt, since the firmware sets the voltages, and with one the energy model fails to register (EM: invalid perf. state: -22, which the first version had).zuma-shusky-bcl.dtsi: 1945 MHz mid, 2294 MHz big), as on gs201 (arm64: dts: exynos: google: gs201: CPU frequency scaling and thermal zones (Pixel 7 Pro) #169): with no BCL driver, they are used only with boost on.Tested on husky (tag
husky-test-20261031-c1: this branch merged with #156, built and installed withmodules-push, a normal boot):clk-acpm,gs101_acpm_tmuand panthor load at about 4.0 s, cpufreq-dt brings up three schedutil policies (0-3, 4-7, 8), and each policy is bound as the cooling device of its zone. The zones read 52-55 C idle.cpucl0-2inclk_summary) agreed.time_in_stateshows 1704, 2367 and 2914 MHz).Re-tested on
husky-test-20261101-e1(this branch as pushed, merged with #160 and #156): all three perf domains register an energy model with no error, the policies come up at 1704/1945/2294 MHz with boost off, and boost on gives 2367/2914 MHz.tools/kernel-pr-check --buildon the commit: checkpatch --strict has nothing to read, and 8 device trees build with W=1 and dtbs_check with no new warnings.Not here:
🤖 Generated with Claude Code