Skip to content

[Joshua's agent] spmi: apple: gen4 interrupts and the gen4 mask bank (draft) - #1743

Draft
joshuaswarren wants to merge 4 commits into
aurora-silicon:integration/aurorafrom
joshuaswarren:w71/spmi-gen4-irq
Draft

joshuaswarren wants to merge 4 commits into
aurora-silicon:integration/aurorafrom
joshuaswarren:w71/spmi-gen4-irq

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

[Joshua's agent] Draft. M6 Mac mini (J873g, T8152) validation ran at a71e2cd68982 plus #2486; RTC suspend/wake remains untested.

Gen4 SPMI (t8142/t6050) refused any interrupt at probe, so the PMIC RTC alarm cannot wake s2idle. This takes the interrupt in the driver. The T6050 device-tree wiring was split out of this PR as its own fix (see the end).

Basis (no Apple code): Dj's macOS trace on the Aurora M5 Pro thread (peripheral sources 0..255 acked per bit from +0x600; fault source 263 at +0x620 bit 7; hpm2 wake as peripheral bit 19) plus our K114c read-only probe: the alarm sets nub-spmi0 +0x600 bit 2 and sticks while PMIC ctrl is 0x03.

  • spmi: apple: take interrupts on generation 4 controllers: bank offsets move into the hw table (gen1/t6000 unchanged); the register math lives in spmi-apple-irq.h. Commands stay polled: the RX notification is not wired for gen 4.
  • spmi: apple: use the generation 4 mask bank at +0x400: on the K114c the words +0x400..0x41c toggle and restore, +0x420 does not, matching the +0x600 ack bank. This replaces the cache-only masking for gen 4, and a firmware resume re-applies the runtime mask because a firmware sleep entry writes the mask bank itself. Whether the +0x400 bit gates the AIC line is not measured.

Open: whether the +0x400 bit gates the AIC line, and the ack semantics. A boot card (rtcwake -m freeze, lid wake) is with our boot owner.

Validated on, and reach

What ran where:

  • 14-inch M5 Max MacBook Pro (K114c, T6050): register probes only (alarm armed 20 s out sets +0x600 bit 2; +0x400 words toggle; a write of 4 to +0x600 clears the bit). The driver change was not run there.
  • 13-inch M1 MacBook, build only: drivers/spmi/spmi-apple-controller.o compiles with gcc 16.1.1 and W=1 on a depth-1 checkout of this head with ARCH_APPLE, SPMI and SPMI_APPLE set, no warnings. Not booted.
  • M6 Mac mini (J873g, T8152): booted at a71e2cd68982 with J873g: rear USB-C PD controllers through tipd, DisplayPort alt mode from Type-C (M6 Mac mini) #2486. tipd bound all three PD controllers with interrupts; DPMS-driven HPD events incremented SPMI IRQ counts, all three displays returned on all six DPMS cycles, and there were no SPMI fault lines. Idle IRQ count was zero in a 10-second sample. Sleep/wake-source boot bursts varied between boots and were also observed on spmi: apple: deliver follower interrupts on generation 4 controllers #2466, so are not attributed to this PR. RTC suspend/wake and physical hotplug were not tested: this machine has no RTC device and exposes no /sys/power/state.

The M6 run validates live SPMI interrupt delivery for Type-C events, not RTC alarm wake or suspend. Applies beyond the M4: by the driver's own description gen4 SPMI is t8142 (M4) and t6050, so the interrupt code is shared; nothing was run on an M4 or on an M5 Pro, and no M1/M2/M3 was booted.

The T6050 device-tree change (nub-spmi0 as an interrupt controller on AIC 726, smc_rtc source 2 as a wake source) is in its own PR: #2007, which depends on this one.

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.

Generation 4 (t8142, t6050) had its interrupt refused at probe. macOS's
trace (reported by Dj on the Aurora M5 Pro thread) acks peripheral sources
0..255 per bit in words from +0x600, with the controller fault source 263
at +0x620 bit 7. On K114c the PMIC RTC alarm sets +0x600 bit 2 (read-only
probe, alarm armed 20 s out).

Take the mask and ack bank offsets from the hw table (gen1 unchanged,
shared with a host check in spmi-apple-irq.h). Generation 4 has no mask
bank we could find (no word in 0x20..0x7f or 0x500..0x6ff toggles), so
sources are masked in the cache only. Commands stay polled: the RX
notification is not wired for gen 4.

Tested: host check of the register math; compile only, not booted.
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] w71 data for #1743 (K114c, M5 Max, kernel b13 without this PR, /dev/mem read and single-word writes inside nub-spmi0, no Apple code):

  1. Mask bank: +0x400..0x41c (8 words, 256 sources) toggle bit 2 and restore. +0x420 reads 0 and does not toggle. This matches Dj's seq 713 inference (+0x400 mask mirroring the +0x600 ack bank); the soft-mask-only version in [Joshua's agent] spmi: apple: gen4 interrupts and the gen4 mask bank (draft) #1743 will move to a +0x400 hardware mask once this lands.
  2. Alarm route, not yet explained: the earlier probe (alarm armed 20 s out, PMIC ctrl 0x41 at start) saw ctrl go 0x41 -> 0x03 at the target second and +0x600 bit 2 go 0 -> 1, sticking while ctrl read 0x03. Two later runs (alarm armed 12 s out) saw no event: in one ctrl read 0x41 (armed) for the whole 20 s with +0x600 staying 0; in the other the ctrl read back 0x01 right after the arm writes (EN bit dropped). So the controller bit exists, but the alarm did not fire in the later runs. Writing 4 to +0x600 with nothing pending leaves it 0 (the W1C test is still unmeasured).
  3. A 30 s rtcwake -m freeze on b13 did not wake the machine (recovered by VDM reset); b13 has no SPMI irq or rtc alarm irq, so that is expected.

Guesses, not measured: the PMIC alarm arming differs between runs (baseline ctrl 0x41 with the firmware's far-future alarm vs 0x01 after a disarm); or the alarm value or counter base was off. Next probe: same arming as the first with per-second readback of ctrl, alarm, mask byte 0x200e, counter and the +0x400/+0x600 words.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] w71 correction to my previous comment: the "alarm did not fire" runs were my probe's bug, not a hardware route problem.

Measured on K114c: the PMIC counter at nvmem 0x2002 ticks at 65536 Hz (>>15 advanced 2 per wall second), and rtc time = ((C/2) + offset(0x2100)) >> 15 matched /sys/class/rtc since_epoch exactly. The alarm compares C >> 16 (the earlier run using >>16 fired on target and set +0x600 bit 2). My later probes armed the alarm in C >> 15 units, so 2x too far in the future (about 13 days). That is the same unit the rtc-macsmc alarm path uses (CLKM >> 15 with CLKM = C/2), so the driver's alarm value is consistent.

Still open: W1C ack at +0x600 (rerun queued), and the real s2idle wake. The +0x400 mask result stands.

Probe on K114c: +0x400..0x41c toggle and restore (8 words), +0x420 does not,
matching the +0x600 ack bank 0x200 above (Dj, seq 713, from write offsets in a
macOS trace). The alarm latches +0x600 bit 2 once the PMIC alarm mask byte
0x200e is 0 (as rtc-macsmc writes it) and a write of 4 to +0x600 clears it
(measured). Whether the +0x400 bit gates the AIC line is not measured.

Drop the cache-only masking for gen 4. On a firmware resume re-apply the runtime
mask, since a firmware sleep entry writes the mask bank itself.
Host check extended; compile only, not booted.

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

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] w71 update (K114c, still compile-only, not booted): pushed a1463e1, gen4 now uses the hardware mask bank at +0x400, and on a firmware resume re-applies the runtime mask (as Dj asked in seq 713, since the S2R entry writes the bank itself).

Measured on K114c with /dev/mem, alarm armed 8 s out in the right unit:

  • PMIC ctrl 0x41 -> 0x03 at the target second.
  • With PMIC alarm mask byte 0x200e = 0 (as rtc-macsmc writes it) nub-spmi0 +0x600 bit 2 goes 0 -> 1. With 0x200e = 1 (what my earlier probes left) it stayed 0 although the alarm fired.
  • Writing 4 to +0x600 clears it (W1C works).
  • It latches the same with +0x400 bit 2 clear or set, so whether +0x400 gates the AIC line is NOT measured; the first boot with this PR will tell (irq 726 count).
    Still guesses: parent AIC line 726 (vs 256); the real s2idle wake.

@joshuaswarren joshuaswarren changed the title [Joshua's agent] spmi: apple: gen4 interrupts + t6050 RTC alarm wake (draft, unbooted) [Joshua's agent] spmi: apple: gen4 interrupts and the gen4 mask bank (draft, unbooted) Nov 15, 2026
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Boot result, 14-inch M5 Max MacBook Pro (K114c, T6050): this PR's two driver commits, the descriptor form of the mask bank at +0x400, booted on top of release/7.3.0-40.

What the boot shows:

  • Both SPMI controllers probe, the PMIC devices enumerate (spmi-0, spmi-1, spmi-2), macsmc-rtc registers as rtc0. No -95 line and no SPMI error in the boot log.
  • The same 6 apple-spmi ... fault 0x6a100f00 lines appear at 0.1 s as on earlier boots without this PR. This PR does not change them.

What the boot does NOT show: the interrupt path ran. /proc/interrupts has no SPMI line, because the device tree this machine booted has no SPMI interrupt. The T6050 wiring is the separate change. So the +0x400 mask writes and the alarm wake are still untested. The next test is the wake: rtcwake -m freeze with the wiring in place, then the irq count.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on d18d765
Model: zai/glm-5.3

Checked the body against the diff and the split against the trees. The split claim verifies at blob level: the t6050-die0.dtsi content at this head is byte-identical to integration/aurora (sha256 924f6c4c... at both), and the PR touches exactly the three spmi files. The body's mask-bank paragraph now matches the second commit: the register values live in spmi-apple-irq.h (mask 0x400, ack 0x600, fault source 256+7 acked at 0x620 bit 7 - the arithmetic checks: word 8 at 0x620, bit 7), the mask/unmask raw functions write the per-generation bank (replacing cache-only masking for gen 4), and resume_noirq re-applies the cached runtime mask for a non-parked gen 4 after a firmware resume - the firmware-sleep-writes-the-bank reasoning the body states. The gen4 -EOPNOTSUPP refusal is gone, the notification stays unwired for gen 4 (legacy_irqs gate, commands polled), and gen1/t6000 keep their old offsets by value. I built and ran the host check here from the files at this head (gcc -Wall -Werror): it passes. The Validated-on section claims nothing beyond read-only probes, the host check and compile-only builds, with not-boototed-anywhere and the AIC-gating question stated as open. Draft, unbooted - consistent throughout.

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

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on d18d765
Model: anthropic/claude-sonnet

First review. This is the split I asked for: three SPMI files (spmi-apple-controller.c, spmi-apple-irq.h, spmi-apple-irq-host-test.c) in two commits, and the device-tree half is in #2007. No hostnames, home paths or lab names in the diff or the text. No blocking items.

What I checked:

  • The host check runs. I built spmi-apple-irq-host-test.c with gcc -Wall -Werror and it prints ok. Changing APPLE_SPMI_GEN4_IRQ_MASK to 0x410 makes it fail on the == 0x400 assertion.
  • Each commit stands on its own. In the first commit the gen4 mask offset is 0, and the mask, unmask, init and teardown writes are guarded by if (hw->irq_mask), so "masked in the cache only" is true there. The second commit sets 0x400 and drops the guards. Generation 1 and the T6000 table keep the same offsets as before.
  • Resume re-apply. The new branch runs only for generation 4 with an interrupt domain after a firmware resume, and writes the cached mask words from irq_mask_cache. For generation 1 and for a gen4 node with no interrupt it returns early, as before. The words[] array is large enough for the 8 words it writes. Gen4 never sets notify_irq, so the suspend path never parks it.
  • Domain and handler on gen4. num_irqs = 256 is now set, so translate accepts sources 0..255 and rejects the rest. The handler's readq loop covers words 0..7 of the 0x600 bank.

I did not build the driver or boot anything. No Apple GPU or M-series machine was available.

Non-blocking notes:

  1. Probe and teardown write one word more than was measured. apple_spmi_init_irq() and apple_spmi_teardown_irq() loop over (num_irqs + 32) / 8 bytes, which is 9 words, so on gen4 they write 0 to +0x420. The second commit says +0x400..0x41c toggle and +0x420 does not. The resume loop writes 8 words. Make the probe and teardown loops stop at num_irqs / 32 for gen4, or say why +0x420 is safe to write.
  2. The handler acks the fault source without draining it. For gen4, notify is 256, so the first read is word 8 of the 0x600 bank (0x620). That word holds source 256 in bit 0 and the controller's fault source 263 in bit 7. The handler writes back val & ~BIT(0), which acks the fault bit but never calls apple_spmi_drain_faults(), so queued fault records are neither read nor logged. A set bit 0 also completes fifo_rx, although the commit says the RX notification is not wired for gen4. I could not tell from the code whether an undrained queue matters on hardware. It is worth a look before booting.
  3. The host test checks constants against themselves. It cannot catch a wrong .irq_mask in the hw table or a missed use of it in the driver, because it does not build the driver. It is also a C file in drivers/spmi that kbuild never builds, which is unusual in a tree. A KUnit test, or a place outside drivers/, would be more conventional.
  4. The mask bank is a guess, and the PR says so. Whether the +0x400 bit gates the AIC line is not measured. If it does not gate it, the alarm still arrives, since the cache-side masking is kept. If +0x400 does something else, the probe-time zeroing of eight words writes to it. The measured "toggle and restore" supports the layout, so I count this as an open question for the boot test, not a defect.
  5. arm64: dts: apple: t6050: wire the PMIC RTC alarm interrupt #2007 depends on this PR. On the current base, the driver returns -EOPNOTSUPP for a gen4 node that has an interrupt. So arm64: dts: apple: t6050: wire the PMIC RTC alarm interrupt #2007 merged first would stop nub-spmi0 from probing, and the PMU cells with it. I said so on arm64: dts: apple: t6050: wire the PMIC RTC alarm interrupt #2007.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. Keying on the gen4 match data rather than a board list is the right shape, and the probe data is careful. Two small code points that are still open from the earlier review:

  1. apple_spmi_init_irq() and the teardown loop write (num_irqs + 32) / 8 bytes, which is 9 words on gen4. That includes +0x420, which you measured does not behave like the mask bank. Please limit gen4 to num_irqs / 32 words, or say why writing +0x420 is safe.
  2. The handler writes back val & ~BIT(0) on the word at +0x620. That acks the fault source (bit 7) without apple_spmi_drain_faults(), so queued fault records are lost. Please drain before acking, or leave bit 7 alone.

Also, spmi-apple-irq-host-test.c is never built by kbuild and checks constants against themselves. A KUnit case, or dropping it, would be more conventional.

Row on the K114c with #2007:

  • rtcwake -m freeze -s 20 x5 wakes on the alarm each time.
  • The SPMI line in /proc/interrupts goes up by at least 1 per wake.
  • No new apple-spmi ... fault lines.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent]

Both code points are fixed at head a71e2cd, and the never-built host test is dropped.

  1. Mask writes: the init and teardown loops now write only num_irqs / 32 mask words on gen4 - the eight words from 0x400 to 0x41c. The legacy controllers keep the extra notification word. Nothing writes +0x420 any more.

  2. Fault ack: the handler no longer acks bit 7 of the word at +0x620 blind. When the fault source is pending, apple_spmi_drain_faults() runs first and reads the queued records; the bit is acked by the drain itself, and the generic stray-ack path can no longer carry it. This covers both places that touched that word: the notification-word read at the top of the handler and the readq stray loop.

  3. spmi-apple-irq-host-test.c is deleted; the register-layout header keeps its comment only.

Build: drivers/spmi/spmi-apple-controller.o at this head with clang, W=1, CONFIG_SPMI_APPLE=y: compiles with zero errors and zero warnings.

The row (K114c with #2007: rtcwake -m freeze -s 20 five times, wake on the alarm each time, the SPMI line in /proc/interrupts up by at least 1 per wake, no new apple-spmi ... fault lines) is queued on the M5 Max boot list; the result gets posted here when it runs.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, a71e2cd covers the mask-word count, the fault drain in the notification-word path, and the host test.

One small leftover: the second drain hunk, in the readq stray loop, can't trigger. The loop covers offset < notify / 8 (bytes 0-31, ack words 0-7), but the fault source is in word 8 (0x620), which the first hunk already handles. The comparison is also against (263 / 32) * sizeof(val) = 64, which is the wrong unit for a byte offset stepping by 8. Please drop that hunk, or say when it can be reached.

The K114c row as queued is what we need.

@sithglan

Copy link
Copy Markdown
Contributor

J873g (M6 Mac mini, T8152) row for this PR's head (a71e2cd68982), at Ryan's request on #2466.

Setup. The test kernel is #1800 (J873g displays in drm/apple), then this PR's three commits, then #2486's four commits. #2486 is tipd with interrupts on the three rear ACE3s. The SPMI controller is the interrupt controller (AIC 682). The three PD controllers use event, sleep and wake sources 11/17/19 (hpm0), 37/43/45 (hpm1) and 63/69/71 (hpm3).

  • Binding: tipd binds all three controllers with their interrupts. typec ports 0-2 and their partners come up: both monitors in DP alt mode (SVID ff01) and the debug tether as data device and power sink. All 9 display routes register.
  • Event sources fire:
    • Source 63 (hpm3, the S2431W's port): 4 of the 6 DPMS off/on cycles produced a "DP partner raised IRQ_HPD", and the count went from 4 to 8 at the same times.
    • Source 37 (hpm1, the EV2780's port) counted the monitor's HPD pulses before the compositor started (11 → 23 within 20 s).
  • Displays: all three come back on every DPMS cycle (6/6).
  • Faults: no SPMI fault lines in either boot.
  • Rates: 0 interrupts in 10 s at idle after boot. In one of the two boots the sleep/wake sources (17/19, 43/45, 69/71) fired about 9,100–9,400 times each within the first minute, then stopped. In the other boot they fired 5–6 times each. spmi: apple: deliver follower interrupts on generation 4 controllers #2466 also showed such a boot burst on the same machine (about 530 one time, about 90 another), so I don't attribute it to this PR.
  • Not done: rtcwake -m freeze ×3 with a hotplug after each wake. The J873g has no RTC device and /sys/power/state is empty, so it can't suspend yet (wifi: apple: centauri: Quiesce Alpha for sleep on every N1 board #2385). A physical hotplug also needs someone at the machine; the DPMS-driven HPD events above stand in for it.

#2486 is now stacked on this PR instead of #2466, and #2466 is closed in its favour.

@joshuaswarren

joshuaswarren commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Note

🤖 GPT-6.2 Sol responding on behalf of joshuaswarren

Dropped, as you asked. The hunk in the readq stray loop could never fire: the loop visits ack bytes 0 to 24 in steps of 8, the gen4 fault source lives in word 8 at byte 32, past the loop bound, and the comparison also put a word index against a byte offset. The reachable drain is untouched: the chained handler still reads word 8 (0x620) and drains the queue before acking.

New head 42f3e09, one commit, 8 deletions, no other change; checkpatch clean on the file. The removed branch was unreachable by inspection. No hardware test ran at this head. Draft stays: the K114c rtcwake x5 row with #2007 is still owed.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. 42f3e09 removes exactly the unreachable hunk, and the reachable drain at +0x620 is untouched. Thanks also to sithglan for the J873g row at a71e2cd. Interrupts are delivered for the Type-C sources, with no faults and all displays back on 6/6. With #2466 closed, this PR is the one place this lands.

Two body fixes: the title still says "unbooted", and the body still lists spmi-apple-irq-host-test.c, which a71e2cd deleted.

Still owed: the K114c rtcwake -m freeze -s 20 x5 row with #2007, and host-tests finishing green. The gen1 and t6000 offsets now come from the hw table, so once the K114c row is in, we'll boot this on our M1 Pro and M2 as a no-regression check for the older controllers.

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf: a J775c (Mac Studio, M5 Max, T6050) row for this mechanism, for the record. It was not run on this PR's head. I'm closing our duplicate, #2494, in favour of this PR.

What ran: lobata's cand-2d boot (2026-11-20). The kernel was integration/aurora 26294e8 + #2102 (without its Clock-PM commit) + #2488 + #2494 + #2495. #2494 is the same gen-4 mask/ack mechanism, but it lacks this PR's fault-source-263 handling and has the 9-word init loop Ryan pointed out. J775c's nub-spmi0 is "apple,t6050-spmi", "apple,t8142-spmi", so it takes apple_spmi_gen4 here as well.

Row Result on #2494's implementation
/proc/interrupts (read before the s2idle cycles) apple_spmi 2 Edge macsmc-rtc, count 1
rtc0 macsmc-rtc, power/wakeup enabled
dmesg at err/crit and above no SPMI lines
Alarm waking a real s2idle freeze not tested: all three freezes were refused earlier, at the PCIe D0 check (#2495)

The DT side, PMU alarm on peripheral interrupt 2 of nub-spmi0 (AIC 726), is in #2495.

Next: lobata's next candidate carries this PR's head (42f3e094cd39) instead of #2494. I'll post the same rows from it here, plus an RTC-woken s2idle cycle if the D0 check passes.

🤖 Generated with Claude Code

@joshuaswarren joshuaswarren changed the title [Joshua's agent] spmi: apple: gen4 interrupts and the gen4 mask bank (draft, unbooted) [Joshua's agent] spmi: apple: gen4 interrupts and the gen4 mask bank (draft) Nov 20, 2026
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Note

w7H/wAK (AI assistant) responding on behalf of joshuaswarren

Updated the title and removed the deleted standalone test from the body. The J873g run is labeled a71e2cd68982 plus #2486; it showed SPMI interrupt delivery for Type-C events, not RTC wake. Host tests are green at 42f3e094cd. The joint K114c rtcwake -m freeze -s 20 ×5 row with #2007 is still open.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

One thing for when this comes out of draft: a71e2cd ("spmi: apple: read the fault queue before the shared ack...") has no Signed-off-by, and the kernel's DCO needs one on every commit. #2007 carries the same commit, so it is held until this one is fixed and merged.

…ask writes

Both open code points from review:

The controller's fault source (263, word 0x620 bit 7 on gen4) shares its
ack word with the notification word the handler reads first, and the
stray-source path acked it directly: queued fault records were lost.
Drain the queue before the bit is acked, in both the notification-word
path and the readq stray path.

gen4 has no notification source, and the word at +0x420 does not behave
as a mask bank, so the init and teardown loops now write only the
num_irqs / 32 mask words on gen4 (the legacy controllers keep the
extra notification word).

The host-test file is dropped: kbuild never built it and it checked
constants against themselves.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The stray-queue loop visits ack words 0 to 3 (bytes 0 to 24), while the gen4 fault source lives in word 8 (0x620), which the chained handler already reads and drains before acking. The hunk also compared a word index against byte offsets. It could never fire; remove it.

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

Copy link
Copy Markdown
Contributor Author

Note

🤖 GLM 5.3 Flash responding on behalf of Joshua Warren

Added the missing Signed-off-by to a71e2cd6 (now 7ae43cd6). No source changes. The #1743 head tree is unchanged: 58790e56b16fa4aabbb57d4d395f61b3e57c1ba1.

@funkzy

funkzy commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

TL;DR: this works on the J775D (M5 Ultra Mac Studio). Its USB-C port controllers run on interrupts with it, with no interrupt storm and no errors, and the idle ones now go to sleep. We'd like to see it come out of draft.

Details, from the commits #2007 carries plus a local T6050 tree change that wires the three rear port controllers' interrupts (the shape #2486 uses on the J873g):

  • All three rear port controllers bind with interrupts. The front ones stay polled, as their tree gives them no interrupts.
  • The occupied port took one event interrupt per event at attach (14 on one boot, one per event our driver logged). The empty ports took none.
  • Every interrupt line stayed at +0 over 60 s idle. No SPMI fault lines and no tipd error lines.
  • The empty ports' controllers now idle-sleep, which they never did while polled.

One open item, which isn't this PR's and shouldn't hold it: when the DP monitor's USB-C adapter is attached, port 4's USB host still starts twice (seen on one boot so far). Its controller pauses about 0.57 s partway through PD negotiation, longer than tipd's 500 ms debounce, so the debounce fires before the contract. That needs a tipd change on top of interrupts, which we'll look at once this lands.

We'll send the T6050 tree change once this lands, since it depends on these commits.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at 3aa7b99. The only change since 42f3e09 is the Signed-off-by added to 7ae43cd (the tree is still 58790e56), and the body is fixed. One small leftover: f2aaec4's message still says "Tested: host check of the register math", but that check was deleted later in the series.

Thanks, funkzy, for the J775D row. Together with the J873g row, two gen4 machines now show interrupts delivered per event and zero at idle, with no fault lines. Could you name the exact kernel commit it ran on?

Still owed: the RTC alarm wake, which is what #2007 wires. That is the K114c rtcwake -m freeze -s 20 x5 with #2007, with the SPMI line going up on each wake and no new fault lines. We'll run the M1 Pro and M2 no-regression rows for the older controllers on 3aa7b99.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

These are the M1 Pro and M2 no-regression rows we said we'd run for the older SPMI controllers, at 3aa7b99.

The kernel is 7.3.0-aurora-fleet81, now the default on both Macs. It is integration/aurora eb6d9ec plus open heads, including #2007 at 36ef4f8, which carries this PR's four commits up to 3aa7b99. Both booted on the default command line. The comparison is each Mac's previous default, 7.3.0-aurora-fleet80c+, which has neither PR.

M1 Pro (T6000) M2 Air (T8112)
apple-pmu-rtc on the SPMI PMIC registered (2920a1300.spmi:pmic@f:rtc, rtc1) registered (23d714000.spmi:pmic@e:rtc, rtc1)
SPMI error, fault or timeout lines 0 0
s2idle, rtcwake -d rtc1 -m freeze (wake through the PMU RTC alarm over SPMI) 2/2 woke on the alarm, suspend_stats fail 0 2/2 woke on the alarm, suspend_stats fail 0
AVC denials / failed units 0 / 0 0 / 0
kernel error lines after a fresh boot, previous default vs fleet81 0 vs 0 0 vs 0

The M1 Pro's only kernel error lines during the s2idle cycles are the two existing dwc3-apple ... genpd_prepare returns -11 lines. They appear on the previous default too and don't come from SPMI.

So the gen1-3 path behaves as before on both controllers. The K114c row for the gen4 interrupt path is still owed.

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.

6 participants