Repository navigation
nvme: apple: add T6040 (M4 Pro) ANS2 support - #387
Merged
RyanTheTide merged 2 commits intoOct 23, 2026
Merged
Conversation
The T6040 (M4 Pro) ANS2 controller has a separate NVMMU region like T8132, and three power domains. It cannot fall back to apple,t8132-nvme-ans2: its "nvme" register block is shorter and the linear submission queue doorbells are in the NVMMU region, so it gets its own compatible. Signed-off-by: Jonathan Goyvaerts <[email protected]> Assisted-by: LLM
The ANS2 controller of the T6040 (M4 Pro) with the 26.x firmware is the post-M4 controller of T8132 with two differences: - Its "nvme" register block ends at 0x10000. The linear submission queue doorbells (0x2490c, 0x24910) and LINEAR_SQ_CTRL (0x24908) are not in it; the doorbells are at the same offsets in the NVMMU block. With the T8132 setup the doorbell writes went past the mapping and the first admin command never reached the controller. - The firmware enables the linear submission queues itself; the driver leaves LINEAR_SQ_CTRL alone. Add an lsq_in_nvmmu hardware flag for this and an apple,t6041-nvme-ans2 entry that sets it, with the T8132 queue setup and depth. APST has never been run on this controller (the machine has always booted with it disabled), so the entry also sets NVME_QUIRK_NO_APST. The doorbell location and leaving the linear SQ enable to the firmware follow Yureka Lilian's adaptation of the Apple NVMe driver to the 26.x firmware; the separate NVMMU region this builds on is from her T8132 series. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Goyvaerts <[email protected]> Assisted-by: LLM
RyanTheTide
pushed a commit
that referenced
this pull request
Oct 23, 2026
Add the ANS2 NVMe controller with its mailbox, SART and power domains. The controller window, the ANS coprocessor and the separate NVMMU are from the J616s ADT; the three power domains are the ANS and the two APCIe system states, all on from boot. Binding: apple,t6041-nvme-ans2 from #387 ("nvme: apple: add T6040 (M4 Pro) ANS2 support"), apple,t6041-sart from the first patch of this series. Signed-off-by: Jonathan Goyvaerts <[email protected]> Assisted-by: LLM
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the 26.x firmware, the T6040 (M4 Pro) ANS2 controller is the post-M4 (T8132) controller with two differences:
This PR adds:
apple,t6041-nvme-ans2, as its own compatible (it cannot fall back to t8132), with the separate NVMMU region and three power domains.lsq_in_nvmmuhardware flag and an entry for the new compatible that sets it. The entry uses the T8132 queue setup and depth 64, plusNVME_QUIRK_NO_APST, because APST has never been run on this controller.Naming: the SoC blocks use
apple,t6041-*, after the T6041 (M4 Max) die the M4 Pro is cut from, as Apple's device tree names it (arm-io,t6041), and as Yureka Lilian's acked t604x bindings (#372) do.Hardware tested on: Apple MacBook Pro (16-inch, M4 Pro, 2024), J616s / T6040, macOS 26.x firmware, booted by our own loader with our private T6040 device tree. It has run Linux 7.3.0-m4.3 daily since 2026-10-22.
How tested: the J616s runs from this controller every day; the root filesystem is on it.
Not tested / limits:
apple,rtkit-handoffextended to the T6040, as a follow-up.Relation to #366 (T8132): #366 changes the same driver for the T8132 (
cold_reset, theapple,rtkit-handofflive session, BROKEN_FUA). Both the driver and the binding merge cleanly with #366. Once both are in:cold_reset, so it keeps the post-M4 "no PMGR reset" path;apple,rtkit-handoffstays limited to t8132/t8140 by its binding; extending it to the T6040 would be a separate patch.Dependencies: none. A T6040 device tree also needs #372.
Credits: the doorbell location and leaving the linear-SQ enable to the firmware follow Yureka Lilian's adaptation of the Apple NVMe driver to the 26.x firmware. The separate NVMMU region this builds on is from her T8132 series (Link: in the commit, https://lore.kernel.org/r/[email protected]).
Base:
integration/aurora(51cda52). Built and checked there:m4_defconfig, W=1 on nvme/host/apple.o (no warnings, same as the base),checkpatch --strictclean, and dt_binding_check of apple,nvme-ans.yaml with dtschema 2026.9.🤖 Generated with Claude Code