LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: Add support for ZB25VQ128
@ 2021-09-18 7:22 Daniel Palmer
2021-09-20 11:26 ` Pratyush Yadav
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Palmer @ 2021-09-18 7:22 UTC (permalink / raw)
To: linux-mtd, tudor.ambarus; +Cc: michael, p.yadav, linux-kernel, Daniel Palmer
Add support for the ZBIT ZB25VQ128 128MBit SPI NOR
flash.
Link: http://www.cipatelje.eu/pdf/ZB25VQ128.pdf
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
drivers/mtd/spi-nor/Makefile | 1 +
drivers/mtd/spi-nor/core.c | 1 +
drivers/mtd/spi-nor/core.h | 1 +
drivers/mtd/spi-nor/zbit.c | 21 +++++++++++++++++++++
4 files changed, 24 insertions(+)
create mode 100644 drivers/mtd/spi-nor/zbit.c
diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile
index 6b904e439372..a6f3646824cb 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 += zbit.o
obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o
obj-$(CONFIG_MTD_SPI_NOR) += controllers/
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index cc08bd707378..75f6ac9485b9 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -1846,6 +1846,7 @@ static const struct spi_nor_manufacturer *manufacturers[] = {
&spi_nor_winbond,
&spi_nor_xilinx,
&spi_nor_xmc,
+ &spi_nor_zbit,
};
static const struct flash_info *
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index 3348e1dd1445..ad3b34a3b80f 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -489,6 +489,7 @@ extern const struct spi_nor_manufacturer spi_nor_sst;
extern const struct spi_nor_manufacturer spi_nor_winbond;
extern const struct spi_nor_manufacturer spi_nor_xilinx;
extern const struct spi_nor_manufacturer spi_nor_xmc;
+extern const struct spi_nor_manufacturer spi_nor_zbit;
extern const struct attribute_group *spi_nor_sysfs_groups[];
diff --git a/drivers/mtd/spi-nor/zbit.c b/drivers/mtd/spi-nor/zbit.c
new file mode 100644
index 000000000000..d240dd65d249
--- /dev/null
+++ b/drivers/mtd/spi-nor/zbit.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2021, Daniel Palmer<daniel@thingy.jp>
+ */
+
+#include <linux/mtd/spi-nor.h>
+
+#include "core.h"
+
+static const struct flash_info zbit_parts[] = {
+ /* zbit */
+ { "zb25vq128", INFO(0x5e4018, 0, 64 * 1024, 256,
+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+ SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
+};
+
+const struct spi_nor_manufacturer spi_nor_zbit = {
+ .name = "zbit",
+ .parts = zbit_parts,
+ .nparts = ARRAY_SIZE(zbit_parts),
+};
--
2.33.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: spi-nor: Add support for ZB25VQ128
2021-09-18 7:22 [PATCH] mtd: spi-nor: Add support for ZB25VQ128 Daniel Palmer
@ 2021-09-20 11:26 ` Pratyush Yadav
2021-09-28 13:15 ` Daniel Palmer
0 siblings, 1 reply; 5+ messages in thread
From: Pratyush Yadav @ 2021-09-20 11:26 UTC (permalink / raw)
To: Daniel Palmer; +Cc: linux-mtd, tudor.ambarus, michael, linux-kernel
On 18/09/21 04:22PM, Daniel Palmer wrote:
> Add support for the ZBIT ZB25VQ128 128MBit SPI NOR
> flash.
>
> Link: http://www.cipatelje.eu/pdf/ZB25VQ128.pdf
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>
> ---
> drivers/mtd/spi-nor/Makefile | 1 +
> drivers/mtd/spi-nor/core.c | 1 +
> drivers/mtd/spi-nor/core.h | 1 +
> drivers/mtd/spi-nor/zbit.c | 21 +++++++++++++++++++++
> 4 files changed, 24 insertions(+)
> create mode 100644 drivers/mtd/spi-nor/zbit.c
>
> diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile
> index 6b904e439372..a6f3646824cb 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 += zbit.o
> obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o
>
> obj-$(CONFIG_MTD_SPI_NOR) += controllers/
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index cc08bd707378..75f6ac9485b9 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -1846,6 +1846,7 @@ static const struct spi_nor_manufacturer *manufacturers[] = {
> &spi_nor_winbond,
> &spi_nor_xilinx,
> &spi_nor_xmc,
> + &spi_nor_zbit,
> };
>
> static const struct flash_info *
> diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
> index 3348e1dd1445..ad3b34a3b80f 100644
> --- a/drivers/mtd/spi-nor/core.h
> +++ b/drivers/mtd/spi-nor/core.h
> @@ -489,6 +489,7 @@ extern const struct spi_nor_manufacturer spi_nor_sst;
> extern const struct spi_nor_manufacturer spi_nor_winbond;
> extern const struct spi_nor_manufacturer spi_nor_xilinx;
> extern const struct spi_nor_manufacturer spi_nor_xmc;
> +extern const struct spi_nor_manufacturer spi_nor_zbit;
>
> extern const struct attribute_group *spi_nor_sysfs_groups[];
>
> diff --git a/drivers/mtd/spi-nor/zbit.c b/drivers/mtd/spi-nor/zbit.c
> new file mode 100644
> index 000000000000..d240dd65d249
> --- /dev/null
> +++ b/drivers/mtd/spi-nor/zbit.c
> @@ -0,0 +1,21 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2021, Daniel Palmer<daniel@thingy.jp>
> + */
> +
> +#include <linux/mtd/spi-nor.h>
> +
> +#include "core.h"
> +
> +static const struct flash_info zbit_parts[] = {
> + /* zbit */
> + { "zb25vq128", INFO(0x5e4018, 0, 64 * 1024, 256,
Zbit should be in bank 10, so it should be preceeded by 9 0x7f bytes,
correct? I don't see any logic to handle that in SPI NOR currently so I
assume this manufacturer does not implement the continuation codes.
In that case, it should go to the manufacturer collisions driver
proposed here [0].
[0] https://patchwork.ozlabs.org/project/linux-mtd/patch/20210727045222.905056-6-tudor.ambarus@microchip.com/
> + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> + SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
> +};
> +
> +const struct spi_nor_manufacturer spi_nor_zbit = {
> + .name = "zbit",
> + .parts = zbit_parts,
> + .nparts = ARRAY_SIZE(zbit_parts),
> +};
> --
> 2.33.0
>
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: spi-nor: Add support for ZB25VQ128
2021-09-20 11:26 ` Pratyush Yadav
@ 2021-09-28 13:15 ` Daniel Palmer
2021-09-28 16:34 ` Pratyush Yadav
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Palmer @ 2021-09-28 13:15 UTC (permalink / raw)
To: Pratyush Yadav
Cc: linux-mtd, tudor.ambarus, michael, Linux Kernel Mailing List
Hi Pratyush,
On Mon, 20 Sept 2021 at 20:26, Pratyush Yadav <p.yadav@ti.com> wrote:
>
> Zbit should be in bank 10, so it should be preceeded by 9 0x7f bytes,
> correct? I don't see any logic to handle that in SPI NOR currently so I
> assume this manufacturer does not implement the continuation codes.
>
> In that case, it should go to the manufacturer collisions driver
> proposed here [0].
>
> [0] https://patchwork.ozlabs.org/project/linux-mtd/patch/20210727045222.905056-6-tudor.ambarus@microchip.com/
Sorry, I'm not sure what I should do with this information. I didn't
even know about the continuation codes thing until now.
Is there something I need to do here or do I just need to wait for the
collision handling code to get merged?
Thanks,
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: spi-nor: Add support for ZB25VQ128
2021-09-28 13:15 ` Daniel Palmer
@ 2021-09-28 16:34 ` Pratyush Yadav
2021-09-29 5:16 ` Tudor.Ambarus
0 siblings, 1 reply; 5+ messages in thread
From: Pratyush Yadav @ 2021-09-28 16:34 UTC (permalink / raw)
To: Daniel Palmer
Cc: linux-mtd, tudor.ambarus, michael, Linux Kernel Mailing List
On 28/09/21 10:15PM, Daniel Palmer wrote:
> Hi Pratyush,
>
> On Mon, 20 Sept 2021 at 20:26, Pratyush Yadav <p.yadav@ti.com> wrote:
> >
> > Zbit should be in bank 10, so it should be preceeded by 9 0x7f bytes,
> > correct? I don't see any logic to handle that in SPI NOR currently so I
> > assume this manufacturer does not implement the continuation codes.
> >
> > In that case, it should go to the manufacturer collisions driver
> > proposed here [0].
> >
> > [0] https://patchwork.ozlabs.org/project/linux-mtd/patch/20210727045222.905056-6-tudor.ambarus@microchip.com/
>
> Sorry, I'm not sure what I should do with this information. I didn't
> even know about the continuation codes thing until now.
> Is there something I need to do here or do I just need to wait for the
> collision handling code to get merged?
I think that should be what you need to do. Tudor, any plans on
re-rolling that patch series in the near future?
>
> Thanks,
>
> Daniel
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: spi-nor: Add support for ZB25VQ128
2021-09-28 16:34 ` Pratyush Yadav
@ 2021-09-29 5:16 ` Tudor.Ambarus
0 siblings, 0 replies; 5+ messages in thread
From: Tudor.Ambarus @ 2021-09-29 5:16 UTC (permalink / raw)
To: p.yadav, daniel; +Cc: linux-mtd, michael, linux-kernel
On 9/28/21 7:34 PM, Pratyush Yadav wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 28/09/21 10:15PM, Daniel Palmer wrote:
>> Hi Pratyush,
>>
>> On Mon, 20 Sept 2021 at 20:26, Pratyush Yadav <p.yadav@ti.com> wrote:
>>>
>>> Zbit should be in bank 10, so it should be preceeded by 9 0x7f bytes,
>>> correct? I don't see any logic to handle that in SPI NOR currently so I
>>> assume this manufacturer does not implement the continuation codes.
>>>
>>> In that case, it should go to the manufacturer collisions driver
>>> proposed here [0].
>>>
>>> [0] https://patchwork.ozlabs.org/project/linux-mtd/patch/20210727045222.905056-6-tudor.ambarus@microchip.com/
>>
>> Sorry, I'm not sure what I should do with this information. I didn't
>> even know about the continuation codes thing until now.
>> Is there something I need to do here or do I just need to wait for the
>> collision handling code to get merged?
>
> I think that should be what you need to do. Tudor, any plans on
> re-rolling that patch series in the near future?
>
Hi, all,
Yes, I was out of office for a month, today I got back. I'll handle it.
Cheers,
ta
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-29 5:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18 7:22 [PATCH] mtd: spi-nor: Add support for ZB25VQ128 Daniel Palmer
2021-09-20 11:26 ` Pratyush Yadav
2021-09-28 13:15 ` Daniel Palmer
2021-09-28 16:34 ` Pratyush Yadav
2021-09-29 5:16 ` 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).