Skip to content

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

Merged
Acelogic merged 88 commits into
aurora-silicon:integration/aurorafrom
sithglan:thomas/j873-wip-train
Nov 23, 2026
Merged

Acelogic merged 88 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.
  • DART power domains (2026-11-22, e9724fe): apple-dart-pd-check.py, J873g DTB against integration d1b022d: 0 new findings (left: pcie0_dart, already in the baseline). CHECK_DTBS: no messages on the new nodes. J873g, one boot of the stack head (J873g: USB4 on the rear USB-C ports through tipd and atc.c (T8152 routers, PCIe-C, M6 Mac mini) #2178 f083bd3): 0 deferred devices, all 14 DARTs bound, the four new domains on. ATC1/2_USB(_AON) read 0x3ff before and after; APCIE_SYS_GP's auto-enable is cleared (0x1f0003ff to 0x0f0003ff, still active). USB, 10GbE (1 Gb/s link, 3/3 pings) and all three displays work as on the default boot, with no DART, genpd or PMGR errors and 0 failed units.
  • 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: lease-only fixed ceiling, held only at its amp level #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

Assisted-by: LLM (Claude:Opus 5.5)

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
The J873g USB controllers and their DARTs are powered by PMGR2 PSD
services 175 (usb-drd1) and 176 (usb-drd2). Say so on the DART nodes,
and that the domain waits on the T8152 PSD provider and has to stay on
until Linux can restore the USB2 PHY setup the loader leaves.

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

Copy link
Copy Markdown
Contributor

Thanks for the J873g row. The boot handshake on AIC 262/302, fio with 0 errors, and 4.1 GB/s for the direct read cover the ANS change. Your explanation for the flat mailbox count makes sense: I/O completes on the NVMe interrupt, and the mailbox only carries RTKit control traffic.

One correction on merge order: 17cb9963 has the same diff as #2105's 31fe9876 but a different SHA, and the ASCWrap v8 entry is inserted right next to that hunk. So git merge-tree reports a conflict in apple,mailbox.yaml around line 41 in both orders. It is easy to resolve. If #2105 lands first, merging integration here and dropping 17cb9963 clears it.

What's left on this PR is the comment on the dwc3_*_dart* nodes plus the link to the PSD provider follow-up. After that we will run the shared mailbox no-regression row on our A18 Pro (Neo) and M4 Pro.

@sithglan

Copy link
Copy Markdown
Contributor Author

As you suggested, ec172bbcc1ed adds a short comment on the USB DARTs in t8152-j873-usb.dtsi: their power domain is PSD service 175 (usb-drd1) / 176 (usb-drd2), waits on the T8152 PSD provider, and has to stay on until Linux can restore the USB2 PHY setup the loader leaves.

The follow-up is #2459: a generic per-service apple,t8152-psd provider that the AVD (#2139) and the CIO services (#2178) now use, with power-off tested on the AVD. Once atc.c can bring the T8152 PHY up (#1799), the USB DARTs and controllers get services 175/176 from it. Until then they need apple,always-on. #1799, #1800, #2176 and #2178 are restacked on this head.

@sithglan

Copy link
Copy Markdown
Contributor Author

Thanks for checking the merge order; you're right that the cherry-pick keeps #2105's diff but not its SHA. If #2105 lands first, I'll merge integration here and drop 17cb9963 as you describe. The dwc3_*_dart* comment and the link to #2459 are in ec172bbcc1ed (comment above, posted after yours).

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for ec172bb and for confirming the merge order. The comment on the USB DARTs naming PSD services 175/176, with the link to the generic apple,t8152-psd provider in #2459, is what we asked for, and merging integration and dropping 17cb9963 if #2105 lands first resolves the binding conflict. The remaining step is ours: the shared mailbox no-regression row on our A18 Pro and M4 Pro, which we will post here.

@joshuaswarren

Copy link
Copy Markdown
Contributor

Heads-up from the Omarchy M+ bring-up side: we have a staged J873g (T8152) series that overlaps this PR, so posting the map now to avoid duplicate work. Happy to rebase ours onto this, drop the identical hunks, or hand you whichever pieces you prefer — how would you like to split it?

Identical to yours (we drop once this lands):

  • apple,t8152-ascwrap-v8-mailbox → smc-hw provider in mailbox.c
  • apple,t8152-sart → sart_ops_v4 match
  • Storage dts covers the same mailbox/sart/nvme node trio (node bodies differ, below)

Same hardware, different implementation — worth a call:

  • NVMe: ours is derived from our shipping m6usb kernel — has_separate_nvmmu=false, no_ioq_readback, secure_reg_layout, t8132 fallback, 3 reg windows incl. the nvmmu region; yours is the 2-window has_lsq_nvmmu model.
  • USB/dwc3: yours binds apple,t8152-dwc3 to the dwc3 core match (loader handoff); ours drives it through the dwc3-apple glue (optional reset, fixed role from dr_mode, PWRDNSCALE 0xd, no cable wait) and adds the 4 usb2phys, 8 pmgr atcN_usb domains + psd parents, and 8 per-instance dart nodes with gen3 tunables/dma-range/TLBI + power-domains across all 4 ports. Yours covers usb1/usb2, core-region-only nodes, no phys/power-domains.

Entirely ours (absent in your diff): AOP pinctrl node + pmgr domains; the two standalone piodma memcpy engines; the PHY power-domain chain (needs the genpd PSD provider).

Entirely yours (we won't touch): ethernet port2/RTL8127 + pcie2_dart, clkref, spmi/pmic, wdt, smc-reboot, fan keys, apple,retain-translation, no_inc_mrrs.

Adjacent: our dart gen3 tunables sit next to aur-2106's owned-streams work — flagging so the two don't collide.

Caveat on our side: the full-hardware path has only been exercised at graft-dtb driver level so far — a graft boot reproducibly stops at smp: Bringing up secondary CPUs (the graft dtb's timer node lacks the EL2 virt IRQ, likely a contributor), so treat ours as a proposed model pending a real-DT boot row, not proven hardware behavior.

@sithglan

Copy link
Copy Markdown
Contributor Author

@joshuaswarren thanks for the map. This is what the open J873g stack already has, so you can see where yours fits:

Piece PR Tested on the M6
ANS mailbox, SART, NVMe this PR RTKit handshake on AIC 262/302, fio with 0 errors, 4.1 GB/s direct read
PSD services as genpd power domains (apple,t8152-psd) #2459 power-off on the AVD
atc.c for T8152: front ATC2 in USB3, rear ATC0/1/3 in CIO #1799, #2178 VL822 hub at 10 Gb/s; USB4 link at 20 Gb/s
Rear ACE3s in tipd with interrupts, DP alt mode from Type-C #2486 three displays, 12/12 DPMS cycles
Gen3 DARTs: the locked display ones, cold init for ACIO/PCIe-C #1800, #2178
Gen3 TLB invalidation through the aperture #2106 (Liam)

Your "identical" list: yes, please drop those.

NVMe: I'd keep this PR's model, since it is the one that has run on the hardware. On the three differences:

  • A t8132 fallback would pick the wrong table on a kernel without the T8152 entry. T8132's has a separate NVMMU and the normal register layout. T8152 has the secure layout, and its NVMMU sits inside the nvme window.
  • The third window: on the J873g the NVMMU registers are at nvme + 0x28100, inside the 0x60000 window at 0x325cc0000, as on T8103. Which address does your third window map?
  • no_ioq_readback: there is no such flag in this tree, and the IOQ setup here ran fio with 0 errors. If it fixes a failure you have seen, could you post it? I can run it on the M6.

USB: the PHY, power and Type-C side is in the stack above. Please build on that instead of adding a second PHY power chain: atc.c's T8152 match data for the PHY, #2459 for the PSD parents, and tipd for the rear ports. What the stack doesn't have yet is the rear ports' USB data path, and that is where your dwc3 work fits:

  • dwc3-apple for T8152, with the role from tipd's role switch on the rear ports. A fixed dr_mode only suits the front hub, which has no Type-C.
  • The USB2 PHY setup the loader does today, in atc.c's T8152 data. With that, ATCn_USB_AON and PSD services 175/176 no longer have to stay always-on.
  • USB2/USB3 mode on the rear ports in atc.c, next to CIO, plus the controllers and DART instances this PR leaves out.

On top of #2178, or #2486 if you start before USB4 matters, that doesn't conflict with mine.

DART tunables: two T8152 Gen3 forms are already in flight: Liam's apple,tlbi-aperture (#2106), and the tlbi reg entry with compatible-selected cold init in #1800/#2178. This PR binds the USB DARTs as T8110, on the loader's setup. If yours need a cold Gen3 init, please build it on one of those two rather than adding a third. The two still have to converge.

Yours alone: the AOP pinctrl and the two PIODMA engines don't overlap with anything of mine.

The SMP stop: our J873g boots use maxcpus=1. The initramfs then brings the 11 spin-table secondaries up one at a time, through cpuN/hotplug/target. On the J813, starting them during boot hangs early in the same way. t8152.dtsi's timer node has all four interrupts, hyp-virt included, if you want to take it from there.

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

Copy link
Copy Markdown
Contributor Author

Rebased onto integration/aurora d1b022dc34fb (Ryan's tidy-up on #1799). The new head is 7f2d14f96a69. It's a merge of integration/aurora into this merge train, with no conflicts; the diff against integration is unchanged. The conflicts, the two host-test fixtures that needed the new fields, and the checks (461/461 host tests, W=1 builds) are listed there: #1799 (comment)

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-review of 7f2d14f: a clean merge of integration/aurora d1b022d with no conflict resolution, and the diff against integration is identical to ec172bb's. Our view stands. The shared mailbox no-regression row on A18 Pro and M4 Pro is still ours to post.

One small thing for whichever way the binding conflict goes: 17cb996 carries a Co-Authored-By: trailer for an AI tool. If #2105 lands first and that commit is dropped, this goes away. Otherwise please remove the trailer from the commit message.

Assisted-by: LLM (Claude:Opus 5.5)

@sithglan

Copy link
Copy Markdown
Contributor Author

@RyanTheTide thanks. 17cb996 is the copy of #2105's binding commit that #1797 carries, with LiamRay11's trailers as they are on #2105. If #2105 lands first, the copy goes with the next rebase. If #1797 goes first, I'll drop the Co-Authored-By: line from the copy before it merges, and say so here.

Assisted-by: LLM (Claude:Opus 5.5)

@sithglan

Copy link
Copy Markdown
Contributor Author

dt-checks failed on the new DART power-domain lint (#2261). The J873g USB DARTs (both instances of dwc3_1_dart and dwc3_2_dart) and pcie2_dart named no power domain. New commit e9724fe gives each one its engine's state:

  • USB: ATC1_USB (usb-drd1) and ATC2_USB (usb-drd2) from the ATC PMGR, as for the dwc3 DARTs on T8132. The DWC3 nodes take the same states. The ADT also gives usb-drd1/2 service-gates 175/176, but reading those PSD blocks (0x303a1af00, 0x303a1b000) takes a bus error on the J873g, so pmdomain: apple: T8152 PSD services as power domains #2459's provider can't cover them. The USB comment's pointer to pmdomain: apple: T8152 PSD services as power domains #2459 is gone. ATCn_USB and ATCn_USB_AON stay on, without auto-PM: they hold the controllers' reset and the loader's USB2 PHY setup.
  • Ethernet: APCIE_SYS_GP (child of APCIE_GP), as pcie2_dart on T8142. Both stay on, without auto-PM: iBoot leaves them on, Linux cannot redo the loader's port 2 PHY and lane setup, and APCIE_GP has no automatic state set, so auto-PM could power gate it.

Checks, J873g DTB at the new head against integration d1b022d:

  • apple-dart-pd-check.py: 0 new findings. The one left is pcie0_dart, which is already in the baseline.
  • CHECK_DTBS: the same three messages as before (GPU and GFX mailbox schemas), none on the new nodes.

J873g row, one boot of the stack head (#2178 f083bd3, kernel 7.3.0-aurora-j873-dartpd+), then back to the default kernel:

  • 0 deferred devices, all 14 DARTs bound, and genpd shows atc1_usb, atc2_usb, apcie_gp and apcie_sys_gp on.
  • PMGR registers: ATC1/2_USB and USB_AON read 0x3ff before and after. APCIE_GP is unchanged at 0x2ff. APCIE_SYS_GP goes from 0x1f0003ff to 0x0f0003ff: auto-enable is cleared and the state is still active.
  • The front hub, keyboard and receiver enumerate as on the default boot. 10GbE links at 1 Gb/s with 3/3 pings.
  • No DART, genpd or PMGR errors in the kernel log, and 0 failed units.

#1799, #1800, #2486, #2178 and #2749 are restacked on e9724fe. #1800 adds the display DARTs' domains and #2178 the ACIO DARTs'.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at e9724fe. The 60 earlier commits range-diff as =; the only change is the new DART power-domain commit, and the J873g row you posted for the stack head covers it (genpd states on, PMGR words unchanged apart from APCIE_SYS_GP's auto-enable bit, no DART/genpd errors). Our view stands.

Assisted-by: LLM (Claude:Opus 5.5)

…t DARTs

Every enabled DART must name the power state of the engine it serves
(scripts/dtc/apple-dart-pd-check.py). The J873g USB and Ethernet DARTs
named none.

USB: the controllers' state is the ATC PMGR's ATC1_USB (usb-drd1, on
atc-phy1) and ATC2_USB (usb-drd2, on atc-phy2), as for the dwc3 DARTs on
T8132. The ADT also gives usb-drd1/2 service-gates 175/176, but those PSD
service blocks take a bus error from the CPU. The loader leaves ATCn_USB
and ATCn_USB_AON on (read back as 0x3ff on J873g), and they hold the
controllers' reset and the USB2 PHY setup it did, which Linux cannot redo
yet. So all four stay on, without automatic power management. ATCn_USB
is a child of ATCn_USB_AON, as on T8132, so the order holds if that ever
changes. The DWC3 nodes take the same state as their DARTs.

Ethernet: dart-apcie2 takes APCIE_SYS_GP (child of APCIE_GP), as
pcie2_dart does on T8142. iBoot leaves both on (0x2ff and 0x1f0003ff),
and the loader's PHY and lane setup for port 2 cannot be redone by
Linux, so both stay on. APCIE_GP has no automatic state set, and
automatic power management would power gate it, so it stays off for
both.

Offsets are from the 26A434 ADT pmgr device list.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan
sithglan force-pushed the thomas/j873-wip-train branch from e9724fe to 3d6cd44 Compare November 22, 2026 14:50
@sithglan

Copy link
Copy Markdown
Contributor Author

Done: ps_atc1_usb and ps_atc2_usb now name their usb_aon state as their power domain (the amended commit 3d6cd44; DTB lint still 0 new). They don't name a common state: on the J873g ATCn_COMMON is a PSD service, which this PR does not describe yet. The ADT also lists no parents for ATCn_USB. #1799, #1800, #2486, #2178 and #2749 are restacked onto it; their own changes are unchanged.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Checked 3d6cd44. ps_atc1_usb/ps_atc2_usb now name their usb_aon state as parent, which closes the nit. Leaving COMMON out is right while it's a PSD service this PR doesn't describe. Every other commit has an identical patch-id. Approval stands. The 17cb996 Co-Authored-By trailer still needs dropping if this lands before #2105.

Assisted-by: LLM (Claude:Opus 5.5)

@Acelogic

Copy link
Copy Markdown
Member

Tested this PR on a physical Mac mini M6 (J873g / Mac18,5). I built head 3d6cd443e589 merged with public integration/aurora at da6707712e47 (tree 08e75a24df34). I booted the kernel and its J873g DTB from RAM through public aura 4a6a093d, with the affected drivers built in and no stacked PRs or DT overlays.

Hardware Result
CPU and probing All 12 CPUs online (0–11), kernel taint 0, and zero deferred probes after boot. Both ATC USB domains, their AON parents and the two APCIE domains reported on.
Internal SSD Apple NVMe came online. I read 32 MiB with direct I/O twice at offset 0 and twice at offset 128 MiB. Both pairs had matching SHA-256 hashes. The namespace stayed unmounted throughout the Linux test.
USB2 Both DWC3/xHCI controllers registered. Linux enumerated the Apple USB2 hub (05ac:800f) at 480 Mb/s.
Audio ALSA registered the J873 primary playback/capture and secondary playback devices. The CS42L84 and TAS2764 drivers bound. The kernel's speaker protection disabled the speakers on this model. Playback was untested.
Restart A Linux-initiated reboot reached the SMC's Issuing restart (phra) message and brought the same M6 back into macOS. I then booted the candidate again and confirmed a new Linux boot ID with 12 CPUs online. Full power-off was untested.
Ethernet The onboard RTL8125CP (PCI 10ec:8125) bound to r8169 and negotiated 2.5 Gb/s full duplex on the cable. DHCP returned no lease on either Linux boot, and the test host did not answer a link-local ping. macOS also saw the 2.5 Gb/s link with no IPv4 address at the time of its check. End-to-end wired traffic remains unverified. This unit has a different NIC from the RTL8127 10 GbE SKU.

All nine GitHub checks passed for the tested PR head. Locally, the 13 changed DT bindings passed validation, the J873g DTB comparison found one existing DART power-domain warning and zero new ones, and the hardware-defaults, apple-dart-range and pmgr-bus host tests passed. PCI enumeration still logged an unassigned legacy I/O BAR on the NIC and a 512-byte maximum read request. The driver bound and the memory BARs were assigned.

@sithglan, #2105 is still open. If #1797 lands first, please remove the co-author trailer from the copied binding commit 17cb9963 as agreed. The recorded tree identifies the source we tested so a message-only edit can be verified.

@sithglan
sithglan force-pushed the thomas/j873-wip-train branch from 3d6cd44 to a7907d9 Compare November 22, 2026 23:58
@sithglan

Copy link
Copy Markdown
Contributor Author

@Acelogic thanks for the row. As agreed, the Co-Authored-By: trailer is gone from the copied binding commit (17cb996 is now c96f8d5), since #1797 may land before #2105. I made a message-only edit. The new head is a7907d9 (was 3d6cd44).

  • git range-diff 3d6cd443e589~1...a7907d9ee4b8~1 shows that one removed line and nothing else. The rest of the history matches: authors, committers, dates, trees and the other messages.
  • The head tree is unchanged (e3ddac5f3a62).
  • Merged with integration/aurora da67077, it gives your recorded tree 08e75a24df34.
  • 7 commits got new hashes: the binding commit and its 6 descendants.

If #2105 lands first instead, the copy goes with the next rebase as before.

Assisted-by: LLM (Claude:Opus 5.5)

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

Approved at a7907d9: tree identical to 3d6cd44 (e3ddac5f), only the Co-Authored-By trailer removed; Acelogic's J873g row covers it.

@Acelogic

Copy link
Copy Markdown
Member

Verified wired traffic on the physical J873g with its onboard RTL8125CP (10ec:8125) connected directly to a Windows desktop. Both Ethernet adapters reported 2.5 Gb/s, and Linux reported full duplex. Windows received all five IPv6 link-local ping replies. Using the desktop’s existing wired IPv4 subnet and a temporary address on the M6, I transferred 32 MiB over TCP from the M6 to Windows and a different 32 MiB payload in the other direction. Both recipients matched the sender’s SHA-256. The Linux RX and TX error counters stayed at zero. This verifies traffic on the RTL8125CP. The RTL8127 10 GbE variant was untested here.

I also checked the commit-message cleanup on a7907d9ee4b8. The copied binding commit c96f8d562763 has the agreed trailer removed, and merging the new head onto the hardware-tested base da6707712e47 reproduces the exact tested tree 08e75a24df34. The earlier J873g hardware results apply to this revision.

@Acelogic
Acelogic merged commit daa9e2d into aurora-silicon:integration/aurora Nov 23, 2026
9 checks passed
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