Skip to content

arm64: dts: apple: t6050-k114c: add the deep-sleep controller node - #2089

Open
joshuaswarren wants to merge 10 commits into
aurora-silicon:integration/aurorafrom
joshuaswarren:w88/k114c-deepsleep
Open

joshuaswarren wants to merge 10 commits into
aurora-silicon:integration/aurorafrom
joshuaswarren:w88/k114c-deepsleep

Conversation

@joshuaswarren

Copy link
Copy Markdown
Contributor

Summary

Ports the T6050 (K114c / M5 Max) deep-sleep controller node and SoC-match
fix from our k40u series:

  • 8dddc6162b57 — arm64: dts: apple: t6050-k114c: add the deep-sleep controller node (new t6050-k114c-sleep.dtsi, 233 lines, plus the
    include in t6050-k114c.dts)
  • c166fc4296c49 — soc: apple: sleep: T6050: match the board by the SoC, not the J714s (sleep-t6050.h + sleep.c display-power
    hand-off compatible)

The node copies the J714s sleep controller shape: cluster power gates,
AOP2/SIO mailboxes, port-controller sleep state. Register banks are the
T6050 pmgr/cluster/watchdog/SPMI/PMC/PTD/clockgen/memory-controller
pages shared with J714s. Per the source commit message, the boot
loader's SoC data is not in the node yet, so the driver has no commit
schedule and does no deep sleep — this lands the DT/driver plumbing,
not an active sleep path.

Port notes

Cherry-picked onto integration/aurora @ bf423bf0. The original sat
on a k40u file layout that also carried t6050-k114c-display.dtsi and
the qspi/nvram block (separate, not-yet-upstreamed work); upstream has
neither, so the include lands at end of file. The sleep.dtsi itself is
unchanged.

Verification

  • t6050-k114c.dtb compiles clean via the kernel dtc path
    (gcc -E -D__DTS__ + scripts/dtc/dtc -b 0): only pre-existing
    warnings in t6050-k114c-gpu.dtsi / t6050-peripherals.dtsi, none
    from the new file.
  • Not booted on hardware — same status as the source commits.
    M5 Max deep-sleep enablement is future work; this is DT plumbing only.

Generated with Devin

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T17:59:38.573034Z
We couldn’t complete this review. Comment @codex review to try again.
21d241e PR opened
🔒 Security Review ❌ Failed 2026-11-16T17:59:47.208792Z
We couldn’t complete this review. Comment @codex security review to try again.
21d241e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

CHANGES on 21d241e
Model: anthropic/claude-sonnet-5-5

Claude review, exact head. One finding, message only. The tree is clean.

Finding: neither commit has a Signed-off-by. ca6345db8975 and 21d241eb905d end at "Not booted on ...". In the last 25 commits under bf423bf0, every non-merge commit has a Signed-off-by (for example 8d144b5430, a250d9c034, bf01f849ab). Add ours in the form of those commits: Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>. The tree stays identical; only the two messages change.

What I checked (sparse checkout of this head, gcc preprocessor plus dtc -@ -b 0, same as the PR body):

  • t6050-k114c.dtb compiles, rc 0. Warnings: 15 lines on the base bf423bf0 and 15 on this head, same text. None come from the new file, as the body says.
  • t6050-k114c-sleep.dtsi is 233 lines and differs from t6050-j714s-sleep.dtsi only on the header comment (line 3). So "the sleep.dtsi is unchanged" and "copies the J714s shape" are true.
  • The sleep node has 46 reg entries and 46 reg-names, no duplicate names. sio is defined once after /delete-node/ &sio;, and the sio alias resolves to dma-controller@505e00000.
  • .machine = "apple,t6050" is safe for the probe: the K114c root compatible is "apple,k114c", "apple,t6050", ... (t6050-k114c.dts:17). The remaining probe guard at sleep.c:1582 still checks cpu_logical_map(0) == 0x40000 and 18 CPUs. The compiled K114c DTB has 18 enabled CPUs with first id 0x40000, the same as the J714s DTB. Only the J714s and K114c carry a sleep node, so no other T6050 board reaches apple_sleep_display_v27_power_ready().

Notes, not findings:

  • rtkit.c:2269 (pmp_ca_event_ack) and clpc.c:2038 (high_power_machine) still match apple,j714s only. They do not touch this change. They apply if K114c needs them later.
  • Not covered: dt-checks was still pending when I looked, and I did not run dtbs_check. Board facts (the hpm1/hpm2/hpm5 ports, the bpli warm-reset key, the N1 link) cannot be checked without a boot; the PR says it is unbooted.

I will re-review and post GREEN when the Signed-off-by lines are in.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

w7X: Signed-off-by added to both commits via rebase --signoff (original author kept; new head 8f72413). Tree unchanged.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on 8f72413
Model: anthropic/claude-sonnet-5-5

Claude review, exact head. This closes my CHANGES on 21d241eb.

  • Both commits now end with Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>, the form the recent commits under bf423bf0 use.
  • The trees did not change. 20bf378b947e has tree 6258978533b1, the same as ca6345db8975. 8f724137548d has tree 8cc2aea826e4, the same as 21d241eb905d. The parent of the first commit is still bf423bf0. So my earlier checks stand: the DTB compiles with the same warnings as the base, the K114c sleep dtsi matches the J714s one except one comment line, 46 reg and 46 reg-names, and the K114c has 18 CPUs with MPIDR 0x40000.
  • The message text above the new trailer is unchanged.

Not covered: dtbs_check, and any boot on the M5 Max. The PR says it is unbooted.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on 218d09f
Model: devin/swe-2-high
Compared vs pre-rebase head 8f72413 (timeline's previous head; the audit's 1ff3f1a4 is unreachable). DTS commit: byte-identical +/- content. Soc-match commit: the sleep.c hunk is genuinely superseded upstream — of_machine_is_compatible("apple,j714s") became apple_sleep_t6050_full(), which gates on s->soc being a T6050 profile; strictly stronger, same effect on K114c. Stands alone: K114c DT declares apple,t6050, the probe gate keeps MPIDR+CPU-count inventory, and .machine=apple,t6050 makes the profile bind there.

Independent review at the rebased head by a second model family, posted by [Joshua's agent] on the reviewer's behalf.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks Joshua, moving the T6050 sleep match off the J714s is the right direction. Three points on the code:

  1. t6050-k114c-sleep.dtsi is t6050-j714s-sleep.dtsi line for line; only the header comment differs. Including the existing file would avoid a second copy.
  2. The K114c is a Max, and the tree already has a Max entry: t6050_j716c_sleep_soc (drivers/soc/apple/sleep-t6050.h:3859, compatible apple,t6050-j716c-sleep) with pmp_unstarted, lower_venc0, clusters_down_first and the Max region profile for the second encoder and AMCC16-31 power words. The J714s file also forces &ps_pmp always-on, which the J716c file does not, and the K114c has no PMP enabled today. Could the K114c node take the Max data and the J716c's sleep files instead of the Pro ones?
  3. sleep-t6050.h:3740 becomes .machine = "apple,t6050", which every T6050 board matches; the node compatible already picks the data. Removing .machine from both entries (:3740, :3872) says that directly, but apple_sleep_validate_cpu_topology() (sleep.c:1896) only checks the boot MPIDR and CPU count when .machine is set, so those two checks would become unconditional in the same commit. T6050: firmware-driven deep sleep on the K116s (16-inch M5 Pro, firmware 27.2) #2201 adds a K116s exception on that same line; this would cover it too.

Row still needed on the K114c: boot with the node and the sleep driver probes without "unsupported board/CPU inventory". Once the boot loader's SoC data is in the node: rtcwake -m mem -s 30 three times, then a lid close/open wake and a power-key wake, each resume with an empty dmesg --level=err, a USB device re-enumerated and Wi-Fi passing ping -c 5.

Since sleep.c is shared, we can then run no-regression sleep rows on our A18 Pro and M4 Pro.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent]

Thanks, Ryan. Three points on #2089 at head 218d09fd, measured only.

1. Duplicate t6050-k114c-sleep.dtsi

Agree. At this head the K114c file is 233 lines and differs from t6050-j714s-sleep.dtsi only in the header comment (same mechanical check posted at 8f724137). #include-ing the J714s file is the right end state. I have not booted either way. I will switch to an include in the next sleep touch when you want a code change on this PR; say so and it goes through the normal commit flow. No DT edit in this message.

2. Max profile: J716c sleep data vs J714s copy

I have no K114c sleep boot receipts yet: no probe line, no rtcwake, no lid or power-key wake, no post-resume USB or Wi-Fi ping. So I cannot support J716c Max soc data vs J714s Pro copy from measurement.

Static facts checked in the tree (not boot):

  • t6050-k114c.dts has no ps_pmp enable (no pmp references in that file today), matching your note that K114c has no PMP enabled.
  • t6050_j716c_sleep_soc exists (sleep-t6050.h, compatible apple,t6050-j716c-sleep) with the Max fields you named.
  • The J714s sleep dtsi path forces &ps_pmp always-on; the J716c sleep files do not.

Position: J716c Max soc plus J716c sleep device files is plausible for a K114c Max without PMP, but it is unproven here until the boot row runs. I will not widen the DTS to J716c shapes without a measured pass that shows the sleep driver probes and suspends cleanly. If the first boot fails inventory or region setup, that is the fork to document.

3. .machine = "apple,t6050" and topology validation

Understood on apple_sleep_validate_cpu_topology() (sleep.c:1896): with .machine set, MPIDR and CPU count checks run; clearing .machine on both entries makes those checks unconditional, and #2201 adds a K116s exception on the same path.

I have not re-run the compile-only inventory proof on 218d09fd this turn. The earlier sparse-checkout check still stands for that head family: K114c DTB builds, 18 CPUs, first MPIDR 0x40000, same as J714s; only J714s and K114c carry a sleep node in that comparison.

I will not remove .machine in this PR without coordinating the topology guard with #2201 in one measured commit. Happy to take a joint update if you want that coupling explicitly in the series.

Row still owed (K114c, unbooted on this PR today): probe without "unsupported board/CPU inventory"; then rtcwake -m mem -s 30 x3, lid close/open wake, power-key wake; each resume: empty dmesg --level=err, USB re-enumerate, ping -c 5 Wi-Fi. I will post timestamps and log paths only.

Skipped: dtbs_check on latest integration tip; J716c sleep DTS swap without boot.
Risk: until the row lands, Pro-shaped sleep data may be wrong for K114c Max; PMP always-on from J714s may be irrelevant but unverified.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks Joshua. Yes, please go ahead with the code change on this PR:

  1. Include the existing sleep .dtsi rather than carrying a copy.
  2. For the Max question, the boot row decides. Since the K114c has no PMP enabled, the J716c data and files (no forced &ps_pmp) are the closer fit to try first; if the first boot fails the inventory or region checks, posting that log is useful too.
  3. Removing .machine no longer needs to be coupled with T6050: firmware-driven deep sleep on the K116s (16-inch M5 Pro, firmware 27.2) #2201: its v2 checks the CPU inventory alone (boot MPIDR and CPU count) in apple_sleep_validate_cpu_topology(), with no machine test. So .machine can go from both entries here.

The K114c row is unchanged: probe without "unsupported board/CPU inventory", then rtcwake -m mem -s 30 x3, a lid wake and a power-key wake, each with an empty dmesg --level=err, a USB device back and ping -c 5 passing.

satchlj and others added 10 commits November 19, 2026 08:49
Describe die-0 ATC0, ATC1 and ATC3 in the shared T6050 files using
acioN names and the integration ATC2 resource layout. ATC0/1/3
addresses and interrupts come from the retained J775c ADT description
(e579145cd); no open J716c display branch is a dependency.

Replace the disabled usb4_3_acio description with acio3 and update its
existing board references. Keep tunables, DROMs, PD endpoints and
activation in board files. Expose the existing acio2 to the other Max
boards disabled, preserving current J714c/J714s/J716c activation and
PCIe-tunnel wiring. The current integration driver foundations and
original authorship remain in ancestry.

Signed-off-by: Satya Benson <satya@benson.earth>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit cd3e03d)
Signed-off-by: Diljit Singh <hey@djdev.me>
Keep the required NHI DROM property on disabled shared instances. Existing board DROMs override the placeholder; no unit identity is embedded in the shared resource descriptions.

Signed-off-by: Satya Benson <satya@benson.earth>
(cherry picked from commit c88cd76)
Signed-off-by: Diljit Singh <hey@djdev.me>
Restore the adopted-host Clock PM policy from candidate44.
Integration boots J775c with this change alone; restoring bus-
number preservation alone does not return as a trial, and
restoring the NVMe driver alone does not return.

The host leaves CLKREQ# pads and reference-clock gating in
firmware state. Removing L0s/L1 capability bits does not mask
PCIE_LINK_STATE_CLKPM. Disable it before endpoint enable and walk
the enumerated bus to retain the policy.

Adapted from Satya Benson candidate44 PCIe adoption changes.
Tested on J775c with Aura b6e6faf4 and candidate44 DTB; other
boards untested.

Signed-off-by: Satya Benson <satya@benson.earth>
Assisted-by: LLM
(cherry picked from commit ccdd14a)
Signed-off-by: Diljit Singh <hey@djdev.me>
Rebase Satya Benson's boot-tested M5 Max Mac Studio board series from
linux PR1619 onto current integration. Consolidate its incremental board
fixups and historical merge cleanups while retaining the original author,
copyright notices and compatibility contract.

Keep the one-die CPU/cache topology, board PCIe/N1/NVRAM/fan and USB/PD
wiring, installed-loader GPU paths/fallback, disabled MTP DART, three
ANE suppliers and omission of the desktop internal-panel DCP. Retain the
original disabled inventory and ANE trial wrapper without claiming new
hardware qualification.

Resolve the ANE binding against the current T8142/T8132 constraints:
retain the explicit T6050 backend/full-inventory distinction and known
0x210/0x220 platform types. Preserve K114c's active ATC2 guards in the
shared router definitions. Do not weaken the modern GPU binding; the
legacy-loader GPU warning gate remains visible.

The original PR1619 and its branch remain open and unchanged.
Source head: 0075a00.
Shared-router and Clock PM dependencies are separate preceding commits.

Based on the J775D board by Jeff Queisser and the single-die J716c work
by Erik Bourget; their foundations remain in integration ancestry.

Signed-off-by: Satya Benson <satya@benson.earth>
Assisted-by: LLM
Signed-off-by: Diljit Singh <hey@djdev.me>
The shared T6050 router declarations default their status to disabled. J714s and J716c previously enabled their board-specific mailbox and router definitions implicitly, which now inherit the disabled property. Explicitly enable the six existing board nodes to preserve their prior effective status.

Signed-off-by: Diljit Singh <hey@djdev.me>
Run the production Clock PM helpers through root-bus and capability admission, locked and unlocked calls, PCI errors, host initialization failure and the adopted-link host gate. Reject mutations that change the mask or remove the gate. Document the rebase and the outstanding loader and hardware qualification limits.

Signed-off-by: Diljit Singh <hey@djdev.me>
Resolve the staged board descriptions into t6050-j775c.dts, retaining symbolic references and the final device policy. Remove all 18 board staging sources, including the separate unqualified ANE trial wrapper. The normal DTB is byte-for-byte identical before and after consolidation (SHA256 0fb4d76a761987bd91bd8680d2d7be5837f31989a1dc8c8b523446244bdf45f5). No hardware is newly enabled. Keep Satya Benson credited for the original board work and leave PR1619 unchanged.

Signed-off-by: Diljit Singh <hey@djdev.me>
Allow only the exact G17C, G17S, T6050 compatible sequence required by installed loaders, alongside the existing two-item G17C form. Keep the G17C handoff resource requirements and the single-compatible raw T6050 contract unchanged.

Exercise both forms and malformed compatibility, incomplete handoff and raw inventory cases against the production binding in the DT workflow. Update the J775c notes to distinguish this schema correction from the still-required hardware qualification.

Signed-off-by: Diljit Singh <hey@djdev.me>
Copy the J714s's sleep controller node and what it needs from the rest of
the tree (the cluster power gates, the AOP2 and SIO mailboxes, the port
controllers' sleep state) into the K114c. The register banks are the T6050
pmgr, cluster, watchdog, SPMI, PMC, PTD, clock generator and memory
controller pages the two boards share. The SoC data the boot loader adds is
not in the node yet, so the driver has no commit schedule and does no deep
sleep.

Not booted on the hardware.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The T6050 profile bound to the J714s alone: its match data named that
machine, and so did the display-power hand-off. The node and its data are
per board (the dtsi gives them), and the CPU inventory check (18 CPUs, boot
MPIDR 0x40000) still refuses a board whose cores differ, so the machine
name added nothing. Match the SoC, which the K114c (M5 Max) shares.

Not booted on the M5 Max.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks Joshua. The latest push seems to have come from the wrong base. The PR now has 10 commits: besides your two, it carries eight from the J775c compatibility work (acio routers, DROM placeholders, PCI Clock PM, the J775c board consolidation, the G17C binding), about 7k lines that belong to #1619 and #1618. Your two commits are unchanged: t6050-k114c-sleep.dtsi is still the 233-line copy, and sleep-t6050.h:3740 still sets .machine = "apple,t6050".

Could you reset the branch onto integration/aurora with only your commits, then make the changes we agreed?

  1. Include the existing sleep .dtsi instead of the copy, trying the J716c data and files first.
  2. Drop .machine from both entries (:3740 and :3872).

The K114c row is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants