Skip to content

arm64: dts: apple: t6050: set CLPC apple,ane-cpu-opp to 3.648 GHz - #4017

Merged
RyanTheTide merged 1 commit into
mainfrom
satchlj/t6050-clpc-ane-cpu-opp
Dec 5, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
satchlj/t6050-clpc-ane-cpu-opp

Conversation

@satchlj

@satchlj satchlj commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

What: Label the 3.648 GHz P-cluster OPP (opp10) as t6050_p_opp_3648 and wire apple,ane-cpu-opp = <&t6050_p_opp_3648> on the T6050 CLPC node so CLPC holds the P cluster (PACC_ANE) at 3.648 GHz while ANE work is active.
Tested: T6050 / J775c (Apple M5 Max, default command line) at exact head 823331df9cf9 inside batched candidate 7f0aa88166ed: boots cleanly with apple,ane-cpu-opp present in live DTB, 0 failed units, 0 new kernel errors, 3/3 15 s RTC s2idle PASS (suspend_stats 3/0), policy12 min returns to 300000 at idle; host tests clpc-ane-cpu-opp-tests.py and clpc-gpu-demand-tests.py PASS, all 7 T6050 DTBs build cleanly, checkpatch.pl --strict 0/0/0.
Risk: two-way door · T6050 Macs (M5 Pro / M5 Max / M5 Ultra die 0). Sequence landing after #3964.
Not yet: None for J775c; other T6050 boards share t6050-die0.dtsi and compile cleanly.

Details

On T6050, once #3964 configures the AXI2AF engine bridges, H17 ANE execution speed scales with the P-cluster (PACC_ANE) operating point and plateaus at 3.648 GHz (opp10), with higher OPPs adding system power without further ANE speedup. Without apple,ane-cpu-opp, running ANE workloads from another CPU cluster leaves PACC_ANE at its minimum frequency or parked, slowing unet-320 roughly 2x (1,054 us parked vs 542.8 us IN_PLACE / 584–619 us copying at 3.648 GHz, where firmware time 456–471 us matches macOS 27.2 CoreML 467.9 us).

J775c P-cluster (PACC_ANE) OPP sweep (unet-320, with #3964 engine bridges)

Submitting thread pinned to an M-cluster core (cpu0), both M clusters fixed at 1344 MHz, ane_states = 6 2, 80 executes per OPP. System power is macsmc_hwmon DC Input Power (power1_input, ~1 Hz sensor cadence; the first two arms carried over 24.34 W from the prior auto arm before the sensor refreshed):

P-cluster OPP Host p50 (us) Firmware mean (us) report_done mean (us) DC Input Power (W)
1308 MHz 1192.9 982.3 815.7 (sensor settling)
1620 MHz 1012.9 801.7 675.2 (sensor settling)
1980 MHz 850.3 644.8 511.6 13.95
2292 MHz 786.5 574.8 441.8 13.95
2580 MHz 774.6 565.8 426.0 15.65
2880 MHz 728.4 517.8 388.2 15.65
3180 MHz 715.8 506.4 373.2 15.65
3432 MHz 716.0 500.6 359.2 17.53
3648 MHz (opp10) 702.8 494.8 363.6 17.53
3828 MHz 700.7 493.9 353.2 20.64
3984 MHz 704.3 495.8 356.7 20.64
4188 MHz 719.9 504.3 378.5 20.64
4332 MHz 714.4 497.0 362.2 25.46
4512 MHz 716.4 502.3 371.7 25.46
4608 MHz 706.6 496.0 355.6 28.83

Above 3648 MHz, stepping one OPP higher to 3828 MHz adds 3.11 W for < 1 us (0.2%), and 4332–4608 MHz add 7.9–11.3 W with no further latency reduction.

This pure devicetree change reuses the apple,ane-cpu-opp support already in drivers/soc/apple/clpc.c with no driver changes. Note that on main without #3964 (engine bridges), unet-320 remains bridge-bound at ~2,462–2,633 us, so this PR should land after #3964; together with #3964 and #4016 (idle parking min-floor support), default-cmdline unet-320 reaches 542.8 us (IN_PLACE).

Evidence
$ ./scripts/checkpatch.pl --strict --git HEAD~1..HEAD
total: 0 errors, 0 warnings, 0 checks, 35 lines checked

$ python3 tools/asahi/clpc-ane-cpu-opp-tests.py
PASS apple,ane-cpu-opp: CPU from the OPP's table, kHz from opp-hz, refusals, 84 gets put

$ python3 tools/asahi/clpc-gpu-demand-tests.py
PASS (all positive and negative controls)

All 7 T6050 DTBs built cleanly with apple,ane-cpu-opp verified via dtc:
t6050-j714s.dtb, t6050-j716c.dtb, t6050-j775c.dtb, t6050-j775d.dtb,
t6050-j873s.dtb, t6050-k114c.dtb, t6050-k116c.dtb

T6050 / J775c batched candidate 7f0aa88166ed (contains 823331df9cf9 unchanged, default cmdline):
- failed_units=0, suspend_stats: success=3 fail=0, 0 new kernel errors
- unet-320 600+ executes pre-sleep and 120+ post-sleep PASS; policy12 min returns to 300000 at idle

On T6050 (M5 Pro/Max), ANE execution speed scales with the P cluster
(PACC_ANE) frequency and plateaus at 3.648 GHz (opp10); higher OPPs
add power without further ANE speedup. When ANE clients run on the
other clusters and PACC_ANE stays at its minimum frequency or parked,
the engine runs roughly 4x slower than macOS.

Label opp10 (3.648 GHz) on the P cluster OPP table as t6050_p_opp_3648
and wire apple,ane-cpu-opp = <&t6050_p_opp_3648> on the T6050 CLPC
node so CLPC holds PACC_ANE at 3.648 GHz while ANE work is active and
releases the floor when idle.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj
satchlj marked this pull request as ready for review December 3, 2026 00:03
@satchlj
satchlj requested review from a team as code owners December 3, 2026 00:03

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 823331d

Checked: Both the shared T6050 DT and the standalone J775c DT link CLPC to the existing P-cluster 3.648 GHz OPP. The same policy reaches every T6050 tree through its existing source layout. I validated the PMC binding and ran the exact OPP parser host test, including its refusal cases and reference releases. The author reports all seven T6050 DTBs built.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 823331d. Both T6050 device-tree paths reference the existing performance-cluster OPP through the existing CLPC property without changing the OPP table values. The reported seven DTB builds and J775c row cover boot, s2idle, and releasing the minimum frequency after ANE work.

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot) labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Merge readiness at 823331df: ready to merge

Check Detail
CI at head ok 11 checks passed
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok in the PR body at 823331df
Conflicts ok none
PR text ok Risk: two-way · T6050 Macs (M5 Pro / M5 Max / M5 Ultra die 0). Sequence landing after #3964.

Areas: area:bringup
Merge: gh pr merge 4017 --merge (Owners and Core through the bypass: add --admin).

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read 823331df9cf9 against main 2b09f588. The DT change itself is right. My one concern is the order: please land it after #3964, not before.

What I checked

  • All 11 T6050 boards, not only the seven listed: the base and head DTBs build, W=1 CHECK_DTBS gives the same 62 warnings, and dt_binding_check on apple,pmc.yaml is clean. In every head DTB the property resolves to the 3648000000 Hz OPP of the P cluster's table. The ANE is enabled on J714s, J716c, J775c, K114c and K114s only.
  • clpc.c takes it on apple,t6050-clpc. Host tests: clpc-* 9/9.
  • No text overlap with #3964, #3989 or #3741. It needs #4016 for a parked P cluster, and that just merged.

Why the order matters. The body says unet-320 stays bridge-bound at 2,462-2,633 us on main without #3964. The main baseline you posted in #3964 was 2,536 / 2,646 / 2,576 us, so that is no gain. Landed today, this would take the P cluster from parked to 3.648 GHz for every ANE burst, on the J714s and J716c laptops too, for the same time. #3964 is still a draft, and its current head does not add the xl window to t6050-j775c.dts.

What would settle it, either one:

  1. #3964 lands first. Then this one is measured better (1,054 us to 543-619 us on J775c, at macOS's firmware time).
  2. A run on main without #3964 that does get faster with the P cluster at 3.648 GHz. On the stock kernel this needs no reboot: set the performance governor on the P cluster (that also stops parking) and step its scaling_max_freq through a few OPPs, with the ANE job on an M-cluster CPU.

Please also add the OPP sweep to the body (time and power at a few states above and below 3.648 GHz). "Plateaus at 3.648 GHz" has no table behind it yet. The T8132 and T8142 values each have theirs in clpc.c.

@RyanTheTide RyanTheTide closed this Dec 3, 2026
@RyanTheTide RyanTheTide reopened this Dec 3, 2026
@github-actions github-actions Bot removed the ready-to-merge Meets the merge policy: merge it (bot) label Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Stock J714s (MacBook Pro 14" M5 Pro, T6050) zero-reboot ANE P-cluster (policy12, performance gov) frequency sweep on 7.3.0-m5-pr67 (boot_id=154b9874-a3e5-46c8-a5a5-837ba7143a0e, SLC 16 planes, ANE ABI v3 H17 26A428, taskset -c 0 M-cluster, 3x200 ane-h17-k96 IN_PLACE jobs as unet-320 is absent on host; note stock kernel lacks #3964 xl engine-bridge reg window): FLAT across all 6 steps (1308000 kHz: p50=135.48 us / PSTR=7.95W [sustained 7.53W]; 2580000: 137.52 us / 8.09W [6.74W]; 3180000: 148.37 us / 8.42W [7.33W]; 3648000: 136.62 us / 8.69W [8.02W]; 3984000: 137.09 us / 9.63W [8.64W]; 4608000 top: 133.99 us / 10.55W [9.57W]); 0 bit mismatches across 96,000 executes (max_abs_err=0.000244), 0 kernel/ANE errors, policy12 restored identically to schedutil 300000..4608000 kHz. (Reference PR head 823331df9cf9c8406163331f9c7e3e928a6b097a; bridge-bound/IPC-dominated without #3964 + unet-320.)

@satchlj

satchlj commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

Added the T6050 / J775c P-cluster OPP sweep table (1308–4608 MHz: host p50, firmware mean, report_done mean, and macsmc_hwmon DC input power) to the PR body: firmware mean drops from 982.3 us at 1308 MHz to 494.8 us at 3648 MHz (17.53 W), then stepping up to 3828 MHz adds +3.11 W (20.64 W) for < 1 us and 4332–4608 MHz add +7.9–11.3 W (25.46–28.83 W) with no further speedup.

Agreed on sequencing: let us hold #4017 until #3964 lands so we do not wake the P cluster on bridge-bound bursts before #3964 is in (and we can follow up with the t6050-j775c.dts xl window if #3964 lands without it).

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

The failed hosted run merged 823331df9cf9 into 2b2681932a5c and stopped in apple/pmgr-inherited on an undeclared apple_pmgr_ps_probe_auto_enable. On the merge tree with main c09b61228e62 (a3071b9b039e), python3 -I tools/asahi/run-host-tests.py --jobs 2 --only <group> passed for pmgr-inherited (1/1), clpc-ane-cpu-opp-tests (6/6), and clpc-gpu-demand-tests (1/1) in the Ubuntu 24.04 CI container.

The J775c receipt in the body covers this head. The remaining dependency is #3964. Its J714s bridge run still needs the xl window from the booted DTB so it exercises the production path. The earlier J714s run mapped that window through a test parameter.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) ready-to-merge Meets the merge policy: merge it (bot) and removed ci-failing A check failed at the PR head (bot) labels Dec 3, 2026
@RyanTheTide
RyanTheTide merged commit cfa9d5a into main Dec 5, 2026
16 of 20 checks passed
@RyanTheTide
RyanTheTide deleted the satchlj/t6050-clpc-ane-cpu-opp branch December 5, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants