diff mbox series

[2/3] mtd: spi-nor: Add support for spansion s25fs512s1

Message ID 20241126185834.1130949-3-va@nvidia.com
State Changes Requested
Headers show
Series Add support for S25FS512S1, and MX25U51279G | expand

Commit Message

Vishwaroop A Nov. 26, 2024, 6:58 p.m. UTC
Add support for the spansion s25fs512s1 SPI NOR flash. This device has
a 64MB size (SZ_64M), dual/quad read capabilities and apply
s25fs_s_nor_fixups to handle specific chip behavior.

Erasing, reading and writing this flash device has been validated on
the Jetson AGX Orin platform using mtd_debug and dd utilities.

Change-Id: I47ee39b33262c77a5f3601cd9f284e8291da27d5
Signed-off-by: Vishwaroop A <va@nvidia.com>
---
 drivers/mtd/spi-nor/spansion.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Pratyush Yadav Dec. 6, 2024, 3:08 p.m. UTC | #1
On Tue, Nov 26 2024, Vishwaroop A wrote:

> Add support for the spansion s25fs512s1 SPI NOR flash. This device has
> a 64MB size (SZ_64M), dual/quad read capabilities and apply
> s25fs_s_nor_fixups to handle specific chip behavior.
>
> Erasing, reading and writing this flash device has been validated on
> the Jetson AGX Orin platform using mtd_debug and dd utilities.

Please read https://docs.kernel.org/driver-api/mtd/spi-nor.html for
requirements for adding new flashes. Also, see if you even need a new
entry at all, or the generic SFDP-based driver works for you already. If
not, explain in your patch why.

Same applies to patch 3/3.
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index 2e1dd023a1aa..472773891dad 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -901,6 +901,13 @@  static const struct flash_info spansion_nor_parts[] = {
 		.size = SZ_16M,
 		.no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
 		.mfr_flags = USE_CLSR,
+	}, {
+		.id = SNOR_ID(0x01, 0x02, 0x20, 0x4d, 0x01, 0x81),
+		.name = "s25fs512s1",
+		.size = SZ_64M,
+		.no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+		.mfr_flags = USE_CLSR,
+		.fixups = &s25fs_s_nor_fixups,
 	}, {
 		.id = SNOR_ID(0x01, 0x20, 0x18, 0x4d, 0x01, 0x81),
 		.name = "s25fs128s1",