Skip to content

Merge aurora-wip 210c8f6e into integration/aurora (J873g NVMe, 10GbE, power off, USB2, audio) - #1797

Open
sithglan wants to merge 85 commits into
aurora-silicon:integration/aurorafrom
sithglan:thomas/j873-wip-train
Open

sithglan wants to merge 85 commits into
aurora-silicon:integration/aurorafrom
sithglan:thomas/j873-wip-train

Conversation

@sithglan

@sithglan sithglan commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

This merges aurora-wip 210c8f6 into integration/aurora 0abc2f3. It's the reverse of #1210, and a normal merge commit: no rebase, no history rewrite. integration/aurora has had no aurora-wip merge since #1197 (J873g platform), so the Mac mini M6 (J873g) has no internal SSD, 10GbE, power-off or USB on integration. The J873g HDMI, CPU performance and USB3 PRs stack on this one.

Included from aurora-wip (55 commits)

PR Author What
#1197 Acelogic (commits by sithglan) J873g: ANS2 NVMe (T8152 secure register layout, SART4, ANS post-office mailbox), 10GbE on apcie port 2, SMC power off/restart, watchdog, SPMI, audio DT, T8152 ADMAC, DART apple,retain-translation
#1205 Acelogic J873g: USB 2 hosts as T8152 DWC3
#1048 Acelogic J813 audio initialization (see below)
#1039 RyanTheTide arm64: dts: apple: t604x-j614-j616: boot NOR flash supply
#1410 joshuaswarren t8152-aop-audio: T6050 match (superseded, see below)

Conflicts (15 files) and how they were resolved

  • sart: both sides added the same SART4 layout: T6050 on integration, T8152 on aurora-wip. git also auto-merged a second sart_ops_v4. I kept integration's generalised SART3 ops (paddr_reg/size_reg) and matched both compatibles. The binding describes SART4 as seen on T6050 and T8152.
  • mailbox: integration's polled providers stay, and so does its interrupt-driven receive path for the T6050 GPU mailboxes (788441e, 41c359d), which replaced their rx_poll_only flag. aurora-wip's J873 ANS post-office mailbox (rx_poll_required, j873_window) is added next to them, and its probe block goes before the polled one. It receives through the T8152 ASCWrap v8 poller.
  • nvme: integration's reset_optional replaces aurora-wip's optional_reset. Both the T6050 and T8152 tables are kept. The binding exempts both from requiring resets and power domains, and integration's apple,sleep-wake-delay-ms stays T6050-only.
  • pcie: power-domain attach and the T8152 MRRS limit are both kept.
  • admac: the T6050 display ADMAC and the T8152 layout are both kept. The T8152 descriptor id goes into the flags word, and the resume path is integration's.
  • Audio files (aop.rs, macaudio.c, t8152_aop_audio.rs, tas2764.[ch], sound Kconfig): these take integration's versions, which already carry the T8152/J873 commits and extend them for T8142 and T6050.
  • Bindings: each lists both sides' compatibles. In apple,mailbox.yaml, interrupts are required unless the mailbox is polled: integration's secure-rtbuddy-proxy, or aurora-wip's T8152 ANS mailbox, which describes none.

Testing

Refreshed on 2026-11-18 onto integration/aurora 0abc2f3 (before that on 514ae1f, 292773f and fdef45b):

  • Build: Image, modules and the J873g DTB, LLVM 22, CONFIG_KVM=y and CONFIG_ARM64_CTXR_EXECMEM=y, together with the J873g PRs stacked on this one.
  • scripts/dtc/apple-dt-check.sh against integration/aurora 0abc2f3, with the J873g PRs stacked on this one: 0 new CHECK_DTBS warnings (8 fewer), and all 21 changed bindings pass dt_binding_check.
  • Host tests: tools/asahi/run-host-tests.py: 427/427, with the stacked J873g PRs.
  • M6 hardware (macOS 27.2 stub, padded Mach-O Stage 1, Linux at EL2), at the previous base fdef45b: booted through aura's kboot (CTXR window). Together with the J873g PRs stacked on this one, that merge is the M6's default kernel, booting by itself from the ESP. The merge on 292773f booted the same way, with the three J873g PRs on it (2026-11-14). The merge on 0abc2f3 booted from the ESP on 2026-11-18 with the stacked J873g PRs plus drm/asahi: g18: J873 G18G on the macOS 27.2 (26B123) firmware #1652, arm64: errata: treat the T8152 vGIC SEIS as broken (KVM guests on the J873g, M6 Mac mini) #1794 and ASoC: apple: macaudio: run the J873 speaker under a fixed -16 dB ceiling #1862, with everything as on the default kernel; the M6 went back to its default afterwards. The root fs on the internal SSD comes up through the ANS post-office mailbox, and all 12 CPUs come online. A 6.3 GB direct read runs at 3.6 GB/s, a 1 GiB direct write reads back identical, and there are no NVMe or mailbox errors.
    • All 12 CPUs, root on the internal NVMe, 10GbE, Wi-Fi and Bluetooth.
    • Both USB2 hosts (keyboard and mouse), the AOP audio card, and power off/restart.

cc @RyanTheTide @Acelogic @DjDeveloperr @LiamRay10

sithglan and others added 30 commits November 6, 2026 11:23
The T8152 (M6) Always-On Processor differs from the T8140 one: its setup
port is not reachable from the AP, so it has one mailbox, and its audio
service uses six serializer power domains and the jack, speaker and
speaker-sense ADMAC channels.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Add the Mac mini M6 (J873) sound card.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J873 (Mac mini M6) AOP runs the same firmware generation as T8140
(EPIC v4, iBoot-loaded, started by the AP), but the T8140 "setup port"
is not reachable from the AP: mailbox 1 of the AOP's mailbox bank and the
ADT aop-exclave-mailbox both bus-error. The firmware boots without it:
RTKit protocol 12, then its "audio" EPIC service. Add apple,t8152-aop
with the T8140 configuration minus the setup port, starting every
advertised endpoint.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The Mac mini (M6, J873) speaker runs a 250-BCLK TDM frame, which the
SN012776's ratio auto-detection rejects. Describe the property that fixes
the ratio instead.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J873 (Mac mini M6) AOP runs the speaker frame at 250 BCLKs of 12 MHz.
The SN012776 cannot auto-detect that ratio and mutes with "fault: bad
TDM clock". With TAS2764_CLK_CFG (register 0x60) set to 0x30 and
TDM_CFG0 bit 6 set it accepts the frame and plays. Do that when the new
ti,bclk-ratio property names the ratio; only this one ratio is supported.

Source of the value: the register write was first seen in the macOS
SN012776 driver; it is a single register value, and its effect (no fault,
correct playback) was verified on J873 hardware. No table or code was
taken from macOS.

The field is initialised in probe, so non-OF matches keep auto-detection.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The SDOUT1 mux offers the ASP receive channels as a source, but no DAPM
route connected them, so selecting "ASP RX CH1" or "ASP RX CH2" left the
capture path without an input. The J873 and J813 AOP audio services use
it to loop the playback stream back.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
On T8152 (J873, Mac mini M6) the AOP firmware owns the audio fabric, as
on T8140. Its "audio" EPIC service offers cout/cin (the CS42L84 jack,
base-ns ADMAC TX5/RX5, MCA4) and spkr (the SN012776 speaker, TX1, MCA0).

Each service is an ASoC back-end DAI: startup attaches it, requests pw0
(which raises the audio fabric) and powers the MCA leaves, all of which
are required. pwrd starts the serializer clocks at prepare, before ASoC
unmutes the codecs: the jack codec locks its PLL to the bit clock, and
the speaker amplifier reports "bad TDM clock" whenever it runs without
one. The jack restarts its clocks on every prepare so that a stream
restarted after an underrun begins on a frame boundary; the mono speaker
(one slot per frame) keeps them running. The front-ends are dmaengine
PCMs on the base-ns channels: the jack in stereo, the speaker in mono
(its serializer runs one 32-bit slot; stereo frames play at half pitch).

The firmware's serializer configuration (property 701) is byte-identical
to the one macOS publishes, so the driver leaves it alone.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J873 (Mac mini M6) uses the T8152 AOP audio driver as its CPU
component: the CS42L84 jack on "cout" (DSP_A | IB_NF, one-BCLK sync
pulse) and one SN012776 on "spkr" (I2S, NB_IF: data sampled on the rising
edge, as macOS programs the amp).

Each AOP front-end owns the DMA channel of one serializer, so the speaker
can only be fed from the secondary front-end; the new spk_secondary_only
sets the speaker mux accordingly, and spk_dai_fmt gives the speaker link
its own format.

There is no qualified speaker protection for J873 yet (no verified sense
path, thermal model or power budget), so the speaker fails closed: it is
only enabled with please_blow_up_my_speakers. Opted in, it runs as macOS
runs it: amp gain 15 (ADT speaker-config) and no volume lock (safe_vol 0),
since there is no sense stream for a protection daemon. The jack is not
affected.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The T8142 AOP keeps its crash buffer in its own slot of its DART stream
and asks for it on endpoint 1 with that IOVA. A client without
shmem_setup refused the request, so the firmware never got its crash
buffer acknowledged.

APPLE_RTKIT_FIRMWARE_OWNED_CRASHLOG takes such a buffer as the firmware's,
without a CPU mapping, and acknowledges the request unchanged; a later
crash is reported without a log. RtKit::new_with_firmware_crashlog()
selects it at runtime, so a driver can use it for one SoC only.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The T8142 AOP (MacBook Air J813) waits for the host on a setup port, as
the T8140 one does: the ADT's aop-exclave-mailbox at 0x3d067c000 (AOP
ASC + 0x4007c000, not behind the arm-io translation). Its EPMAP announces
other service endpoints than T8140's fixed set (0x4, 0x20, 0x23 and 0x32
on J813), so take the endpoints that must get buffers from the EPMAP when
the match data says so.

The firmware places its own crash log buffer in its firmware-mapped DART
slot; accept it as the firmware's, as for G17P.

After the setup boot all AFK endpoints start, and with the audio fabric
left to the firmware (see the J813 device tree) the firmware announces
its "audio" EPIC service.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Behind an AOP the serializer feeding a capture channel is the firmware's,
and it stops in the middle of a frame whenever it likes. A capture that
stays open across such stops (the speaker V/I sense, which a protection
daemon reads for as long as it runs) then carries the partial frame
forward: every later frame is off by its words, and the samples of one
amplifier are read as another's. On the MacBook Air J813 one restart in
three slipped by one 16-bit word.

Let a client pass the frame size in bytes as a u32 in
dma_slave_config.peripheral_config. A paused cyclic capture on such a
channel resumes at the next frame boundary of its current period: the
reports completed before the pause are accounted for, the rings are
reset and the rest of the period is submitted from the aligned address,
then whole periods as before. Without a frame size nothing changes.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J813 speaker stream (ADT iop-audio-controller/audio-speaker) differs
from J873's: four SN012776 in 32-bit playback slots 0-3, and their voltage
and current sense back on the same stream's RX side (base-ns RX0) as eight
16-bit slots. Make the speaker and sense shapes per-SoC match data:
J873 keeps one playback channel; T8142 gets four, and an 8-channel S16_LE
"Speaker Sense" front-end.

The sense capture is the speaker serializer's RX, which the firmware
stops anywhere in a frame. Before every `pwrd` of the speaker, restart a
running sense capture at a frame boundary (apple-admac realignment, the
partial frame reads as zeros), so that a protection daemon that keeps it
open attributes each amplifier's voltage and current to the right one.

The sense back-end also attaches the speaker service and requests `pw0 `
at startup: its front-end requests the ADMAC channel next, and the ADMAC
only answers while the firmware holds the audio fabric up. Opening the
sense before any other stream since the AOP started (speakersafetyd at
boot) otherwise faults the bus.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
MacBook Air 13" M5 (T8142): as on J873 the AOP firmware owns the audio
fabric and the CPU component is the T8152-style AOP audio driver. The
jack is a CS42L84 on "cout", the speakers four SN012776 (one woofer and
one tweeter per side) on "spkr", with their V/I sense on the same stream.
As on the other SN012776 laptops the speaker volume stays locked until a
protection daemon (speakersafetyd) holds it.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The MacBook Air J813's three microphones are the AOP's "hpai" service
(ADT iop-audio-controller/audio-hp-mic): the firmware runs the PDM part
and delivers 48 kHz float32 frames of three channels (the ADT's
audio-hp-mic-proxy description: 12 bytes per frame) on leap-s ADMAC RX0.
There is no codec, so it gets a card of its own with one capture PCM,
named like the other AOP microphone cards (AppleJ813HPAI, "MacBook Air
J813 High-Power Audio Interface", driver aop_audio) so that the existing
UCM and DSP configurations for those apply.

As on T8140: open attaches the service and requests pw0 (which raises
the LEAP fabric), powers the LEAP leaves (leap-s ADMAC, RX0, LEAP MCA),
and only then requests the channel, whose registers fault without them.
The trigger starts the DMA and queues pwrd behind it; started earlier,
the LEAP produces into a channel nobody services. Close releases the
channel, then pw0 and the leaves.

The card exists only where the DT gives the LEAP power domains (all
three); J873 is unchanged. The dmaengine substream setup moves into a
helper shared with the ASoC front-ends.

Tested on J813: a tone from the speakers reads -44 to -49 dBFS on all
three channels, 70 dB over the quiet floor, exactly while it plays;
PipeWire picks up the card with asahi-audio's J613 beamformer graph.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
integration/aurora added the nCal boot argument and word-wise boot-argument
access to AopHwConfig. Both machine configurations keep the firmware's own
boot arguments unchanged, so set ncal to zero and leave word access off.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Every boot on the J616s logged "spi-nor spi0.0: supply vcc not found,
using dummy regulator". The M1, M2, M3, J713 and J700 trees describe the
flash's always-on PMU rail as a fixed regulator; the M4 Pro/Max tree
came later and has none. Add the same regulator and point the flash at it.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
Preserve current RTKit crashlog and GPU handling while retaining the expanded macaudio bindings and adding J813/J873 compatibles. Original audio commits and authorship are preserved.
…ation

Test whether COUT standby supplies the missing cold-boot fabric setup. A muted zero-data jack stream permitted HPAI capture and subsequent capture-only opens on J813; standby without any playback is the next hardware qualification step.

Preserve Thomas Glanzmann’s driver and adapt the T8140 DMA sync-stop pattern from Ryan Murray, also flushing queued HPAI work before DMA teardown. No LPAI buffer binding or codec unmute is performed.
…queue

Describe the T8142 microphone DMA and LEAP power domains and card names in the shared audio binding. Queue sleeping firmware power requests on system_dfl instead of the deprecated system workqueue, as directed by the runtime warning observed during hardware capture tests.
…-initialization-20261106

ASoC: apple: integrate J813 audio with first-open microphone initialization
…616-nor-vcc

arm64: dts: apple: t604x-j614-j616: Describe the boot NOR flash supply
Resolves sound/soc/apple/macaudio.c: aurora-wip added spk_dai_fmt and
spk_secondary_only (J813/J873) where integration added tweeter_hpf_granted
(speaker protection ownership); the struct keeps all three.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
…nc-20261107

Merge integration/aurora into aurora-wip (11-07)
Brings aurora-wip up to integration/aurora 068dfce: pcie-apple endpoint
reset retry (aurora-silicon#1069) and the
tools/aurora-sep PKGBUILD checksum fix
(aurora-silicon#1068).

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
…n/wip-sync-20261107b

aurora-wip <- integration/aurora 068dfce (aurora-silicon#1068, aurora-silicon#1069). Clean merge, W=1 pcie-apple.o 0 warnings on the merged tree, CI host-tests/rust-build/source pass. Merge train (MTR).
Brings aurora-wip up to the tested release branch: CTXR execmem
(aurora-silicon#985, aurora-silicon#1079), KFIX speaker sleep and resume fixes (aurora-silicon#1077, aurora-silicon#1080),
JPEG v2 (aurora-silicon#1072), Jonathan's G17 and USB work (aurora-silicon#1073-aurora-silicon#1076), brcmfmac
flowring count (aurora-silicon#1081), ANE H16 startup restart (aurora-silicon#1066) and the
Touch ID per-prompt match (aurora-silicon#904).

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
Adds the 11-07 evening batch: t8140 disabled SPI3/FPWM0/SPMI nodes
(aurora-silicon#1034), J700 CPU zones (aurora-silicon#1043), J616C fans (aurora-silicon#1092) and the thunderbolt
DP PM workqueue fix (aurora-silicon#1098).

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
…n/wip-sync-20261107c

Gate on the exact head tree 6c684e8 (buildbox): fleet22-config Image+modules+dtbs build rc=0, 0 errors, 0 warnings, 5890 modules (= fleet); run-host-tests 193/193; apple-dcp host selftests 86/86 (fleet baseline 86/86). CI host-tests/source/rust-build green. Brings aurora-wip up to integration/aurora 810b92c.
Brings aurora-wip up to fleet25: DT descriptions (aurora-silicon#1029, aurora-silicon#1030, aurora-silicon#1112),
the J715 board (aurora-silicon#1129), Stockholm NFC (aurora-silicon#1042, aurora-silicon#1136), the AV1 tile check
(aurora-silicon#1100), the M4 Max ANE profile and AVD quirk (aurora-silicon#1088, aurora-silicon#1091), boot-log
fixes (aurora-silicon#1103, aurora-silicon#1104) and the Neo ANE memory floor (aurora-silicon#1137).

Conflicts: macaudio.c and apple,macaudio.yaml, where aurora-wip's J813
and J873 entries and integration's J715 entries were added at the same
spot. Keep all of them.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
RyanTheTide and others added 6 commits November 8, 2026 21:40
The integration merge brought in two rules for the required resets and
power domains. aurora-wip had "required unless T8152", and integration
had "forbidden on T6050, else required". Together they required the
properties on T6050 nodes that must not have them, and on T8152 nodes
where they are optional. dt-checks flagged that on every T6050 board and
on J873g. Keep one rule: required unless T6050 or T8152. T6050 still
forbids them.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
Brings aurora-silicon#1211, the G17 QoS KUnit test fix.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
Brings aurora-silicon#1215, the ADT coverage fix for boards that are new to the base.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
Brings aurora-silicon#1194, which makes Touch ID wait for the first password after boot (kernel side).

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
…n/wip-sync-20261108b-mtr3

Merge train: sync aurora-wip with integration/aurora 6fee375
…silicon#1410)

The binding and the J714c device tree name the AOP audio service
"apple,t6050-aop-audio", but the driver matched only t8142 and t8152, so
that node never bound.

Add a T6050 hardware config. The J714c ADT audio-speaker stream header
(DeviceTree.j714cap) has the same layout as J813's with six amplifiers in
place of four: 6 speaker slots and 12 sense words (V, I per amplifier), at
16 bits, on slots vsense 0,4,..20 / isense 2,6,..22. J813's header has 4
slots, 8 sense words and vsense 0..12 / isense 2..14. HW_CFG_T8152 (one
amplifier, two sense words) would expose the wrong channel counts, so it is
not reused.

The sense width and the sense realignment are taken from J813's config by
analogy; they are not tested on a J714c.

Tested: builds as a module with Rust enabled (clang 19, arm64 defconfig plus
CONFIG_RUST, CONFIG_SND_SOC_APPLE_T8152_AOP_AUDIO=m); the object carries the
apple,t6050-aop-audio match string. Not tested: no J714c boot, no sound.
@sithglan

Copy link
Copy Markdown
Contributor Author

Refreshed onto integration/aurora 292773f, as @DjDeveloperr asked on #1798–#1800. The merge is now ceade2e (was a761a62), a fresh merge of the same aurora-wip 210c8f6.

  • The only conflict was drivers/soc/apple/mailbox.c. 41c359d and 788441e moved the T6050 GPU mailboxes from the rx_poll_only flag and its pollers to receiving by interrupt. That interrupt-driven receive path stays as it is.
  • J873 ANS mailbox: aurora-wip's mailbox keeps rx_poll_required and j873_window, and apple_mbox_has_rx_poller() is back to aurora-wip's is_ascwrap_v8 || rx_poll_required. That mailbox receives through the T8152 ASCWrap v8 poller, which integration left unchanged.
  • Nothing else changed in the resolution. Against integration, the merge's diff is the old one minus the rx_poll_only lines. The mailbox line in the commit message and the description is updated.

Testing, with the three J873g PRs on top:

  • Image, modules and the J873g DTB build (LLVM 22, the M6's config). The changed C files build with W=1 and no new warnings.
  • tools/asahi/run-host-tests.py: 323/323.
  • scripts/dtc/apple-dt-check.sh against 292773f: 0 new CHECK_DTBS warnings (8 fewer), and every changed binding passes dt_binding_check.
  • Not booted on the M6 at the new base yet.

@sithglan

Copy link
Copy Markdown
Contributor Author

The refreshed stack now boots on the M6. I booted this merge with #1798, #1799 and #1800 on top through aura's kboot (CTXR window):

The GPU stays off on this kernel because the macOS 27.2 G18G firmware needs #1652, which isn't in this stack. The descriptions are updated.

@sithglan

Copy link
Copy Markdown
Contributor Author

Refreshed onto integration/aurora 514ae1f, because #1963 made it conflict. The merge is now d87e41e (was ceade2e), again a merge of aurora-wip 210c8f6.

  • The only conflict was apple,nvme-ans.yaml. T6050 (M5 Pro, J714s): suspend to RAM #1963 added apple,sleep-wake-delay-ms and forbids it in the else branch of the T6050 block. This merge had removed that branch's required list, because a separate block now requires resets and power domains on everything except T6050 and T8152. The else branch now holds only the property rule, so the property stays T6050-only. The commit message and the description say so.
  • Everything else is the old resolution. Against integration, the merge's diff matches the old one line for line, apart from that binding hunk.

Testing, with the three J873g PRs on top:

  • Image, modules and the J873g DTB build (LLVM 22, the M6's config).
  • scripts/dtc/apple-dt-check.sh against 514ae1f: 0 new CHECK_DTBS warnings (8 fewer), and every changed binding passes dt_binding_check.
  • tools/asahi/run-host-tests.py: 321/321.
  • Not booted on the M6 at the new base yet.

aurora-wip carries the J873g (Mac mini M6) hardware that integration lacks:
aurora-silicon#1197 (ANS2 NVMe, 10GbE on apcie port 2, SMC power off/restart, watchdog,
SPMI, USB2 hosts, audio DT) and the T8152 ADMAC layout.

Resolutions:
- sart: both sides added the same SART4 layout (T6050 on integration, T8152
  on aurora-wip); keep integration's sart_ops_v4 and match both.
- mailbox: keep integration's polled providers and its interrupt-driven
  receive for the T6050 GPU mailboxes (788441e, 41c359d), and
  add the J873 ANS post-office mailbox (rx_poll_required, j873_window)
  next to them. It receives through the T8152 ASCWrap v8 poller.
- nvme: integration's reset_optional replaces aurora-wip's optional_reset;
  keep the T6050 and T8152 tables.
- pcie: keep power-domain attach and the T8152 MRRS limit.
- admac: keep the T6050 display ADMAC and add the T8152 layout; the
  descriptor id goes into the flags word; the resume path is integration's.
- aop.rs, macaudio.c, t8152_aop_audio.rs, tas2764.[ch], sound Kconfig:
  integration's versions, which already carry the T8152/J873 commits and
  extend them (T8142, T6050). Dropped from aurora-wip with them: aurora-silicon#1410
  (integration matches T6050 itself) and the system_dfl workqueue switch
  of ad4910c.
- bindings: list both sides' compatibles. In apple,mailbox.yaml interrupts
  are required unless the mailbox is polled: integration's
  secure-rtbuddy-proxy or aurora-wip's T8152 ANS mailbox, which describes
  none.
  In apple,nvme-ans.yaml resets and power domains are required unless
  the controller is the T6050's or the T8152's, and integration's
  apple,sleep-wake-delay-ms stays T6050-only.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan
sithglan force-pushed the thomas/j873-wip-train branch from d87e41e to bbfdefa Compare November 18, 2026 15:07
@sithglan

Copy link
Copy Markdown
Contributor Author

Refreshed onto integration/aurora 0abc2f3, because the T8142 peripheral bindings (cf92f98) made it conflict. The merge is now bbfdefa (was d87e41e), again a merge of aurora-wip 210c8f6.

  • The only conflict was apple,i2c.yaml. integration added apple,t8142-i2c where aurora-wip adds apple,t8152-i2c; both are listed, in order.
  • Everything else is the old resolution. I redid the merge as a three-way merge of the new integration onto the old merge result. Against integration, the new merge's diff matches the old one line for line.

Testing, with the J873g PRs on top (#1798, #1799, #1800, #2176, #2178 and #2139, all rebased today):

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for carrying the J873g work onto integration, and for the detailed M6 boot and NVMe results.

A few parts conflict with how we structure hardware support. We select behaviour by a hardware property, not by the machine it was tested on, and safety settings apply everywhere:

  • arch/arm64/boot/dts/apple/t8152-j873-usb.dtsi:33-38, 51-56: the new dwc3_1_dart_1 / dwc3_2_dart_1 nodes have no power-domains, and the header says the controllers' power domain is "left to the loader". Each DART needs the power domain of the block it serves, so that it is kept on and restored across suspend instead of relying on loader state.
  • drivers/soc/apple/mailbox.c:1596-1604, 1991: of_machine_is_compatible("apple,j873g") and a hard-coded j873_window = 0x316010300 in match data. The window is already the node's reg. The compatible plus reg should be enough.
  • drivers/soc/apple/mailbox.c:1985-1991: the ANS mailbox is polled in both directions because the interrupt order is not known, even though the ADT lists its interrupts. Please describe the interrupts and use them. Polling can stay as a documented fallback for a missing IRQ.

Once these are fixed, we can run a no-regression row for the shared mailbox/DART paths on our M1 Pro / M2 / M4 Pro / A18 Pro.

@RyanTheTide

Copy link
Copy Markdown
Contributor

One follow-up on the ANS mailbox point above, because it now affects #2105.

#2105 describes the T8152 ANS window as "apple,t8152-ans-mailbox", "apple,t8152-smc-mailbox" with the SMC mailbox's send-empty / recv-not-empty interrupt pair, and the J804 NVMe already runs through that node without a match entry of its own. This PR adds apple,t8152-ans-mailbox as a standalone compatible with interrupts: false, and a driver entry pointing at apple_mbox_t8152_ans_hw. If both land, the J804 node matches this PR's entry first and probe fails at drivers/soc/apple/mailbox.c:1599-1604, because the machine is not apple,j873g and the window is not 0x316010300. The two bindings also conflict textually in apple,mailbox.yaml.

The simplest shape that works for both machines:

  • J873g ANS node: compatible = "apple,t8152-ans-mailbox", "apple,t8152-smc-mailbox";, reg as now, plus the ANS interrupt pair from the ADT.
  • Drop apple_mbox_t8152_ans_hw, rx_poll_required, j873_window and the machine check. If the J873g interrupts turn out not to fire, keep polling only as a fallback when the node has no interrupts, with a comment giving the reason.
  • Take dt-bindings: mailbox: apple,mailbox: T8152 post-office mailboxes for ANS, DCP, MTP and SEP #2105's binding hunk for the compatible instead of the standalone entry.

Row for this change on the J873g, booted from the internal SSD:

  • cat /proc/interrupts | grep -i mbox before and after fio --name=r --filename=/dev/nvme0n1 --rw=randread --bs=4k --direct=1 --runtime=60 --time_based --readonly: the ANS mailbox interrupt counts increase, fio finishes with 0 errors, and dmesg shows no nvme or mailbox errors.
  • The 6 GB direct read stays at about the 3.6 GB/s you measured.

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

LiamRay11 and others added 4 commits November 19, 2026 19:21
…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>
Describe the J873g ANS post-office mailbox as the J804 does: with
apple,t8152-smc-mailbox as the fallback compatible and the window's
send-empty and recv-not-empty interrupts.

The ADT's ans node lists interrupts 302, 262, 222 and 1349 (the last is
NVMe's, nvme-interrupt-idx 3). Every post-office mailbox's list starts
with 299 + its msgbox-mailbox-num and 259 + that number, and for the SMC
(760, 759) and the DCP (304, 264) mailboxes, which run on their
interrupts on the J873g, the first is send-empty and the second
recv-not-empty.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J873g ANS node now carries apple,t8152-smc-mailbox as its fallback
and describes its interrupts, so the SMC mailbox's match data serves it
on its interrupts, as it serves the J804's. Remove the profile that
polled both directions without interrupts: its match entry, the
rx_poll_required and j873_window fields, and the machine and fixed
address check in probe.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…ilbox

The J873g ANS mailbox is now described with the apple,t8152-smc-mailbox
fallback and its interrupts. Remove the standalone, interrupt-less
apple,t8152-ans-mailbox entry and its conditions.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan

Copy link
Copy Markdown
Contributor Author

Thanks. I've reworked the ANS mailbox as you suggested. Four commits on top of the merge (head fad2b80d3dd1):

  • 17cb9963559c is LiamRay11's dt-bindings: mailbox: apple,mailbox: T8152 post-office mailboxes for ANS, DCP, MTP and SEP #2105 binding commit, taken unchanged. I placed it before this branch's apple,t8152-ascwrap-v8-mailbox entry, so the two merge cleanly whichever lands first.
  • 15d51203cf03 arm64: dts: apple: j873: describe the ANS mailbox like the J804's. The node is now "apple,t8152-ans-mailbox", "apple,t8152-smc-mailbox", with reg unchanged, interrupts = <AIC_IRQ 302 ...>, <AIC_IRQ 262 ...> and interrupt-names = "send-empty", "recv-not-empty".
  • a9b13e8bb40f soc: apple: mailbox: drop the polled T8152 ANS profile. This removes apple_mbox_t8152_ans_hw, rx_poll_required, j873_window, the apple,j873g check and the polled probe branch. Apart from the ASCWrap v8 match entry, mailbox.c is now identical to integration.
  • fad2b80d3dd1 dt-bindings: mailbox: apple,mailbox: drop the standalone T8152 ANS mailbox. This removes the standalone entry and its interrupts: false conditions.

The interrupt order comes from the ADT. The ans node lists [302, 262, 222, 1349], where 1349 is NVMe (nvme-interrupt-idx = 3). Every post-office mailbox's list starts with 299 + its msgbox-mailbox-num and then 259 + that number. The SMC ([760, 759]) and DCP ([304, 264]) mailboxes already run on their interrupts on the J873g, and in both the first entry is send-empty and the second recv-not-empty. The pair matches the one #2105 uses on the J804. One difference is still in the J873g node: it keeps the non-alias window 0x316010300, because the ADT's ans node has no msgbox-using-alias. The J804 node uses the alias window 0x316020300.

Checks: mailbox.o builds with no W=1 warnings, dt_binding_check passes for apple,mailbox.yaml, and dtbs_check on t8152-j873g.dtb shows no mailbox, ANS or NVMe findings. The J873g row has not run yet: the M6 isn't on its tether at the moment. I'll post the /proc/interrupts before/after, the fio result and the 6 GB direct-read figure as soon as it is. If the interrupts don't fire, I'll come back with the polling fallback for a node without interrupts, as you described.

The USB DART power domains aren't in this update, because they depend on two things that aren't in this base yet:

  • T8152 doesn't power the USB controllers through a pmgr-pwrstate register. The ADT gives usb-drd1 service-gates = 175 and usb-drd2 service-gates = 176, which are PMGR2 PSD services, the same kind as AVD's service 50. This base has no PSD power-domain provider. The only one is in M6/J873g: enable Kopsia hardware video decoding #2139 (pmgr-psd.c), where you've asked for a power-off path.
  • USB2 here still depends on the ATC PHY state the loader sets up, because there's no T8152 ATC PHY support in Linux yet. That support is the atc.c rework you asked for on J873g: USB3 on the front ports (T8152 ACIOPHY, M6 Mac mini) #1799. Until it exists, powering the domain off would lose the PHY setup, and nothing could restore it.

My proposal is this. First, turn #2139's provider into a generic per-service apple,t8152-psd node with a power-off path, as its own small PR that AVD (#2139), CIO (#2178) and USB can all use. Then give dwc3_1_dart, dwc3_1_dart_1 and usb1 the service-175 domain, and the drd2 three the service-176 domain. Each stays on, with a comment giving the reason, until atc.c can bring the PHY back up. Would you take the DART power domains as that follow-up instead of in this merge?

I restacked #1799, #1800 and #2176 onto the new head; their own commits are unchanged. #2178 isn't restacked yet: its ACIO mailbox commit builds on the polled profile removed here, so it gets reworked along with the other #2178 points.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the ANS rework. The shared apple,t8152-smc-mailbox path with the ADT interrupt pair, and no polled profile or machine check, resolves the mailbox point. We'll look for the J873g /proc/interrupts and fio row once the machine is back on its tether.

On the USB DART power domains, a separate follow-up is fine for the reason you give: T8152 powers these controllers through PSD services, and this base has no provider for them yet. Until then, could you add a short comment on the dwc3_*_dart* nodes saying the power domain waits on that provider, and link the follow-up here? A generic per-service PSD provider that AVD, CIO and USB share sounds right.

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.

5 participants