Skip to content

[WIP] Apple M4 (T8132) Mac mini (J773g): boot from the SSD with Ethernet, Wi-Fi/Bluetooth and the SMC - #332

Draft
techmore wants to merge 11 commits into
omacom:integration/aurorafrom
techmore:m4/j773g-boot-v3
Draft

techmore wants to merge 11 commits into
omacom:integration/aurorafrom
techmore:m4/j773g-boot-v3

Conversation

@techmore

@techmore techmore commented Nov 3, 2026 •

Copy link
Copy Markdown
  • Target: omacom/linux-aurora, base integration/aurora (2a76ae3)
  • Head: techmore:m4/j773g-boot-v3 (24f75ab), 11 commits, +403/-2, device tree and bindings only

Status: work in progress, not booted

  • Built, not booted. This branch builds (full Image modules dtbs, 0 warnings), and dtbs_check is clean on all six T8132 boards. That is a compile result, not a runtime pass: no kernel from this tree has booted on a J773g yet.
  • One boot attempt failed. An omacom Aurora kernel (7.2.11) with this series' J773g DT hung before the root filesystem on our J773g. That was v2 of this series plus the cpufreq/sensors commits; v3 differs by commits 9-11 below.
    • One attempt, on 2026-11-02. Each power-cycle into it failed the same way: no network and a black screen.
    • No logs were captured: no journal entry and an empty pstore.
    • The same stage-2 DTB booted a GravityLinux 7.1.13 kernel twice.
    • The initramfs held every module the SSD path needs, so a missing module is ruled out. The cause is not known yet.
  • Debugging is underway. Commit 9 reserves a ramoops region as an early persistent-log backend. Whether its contents survive a reboot through this boot chain is not established yet: a test marker did not survive a warm reboot under GravityLinux. Test kernels now start by kexec from the running system, with pstore and the panic options built in, so no boot files change.
  • Blocker: commits 2 and 5 are Yureka Lilian's and have no Signed-off-by from her in the history they come from (see Credit). They need her Signed-off-by, or a rewrite from the ADT, before merge.
  • Follow-ups: CPU frequency/sensors/fan and the PMP RFC are ready on top of this branch (techmore:m4/j773g-cpufreq-sensors-v3, techmore:m4/j773g-pmp-rfc-v3). They will be opened once this PR settles.

Verification (v3, 2026-11-03)

  • Base: integration/aurora 2a76ae3. The rebase from the v2 base 4fdd0fc was clean; commits 1-8 are unchanged.
  • DART aperture change (21d3646): needs no change here. It only affects consumers with their own apple,dma-range, and none of these nodes has one.
  • dtc 1.8.1: all six t8132-*.dts at every commit, 0 warnings, with avoid_unnecessary_addr_size, alias_paths, unique_unit_address, pci_device_reg and the strict name checks.
  • make CHECK_DTBS=y (dt-schema 2026.9): all six T8132 boards clean at this head. Before commits 10 and 11, the J773g PCIe node failed it.
  • dt_binding_check on the changed bindings: make dt_binding_check (dt-schema 2026.9) with DT_SCHEMA_FILES set to the 11 bindings this series changes: exit 0, and no warning or error names any of them. The only problems reported are in unrelated example files (Apple DCP, i.MX display).
  • checkpatch --strict:
    • The only errors are the missing author Signed-off-by on commits 2 and 5.
    • Warnings: the Co-Authored-By trailer form, GravityLinux commit ids in port notes, and the standard pciclass/pci14e4 PCI compatibles in existing context.
  • Build: with this series and the follow-ups on top, a full make LLVM=1 Image modules dtbs on the J773g (rust 1.93.1, the omarchy-pkgs linux-aurora config merged with asahi.config) gives exit 0 and 0 warnings. That's Image, 1917 modules and all six T8132 DTBs.

Summary

integration/aurora has t8132-j773g.dts with a RAM-only boot: CPUs, interrupts, power domains, pins, I2C and the boot framebuffer on the HDMI port. This series adds what the Mac mini needs to run an installed system: the NVMe SSD, the internal PCIe bus with Ethernet and the Wi-Fi/Bluetooth module, and the SMC (power-off, reboot, RTC, power button, and the GPIO that powers the Wi-Fi port). No driver changes: every block works with a driver and fallback compatible this tree already has (apple_nvme_t8132_hw, t602x PCIe, t8110 DART, t6000 SART, asc-mailbox-v4, t8103 SMC/SPMI). USB-C, HDMI (DCP), audio and the GPU are not part of it.

This is the M4 bring-up work invited for this repo. It is J773g-only in effect: the SoC nodes are added disabled, and the J773g board file enables them.

Layers (in commit order)

# Commit Author What it gives
1 dt-bindings: apple: Add the T8132 compatibles the Mac mini boots with Sean Dolbec apple,t8132-{dart,sart,asc-mailbox,smc,spmi,pcie}, apple,abbey-pmic with the T8122/T8140 fallbacks
2 arm64: dts: apple: t8132: Add the SMC and its mailbox Yureka Lilian (ported) SMC + GPIO controller, disabled
3 arm64: dts: apple: t8132: Add NVMe nodes Yureka Lilian (ported) ANS2, SART, ANS mailbox, disabled
4 arm64: dts: apple: t8132: Describe the NVMe controller and NVMMU windows Sean Dolbec the separate nvmmu window this tree's T8132 ANS2 code needs (ADT reg[3] 0x485cc0000)
5 arm64: dts: apple: t8132: Add the PCIe controller and its DARTs Yureka Lilian (ported) controller, 3 ports with PERST#/CLKREQ#, 3 DARTs, SoC dma-ranges
6 arm64: dts: apple: t8132: Add the nub SPMI controller Sean Dolbec the bus of the main PMU
7 arm64: dts: apple: t8132-j773g: Enable the SMC, PMU cells, reboot and RTC Sean Dolbec power-off/reboot/RTC/power button
8 arm64: dts: apple: t8132-j773g: Enable the SSD, Wi-Fi, Bluetooth and Ethernet Sean Dolbec NVMe, PCIe port 0 (BCM4388, apple,sakhalin) and port 2 (Ethernet), MAC/BD aliases for m1n1
9 arm64: dts: apple: t8132-j773g: Reserve a ramoops region Niklas Sheth (ported) a 2 MiB pstore region, intended as an early persistent-log backend (survival across a reboot through this boot chain is not established yet). From GravityLinux 877c574, with his Signed-off-by; the same region is in use on our J773g under GravityLinux
10 dt-bindings: pci: apple,pcie: Describe the three T8132 root ports Sean Dolbec T8132 gets the T8140 list (3 ports + 3 PHYs) instead of the T6020 rule's ten regions, which dtbs_check failed
11 arm64: dts: apple: t8132: Power the PCIe ports with pwren-gpios Sean Dolbec Wi-Fi port power as pwren-gpios (SMC GPIO 19), which pcie-apple drives itself, instead of a fixed regulator plus pciclass,0604 root-port compatibles; same GPIO and polarity

Credit

Commits 2, 3 and 5 are Yureka Lilian's T8132 nodes as GravityLinux gravity-m4 carries them (be925f3, 79b86cb, 9edf52c + bdafece; cherry-picks of her d7525ca925b6, 9a864cea9329, 19103645439f, c59a7a826661). They keep her authorship and date; the port changes are listed in a [sdolbec: …] note in each. Commits 2 and 5 have no Signed-off-by from Yureka in that history; they are forwarded under DCO (b) and need her Signed-off-by before merge (or a rewrite from the ADT). The NVMMU window follows KB2UKA's J713 ADT reading (Kb2uka/Omarchy-M4-Native). The board wiring in commit 8 follows Yureka's J773g PCIe description; the PMU cells in commit 7 are ours.

What was measured

On our J773g (M4, 10-core GPU, 10 Gb Ethernet), the same nodes run today under GravityLinux gravity-m4 7.1.13 with m1n1-gravity 1.6.1: root on the NVMe SSD, AQC113 Ethernet on atlantic, BCM4388 on brcmfmac/hci_bcm4377, SMC power-off (LED off) and reboot, RTC across reboots, power button events. A dtc comparison of this branch's t8132-j773g.dtb against that kernel's DTB shows the same reg, interrupts, MSI ranges, IOMMU maps, GPIOs and power domains for every node in this series. The differences are node names (mailbox@/iommu@), status properties, the added nvmmu window and the SPMI power domain.

What was not measured

  • Any boot of this tree on a J773g (see Status).
  • The nvmmu window with this tree's NVMe driver. Gravity's driver reads the NVMMU through the controller window, which is kept at 0x60000 for that reason.
  • pwren-gpios power sequencing of the Wi-Fi port with this tree's pcie-apple. Gravity powered the port through a regulator.

Merge Danger

Door: two-way. Blast radius: J773g boots. Other T8132 boards gain only disabled nodes and the SoC dma-ranges (the same line T8112, T8122 and T6030 have). On J773g, m1n1 puts this DTB into stage 2 for every kernel; it is built to keep booting GravityLinux kernels too (same compatibles, 0x60000 controller window), but the mini loses USB, DCP, audio and GPU nodes until those follow-ups land, so owners of a working mini setup should not switch stage 2 to it yet.

Follow-ups

CPU frequency, SMC sensors and fan (m4/j773g-cpufreq-sensors-v3, after this PR settles), then USB-C (ATC PHY, dwc3, the SPMI Type-C controllers, the front-port hub), DCP/HDMI, audio, and the GPU once a G16 backend is in this tree. The PMP stays an RFC (m4/j773g-pmp-rfc-v3).

🤖 Generated with Claude Code

techmore and others added 11 commits November 2, 2026 19:23
The M4 (T8132) Mac mini needs its NVMe controller, the SART, the SMC,
the SPMI controllers, the PCIe controller and their DARTs and mailboxes
before it can boot from its SSD and reach the network. Each block works
with an existing generation's driver, so add the T8132 compatibles with
the fallbacks T8122 and T8140 already use:

- apple,t8132-dart        (apple,t8110-dart)
- apple,t8132-sart        (apple,t6000-sart)
- apple,t8132-asc-mailbox (apple,asc-mailbox-v4)
- apple,t8132-smc         (apple,t8103-smc)
- apple,t8132-spmi        (apple,t8103-spmi)
- apple,t8132-pcie        (apple,t6020-pcie), next to apple,t8122-pcie
- apple,abbey-pmic        (apple,spmi-nvmem), the T8132 main PMU

A J773g runs today with these compatibles and fallbacks under
GravityLinux's gravity-m4 kernel. The DART and mailbox lines are the
same as in the open omacom/linux-aurora AsahiLinux#200 (T8132 SEP); whichever
change lands second drops them.

Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the T8132 System Management Controller and its ASC mailbox.
The SMC's GPIO controller switches the power of the PCIe Wi-Fi port and
the SMC handles power-off, reboot, the RTC and the power button, so
every T8132 board needs it before it can run from its own storage and
network. Both nodes stay disabled; a board enables them.

[sdolbec: Ported from GravityLinux gravity-m4 commit be925f3
 ("t8132 smc"), a cherry-pick of Yureka's commit d7525ca925b6 ("t8132
 smc"). Renamed mbox@ to mailbox@ and added status = "disabled", as
 t8140.dtsi does. The original commit carries no Signed-off-by; it is
 forwarded here under DCO clause (b), and Yureka's Signed-off-by should
 be added before this is merged. The J773g runs these nodes, unchanged
 apart from the status, under that kernel.]
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the T8132 ANS2 NVMe controller, its SART and its mailbox.

Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
[sdolbec: Ported from GravityLinux gravity-m4 79b86cb, a
 cherry-pick of Yureka's 9a864cea9329. Renamed mbox@ to mailbox@ and
 sart@ to iommu@ and added status = "disabled" to all three nodes, as
 t8140.dtsi does. Added the one-line description above.]
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This tree's T8132 ANS2 support (apple_nvme_t8132_hw) maps the NVMMU from
its own "nvmmu" resource and fails to probe without it. The T8132 ANS
has two windows: the ADT's /arm-io/ans reg[9] is the NVMe controller and
reg[3] is the NVMMU, the split m1n1 uses for every chip with
nvme-secure-bar. On T8132 they are at 0x4c5cc0000 and 0x485cc0000, the
same layout as T8140 (0x3cdcc0000 and 0x38dcc0000).

Add the 0x60000 NVMMU window, which holds the TCB registers at
+0x28100..+0x28120. Keep the controller window at 0x60000 rather than
the 0x28000 the linear queue registers need: GravityLinux's driver
reaches the NVMMU registers through this alias at the same offsets, and
our J773g runs from its SSD that way today. Keeping the window lets one
device tree boot both kernels, which matters while J773g owners move
between them and as a fallback while this tree is tested.

The window split follows KB2UKA's reading of the J713 ADT
(Kb2uka/Omarchy-M4-Native, "fix(dts): t8132: split M4 NVMe and NVMMU
windows"). This layout has not been booted with this tree's driver yet.

Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the T8132 internal PCIe controller, its three root ports and
the DART of each port. On the M4 machines port 0 carries the Wi-Fi and
Bluetooth module, and on the Mac mini port 2 carries the Ethernet
controller. Give the SoC bus the same dma-ranges as T8112, T8122 and
T6030 so that devices behind DARTs get DMA above 4 GiB, and include
gpio.h for the PERST# lines.

Everything stays disabled. A board enables the controller, the ports it
wires and their DARTs, and maps their requester IDs (iommu-map), because
the stream IDs differ between boards.

[sdolbec: Ported from GravityLinux gravity-m4 commit 9edf52c
 ("t8132 pcie") and commit bdafece ("t8132 wifi pwren"),
 cherry-picks of Yureka's commit 19103645439f ("t8132 pcie") and commit
 c59a7a826661 ("t8132 wifi pwren"). SoC part only; the board parts move
 to t8132-j773g.dts in a later commit. Changes: port labels pcie0_portN
 as in t8140.dtsi, status = "disabled" on the controller, its ports and
 DARTs, iommu-map left to the board, and the controller's power domain
 apcie_phy_sw instead of apcie_gp, which is what the J773g runs with
 today under gravity-m4 (changed there after these commits). The
 original commits carry no Signed-off-by; they are forwarded here under
 DCO clause (b), and Yureka's Signed-off-by should be added before this
 is merged.]
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The main PMU of the T8132 machines sits on the nub SPMI bus at
0x388714000 (macOS: nub-spmi0). Its NVMEM holds the shutdown, boot-stage
and RTC-offset cells that the SMC reboot and RTC drivers need: without
the shutdown flag, the SMC's "off1" restarts the machine instead of
powering it off.

Add the controller, disabled, with its always-on nub_spmi0 power domain
as t8140.dtsi does. Boards add the PMU and enable the bus.

Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… RTC

Enable the SMC on the Mac mini and give it the reboot and RTC children,
fed by the main PMU's (Abbey, SPMI 0xe) NVMEM cells. This gives the mini
power-off, reboot, the RTC and the power button (macsmc-input), and the
SMC GPIO that switches the Wi-Fi port's power.

The cell offsets come from this mini's macOS IORegistry: pmu-main@E
"pmu,abbey", info-leg_scrpad 0xf800, info-pm_setting 0x2001,
info-clock_offset 0x2100 (6 bytes), info-fault_shadow 0x867b (0x10),
info-scrpad_socd 0x8b00 (0x1800). The state cells sit at leg_scrpad + 1,
+ 2 and + 0xf, as on the other Apple families. These values are the
same as on the M4 MacBook Air (J713).

Tested on a J773g (2026-10-17) with the same nodes under GravityLinux's
gravity-m4 7.1.13 kernel: the PMU cells appear, macsmc-reboot and
macsmc-rtc bind, rtc0 keeps time across reboots and `systemctl poweroff`
turns the mini off (power LED off). Without the shutdown flag it
restarted instead.

Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Ethernet

Enable the internal NVMe SSD (ANS2, its SART and mailbox) and the
internal PCIe controller on the M4 Mac mini, with the BCM4388 Wi-Fi and
Bluetooth module on port 0 and the Ethernet controller on port 2. With
this the mini boots from its own SSD and reaches the network, with the
display on the boot framebuffer.

- Port 0 is powered by SMC GPIO 19 (pwren-pcie0-port0). Its Wi-Fi and
  Bluetooth functions use the "apple,sakhalin" firmware.
- Port 2 has its own DART. The requester IDs map to stream 1 of the
  port 0 and port 2 DARTs.
- The ethernet0, wifi0 and bluetooth0 aliases let m1n1 fill in the MAC
  and Bluetooth addresses and the Wi-Fi calibration.

The board wiring follows Yureka Lilian's J773g PCIe description ("t8132
pcie", picked into GravityLinux gravity-m4 as 9edf52c) and the
board-type fix in gravity-m4's current J773g tree. The ATC (USB-C) ports,
HDMI, audio, CPU frequency scaling and the GPU are not part of this
change.

A J773g runs these board nodes today under gravity-m4 7.1.13 (AQC113 on
the atlantic driver, BCM4388 on brcmfmac and hci_bcm4377, NVMe root
file system); this tree with this commit has not been booted yet.

Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Give pstore a fixed 2 MiB RAM region on the Mac mini (J773g): 1 MiB for
the kernel console, 256 KiB records and 256 KiB for pmsg. It is near the
top of RAM and outside m1n1's kernel and initramfs load area.

Without it a J773g boot that fails before the root filesystem leaves no
trace: no journal and an empty pstore. That is what a first boot of this
tree on a J773g did. With CONFIG_PSTORE_RAM and CONFIG_PSTORE_CONSOLE
built in, the console of a crashed boot can be read from
/sys/fs/pstore on the next one.

Signed-off-by: Niklas Sheth <hi@niklassheth.com>
[sdolbec: split out of GravityLinux gravity-m4 877c574 "drm/apple:
 bring up T8132 DCP hotplug" (the ramoops hunk only, unchanged values);
 the same region is in use on our J773g under GravityLinux 7.1.13]
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The T8132 (M4) controller has three root ports, each with its own PHY
register window, like the T8140: config, rc, port0-2 and phy0-2. It uses
the apple,t6020-pcie fallback, whose rule asks for four ports and four
PHY windows (ten regions), so a T8132 node with its eight regions failed
dtbs_check. Give T8132 the T8140 list and leave the other T6020-derived
controllers unchanged.

Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the Wi-Fi/Bluetooth port's power enable (SMC GPIO 19) as
pwren-gpios on the root port, as the other Apple boards in this tree do.
pcie-apple then drives it itself, with its power-on delay, before the
link comes up. Before, the J773g used a fixed regulator through the
generic PCI power-control driver, with "pciclass,0604" root-port
compatibles. Both are outside apple,pcie.yaml, so dtbs_check refused
the J773g tree.

Drop the root-port compatibles and the regulator. The GPIO, polarity
and port are unchanged.

Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techmore

techmore commented Nov 3, 2026

Copy link
Copy Markdown
Author

@yuyuyureka, hi Yureka. This draft ports two of your T8132 device-tree commits for the M4 Mac mini (J773g):

  • arm64: dts: apple: t8132: Add the SMC and its mailbox, from your d7525ca925b6 ("t8132 smc") as carried in GravityLinux gravity-m4 be925f37d4ef.
  • arm64: dts: apple: t8132: Add the PCIe controller and its DARTs, from your 19103645439f ("t8132 pcie") and c59a7a826661 ("wifi pwren"), as carried in GravityLinux 9edf52c13ea3 + bdafece9eddb.

Both keep your authorship. The changes made while porting are listed in a [sdolbec: …] note in each commit. Neither original has a Signed-off-by, so they are forwarded under DCO (b) for now, and that blocks merging.

Would you be willing to add your sign-off? A reply here with

Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>

for those two commits is enough; I'll add it to them. If you'd rather not, say so, and I'll rewrite those nodes independently from the ADT instead.

Your third commit here (Add NVMe nodes) already carries your Signed-off-by. Thank you for the T8132 work this builds on.

@techmore

techmore commented Nov 3, 2026

Copy link
Copy Markdown
Author

Status from the J773g bring-up (2026-11-03), for anyone following this draft:

  • Boots with a Gravity-shaped DT. GravityLinux's live J773g DT plus one change — the NVMe node's extra nvmmu window (reg-names = "nvme", "nvmmu", "ans", 0x485cc0000/0x60000) — boots the GravityLinux 7.1.13 kernel to userspace with NVMe on the M4 mini. The integration/aurora 7.3 kernel (19f71a142419 + the SMC change below) boots on that same DT, prints, and panics a few seconds in; the panic text has not been captured yet (no serial console on this unit yet, and the display is blanked by then). So the T8132 NVMe T8132 data path needing the nvmmu window is confirmed; what kills 7.3 shortly after is still open.
  • The J773g DT in this series still dies before the first printk when booted by either kernel through Limine (dtb_path). Not a dtc/format or size issue (decompile+recompile is byte-identical; padding to 130 KB changes nothing); PCIe/DARTs, display power domains and the built-in-DTB option are ruled out. Bisecting against the Gravity DT continues.
  • Restart path: with aurora-silicon's bounded atomic SMC write (c243a5f), a restart on the J773g can fall through macsmc_restart() to apple_wdt, and iBoot then boots macOS (panicmedic). Giving the atomic path 5 s instead of 500 ms made the restart return to Linux. This tree still has the unbounded poll, so it is not affected; I'll send the fix to aurora-silicon.

Keeping the WIP label; still waiting on Yureka's sign-off for the two ported DT commits.

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