Skip to content

soc: apple: select T6030 interrupt, GPIO and ANS sleep profiles - #3805

Merged
DjDeveloperr merged 2 commits into
mainfrom
feat/t6030-core-s2r-hooks
Dec 2, 2026
Merged

DjDeveloperr merged 2 commits into
mainfrom
feat/t6030-core-s2r-hooks

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

What: Apply the firmware suspend AIC3 profile, uncached GPIO profile, and warm ANS3 policy to the T6030 controllers already named in the device tree. Document the ANS3 compatible and keep the existing T8103 fallback.

Tested: Strict checkpatch and whitespace checks passed. Clang AArch64 built the AIC, GPIO and NVMe objects and J516s DTB. Main and this change produced the same existing NVMe thread-safety warnings. The NVMe binding passed dt-doc-validate.

J516s, integrated kernel af2647f710fd, direct-t357h-02: 89.921 s and 88.309 s suspended on the same boot, with zero new priority 0–3 kernel records in either wake window. The sleep controller reported restoring all 179 changed AP pins after both wakes. The second wake failed the RTC latch check, and the post-wake NVMe direct-read check failed.

Risk: Two-way door. The new match entries apply to T6030. The affected AIC, GPIO and ANS code is shared with other generations.

Not yet: Nothing for this PR. The J516s row with the post-wake direct NVMe read (#3805 (comment)), the J714s second-generation row (#3805 (comment)) and the independent review are posted. This is a separate prerequisite for the T6030 suspend series.

Document the T6030 ANS3 compatible already present in the M3 Pro
device tree. Keep the T8103 fallback for the shared register layout.

Signed-off-by: Diljit Singh <hey@djdev.me>
Give T6030 AIC3 the firmware suspend callback, use the uncached
Apple GPIO profile, and match the ANS3 suspend policy where the
T6030 device tree already identifies those controllers. Preserve
the existing fallback compatibles for older kernels.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr marked this pull request as ready for review December 1, 2026 17:06
@DjDeveloperr
DjDeveloperr requested review from a team as code owners December 1, 2026 17:06
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Local receipt at abcc952e81894b9c34cf8a22cd1895719f4d9657 on Linux main d148fbda6dca. Clang AArch64 built the AIC, Apple GPIO and NVMe objects and the J516s DTB.

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Merge readiness at abcc952e: not ready yet

Check Detail
CI at head ok 18 checks passed
Review ok approved by satchlj
Requested changes ok none
Hardware row at head ok comment at abcc952e
Conflicts ok none
PR text ok Risk: two-way · . The new match entries apply to T6030. The affected AIC, GPIO and ANS code is shared with other generations.
Hold no labelled hold by a maintainer

Areas: area:platform

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

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J516s (T6030, M3 Pro) hardware qualification PASS for exact head abcc952e81894b9c34cf8a22cd1895719f4d9657 (qualified unchanged inside the integrated #3818 T6030 S2R candidate e9ce12c1c2381a20e24ea1ed3ebf19a02ae7f24f, run pr3818-qual-03, 7.3.0-t6030s2r #64, boot=e8c203da-da14-410c-9946-25636a7b8481):

  • 2 consecutive same-boot zero-flag production deep-sleep cycles: resumes 0 -> 1 -> 2 (90.06s + 59.31s, NUB.SPMI0.SW3, MBSE 0x10650, 0 suspend/resume priority 0–3 kernel errors, all 5 PMU scratch regions byte-identical to stock boot).
  • Scoped verification: T6030 controller sleep profiles (SMC, SPMI, PMGR, PCIe, ANS2 NVMe: 16 MiB pre-sleep RW NVMe SHA-256 OK + 16 MiB post-wake fsync write OK, MBSE 0x10650, NUB.SPMI0.SW3 wake on both cycles).
  • Clean stock handback: verified back on stock 7.3.0 (boot=428632eb-f34e-427f-8014-cd7167d9cea1, both ESPs efab68fa..., empty grubenv, 0 failed units). Non-T6030 shared-driver peer hardware rows remain tracked separately before merge.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 1, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HOLD at abcc952e8189

The first J516s run reported a failed post-wake direct NVMe read. The later run verified a file checksum and an fsynced 16 MiB write. Its checksum read used buffered I/O. Record a successful post-wake direct read against known data to close the earlier failure, along with the requested second-generation controller receipt.

Checks and evidence

I checked the new T6030 match entries against the AIC3, uncached GPIO and ANS profiles. Existing fallback entries are preserved. The Apple build, DT and host checks passed.

@DjDeveloperr DjDeveloperr added the hold Held on purpose; skipped by the PR digest label Dec 1, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J516s hardware verification for exact head abcc952e8189:

  • Verified in merged T6030 S2R candidate (098d2b244e078adb3b5b9c23f220ef84fb76ab0a, boot f713a241-9f3e-4536-bd6d-c27ec12643b1): 2 physical deep-sleep cycles (1×30s + 1×20s, suspend_stats: success=2, fail=0).
  • Direct NVMe read (dd if=/dev/nvme0n1p7 bs=1M count=64 iflag=direct | sha256sum) passed post-resume at 1.8 GB/s (and 1.9 GB/s repeatable SHA-256 after the 600 s dark-wake soak + 3×20 s cycles on f1678207-2630-47e5-a754-9d28f813f331).
  • Stock 7.3.0 restored (boot_id=5c2faf10-ca29-4e2e-8b48-0b040cc2a613).

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J516s (M3 Pro, T6030) hardware row at abcc952e81894b9c34cf8a22cd1895719f4d9657: PASS (deterministic O_DIRECT NVMe verification).

  • Pre-sleep 32 MiB deterministic pattern file written via O_DIRECT + fsync + drop_caches (e11ab74b9505c7fb649c7a89eb4b7f06cfa0be0501dfc41467b444e34863993d).
  • After both Cycle 1 (30.80s) and Cycle 2 (46.87s) wakes (each after echo 3 > /proc/sys/vm/drop_caches): dd iflag=direct and Python os.O_DIRECT aligned reads matched e11ab74b... byte-for-byte, and fresh 16 MiB post-wake O_DIRECT write -> drop_caches -> O_DIRECT read verified (f035cb4c79f51294 / 83ca38643c539f3d) with 0 NVMe/I/O errors.
  • Verified unchanged inside integrated #3818 candidate 098d2b244e07 (7.3.0-t6030s2r #73, Image SHA-256 d3cc6ddf5e88..., boot 9d3fa896-3c56-4ac3-b39c-62d014311536, zero-flag production cmdline, real installed aurora-sep 1-32 + aurora-sep-host-state 1-2 with zero unit drop-ins): 2 consecutive physical deep-sleep cycles (30.80s + 46.87s, boot object resumes 0 -> 1 -> 2, MBSE 0x10650, NUB.SPMI0.SW3, suspend_stats: success=2 fail=0, 0 new priority 0-3 kernel errors, 0 failed systemd units, eDP-1 3456x2234 link: 1). Clean stock 7.3.0 handback verified on boot 8683f1b3-46f2-46a5-9052-eb8f921dc7c0 (both ESPs stock efab68fa..., empty grubenv, aurora-sep 1-25 0 altered files, mesa-aurora 0 altered files, 0 failed units).

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J714s (M5 Pro, T6050) second-generation peer-control S2R row at exact unchanged head abcc952e81894b9c34cf8a22cd1895719f4d9657: PASS.

Candidate: refs/aurora/m3-lead/shared-control-batch-20261202-v2 (59b414a7cbe3d97067e2b7c2d76359be8cc29af5 on main cf03d96bf209, all 13 PR heads included unchanged as merge parents).

  • Kernel: 7.3.0-m5-s2rbatch-59b414a7 (boot_id 158c330e-c583-4032-a79d-f092b07c7828, 16 SLC planes, SEP writes ENABLED, 0 GPU/MMU/DART/IOMMU/DCP/ISP/RTKit/BCM4377 faults).
  • Physical PMU RTC deep sleep/wake: rtcwake -d /dev/rtc1 -m mem -s 30 exited 0, suspend_stats 0 -> 1 (fail 0), firmware boot object resumes 0 -> 1 (AP 76 NUB.SPMI0Sw3IRQ / rtc), elapsed 30.492 s, same boot_id pre/post.
  • Handback: clean return to stock 7.3.0-m5-pr67 (boot_id 6c48d997-34de-4cbd-abe5-b8ecd12b4a7d, 13/13 slot+Stage2 hashes, 71/71 ICD hashes, pacman -Qkk mesa 0 altered).
  • Subsystem evidence: AIC 3104/4096 IRQs + Fast IPIs; 187 of 216 AP pins changed by the sleep, all put back; all 3 pinctrl devices (2881e4000, 290824000, 29c000000) bound pre/post; nvme-apple clean stop/wake (idle 0 in 16830 us); read-only O_DIRECT 4 MiB /dev/nvme0n1 read matched pre (1.5 GB/s) and post (905 MB/s) with identical SHA-256 16408deb8f02....

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at abcc952e81894b9c34cf8a22cd1895719f4d9657
Blockers: none (note: the earlier hold label conditions are now closed by the post-wake O_DIRECT J516s and J714s peer-control receipts below, so the hold label can be cleared)
Checked: no Apple material, no inappropriate model gating, default command-line compatibility, apple,nvme-ans.yaml, irq-apple-aic.c, drivers/nvme/host/apple.c, pinctrl-apple-gpio.c, hosted CI, J516s O_DIRECT and J714s peer-control hardware receipts, PR text

Evidence
  • Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml: documents apple,t6030-nvme-ans3 while keeping the apple,t8103-nvme-ans2 fallback.
  • drivers/irqchip/irq-apple-aic.c: adds aic3_t6030_info (.version = 3, .irq_cfg = AIC3_IRQ_CFG, .fast_ipi = true, .local_fast_ipi = true, .fw_suspend = true) matched on apple,t6030-aic3, preserving existing entries.
  • drivers/nvme/host/apple.c & drivers/pinctrl/pinctrl-apple-gpio.c: maps apple,t6030-nvme-ans3 to &apple_nvme_t8122_hw and apple,t6030-pinctrl to &apple_gpio_uncached_hw.
  • Hosted CI: all 18 checks passed (apple-build, dt-checks, host-tests, pr-text, readiness, KUnit plan); MERGEABLE with zero conflicts.
  • Hardware rows at exact head abcc952e8189 close both earlier hold items: J516s (T6030, #issuecomment-7331615913) passed 2 physical deep-sleep cycles with deterministic pre/post O_DIRECT + drop_caches NVMe readback and fresh post-wake O_DIRECT write/read; J714s (T6050, #issuecomment-7339035073) passed second-generation peer-control physical deep sleep with AIC, pinctrl, and O_DIRECT NVMe readback intact.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 2, 2026
@DjDeveloperr DjDeveloperr removed the hold Held on purpose; skipped by the PR digest label Dec 2, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Local CI for head abcc952e8189 on current main: no new failures.

Hosted CI last ran against a main that was 291 commits older, so I reran the affected workflow steps on pc on a merge tree.

Workflow step Command Result
apple-build make LLVM=1 W=1 modules_prepare drivers/irqchip/irq-apple-aic.o drivers/nvme/host/ drivers/pinctrl/pinctrl-apple-gpio.o drivers/soc/apple/ apple/t6030-j514s.dtb apple/t6030-j516s.dtb (defconfig + asahi.config, warm O= dir), main and merge rc 0 on both; the W=1 warning set is identical to main (the existing NVMe thread-safety warnings)
dt-checks scripts/dtc/apple-dt-check.sh main merge plus the agx binding, ADT coverage, DART power-domain and sibling-drift steps 0 new CHECK_DTBS warnings, 4 removed; apple,nvme-ans.yaml passes dt_binding_check; every step rc 0
host-tests tools/asahi/run-host-tests.py in the host-tests.yml image (ubuntu 24.04, clang 18, gcc 13, rust 1.96.0) 948/952 with #3812 in the tree. display26-tests fails because of #3812. On main + #3920 + this PR, the four failing tests pass (--jobs 2)
KUnit plan scripts/ci/apple-kunit.py plan no suite for these files

Hardware rows at this head: the J516s post-wake O_DIRECT row (#issuecomment-7331615913) and the J714s second-generation row (#issuecomment-7339035073). The hold label is cleared.

@DjDeveloperr
DjDeveloperr merged commit a61ebe1 into main Dec 2, 2026
25 of 26 checks passed
@DjDeveloperr
DjDeveloperr deleted the feat/t6030-core-s2r-hooks branch December 2, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants