Skip to content

spi: apple-qspi: admit both J616s boot NOR parts - #724

Merged
RyanTheTide merged 1 commit into
aurora-silicon:aurora-wipfrom
jgoyvaerts:m4pro/j616s-boot-nor-both-parts
Nov 2, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:aurora-wipfrom
jgoyvaerts:m4pro/j616s-boot-nor-both-parts

Conversation

@jgoyvaerts

Copy link
Copy Markdown
Contributor

eac79241035d pinned the J616s boot NOR to c22b27, the Macronix ID macOS reports. The Mac16,7 here has a different part: RDID returns ef6517, the ID the driver already calls W25Q64, and SFDP is valid. On this Mac:

  • every NVRAM program and erase fails with -ENODEV
  • flash_status fails with error 524, because 35h is refused for the whole board even though it is an ordinary SR2 read on this part

I can't tell whether c22b27 came from a different J616s or from how macOS reports the part, so this keeps both IDs rather than swapping one for the other.

What changes

  • A board can name a second JEDEC ID, and the J616s lists W25Q64.
  • 35h is decided from the flash's own RDID, because the table no longer says which part is fitted. Macronix parts still never see it.
  • An empty second slot admits nothing, so a bus that reads zeroes stays refused.

The status checks already follow the ID read from the flash, so the Winbond part gets the Winbond checks.

Testing

On the Mac16,7, with this driver built for a kernel whose spi-apple-qspi.c matches this base, and swapped in as a module:

Without this change With this change
flash_status error 524 jedec=ef6517 sr1=00 sr2=02 sr3=60
Page 0 of /dev/mtd0 written back unchanged, read_only=N ENODEV returned 256, no fault
SHA-256 of the 1 MiB partition 203081c48a98c24e… 203081c48a98c24e…

tools/asahi/qspi-nvram-tests.py passes, also through run-host-tests.py --only qspi. It has new cases for the W25Q64 part on the J616s entry, a third ID and an empty second slot, plus two new changed-guard controls. checkpatch --strict is clean on the patch.

Not tested:

  • A physical program or erase on this part. The driver skips the program when a page is identical, so the test above stops after the ID, status and read checks. That was deliberate, because this flash holds the Mac's boot settings. The WREN, program and readback sequence is only covered by the harness here.
  • Macronix hardware. I don't have any, so that path is only covered by the harness.

🤖 Generated with Claude Code

Commit eac7924 ("spi: apple-qspi: use the J616s Macronix boot NOR ID
and registers") pinned the J616s boot NOR to c22b27, the Macronix ID macOS
reports, in place of the W25Q64 ID. Not every J616s has that part: on a
Mac16,7 RDID returns ef6517, the ID the driver already calls W25Q64, and
SFDP is valid. That Mac now fails every NVRAM program and erase with
-ENODEV. flash_status fails as well, because 35h is refused for the
whole board although it is an ordinary SR2 read on this part.

Let a board name a second JEDEC ID and list W25Q64 on the J616s. Decide
35h from the flash's own RDID, since the table no longer says which part
is fitted. An empty second slot admits nothing, so a bus that reads
zeroes stays refused. The status checks already follow the ID read from
the flash.

Fixes: eac7924 ("spi: apple-qspi: use the J616s Macronix boot NOR ID and registers")
Assisted-by: LLM
Signed-off-by: Jonathan Goyvaerts <[email protected]>
@RyanTheTide
RyanTheTide merged commit 7526e03 into aurora-silicon:aurora-wip Nov 2, 2026
notmysegv pushed a commit to notmysegv/linux that referenced this pull request Nov 4, 2026
…nto integration/aurora

Bring integration/aurora up to the aurora-wip tip 9ff2b9a. After this
merge the two branches have the same tree.

The range contains the fleet14o source c243830 (aurora-silicon#857, aurora-silicon#858, aurora-silicon#795,
aurora-silicon#859), which was promoted on all four machines on 2026-11-02 and 03, and
the merges after it: aurora-silicon#861 (apple-dcp selftest stubs for aurora-silicon#858), aurora-silicon#860
(SEP keybag in the shared xART window, the aurora-wip copy of aurora-silicon#856),
aurora-silicon#724 (J616s boot NOR, both parts), aurora-silicon#779 (ALS colour temperature ABI),
aurora-silicon#862 (J700 GD25UF16E boot NOR, the Neo bless fix), aurora-silicon#863 (J616s ANE H16
start stall), aurora-silicon#797 (T6000 DCS whole-word writes) and aurora-silicon#803 (G17 keeps
innocent clients alive across another client's recovery).

aurora-silicon#858 and aurora-silicon#860 make the same changes integration/aurora already had as
aurora-silicon#855 and aurora-silicon#856, so they merge without conflicts.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
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.

2 participants