Skip to content

arm64: dts: apple: t6050-j716c: start the PMP - #3651

Merged
RyanTheTide merged 4 commits into
mainfrom
feat/j716c-pmp
Dec 1, 2026
Merged

RyanTheTide merged 4 commits into
mainfrom
feat/j716c-pmp

Conversation

@erikwb

@erikwb erikwb commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What: Start the PMP on the J716c: enable pmp0, its DART and mailbox, the PMP report and their power domains, and name the PMP in the PMC (with its voter agent among the static voters) and in the report. The DT carries no PMP values: the boot loader fills in apple,board-id, apple,dram-vendor-id, apple,pmc, apple,pmc-pmgr and apple,tunable-* from the running machine (aura #506). On main the J716c PMP is off, so the devices' PMP requests and the PMP's DCS and SoC rail votes are missing. Stacked on #3650, which keeps the PMC, cpufreq and the report sane under a loader that does not hand the PMP over.

Tested: J716c (16-inch M5 Max) at 2a439a39eecc (rows built at 5b7c45fcd7fb, which differs only in a header's SPDX line and a DT comment), trial DTB without t6050-media.dtsi (main hangs the J716c at boot with it, #3618; nothing else differs). With the current loader: the PMP binds and starts, the report hands it its requests (PMP running (status 0x1), requests 0x1000047000), PMC static agents 0xb (PMP, CLPC, AP) on the DCS and SoC rails, cpufreq on all three clusters. With a loader that does not fill in the PMP values: the PMP fails its probe as expected, the PMC and cpufreq run without it and the report does not poll. s2idle suspend and resume (18 min, key wake): the report still runs and the PMC agents are unchanged. Default command line; kernel errors are the default kernel's set plus, once the PMP runs, an occasional refused PMP endpoint-7 message that kernels starting the PMP already show (Evidence); failed units the same as the default kernel (no SELinux on this distribution). make CHECK_DTBS=y apple/t6050-j716c.dtb: the same 6 messages as main, none new.

Risk: two-way door · J716c only (one DTB).

Not yet:

Details
  • Same PMP block as the J714c and K116s, without compiled-in tunables: the loader pairs pmp0 with its ADT node and fills every value from the live machine.
  • The PMP is PMC agent 0 (ADT voter-agent), added to the existing CLPC (1) and AP (3) static voters, and given as apple,pmp-voter so that the PMC runs without it when the PMP was not handed over (pmdomain: apple: run the PMC and PMP report without a PMP the boot loader did not hand over #3650).
  • This does not move the J716c GPU onto the PMP's power domains or add PMP thermal zones; those are separate changes.
Evidence

J716c (16-inch M5 Max), system and OS firmware 27.2, kernel 7.3.0-ewb391+ = main de965eb5b26b + #3650 + this commit, built at 5b7c45fcd7fb (the heads now, 292954d133ce and 2a439a39eecc, differ only in pmp-handoff.h's SPDX line and a DT comment). One-shot trial boots under a watchdog dead-man, default command line. Trial DTB: t6050-j716c.dts at 5b7c45fcd7fb with #include "t6050-media.dtsi" left out (main hangs the J716c at boot with it, #3618); nothing else differs.

Boot Loader PMP PMC static agents Report cpufreq
hand-off current default binds, PMP started 0xb (PMP, CLPC, AP) on DCS and SoC PMP running (status 0x1), requests 0x1000047000 3 clusters, apple-cpufreq
no hand-off 2026-11-22 Stage 2 (fills no T6050 PMP values) property 'apple,dram-vendor-id' is missing, probe -22 0xa (CLPC, AP), ... was not handed over; running without its votes ... was not handed over; not waiting for it, running: 0 3 clusters, apple-cpufreq

Kernel err-level messages on the hand-off boot: the same set as on the default kernel (7.3.0-ewb342+): the systemd-gpt-auto-generator pair and aurora ... gpu: M5 bare-metal bootstrap failed at session: EPROBE_DEFER. The no-hand-off boot adds only the two apple_pmp probe lines above. Failed units on both: aurora-peripherals.service, which fails the same way on the default kernel. No SELinux on this distribution.

  • arm64 QEMU KUnit (drivers/pmdomain/apple/.kunitconfig.apple-pmp + CONFIG_APPLE_PMC_KUNIT_TEST): 31/31, apple-pmc 17/17.
  • make dt_binding_check DT_SCHEMA_FILES=power/apple,pmc.yaml and =power/apple,t8140-pmp-report.yaml: 0 messages.
  • s2idle on the hand-off boot: systemctl suspend, 18 min asleep, woken by a key press (an RTC alarm did not wake the J716c from s2idle on main in our earlier runs). After the resume the report reads running: 1 and the PMC agents are still 0xb.
  • make CHECK_DTBS=y apple/t6050-j716c.dtb: 6 messages (opp-table-gpu-afr, opp-table-gpu-cs names and opps, pcie@1c50000000 and pcie@1c60000000 port0), the same 6 as main de965eb5b26b.
  • Once the PMP runs, it sends endpoint-7 messages that RTKit refuses now and then, logged as apple_pmp ...: RTKit: refused auxiliary buffer request (rate-limited, err level): 1 at the s2idle resume here, and 6 to 14 per boot on the J716c kernels that already start the PMP (7.3.0-ewb342+ and later). The PMP keeps running after them.

A board DT can leave a PMP's apple,board-id and apple,dram-vendor-id to
the boot loader, which fills them in from the running machine. Without
them the PMP never starts, and the PMC and the PMP report should not
wait for it.

Add apple,pmp-voter to the PMC, the voter agent of the PMP it names in
apple,pmp, so that the PMC can leave that agent out of its static voters
when the PMP was not handed over. Let a PMP report name such a PMP in
apple,pmp.

Signed-off-by: Erik Bourget <[email protected]>
…over

A board DT can leave the PMP's apple,board-id and apple,dram-vendor-id to
the boot loader, which fills them in from the running machine. Under a
boot loader that does not, the PMP driver fails its probe for good, and a
PMC that names that PMP in apple,pmp defers forever: its CLPC child, and
cpufreq with it, never probes.

When the PMC also gives the PMP's voter agent (apple,pmp-voter), wait for
the PMP only when it is available and has both values. When it does not,
say so once, skip the device link and leave that agent out of the static
voters, so the PMC and CLPC run as on a board without a PMP. A PMC
without apple,pmp-voter waits for its PMP as before.

Signed-off-by: Erik Bourget <[email protected]>
…d over

A PMP report whose PMP is not running yet keeps the devices' requests to
itself and polls until the PMP runs, every 100 ms at first and then once
a second. A PMP whose board values (apple,board-id and
apple,dram-vendor-id) the boot loader did not fill in never starts, so
that poll never ends.

When the report names an enabled PMP in apple,pmp and that PMP lacks the
values, say so once and do not start the poll. The report still binds
and keeps its requests, as it does while it waits. Reports that name no
PMP, or a disabled one, wait as before.

Signed-off-by: Erik Bourget <[email protected]>
Enable pmp0, its DART and mailbox, the PMP report and the PMP's power
domains on J716c. Name the PMP in the PMC (apple,pmp, with its voter
agent in apple,pmp-voter and among the static voters) and in the PMP
report. Leave apple,board-id, apple,dram-vendor-id, apple,pmc,
apple,pmc-pmgr and apple,tunable-* to the boot loader, which fills them
in from the running machine, so no tunables are compiled in.

This starts the PMP, hands it the PMP report's requests and lets it vote
on the DCS and SoC rails through the PMC. Under a boot loader that does
not fill in the PMP's values, the PMC and the report run without it.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb marked this pull request as ready for review November 30, 2026 21:18
@erikwb
erikwb requested review from a team as code owners November 30, 2026 21:18
@erikwb
erikwb requested review from Acelogic and malik-na November 30, 2026 21:18
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at 2a439a39: not ready yet

Check Detail
CI at head ok 5 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at 2a439a39
Conflicts ok none
PR text ok Risk: two-way · J716c only (one DTB).

Areas: area:bringup, area:power

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

@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: HOLD at 2a439a39

Blockers:

  1. Stacked on unmerged linux#3650 (base=fix/apple-pmc-unhanded-pmp). Full Device tree checks / build / KUnit workflows have not executed against main yet; wait for #3650 to merge, retarget onto main, and verify CI passes green.

Checked:

  • Diff (arch/arm64/boot/dts/apple/t6050-j716c.dts, +44/-0), MERGEABLE against fix/apple-pmc-unhanded-pmp; carries no static PMP values (loader fills in apple,board-id/apple,dram-vendor-id/apple,pmc*/apple,tunable-*) and backed by J716c exact-head hardware testing at 2a439a39eecc.
Evidence
  • Strictly awaiting parent #3650 landing and Device tree checks / build CI on main.

@DjDeveloperr
DjDeveloperr changed the base branch from fix/apple-pmc-unhanded-pmp to main November 30, 2026 23:11
@github-actions github-actions Bot added the area:power Area from CODEOWNERS (bot) label Nov 30, 2026

@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 2a439a39eecc

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: - Diff (arch/arm64/boot/dts/apple/t6050-j716c.dts, +44/-0), MERGEABLE against fix/apple-pmc-unhanded-pmp; carries no static PMP values (loader fills in apple,board-id/apple,dram-vendor-id/apple,pmc*/apple,tunable-*) and backed by J716c exact-head hardware testing at 2a439a39eecc.

Follow-ups (not blocking): Merge parent #3650 first; follow-ups: retarget, DT/build CI on main

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 2a439a39eecc (B2 merge train, 12-01 merge bar). Approval at this head: aurora-silicon-review[bot]. Row: in the PR body at 2a439a3. CI: linux train L2 = main (after train L1) + #1489 #3223 #3291 #3333 #3395 #3407 #3547 #3560 #3651 #3684 #3569 #3599 (candidate dd0c7bb9): Apple driver compile pass, Apple DTBs W=1 pass, planned KUnit ane-boot/clpc/ane-pm/dcp-topology/ave/asahi all pass; host-tests/dt-checks green at this head where they apply. The rest of the hosted run is queued behind the backlog. Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit 0ef9e9b into main Dec 1, 2026
11 of 12 checks passed
@RyanTheTide
RyanTheTide deleted the feat/j716c-pmp branch December 1, 2026 07:31
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) area:power Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants