From nobody Thu Apr 2 22:22:19 2026 Received: from mail.unwrap.rs (mail.unwrap.rs [172.232.15.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B319A1A317D for ; Sat, 14 Feb 2026 06:22:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.232.15.166 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771050151; cv=none; b=eMC82SHtHbDxWr7XRJBFFj8tGlWxRKgEnWsl3F/Hq5Gy8E9Q2R7QwkbWrtWMU+wV+UoHns7Bp/Gbye7Z/4cJrQEVU0qOHsyka99ecZ8/AIUh8j0+DjCvMKkBWwd6IQzeKhrGtb0aAuBcQMJRHECiCSoHJbFBX8wzDuOyZgPSs3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771050151; c=relaxed/simple; bh=LboIeYlGv9US1SFFbBFLgcTvrzdmY72LxqXODpH5NAE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pDwORoeqH5EqaHGyVKY59fHqOM1FqUzgV6aCZRc32MesmHf0G7dsavT1OTsw8LDsXsIcTE4yjCv0/HAB3Txp18FrFGep82AxtVc+ffSxZE+fqYZRLuQ7dPTiWIqawlzsrPV0qK91T/DYio/4yW3dWwfNO38PfNr4fSVuwRgJlqw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=unwrap.rs; spf=pass smtp.mailfrom=unwrap.rs; arc=none smtp.client-ip=172.232.15.166 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=unwrap.rs Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unwrap.rs From: Cole Leavitt To: Tudor Ambarus , Pratyush Yadav , Michael Walle Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Cole Leavitt Subject: [PATCH] mtd: spi-nor: add support for Fudan Microelectronics FM25Q256 Date: Fri, 13 Feb 2026 23:20:02 -0700 Message-ID: <20260214062002.17862-1-cole@unwrap.rs> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for the Fudan Microelectronics FM25Q256 (JEDEC ID f7 f0 30), a 256Mbit (32MB) SPI NOR flash chip. This chip is found on Lenovo ThinkPad P16 Gen 3 (Arrow Lake-S) platforms as the SPI flash backing the UEFI firmware. The chip supports 4K sector erase, dual read, and quad read modes. Without this patch, the kernel's spi-nor driver reports: spi-nor spi0.0: unrecognized JEDEC id bytes: f7 f0 30 and refuses to create an MTD device, preventing userspace tools from accessing the flash. Signed-off-by: Cole Leavitt --- drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/spi-nor/core.c | 1 + drivers/mtd/spi-nor/core.h | 1 + drivers/mtd/spi-nor/fudan.c | 25 +++++++++++++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 drivers/mtd/spi-nor/fudan.c diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile index 5dd9c35f6b6f..2c8b9b3e08bb 100644 --- a/drivers/mtd/spi-nor/Makefile +++ b/drivers/mtd/spi-nor/Makefile @@ -5,6 +5,7 @@ spi-nor-objs +=3D atmel.o spi-nor-objs +=3D eon.o spi-nor-objs +=3D esmt.o spi-nor-objs +=3D everspin.o +spi-nor-objs +=3D fudan.o spi-nor-objs +=3D gigadevice.o spi-nor-objs +=3D intel.o spi-nor-objs +=3D issi.o diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index d3f8a78efd3b..395ff5c39883 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -1944,6 +1944,7 @@ static const struct spi_nor_manufacturer *manufacture= rs[] =3D { &spi_nor_eon, &spi_nor_esmt, &spi_nor_everspin, + &spi_nor_fudan, &spi_nor_gigadevice, &spi_nor_intel, &spi_nor_issi, diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 16b382d4f04f..be63273677c8 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -594,6 +594,7 @@ extern const struct spi_nor_manufacturer spi_nor_atmel; extern const struct spi_nor_manufacturer spi_nor_eon; extern const struct spi_nor_manufacturer spi_nor_esmt; extern const struct spi_nor_manufacturer spi_nor_everspin; +extern const struct spi_nor_manufacturer spi_nor_fudan; extern const struct spi_nor_manufacturer spi_nor_gigadevice; extern const struct spi_nor_manufacturer spi_nor_intel; extern const struct spi_nor_manufacturer spi_nor_issi; diff --git a/drivers/mtd/spi-nor/fudan.c b/drivers/mtd/spi-nor/fudan.c new file mode 100644 index 000000000000..e9a4d3ed3cd0 --- /dev/null +++ b/drivers/mtd/spi-nor/fudan.c @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Fudan Microelectronics SPI NOR flash support. + * + * JEDEC manufacturer ID 0xf7. + */ + +#include + +#include "core.h" + +static const struct flash_info fudan_nor_parts[] =3D { + { + .id =3D SNOR_ID(0xf7, 0xf0, 0x30), + .name =3D "fm25q256", + .size =3D SZ_32M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + }, +}; + +const struct spi_nor_manufacturer spi_nor_fudan =3D { + .name =3D "fudan", + .parts =3D fudan_nor_parts, + .nparts =3D ARRAY_SIZE(fudan_nor_parts), +}; base-commit: 2687c848e57820651b9f69d30c4710f4219f7dbf --=20 2.52.0