Repository navigation
fmc100: the SPI NAND and NOR chips u-boot-xmedia knew - #51
Conversation
OpenIPC/u-boot-xmedia stopped publishing on 2026-10-16 (#14), and OpenIPC/firmware `latest` has carried this tree's -nor/-nand builds of its SoCs since (hi3516ev200/ev300, hi3518ev300, hi3516dv200, the gk7205v200 family, gk7205v500/v510/v530). Their fmc100 ID tables lacked 36 SPI NAND and 8 SPI NOR chips the xmedia builds identified, so a camera with one of them lost its flash: a NAND U-Boot found "0 MiB", a NOR U-Boot fell back to another vendor's profile, or to "unknown", 4 MiB. SPI NAND, appended after the existing entries (the driver takes the first ID-prefix match, so they cannot shadow one above): Micron MT29F1G01ABA/ABB, MT29F2G01ABA/ABB, MT29F4G01ADAG/ABBFDWB; GigaDevice GD5F1GM7UEYIG (xmedia 6910ce1a9), GD5F1GQ4UAYIG, GD5F2GQ4UAYIG, GD5F4GQ4UAYIG, GD5F4GQ4RAYIG, GD5F4GQ4RBYIG, GD5F4GQ6RE9IG; ESMT F50L512M41A, F50L1G41A, F50L1G41LB-104YG2ME; Winbond W25N02JWZEIF, W25N02KVZEIR; Macronix MX35LF2GE4AB, MX35LF2G24AD, MX35UF4GE4AD; ATO ATO25D1GA; Paragon PN26G01A/G02A; Foresee FM25S01-DND-A-G, FM25S01A; ALLIANCE AFS1GQ4UAC/AFS2GQ4UAD; Toshiba TH58CYG3S0H; HeYangTek HYF1GQ4UAACAE, HYF2GQ4UAACAE, HYF4GQ4UAACBE; Etron EM73C044VCC-H, EM78D044VCF-H, EM78E044VCA-H, EM78F044VCA-H. Skipped as already identified by an existing entry with the same ID: GD5F2GQ4U9IGR/BYIG, XT26G01B, and the 31 chips both tables share. The read/write/erase ops the new entries use are declared with the others. SPI NOR (longest exact ID match wins, so order does not matter): S25FL256S, XT25F16BSSIGU, MT25QL256A, F25L64QA, GD25Q256, W25Q256JW-IQ, W25Q256JWFIM, W25Q512NW-IM (xmedia 31f87ca2b and later). F25L64QA used xmedia's spi_driver_f25l64q, whose fields equal spi_driver_no_qe, so it uses that. The NOR clock limits (CONFIG_FMC_SPI_NOR_*_CLK_MAX) apply to them as to every entry. Entries copied from OpenIPC/u-boot-xmedia master (bfbba0e5a); driver cores (fmc100.c, fmc100_spi_general.c, the spi_nand_info and spi_nor_info structs) match between the trees. Checked in qemu-hisilicon, the FMC's READ_ID overridden with -global hisi-fmc.nand-jedec / flash-jedec, published latest U-Boot vs this build: - SPI NAND, gk7205v200, hi3516ev300 and gk7205v500: GD5F1GM7 (0xc8 0x91, the model's default), GD5F1GQ4UAYIG (0xc8 0xf1), MT29F2G01ABA (0x2c 0x24), W25N02KV (0xef 0xaa 0x22): published "0 MiB", this build 'Name:"..."' and 128/256 MiB; W25N01GV (0xef 0xaa 0x21) 128 MiB on both. GD5F4GQ6RE9IG (0xc8 0x45), hi3516ev300 and gk7205v200: published 'Cannot found a valid SPI Nand Device', this build 'Name:"GD5F4GQ6RE9IG"'. - SPI NOR, hi3516ev300 and gk7205v200: W25Q256JW (0xef 0x60 0x19) and W25Q512NW (0xef 0x80 0x20) published "unknown" 4MB, this build 32MB / 64MB; GD25Q256 and XT25F16B published under W25Q256JVFIQ / GD25Q16ESIG, this build under their own names; W25Q128 unchanged. hi3516ev300, gk7205v200, gk7205v500 and hi3516cv300 build (NOR, NAND), within their boot areas, with no new warnings. Not run on hardware.
PR Summary by Qodofmc100: recognize SPI NAND and NOR chips from u-boot-xmedia
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. ESMT flash reads fail with quad mode off
|
OpenIPC/u-boot-xmedia stopped publishing on 2026-10-16 (u-boot-xmedia#14), and OpenIPC/firmware
latesthas carried this tree's-nor/-nandbuilds of its SoCs since: hi3516ev200/ev300, hi3518ev300, hi3516dv200, the gk7205v200 family, gk7205v500/v510/v530. Their fmc100 ID tables lacked 36 SPI NAND and 8 SPI NOR chips the xmedia builds identified, so a camera with one of them lost its flash. A NAND U-Boot reportedCannot found a valid SPI Nand Device/0 MiB; a NOR U-Boot fell back to another vendor's profile, or to "unknown" at 4 MiB.SPI NAND, appended after the existing entries (the driver takes the first ID-prefix match, so they cannot shadow one above):
GD5F2GQ4U9IGR/BYIG and XT26G01B were skipped: existing entries already identify the same IDs.
SPI NOR (longest exact ID match wins): S25FL256S, XT25F16BSSIGU, MT25QL256A, F25L64QA, GD25Q256, W25Q256JW-IQ, W25Q256JWFIM, W25Q512NW-IM. F25L64QA maps to
spi_driver_no_qe(xmedia'sspi_driver_f25l64qhas identical fields). The NOR clock limits apply as to every entry.Data only. Entries are copied from OpenIPC/u-boot-xmedia master (bfbba0e5a); the fmc100 driver cores and the
spi_nand_info/spi_nor_infostructs match between the trees.Checked in qemu-hisilicon (FMC READ_ID overridden with
-global hisi-fmc.nand-jedec/flash-jedec), the publishedlatestU-Boot vs this build:0 MiBName:"GD5F1GM7UEYIG", 128 MiB0 MiB0 MiB0 MiBhi3516ev300, gk7205v200, gk7205v500 and hi3516cv300 build (NOR and NAND). The largest NOR image is 224256 of 262144 bytes; NAND images fit the 768K boot area.
The QEMU model answers only READ_ID, so this shows identification, not reads, writes or ECC with each chip's geometry. Timings are as xmedia had them. Not run on hardware.