public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: Add support for XM25Q series chips.
@ 2024-09-07  6:31 Renjun Wang
  2024-09-07  9:09 ` Michael Walle
  0 siblings, 1 reply; 2+ messages in thread
From: Renjun Wang @ 2024-09-07  6:31 UTC (permalink / raw)
  To: tudor.ambarus, pratyush, mwalle, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, Renjun Wang

Add support for XM25QH32A, XM25QH64C, XM25QU64C, XM25QH128B, XM25QH128C,
XM25QU128C, XM25QH256C. These series chips are already tested on Orange
Pi boards[1].

[1]https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-rk35xx/drivers/mtd/spi-nor/xmc.c

Signed-off-by: Renjun Wang <renjunw0@foxmail.com>
---
 drivers/mtd/spi-nor/xmc.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
index d5a06054b0dd..0532d2e2f193 100644
--- a/drivers/mtd/spi-nor/xmc.c
+++ b/drivers/mtd/spi-nor/xmc.c
@@ -10,15 +10,49 @@
 
 static const struct flash_info xmc_nor_parts[] = {
 	{
+		.id = SNOR_ID(0x20, 0x70, 0x16),
+		.name = "XM25QH32A",
+		.size = SZ_4M,
+		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+	}, {
 		.id = SNOR_ID(0x20, 0x70, 0x17),
 		.name = "XM25QH64A",
 		.size = SZ_8M,
 		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+	}, {
+		.id = SNOR_ID(0x20, 0x40, 0x17),
+		.name = "XM25QH64C",
+		.size = SZ_8M,
+	}, {
+		.id = SNOR_ID(0x20, 0x41, 0x17),
+		.name = "XM25QU64C",
+		.size = SZ_8M,
+		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
 	}, {
 		.id = SNOR_ID(0x20, 0x70, 0x18),
 		.name = "XM25QH128A",
 		.size = SZ_16M,
 		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+	}, {
+		.id = SNOR_ID(0x20, 0x60, 0x18),
+		.name = "XM25QH128B",
+		.size = SZ_16M,
+		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+	}, {
+		.id = SNOR_ID(0x20, 0x40, 0x18),
+		.name = "XM25QH128C",
+		.size = SZ_16M,
+		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+	}, {
+		.id = SNOR_ID(0x20, 0x41, 0x18),
+		.name = "XM25QU128C",
+		.size = SZ_16M,
+		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+	}, {
+		.id = SNOR_ID(0x20, 0x40, 0x19),
+		.name = "XM25QH256C",
+		.size = SZ_32M,
+		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
 	},
 };
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: spi-nor: Add support for XM25Q series chips.
  2024-09-07  6:31 [PATCH] mtd: spi-nor: Add support for XM25Q series chips Renjun Wang
@ 2024-09-07  9:09 ` Michael Walle
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Walle @ 2024-09-07  9:09 UTC (permalink / raw)
  To: Renjun Wang, tudor.ambarus, pratyush, miquel.raynal, richard,
	vigneshr
  Cc: linux-mtd, linux-kernel

Hi,

On Sat Sep 7, 2024 at 8:31 AM CEST, Renjun Wang wrote:
> Add support for XM25QH32A, XM25QH64C, XM25QU64C, XM25QH128B, XM25QH128C,
> XM25QU128C, XM25QH256C. These series chips are already tested on Orange
> Pi boards[1].

I've just checked a few but they all had SFDP. Thus they don't need
an entry in the database as it is covered by the generic driver.

Also please read https://docs.kernel.org/driver-api/mtd/spi-nor.html

> [1]https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-rk35xx/drivers/mtd/spi-nor/xmc.c

That's an ancient kernel.

-michael

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-07  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07  6:31 [PATCH] mtd: spi-nor: Add support for XM25Q series chips Renjun Wang
2024-09-07  9:09 ` Michael Walle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox