Repository navigation
spi: apple-qspi: admit the J700 GigaDevice boot NOR - #862
Merged
Merged
Conversation
Some J700s carry a GigaDevice GD25UF16E boot NOR (RDID c8 83 15) in place of the Winbond W25Q16 the board entry names. On those Macs every NVRAM program and erase fails with -ENODEV, so asahi-bless cannot select a boot volume. The part is also 2 MiB, takes 3-byte addresses and uses the same 02h page program and 20h 4 KiB erase, so the J700 partition and mutation policy hold unchanged. Its status registers differ from Winbond: - SR1 bits 6:2 are BP4 to BP0. Winbond has SEC and TB at bits 6:5, which the Winbond check leaves as found. - SR2 bit 2 is SUS2, program suspend. It is reserved on Winbond. - SR3 has no WPS. Bit 2 there is LPE, a low-power setting. Name the part in the second JEDEC slot of the J700 entry and give GigaDevice its own status check: WIP, WEL, CMP, SUS1 and SUS2 are refused, BP2 to BP0 only where the board allows them, and BP3 and BP4 always on the J700. The check is picked from the manufacturer the flash reports. flash_status prints all three registers for GigaDevice parts too. The bit layout is from the GD25UF16E datasheet, Rev 1.0 (DS-01151). Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This was referenced 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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some J700s have a GigaDevice boot NOR. On those Macs RDID returns
c88315, but the J700 entry admits only the Winbond W25Q16 (ef6515), so every NVRAM program and erase fails with-ENODEVandaurora-blesscannot select a boot volume. This builds on #724, which added a second JEDEC slot per board.c88315is the GigaDevice GD25UF16E (1.2 V, 16 Mbit). Its datasheet (DS-01151, Rev 1.0, 9Fh table:C8 83 15) gives the same geometry as the Winbond part: 2 MiB, 3-byte addresses, 256-byte pages, 02h page program and 20h 4 KiB erase. So the J700 partition[0x24000, 0x1f4000)and the mutation policy hold unchanged. Read (03h) runs up to 40 MHz even in low-power mode, above the DT's 25 MHz, and erase and program maximums (400 ms, 4 ms) are well inside the driver's 3 s poll. The status registers do differ:SR2 bit 7 is SUS (SUS1 on GigaDevice), bit 6 is CMP, and bits 5:3 are LB on both. QE is bit 1 on both and is fixed at 1 on the GD25UF16E. Under the Winbond check a GigaDevice part with BP3 or BP4 set, or with a suspended program, would have passed.
What changes
apple_qspi_gd_status_allows_write(): WIP, WEL, CMP, SUS1 and SUS2 are refused. BP2 to BP0 are allowed only where the board allows them (0x1con the J700, where iBoot leaves BP0 over the top 64 KiB). BP3 and BP4 are refused. SRP0, SRP1, QE, LB and SR3 stay as found.apple_qspi_part_status_allows_write()picks the Winbond, Macronix or GigaDevice check from the manufacturer the flash reports.flash_statusprints all three registers for GigaDevice parts too.The kernel default is unchanged: the NOR stays read-only until root opts in. aurora-silicon/aurora-bless#2 makes
aurora-blessopen that opt-in only around its own write.Testing
tools/asahi/qspi-nvram-tests.pypasses, also throughrun-host-tests.py --only qspi. New J700 GD25UF16E cases:There are five new changed-guard controls: gd-dispatch, gd-bp34, gd-sus2, gd-cmp and j700-gd-id.
KUnit
apple-qspi-nvram-policypasses 11 of 11 under UML, with newqspi_policy_gd_statusandqspi_policy_part_statuscases.checkpatch.pl --strictis clean.On our Neo (Winbond
ef6515,jedec=ef6515 sr1=04 sr2=02 sr3=20), with fleet14o and this driver swapped in as a signed module:flash_status,read_onlyafter loadYread_only=N1360cd52...before and afteraurora-bless --set-boot 2 -y(Aurora, already the default) with Open the boot NOR only around an NVRAM write aurora-bless#2, no manual opt-inread_onlyback toY; default and next boot still AuroraNVRAM deniedorwrite faultfrom the writesAn unchanged bless still appends one record, so the partition hash after it matches the dry run rather than the pre-bless image. The GigaDevice path needs a GigaDevice Neo; see below.
Test on a GigaDevice Neo
Run this on a kernel with this change and
aurora-blessfrom aurora-silicon/aurora-bless#2. The steps take about a minute and change nothing: they set the default to the volume that is already the default.The expected results are
rc=0,MATCHES-DRY-RUN,read_onlyback atY, the same default volume, andno-qspi-faults. Ifflash_statusshows SR1 bit 5 or 6 set, or SR2 bit 2, 6 or 7 set, the write is refused withEACCESby design. Please post the line in that case.🤖 Generated with Claude Code