linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi-nor: Add support for xt25f32b/xt25f128b
@ 2020-06-29 15:57 microcai
  2020-07-01  7:37 ` Tudor.Ambarus
  0 siblings, 1 reply; 2+ messages in thread
From: microcai @ 2020-06-29 15:57 UTC (permalink / raw)
  To: tudor.ambarus; +Cc: linux-mtd, LKML

From 5e308ec7332d01e84a3a5233f4cb8bd5a00026cf Mon Sep 17 00:00:00 2001
From: microcai <microcaicai@gmail.com>
Date: Mon, 29 Jun 2020 23:36:40 +0800
Subject: [PATCH] spi-nor: Add support for xt25f32b/xt25f128b

The RockPi4b dev board ship with xt25f32b solded. add these ids so the
board's spi flash can be accessed within linux.

Signed-off-by: microcai <microcaicai@gmail.com>
---
 drivers/mtd/spi-nor/Makefile |  1 +
 drivers/mtd/spi-nor/xtx.c    | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 drivers/mtd/spi-nor/xtx.c

diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile
index 653923896205..3f7a52d7fa0b 100644
--- a/drivers/mtd/spi-nor/Makefile
+++ b/drivers/mtd/spi-nor/Makefile
@@ -17,6 +17,7 @@ spi-nor-objs += sst.o
 spi-nor-objs += winbond.o
 spi-nor-objs += xilinx.o
 spi-nor-objs += xmc.o
+spi-nor-objs += xtx.o
 obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o

 obj-$(CONFIG_MTD_SPI_NOR) += controllers/
diff --git a/drivers/mtd/spi-nor/xtx.c b/drivers/mtd/spi-nor/xtx.c
new file mode 100644
index 000000000000..05f2d69401b2
--- /dev/null
+++ b/drivers/mtd/spi-nor/xtx.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005, Intec Automation Inc.
+ * Copyright (C) 2014, Freescale Semiconductor, Inc.
+ */
+
+#include <linux/mtd/spi-nor.h>
+
+#include "core.h"
+
+static const struct flash_info xtx_parts[] = {
+ /* XTX (Shenzhen Xin Tian Xia Tech) */
+ { "xt25f32b", INFO(0x0b4016, 0, 64 * 1024, 64, SECT_4K) },
+ { "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, SECT_4K) },
+};
+
+const struct spi_nor_manufacturer spi_nor_xtx = {
+ .name = "xtx",
+ .parts = xtx_parts,
+ .nparts = ARRAY_SIZE(xtx_parts),
+};
-- 
2.26.2

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] spi-nor: Add support for xt25f32b/xt25f128b
  2020-06-29 15:57 [PATCH] spi-nor: Add support for xt25f32b/xt25f128b microcai
@ 2020-07-01  7:37 ` Tudor.Ambarus
  0 siblings, 0 replies; 2+ messages in thread
From: Tudor.Ambarus @ 2020-07-01  7:37 UTC (permalink / raw)
  To: microcaicai, daniel; +Cc: linux-mtd, linux-kernel

On 6/29/20 6:57 PM, microcai wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
>>From 5e308ec7332d01e84a3a5233f4cb8bd5a00026cf Mon Sep 17 00:00:00 2001
> From: microcai <microcaicai@gmail.com>
> Date: Mon, 29 Jun 2020 23:36:40 +0800
> Subject: [PATCH] spi-nor: Add support for xt25f32b/xt25f128b
> 
> The RockPi4b dev board ship with xt25f32b solded. add these ids so the
> board's spi flash can be accessed within linux.

I couldn't find datasheets for neither of these flashes. Can you point
me to them?

Were both the flashes tested?

Daniel tested xt25f128b, maybe you can sync with him for the xt25f128b
flash:  https://patchwork.ozlabs.org/project/linux-mtd/patch/20200206171941.GA2398@makrotopia.org/

> 
> Signed-off-by: microcai <microcaicai@gmail.com>

You need your full name here.

Cheers,
ta
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2020-07-01  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 15:57 [PATCH] spi-nor: Add support for xt25f32b/xt25f128b microcai
2020-07-01  7:37 ` Tudor.Ambarus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).