Repository navigation
M3 Air 15 (J615): read NVRAM from the QSPIMC NOR - #2593
RyanTheTide wants to merge 4 commits into
Conversation
…s it The probe refuses an apple,t8122-qspi controller unless the machine is the J613, so on another M3 Mac whose device tree describes the boot NOR on QSPIMC (the 15-inch Air, J615) the NOR never probes and there is no nvram device. Drop the board check. The device tree decides whether the controller exists; writes are unchanged: they still need a qualified board entry (apple_qspi_boards[]: machine, aperture, nvram window, JEDEC), so a board without one only reads, whatever its partition says. Tested on the J615 with its NOR described on QSPIMC: JEDEC ef6517 (the J613's W25Q64), the 1 MiB nvram partition reads back with an NVRAM v3 store header, asahi-bless lists the boot volumes; writes are refused. tools/asahi/qspi-nvram-tests.py passes. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The J615 includes the J613/J615 common tree, which places the NVRAM on
SPI1 as on the M1 and M2 Macs. The J615's ADT has its boot NOR on
QSPIMC instead, with nvram at 0x700000 (1 MiB), the layout
t8122-j613-qspi.dtsi describes. Probing SPI1 finds nothing
("unrecognized JEDEC id bytes: 00"), so the J615 has no nvram device
and cannot read or select its boot volume.
Include t8122-j613-qspi.dtsi in the J615 tree and keep the partition
read-only: there is no NVRAM write entry for this board. The 25G83
variant got both from its own lines, which go now that it inherits
them; its DTB is unchanged, as is the J613's.
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Looks good; approve once the row below is run on this exact tree. The change is sound. With the probe check gone (
HW row: J615, 27.2 stub, this PR on the fleet kernel with the DTB built from this tree (not fdtput), default command line. Pass: Assisted-by: LLM (Claude:Opus 5.5) |
Runtime PM was enabled only for the T8140 controller. Every other one holds its power domain on for as long as the driver is bound. On the J615, whose tree now describes the NVRAM NOR on the QSPIMC, that keeps the qspi and spi_p domains on: blank idle went from 2.8 W to 3.45 W. The runtime suspend and resume paths already restore what a gated block loses (the reset helper re-applies timing, FIFO thresholds and interrupt state; mode, divider and descriptors are set per operation). Use them for every controller whose node puts it in a power domain, instead of a per-SoC flag. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
J615 row, and a fix pushed (d7e3179..7127d73, fast-forward). Row at d7e3179. J615 production default, 7.3.0-aurora-fleet79 (integration 92fd860 plus 25 PR heads including this one; the DTB is built from the tree), Stage 2 aura main 7d8e91f8, default command line:
Regression found on the same default, fixed in 7127d73. With this tree the J615's blank idle went from 2.8 W to 3.45 W (measured by the J615 integrator). apple-qspi enabled runtime PM only for T8140, so a bound controller held the Module A/B on the same boot, no reboot (stock fleet79 module, then the fleet79 source plus 7127d73, then stock again):
NVRAM content was identical across the A/B, and Still to run.
|
|
Merge-train adversarial review (MERGETRAIN-LINUX2) at 7127d73: BLOCKERS. Not merging until the blockers below are fixed or answered; the details have file:line and a failure case. Full review#2593 M3 Air 15 (J615): read NVRAM from the QSPIMC NOR @7127d731VERDICT: BLOCKERS Blockers:
Nits:
Missing rows:
|
|
J615 row at head 7127d73 (runtime suspend for any controller in a power domain): PASS. Kernel: the fleet79 test set with this head merged in, default command line, default boot chain (tree DTB with the QSPIMC NOR), kernel-only one-shot.
Review of 7127d73: no blockers. Runtime PM is chosen by whether the node sits in a power domain ( Power: blank idle on this boot is 3.46 W, about the same as without the change. The powered-domain set now matches an earlier boot that had no QSPI node at all, so the remaining difference from older 2.8 W numbers is not QSPI. That boot also had a live USB4 link and a second sink port that the older one didn't. |
|
J713 (M4 Air, T8132) row for 7127d73. The runtime-PM change now turns on there because the QSPI controller sits in the I tested with a live module A/B/A of
Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review at live head 7127d7310c1b1c4b2e61d9885400b0ca423233f3 (CI: 2/2 green; §2 default cmdline, §4 human commit attribution/SoB, §6 naming clean).
Commits 86809d34 (dropping the J613-only probe gate) and d7e3179f (describing J615's read-only QSPIMC NVRAM) are clean, remove a §1 board gate, keep J615 writes double-blocked (read-only in DT and absent from apple_qspi_boards[]), and have a clean J615 boot + regression row.
Blockers (commit 7127d731)
-
§1 multi-Mac proof & §3 boot-NOR write safety gap (
drivers/spi/spi-apple-qspi.c:1084-1095)- Commit
7127d731turns on runtime-PM autosuspend (100 ms,:91) andps_qspipower-domain gating for every QSPIMC controller withdev->pm_domain, which now includes all M3/M4 qualified NVRAM-write boards (T8132: J713/J715/J604/J623/J624/J773g;T6041: J616s;T8122: J613-25G83). - In
apple_qspi_nvram_modify()(:720-836), sector erase (0x20) and subsequent page programs (0x02) run as separatespi_mem_exec_op()calls, each dropping its runtime PM ref (:913-914). A>100 msgap betweenMEMERASEand program will gateps_qspioff mid-bless; on resumeapple_qspi_hw_reset()->apple_qspi_init_config()(:457-458) RMWsCONFIG_48from its post-gate reset state rather than iBoot's state. If any restored state differs on T8132 or T6041, erase succeeds and verify fails (:810-812), latchingwrite_fault+read_onlyuntil reboot with an erased NVRAM sector. - Despite expanding gating to every M4 QSPIMC board, there is 0 NVRAM-write verification across
>100 msautosuspend gaps on any newly gated write board (the J713 row was read-only module A/B only) and 0 testing of any kind on T6041 (J616s, available in the lab) or J613-25G83.
- Commit
-
Disproven motivation in
7127d731commit message7127d731's commit message claims disabling QSPI gating caused J615 blank idle to rise from2.8 Wto3.45 W. Your own 11-22 J615 head test showed blank idle remained3.46 Wwith7127d731applied (the delta came from the USB4 link / second sink, not QSPI).
Path forward
- Fastest: Split
7127d731out into its own PR. With86809d34+d7e3179falone, the J615 read-only QSPIMC NVRAM fix is proven and ready oncet8122-j615(and ideallyj615-25g83/J613) stay clean. - Or keep
7127d731: Correct its commit message to drop the disproven J615 power claim, and add §1/§3/§5 rows at the live head on T8132 (J713) and T6041 (J616s) covering anaurora-bless --set-bootround trip with>100 msautosuspend gaps between erase and program, s2idle + post-resume read, genpdqspistate, and 0 SELinux AVC denials / 0 failed units / 0 new kernel errors.
Non-blocking note
- As already noted in the thread, please avoid adding a J615 entry to
apple_qspi_boards[]in the future write-enablement follow-up — qualify writes from DT properties instead of a per-machine table (§1).
Assisted-by: LLM (Gemini 4 Neon)
…main" This reverts commit 7127d73. That change turns on runtime suspend for every QSPIMC controller in a power domain, including the T8132 and T6041 boards that write NVRAM, and it has no NVRAM write row across an autosuspend gap on any of them. Its stated motivation also did not hold: the J615 blank idle stayed at 3.46 W with it applied. It moves to its own pull request, together with holding the controller powered across a whole NVRAM erase/program/verify sequence. This series stays the J615 read-only NVRAM fix it was tested as. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Took the fastest path from Dj's 11-22 review: 7127d73 is reverted on this branch (1a6e3db, fast-forward, no force push). The tree is now identical to d7e3179, so this PR is the J615 read-only NVRAM fix that the J615 row at d7e3179 covered. The runtime-suspend change has moved to its own draft, #2824:
Rows #2824 needs before review
Still open here: the J613 and J615-25G83 boots from the earlier review. Assisted-by: LLM (Claude:Opus 5.5) |
|
Review at 1a6e3db: no blockers. Both blockers from the 2026-11-22 08:47 review were against 7127d73 (runtime-PM autosuspend on every QSPIMC controller, and its power claim). 1a6e3db reverts it, and the PR's tree at 1a6e3db is byte-identical to d7e3179 ( Full reviewNet change vs integration/aurora 8b360dc (3 files, +9/-9):
Commits ( Checks
Non-blocking
Assisted-by: LLM (Claude:Opus 5.5) |
Problem
On the M3 MacBook Air 15" (J615) there is no nvram device: the J615 tree describes the NVRAM NOR on SPI1 (the M1/M2 layout), which finds nothing ("spi-nor spi0.0: unrecognized JEDEC id bytes: 00"), so asahi-bless / aurora-bless cannot even read the boot volume. The J615's ADT puts the NOR on QSPIMC (nvram at 0x700000, 1 MiB), as
t8122-j613-qspi.dtsialready describes, but only the 25G83 variants include it, and spi-apple-qspi additionally refuses any T8122 QSPIMC that is not on a J613.Change
spi: apple-qspi: drop the J613-only probe check forapple,t8122-qspi. The device tree decides whether the controller exists; writes are unchanged and still need a qualified board entry, so a board without one only reads.t8122-j615.dts: includet8122-j613-qspi.dtsiwith the nvram partition read-only (no J615 write entry exists).t8122-j615-25g83.dtsdrops its now-inherited copy; its DTB is byte-identical, as is the J613's.Testing
J615, macOS 27.2 stub, one-shot lab boot with this device tree layout and the probe check removed:
ef6517(W25Q64, the J613's part);/proc/mtdlistsnvram1 MiB, not writeable;asahi-bless --get-bootand--list-volumeswork (Macintosh HD, Aurora Fedora Remix);tools/asahi/qspi-nvram-tests.py: 27/27 pass; DTBs: J615 changes only (QSPIMC on, SPI1 off, nvram alias moved), J613 and J615-25G83 identical; driver builds; checkpatch --strict clean.Still to run
apple_qspi_boards[]entry. Until then a macOS next-boot can't be selected from Linux.Lab boot details
Kernel: J615 lab kernel (bring-up tree) with the same probe-check removal; Stage 2 DTB = the J615 tree with the same QSPIMC + read-only nvram nodes applied by fdtput. Evidence kept in the lab store (traces/kernel/20261121-j615-io-nvram); no NVRAM contents were stored.
Assisted-by: LLM (Claude:Opus 5.5)