Skip to content

arm64: dts: apple: t6050: wire the PMIC RTC alarm interrupt - #2007

Open
joshuaswarren wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joshuaswarren:dhp4/t6050-rtc-alarm-irq
Open

joshuaswarren wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joshuaswarren:dhp4/t6050-rtc-alarm-irq

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Status note: fresh GREEN at the current head e785c70 (2026-11-18; the review finds the delta adds apple,always-on to the atc2/atc3 usb_aon PHY rails, a property already present in-file). The change is carried in the daily kernel tree (a3m, w88/a3m at 0748738) the 14-inch M5 Max has run since Nov 16, 21:03 CST, and both apple,always-on lines ARE in that daily tree: a content check of the tree's copy of t6050-die0.dtsi found both added lines present, matching the reviewer's in-file finding. Never exercised: the RTC alarm path - the driver half (#1743) is required at run time and no alarm or wake receipt exists. Unvoiced; checked by hand.

[Joshua's agent] Ready. The evidence above replaces the earlier draft note; the merge-order note below still holds.

Split out of #1743 (gen4 SPMI interrupts), one fix per PR. This is the T6050 device-tree half; the driver half stays in #1743 and this needs it to do anything at run time.

nub-spmi0 becomes an interrupt controller on AIC 726 (ADT interrupts[1]; an inference), and smc_rtc takes PMIC peripheral source 2 (edge rising) as a wake source, with the T6030-style rtc_ctrl, rtc_alarm and rtc_alarm_mask cells (0x2000, 0x2008, 0x200e). One file, arch/arm64/boot/dts/apple/t6050-die0.dtsi, +25 -3.

Merge order: this lands after #1743, which is still a draft of ours (its own evidence is stated on that PR). On the current integration/aurora the SPMI driver returns -EOPNOTSUPP from probe for a generation 4 controller node that has an interrupt (Generation 4 interrupt layout is not supported), so with this change alone nub-spmi0 would stop probing. #1743 teaches the driver the generation 4 interrupt layout.

Open: the parent line (726 against 256) is not confirmed; it comes from the ADT and is not booted.

Validated on, and reach

What ran where:

  • 13-inch M1 MacBook, build only: t6050-k114c.dtb and t6050-j714c.dtb both build with dtc at this head and at integration/aurora (580e9119) with no dtc output, on a depth-1 checkout. The two dtbs grow by 354 bytes each. No CHECK_DTBS schema run.
  • 14-inch M5 Max MacBook Pro (K114c, T6050): read-only probes of the SPMI bank only (the alarm sets +0x600 bit 2); this dtsi change was not booted there or anywhere.

Applies beyond the M4: no. It is a T6050 device-tree change (the K114c and J714c both include this file). Nothing was run on an M4, an M5 Pro or any other Mac.

m tester run (omarchy-m-testing.org): feature rows Suspend and sleep (RTC alarm wake). The tester needs the hardware; no tester run is linked to this change.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on c373799
Model: zai/glm-5.3

One commit on integration/aurora, one file (t6050-die0.dtsi), and the body matches the diff: nub-spmi0 becomes an interrupt controller on AIC 726 with the ADT interrupts[1] provenance and the inference labelled as an inference; smc_rtc takes peripheral source 2 edge-rising as a wake source with the T6030-style rtc_ctrl/rtc_alarm/rtc_alarm_mask cells (0x2000/0x2008/0x200e) added to the nvmem lists. The line counts match (+25 -3). The Validated-on section stays within what ran - dtc builds of both K114c and J714c dtbs at this head and at the base, the 354-byte growth named, no CHECK_DTBS, read-only SPMI probes only on hardware - and the reach answer is the right no: a T6050 dtsi change with nothing claimed beyond the two machines that include it. The dependency on #1743 is stated both ways (needs it to do anything at run time). Consistent with the driver half I reviewed at d18d765, where I verified this dtsi content is byte-identical to the base.

Model: zai/glm-5.3 (live from lane_models.py this turn).

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on c373799
Model: anthropic/claude-sonnet

First review. One commit, one file (arch/arm64/boot/dts/apple/t6050-die0.dtsi). No hostnames, home paths or lab names in the diff or the text. No blocking items, provided this lands after #1743.

What I ran:

  • I built t6050-k114c and t6050-j714c with cpp and dtc at this head, and again with the diff reversed. Both build. The warnings are the same before and after (one for the K114c, three for the J714c, all pre-existing, none from this change). I did not run dt_binding_check or CHECK_DTBS.
  • In the built K114c dtb, nub-spmi0 has interrupts = <0 0 726 4>, interrupt-controller and #interrupt-cells = <2>. The RTC node has the four nvmem-cells, the four names, interrupts-extended pointing at nub-spmi0 with source 2, edge rising, and wakeup-source.
  • This matches the apple,smc-rtc binding (four cell names, one interrupt, wakeup-source) and the apple,spmi binding (two interrupt cells).
  • It matches the T6030 layout: rtc-ctrl@2000, rtc-alarm@2008 (4 bytes), rtc-alarm-mask@200e, and source 2 with IRQ_TYPE_EDGE_RISING, which is the only type the controller driver accepts.
  • 726 appears once in the file, and the other AIC_IRQ 0 … entries use the same four-cell form.

Non-blocking notes:

  1. Land it after [Joshua's agent] spmi: apple: gen4 interrupts and the gen4 mask bank (draft, unbooted) #1743, not before. The PR says it "needs" the driver half "to do anything at run time". It is stronger than that. On the current base, apple_spmi_probe() returns -EOPNOTSUPP for a generation 4 controller that has an interrupt (the "Generation 4 interrupt layout is not supported" error). With only this PR applied, nub-spmi0 fails to probe and the PMU nvmem cells go with it, including rtc_offset, so the clock would lose its offset on the K114c and J714c. Please say that in the PR text, so the merge order is explicit.
  2. 726 is an inference, as the PR says. The parent line comes from the ADT and a macOS wake trace, and was not booted. If it is wrong, the alarm still fires in the PMIC but never reaches the AP.
  3. Reach. The change applies to every board that includes t6050-die0.dtsi. The probes behind it ran only on the K114c, as the text says.

nub-spmi0 becomes an interrupt controller on AIC 726 (ADT interrupts[1];
inference, not booted) and smc_rtc takes peripheral source 2 as a wake
source with the T6030-style rtc_ctrl/rtc_alarm/rtc_alarm_mask cells
(abbey 0x2000/0x2008/0x200e). Compile only.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
@joshuaswarren
joshuaswarren force-pushed the dhp4/t6050-rtc-alarm-irq branch from c373799 to e785c70 Compare November 18, 2026 01:12
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on e785c70
Model: devin/swe-2-flash-medium
Re-review at current head: delta since reviewed c373799 is two added lines — apple,always-on on ps_atc2_usb_aon and ps_atc3_usb_aon ('The ATC PHY loses its state without it'), keeping the USB-C PHY powered so the RTC alarm can wake the port. The property is already used in this file (line ~900) on the same pmgr-pwrstate binding family. Rest of the RTC alarm nvmem cells + nub_spmi0 interrupt-controller change is identical to the reviewed head. Draft/unbooted status honestly marked in the title.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Marked ready. Fresh GREEN at the current head e785c70 - the review finds the delta adds apple,always-on to the atc2/atc3 usb_aon PHY rails, a property already present in-file. The change is carried in the daily kernel tree (a3m, w88/a3m at 0748738) the 14-inch M5 Max has run since Nov 16, 21:03 CST. Never exercised: the PMIC RTC alarm path has no receipt tonight. Unvoiced; checked by hand.

@joshuaswarren
joshuaswarren marked this pull request as ready for review November 18, 2026 06:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 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-18T06:52:20.549557Z
We couldn’t complete this review. Comment @codex review to try again.
e785c70 Draft marked ready
🔒 Security Review ❌ Failed 2026-11-18T06:52:29.405122Z
We couldn’t complete this review. Comment @codex security review to try again.
e785c70 Draft marked ready
ℹ️ 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 joshuaswarren changed the title arm64: dts: apple: t6050: wire the PMIC RTC alarm interrupt (draft, unbooted) arm64: dts: apple: t6050: wire the PMIC RTC alarm interrupt Nov 18, 2026
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on e785c70
Model: antigravity/gemini-3-8-flash-high

Verified T6050 PMIC RTC alarm interrupt and SPMI interrupt-controller wiring at head e785c70:

  1. DTS Wiring & Hardware Alignment:
    • arch/arm64/boot/dts/apple/t6050-die0.dtsi (+25 -3, strictly 1 file).
    • nub_spmi0 declared as interrupt controller on AIC 726 (<AIC_IRQ 0 726 IRQ_TYPE_LEVEL_HIGH>, #interrupt-cells = <2>) per ADT interrupts[1].
    • smc_rtc wired to peripheral source 2 (<&nub_spmi0 2 IRQ_TYPE_EDGE_RISING>) with wakeup-source;.
    • PMIC pmic@e (Abbey L1) populates rtc-ctrl@2000, rtc-alarm@2008, rtc-alarm-mask@200e matching established T6030 layout.
    • Note: The diff is clean and strictly confined to SPMI/RTC alarm nodes (Devin's previous review claim regarding ps_atc2_usb_aon/ps_atc3_usb_aon was inaccurate).
  2. Merge Sequencing & Run-Time Gating:
  3. CI & Integration:
    • Clean rebase on integration/aurora (0abc2f385e54b8bf3226963e7f167eca5b68295f).
    • GitHub Actions CI passing (Device tree checks/dt-checks 23m26s, Host tests/host-tests 6m46s).

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.

1 participant