Skip to content

dt-bindings: mailbox: apple,mailbox: T8152 post-office mailboxes for ANS, DCP, MTP and SEP - #2105

Open
LiamRay11 wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
LiamRay11:j804/t8152-mailboxes
Open

LiamRay11 wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
LiamRay11:j804/t8152-mailboxes

Conversation

@LiamRay11

Copy link
Copy Markdown

Summary

On T8152 (M6), the NVMe (ANS), display (DCP), keyboard/trackpad (MTP) and SEP coprocessors use windows of the same post-office block as the SMC. That block has counted FIFOs sharing one status register, and interrupt masking is left to the interrupt controller. apple,t8152-smc-mailbox already describes this register layout. This PR adds a compatible for each of these coprocessors, with apple,t8152-smc-mailbox as the fallback.

Why bindings only

The bring-up tree added four identical entries to the driver's match table, all pointing at apple_mbox_t8152_smc_hw. A fallback compatible gives the same result without a code change. If the windows ever differ, the specific compatible is still there to key on. If reviewers prefer driver match entries, or a single generic apple,t8152-po-mailbox, that is an easy change.

Changes

  • Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml: one new oneOf branch: apple,t8152-{ans,dcp,mtp,sep}-mailbox followed by apple,t8152-smc-mailbox. The existing T8152 conditions on interrupts (send-empty, recv-not-empty) apply through contains. Also adds an example.

Testing

On hardware: MacBook Pro 14-inch (M6, J804), 2026-11-16, tested by LiamRay11.

  • What ran: kernel 7.3.0 built from integration/aurora bf423bf0e with all nine J804 linux PRs merged (t8152-mailboxes, dart-gen3, dt-board, centauri, g18-fast-retire, cfg80211-stale-scan, smc, cs42l84-jack, and an NVMe PR that is not sent yet), plus retest-only device-tree changes that are not part of these PRs: SSD nodes (ANS mailbox, SART, NVMe), PCIe port 0 with the N1 Wi-Fi, the USB0 gadget console, and a read-only NVRAM partition. Those nodes were needed to reach the root filesystem and SSH.
  • Booted through aura on the installed root filesystem. A systemctl reboot from this kernel (watchdog restart) returned to the installed system.

Results for this PR:

  • The ANS mailbox node (apple,t8152-ans-mailbox, apple,t8152-smc-mailbox) bound through the fallback, with no driver match entry. NVMe ran through it: the namespaces came up, two cold reads of the same large file gave equal hashes, and a package-manager integrity check reported 0 altered files.
  • The DCP, MTP and SEP windows have no nodes in that tree, so they were not exercised on this kernel. On an earlier base with single-compatible nodes, all four windows carried traffic: NVMe, the keyboard and trackpad, and Touch ID ran through them, and the DCP driver exchanged its messages.

Checks on this base: no code change. scripts/dtc/apple-dt-check.sh (base bf423bf0e, head = this series together with j804/dt-board, j804/dart-gen3 and the J804 NVMe change): 137 Apple DTBs built at both, 0 new CHECK_DTBS warnings (8 removed: the J873g apple,t8152-pmgr/-pmgr-pwrstate ones), and dt_binding_check passes for every changed binding.

integration/aurora has since moved to 677be395b; this branch still merges into it without conflicts.

Dependencies

None. The users of these compatibles are the J804 NVMe, MTP, DCP and SEP nodes in later PRs. The ISP and PMP windows are not included: their consumers are not proposed yet.

🤖 Generated with Claude Code

…mailboxes

On T8152 the NVMe (ANS), display (DCP), keyboard and trackpad (MTP)
and SEP coprocessors talk through windows of the same post-office
block as the SMC: counted FIFOs sharing one status register, with
interrupt masking left to the interrupt controller. The register
layout is the one apple,t8152-smc-mailbox already describes.

Add a compatible per coprocessor, each with apple,t8152-smc-mailbox as
its fallback, so the existing driver match serves them without a code
change and a later difference can still be keyed on the specific
compatible.

All four carry traffic on a MacBook Pro (M6, J804), with the
single-compatible form of these nodes: NVMe, the keyboard and
trackpad, and Touch ID run through them, and the DCP driver exchanges
its messages through the DCP window.

Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

Test report, 2026-11-17: Apple Mac mini M6 (J873g/T8152, board 0x24). PR revision tested: 31fe98769029f1fbdd7e5e74e93672a372b63018.

Host validation used the combined #2105–2108/#2110–2112 series (54742c617db4 on 677be395b9d2) with Clang 22. All changed driver objects built with W=1 and no new warnings; two pre-existing DART unused-helper warnings were unchanged.

The changed mailbox binding passed dt_binding_check as part of validation of all ten changed bindings in the related series. All 137 Apple DTBs built at both base and combined head: zero new warning lines and eight removed. This is schema/DT build coverage; no new mailbox endpoint was independently exercised on hardware.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, LiamRay11. Using apple,t8152-smc-mailbox as the fallback instead of four identical match entries is the right shape, and the J804 NVMe result through the fallback is useful evidence.

One thing to sort out before this can go in: #1797 adds apple,t8152-ans-mailbox as a standalone compatible with interrupts: false, plus a driver match entry for a polled ANS mailbox that only accepts the J873g's window (drivers/soc/apple/mailbox.c:1599-1604 in that PR). The two binding hunks conflict in apple,mailbox.yaml. If both merged as they are, the J804 ANS node would match #1797's entry first and fail to probe. We have asked on #1797 to switch the J873g node to your two-compatible form with its interrupts and to drop the polled entry. Nothing needs to change here, but please keep an eye on that thread in case its binding changes in a way that touches this one.

The binding has no code of its own, so the remaining row is for the windows that have not run on this base yet:

  • J804, MTP node as "apple,t8152-mtp-mailbox", "apple,t8152-smc-mailbox" (with the MTP DT nodes): evtest on the keyboard and trackpad devices shows key, multitouch and Force Touch click events, with no mailbox errors in dmesg.
  • If you have the DCP or SEP nodes: the DCP brings up the internal panel, and the SEP endpoints start.

After that we will run a no-regression row for the shared mailbox driver on our A18 Pro (Neo) and M4 Pro.

sithglan pushed a commit to sithglan/aurora-linux that referenced this pull request Nov 19, 2026
…mailboxes

On T8152 the NVMe (ANS), display (DCP), keyboard and trackpad (MTP)
and SEP coprocessors talk through windows of the same post-office
block as the SMC: counted FIFOs sharing one status register, with
interrupt masking left to the interrupt controller. The register
layout is the one apple,t8152-smc-mailbox already describes.

Add a compatible per coprocessor, each with apple,t8152-smc-mailbox as
its fallback, so the existing driver match serves them without a code
change and a later difference can still be keyed on the specific
compatible.

All four carry traffic on a MacBook Pro (M6, J804), with the
single-compatible form of these nodes: NVMe, the keyboard and
trackpad, and Touch ID run through them, and the DCP driver exchanges
its messages through the DCP window.

Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Thomas: taken from aurora-silicon#2105 for the J873g ANS node;
 placed before the T8152 ASCWrap v8 entry this branch adds]
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan

Copy link
Copy Markdown
Contributor

For the overlap with #1797: as of fad2b80d3dd1 it describes the J873g ANS node as "apple,t8152-ans-mailbox", "apple,t8152-smc-mailbox" with the send-empty/recv-not-empty pair (302, 262), and it no longer has the standalone binding entry or the polled driver profile. Your binding commit is in that branch unchanged, with the T8152 ASCWrap v8 entry placed after it, so the two merge cleanly whichever lands first. Nothing needs to change here.

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