Skip to contentSkip to conversation

mtd: nand: spi: Add Gigadevice SPI NAND support

PATCH New Stefan Roese 3 participants 7 messages Aug 16, 2018 – Oct 4, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: nand: spi: Add Gigadevice SPI NAND support

This patch adds support for Gigadevices SPI NAND device to the new SPI NAND infrastructure in U-Boot. Currently only the 128MiB GD5F1GQ4UC device is supported.

Cc Miquel Raynal <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Jagan Teki <[email protected]>

---
Miquel, I somehow always forgot to send this Gigadevice support patch in my last series versions. This is the chip I'm currently testing with. Either please fold it into your series, if you re-send it at a later time. Or we should add it on top. Of course only if nobody has any objections or change requests.

Thanks,
Stefan

 drivers/mtd/nand/spi/Makefile     |   2 +-
 drivers/mtd/nand/spi/core.c       |   1 +
 drivers/mtd/nand/spi/gigadevice.c | 135 ++++++++++++++++++++++++++++++
 include/linux/mtd/spinand.h       |   1 +
 4 files changed, 138 insertions(+), 1 deletion(-)
 create mode 100644 drivers/mtd/nand/spi/gigadevice.c
drivers/mtd/nand/spi/Makefile +1 -1
index a66edd9199..dd6bacae34 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
 
-spinand-objs := core.o macronix.o micron.o winbond.o
+spinand-objs := core.o gigadevice.o macronix.o micron.o winbond.o
 obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
drivers/mtd/nand/spi/core.c +1 -0
index 362d104846..cb8ffa3fa9 100644
@@ -830,6 +830,7 @@ static const struct nand_ops spinand_ops = {
 };
 
 static const struct spinand_manufacturer *spinand_manufacturers[] = {
+	&gigadevice_spinand_manufacturer,
 	&macronix_spinand_manufacturer,
 	&micron_spinand_manufacturer,
 	&winbond_spinand_manufacturer,
drivers/mtd/nand/spi/gigadevice.c new file +135 -0

135 lines not on this page · raw message

include/linux/mtd/spinand.h +1 -0
index 8c9c756179..be01e1e82e 100644
@@ -201,6 +201,7 @@ struct spinand_manufacturer {
 };
 
 /* SPI NAND manufacturers */
+extern const struct spinand_manufacturer gigadevice_spinand_manufacturer;
 extern const struct spinand_manufacturer macronix_spinand_manufacturer;
 extern const struct spinand_manufacturer micron_spinand_manufacturer;
 extern const struct spinand_manufacturer winbond_spinand_manufacturer;
Signature · 1 line
2.18.0
maintainer
#1 lore raw

PATCH 1/1 mtd: nand: spi: Add Gigadevice SPI NAND support

Hi Stefan,

Stefan Roese <[email protected]> wrote on Thu, 16 Aug 2018 18:05:08 +0200:

Quoted 8 lines

This patch adds support for Gigadevices SPI NAND device to the new SPI NAND infrastructure in U-Boot. Currently only the 128MiB GD5F1GQ4UC device is supported.

Cc Miquel Raynal <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Jagan Teki <[email protected]>
Quoted 6 lines

---
Miquel, I somehow always forgot to send this Gigadevice support patch in my last series versions. This is the chip I'm currently testing with. Either please fold it into your series, if you re-send it at a later time. Or we should add it on top. Of course only if nobody has any objections or change requests.

No problem, as I don't wan't to resend another series of 30+ patches I just asked Jagan/Tom if they could take them (up to patch 23 included), so this one could be applied on top of it, alone.

BTW, I see #ifndef __UBOOT__ but I don't think it has been contributed to Linux yet, do you plan to do it?

Thanks,
Miquèl

#2 lore raw

PATCH 1/1 mtd: nand: spi: Add Gigadevice SPI NAND support

Hi Miquel,

Quoted 17 lines · Miquel Raynal

Stefan Roese <[email protected]> wrote on Thu, 16 Aug 2018 18:05:08 +0200:

Quoted 8 lines

This patch adds support for Gigadevices SPI NAND device to the new SPI NAND infrastructure in U-Boot. Currently only the 128MiB GD5F1GQ4UC device is supported.

Cc Miquel Raynal <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Jagan Teki <[email protected]>
Quoted 6 lines

---
Miquel, I somehow always forgot to send this Gigadevice support patch in my last series versions. This is the chip I'm currently testing with. Either please fold it into your series, if you re-send it at a later time. Or we should add it on top. Of course only if nobody has any objections or change requests.

Quoted 5 lines

No problem, as I don't wan't to resend another series of 30+ patches I just asked Jagan/Tom if they could take them (up to patch 23 included), so this one could be applied on top of it, alone.

Thanks.

Quoted 2 lines

BTW, I see #ifndef __UBOOT__ but I don't think it has been contributed to Linux yet, do you plan to do it?

Ah, yes. That ifdef if from a copy-and-paste. Its not been used in Linux yet (we are still on some older OpenWRT branch that uses an older SPI NAND infrastructure). But the plan is to move to the new IF soon and we will definitely push this SPI NAND chip support into mainline.

Thanks,
Stefan

#3 lore raw

PATCH 1/1 mtd: nand: spi: Add Gigadevice SPI NAND support

Hi Jagan,

Quoted 20 lines · Stefan Roese

Hi Miquel,

Quoted 17 lines · Miquel Raynal

Stefan Roese <[email protected]> wrote on Thu, 16 Aug 2018 18:05:08 +0200:

Quoted 14 lines

This patch adds support for Gigadevices SPI NAND device to the new SPI NAND infrastructure in U-Boot. Currently only the 128MiB GD5F1GQ4UC device is supported.

Cc Miquel Raynal <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Jagan Teki <[email protected]>

---
Miquel, I somehow always forgot to send this Gigadevice support patch in my last series versions. This is the chip I'm currently testing with. Either please fold it into your series, if you re-send it at a later time. Or we should add it on top. Of course only if nobody has any objections or change requests.

Quoted 7 lines
Quoted 5 lines

No problem, as I don't wan't to resend another series of 30+ patches I just asked Jagan/Tom if they could take them (up to patch 23 included), so this one could be applied on top of it, alone.

Thanks.

Could you please add to your upstream queue as well?

Thanks,
Stefan

maintainer
#4 lore raw

PATCH 1/1 mtd: nand: spi: Add Gigadevice SPI NAND support

Hi Stefan,

Stefan Roese <[email protected]> wrote on Thu, 4 Oct 2018 10:03:54 +0200:

Quoted 22 lines

Hi Jagan,

Quoted 19 lines · Stefan Roese

Hi Miquel,

Quoted 18 lines · Miquel Raynal

Stefan Roese <[email protected]> wrote on Thu, 16 Aug 2018 18:05:08 +0200:

Quoted 14 lines

This patch adds support for Gigadevices SPI NAND device to the new SPI NAND infrastructure in U-Boot. Currently only the 128MiB GD5F1GQ4UC device is supported.

Cc Miquel Raynal <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Jagan Teki <[email protected]>

---
Miquel, I somehow always forgot to send this Gigadevice support patch in my last series versions. This is the chip I'm currently testing with. Either please fold it into your series, if you re-send it at a later time. Or we should add it on top. Of course only if nobody has any objections or change requests.

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

No problem, as I don't wan't to resend another series of 30+ patches I just asked Jagan/Tom if they could take them (up to patch 23 included), so this one could be applied on top of it, alone.

Thanks.

Could you please add to your upstream queue as well?

Indeed, I completely forgot about this patch, I should have warned Jagan about it, sorry for forgetting.

BTW, someone did raise a bug with a raw nand device and the mtd command, did you have a chance to test it with such device? For now I just have a SPI-NAND and a parallel NOR to play with. I'll build another setup to test also parallel NANDs, but while on it...

Thanks,
Miquèl

#5 lore raw

PATCH 1/1 mtd: nand: spi: Add Gigadevice SPI NAND support

Hi Miquel,

Quoted 33 lines · Miquel Raynal

Hi Stefan,

Stefan Roese <[email protected]> wrote on Thu, 4 Oct 2018 10:03:54 +0200:

Quoted 29 lines

Hi Jagan,

Quoted 25 lines · Stefan Roese

Hi Miquel,

Quoted 24 lines · Miquel Raynal

Stefan Roese <[email protected]> wrote on Thu, 16 Aug 2018 18:05:08 +0200:

Quoted 8 lines

This patch adds support for Gigadevices SPI NAND device to the new SPI NAND infrastructure in U-Boot. Currently only the 128MiB GD5F1GQ4UC device is supported.

Cc Miquel Raynal <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Jagan Teki <[email protected]>
Quoted 6 lines

---
Miquel, I somehow always forgot to send this Gigadevice support patch in my last series versions. This is the chip I'm currently testing with. Either please fold it into your series, if you re-send it at a later time. Or we should add it on top. Of course only if nobody has any objections or change requests.

No problem, as I don't wan't to resend another series of 30+ patches I just asked Jagan/Tom if they could take them (up to patch 23 included), so this one could be applied on top of it, alone.

Thanks.

Quoted 7 lines
Quoted 1 line

Could you please add to your upstream queue as well?

Indeed, I completely forgot about this patch, I should have warned Jagan about it, sorry for forgetting.

BTW, someone did raise a bug with a raw nand device and the mtd command, did you have a chance to test it with such device?

No, not yet, sorry. My current platforms only have SPI NOR and SPI NAND.

Quoted 3 lines

For now I
just have a SPI-NAND and a parallel NOR to play with. I'll build another setup to test also parallel NANDs, but while on it...

Once I have such a platform on my desk (again), I'll definitely will test it with the mtd command.

Thanks,
Stefan

#6 lore raw

PATCH 1/1 mtd: nand: spi: Add Gigadevice SPI NAND support

In reply to Stefan Roese
Quoted 9 lines · Stefan Roese

This patch adds support for Gigadevices SPI NAND device to the new SPI NAND infrastructure in U-Boot. Currently only the 128MiB GD5F1GQ4UC device is supported.

Cc Miquel Raynal <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Jagan Teki <[email protected]>

Applied to u-boot-spi/master