Skip to content

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

Open
satchlj wants to merge 1 commit into
mainfrom
satchlj/t6050-clpc-ane-cpu-opp
Open

satchlj wants to merge 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 (linux-aurora-ane4): 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).
Not yet: None for J775c; other T6050 boards share t6050-die0.dtsi and compile cleanly.

Details

On T6050, H17 ANE execution speed scales with the P-cluster (PACC_ANE) operating point and plateaus at 3.648 GHz (opp10), with higher OPPs adding 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 even after #3964 configures the T6050 AXI2AF engine bridges (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).

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; 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 5 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).

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

This branch has not been deployed

No deployments
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