Appendix · reference

GigaDevice GD25LQ128 (SPI NOR, 16 MiB)

Boot flash holding rk2aw + Megi U-Boot 2024.04.

Identity

PartGigaDevice GD25LQ128 (16 MiB / 128 Mbit, JEDEC ID 0xc8 0x60 0x18)
RoleBoot-stage SPI NOR — holds rk2aw at sector 64 and Megi U-Boot 2024.04 at sector 20480
Bus / addressspi1 (chip-select 0)
GPIO / IRQnone beyond spi1 CS
DatasheetGD25LQ128E (GigaDevice)
Pine64 wikiPinePhone Pro Hardware
Schematicsheet 5 (spi1 + boot flash)

Status — ◐ partial

The chip is physically present and U-Boot drives it just fine — stock FreeBSD’s mx25l(4) driver does not recognise the JEDEC ID, so probe fails and /dev/flash0 never attaches. The flash itself is fully populated with the working bootloader stack (flashed from postmarketOS on 2026-03-31 — see essay 02). patches/sys/dev/flash/mx25l.c.patch adds the one-line table entry; status is partial because the patch is in-tree but not yet hardware-verified on the bench. Until it boots and flashctl /dev/flash0 read 0 512 returns rk2aw bytes, falsifiable claims below remain unproven.

Driver

mx25l(4) is FreeBSD’s catch-all SPI NOR driver — despite the Macronix-flavoured name it handles Winbond, Spansion, Micron, and GigaDevice parts via a JEDEC ID lookup table. The probe sequence is RDID (0x9f) which returns three bytes: manufacturer (0xc8 for GigaDevice), memory type (0x60 for SPI NOR 1.8 V), capacity (0x18 for 128 Mbit). Without an entry in the table the driver logs an “unknown flash” error and detaches; nothing else uses the chip. After the table addition, 4 KiB sector erase plus dual-IO read should both work without further driver changes.

Open work

Parity verification

Once the patched kernel boots on the phone, the following checks prove the table entry took effect: