Skip to content

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

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

joshuaswarren wants to merge 2 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.

@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.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Inspection evidence (no K114c boot claim): at the pinned integration base 26294e8 and #2201 head 965c1b5, the MPIDR/CPU-count check remains inside soc->machine guard. Dropping .machine alone would skip inventory validation. The clean rewrite will decouple that guard before removing .machine from both T6050 entries, retain only the two intended commits, and try the J716c Max sleep data/DTSI without forcing PMP. K114c boot remains unrun.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, you're right. At the base, the boot-MPIDR and CPU-count check in apple_sleep_validate_cpu_topology() sits inside the soc->machine guard, so dropping .machine alone would lose it. Decoupling it first is the right order: check boot_mpidr/cpu_count whenever an entry sets them, then drop .machine from both T6050 entries. Only the T6050 entries set those fields, so other SoCs see no change.

Still missing:

  • the branch reset onto integration/aurora with only your two commits (it still carries the eight J775c commits)
  • the shared sleep .dtsi instead of the 233-line copy
  • the K114c row

- Reuse J716c's disabled Max description instead of a copied J714s file.
- Keep the controller disabled until K114c sleep is qualified.
- Preserve K114c's SIO alias and MagSafe controller status.
- Do not enable the unqualified full profile.
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
- Validate CPU inventory when a profile provides MPIDR or CPU count.
- Remove machine metadata from both T6050 entries and KUnit assertions.
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
@joshuaswarren
joshuaswarren marked this pull request as draft November 20, 2026 01:51
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Reset complete: PR head is 50ae77a3c1308d6303997c419ff275ab3cfbfd57, based on integration/aurora at 26294e82e9c87a0162a7973c5e23c599ceaea22f, with exactly two commits:

  1. bfe4a4f removes the 233-line K114c copy and includes the existing disabled J716c sleep description. It keeps K114c’s SIO alias and MagSafe controller enabled; the J716c full sleep profile remains disabled, and no &ps_pmp always-on override is added.
  2. 50ae77a checks boot MPIDR and CPU count whenever a profile supplies either, independent of machine metadata; it removes .machine from both T6050 entries and updates the KUnit assertions.

checkpatch.pl --strict reports 0 errors and 0 warnings on each commit. The K114c boot/suspend row remains unrun; no hardware qualification is claimed. PR remains Draft.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the reset: two commits on current integration, the K114c reusing the existing disabled J716c sleep description instead of a 233-line copy, and the MPIDR/CPU-count check now running whenever a profile supplies either, with .machine gone from both T6050 entries. That is the shape we asked for. What is left is the K114c boot and suspend row on 50ae77a and CI on that head (still running).

@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.

Looked at 50ae77a. The shape is right: the K114c includes the disabled J716c sleep description, and the CPU-inventory check (sleep.c:1895-1898) now runs whenever a profile sets boot_mpidr or cpu_count. Neither .machine remains.

Not merging yet:

  • It's a draft, and it conflicts with integration/aurora (DIRTY). The base moved about 326 commits past 26294e8, including t6050-k114c.dts and sleep-t6050.h, so it needs a rebase onto the current tip.
  • The K114c (14-inch M5 Max) row is still open, as Ryan listed it. Run it on the rebased head:
    1. The sleep driver probes with no "unsupported CPU inventory" line.
    2. rtcwake -m mem -s 30 passes three times.
    3. A lid close/open wake and a power-key wake both work.
    4. After each resume, dmesg --level=err is empty, a USB device comes back, and ping -c 5 passes over Wi-Fi.

sleep.c is shared, so once that row is in we'll run the no-regression sleep rows on J714s and J700 before merging.

Assisted-by: Claude Opus 5.5

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Note

wAK (AI assistant) responding on behalf of joshuaswarren

Acknowledged: shape accepted, rebase first. Next action is rebasing the two commits onto the current integration/aurora tip (clearing the DIRTY state including t6050-k114c.dts/sleep-t6050.h), then the K114c row runs on the rebased head exactly as listed: probe with no unsupported-CPU-inventory line, rtcwake -m mem -s 30 x3, lid and power-key wakes, and after each resume an empty dmesg --level=err, a returning USB device, and ping -c 5 over Wi-Fi. The row posts here with those artifacts before the draft leaves draft state. Lab owner for the K114c boot window is being confirmed in parallel; no merge is requested before the row lands.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Blockers: 2.

Not superseded: no K114c sleep node is on integration/aurora (the tip's t6050-k114c.dts includes no sleep dtsi and still has its own hpm5 node at :393-401), and no other PR adds one. Two open PRs touch the same lines, so the rebase already asked for has to pick an order:

  1. t6050-k114c.dts:577: the include turns on a device; it is not only disabled plumbing. I compiled the K114c DTB at 26294e8 and at 50ae77a and diffed them. Apart from the disabled nodes and the alias, the include adds pmu_rtc (apple,t6050-pmu-rtc, status = "okay", wakeup-source, sharing the rtc_offset cell with smc_rtc). Before this PR the K114c had only smc_rtc. So a second RTC probes, and whichever probes first becomes rtc0, the default device for rtcwake and hwclock. The header of t6050-j716c-sleep.dtsi itself says the PMU RTC is still under qualification. Either add &pmu_rtc { status = "disabled"; }; next to &hpm5, or keep it on and add it to the row: /sys/class/rtc/rtc*/name, hwclock -r and an rtcwake alarm on each RTC.
  2. The branch conflicts with its base (370 commits behind). Rebase it on top of arm64: dts: apple: t6050: share the MagSafe 3 PD controller, add it to J714c and J716s #2400 or under it, as above.

Nit: the PR title and body still describe the old 233-line t6050-k114c-sleep.dtsi copy and the J714s data, and the body ends with "Generated with Devin" rather than an Assisted-by: line. Please update both to match the two current commits.

The sleep.c change is right. With .machine gone, the inventory check at sleep.c:1895-1898 runs for both T6050 entries (the only profiles that set boot_mpidr/cpu_count), and the compatible on the node picks the data.

HW row: K114c on the rebased head. The sleep driver probes with no "unsupported CPU inventory" line, the rtc list is as above, and there are 0 failed units, 0 AVC and no new dmesg --level=err lines against the base. The suspend part of the row waits until the node is enabled.

Assisted-by: LLM (Claude:Opus 5.5)

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.

3 participants