* [PATCH] mtd: nand: add Winbond manufacturer and chip
@ 2018-07-24 14:09 John Crispin
2018-07-24 20:58 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: John Crispin @ 2018-07-24 14:09 UTC (permalink / raw)
To: Boris Brezillon, Richard Weinberger
Cc: linux-mtd, Christian Lamparter, John Crispin
From: Christian Lamparter <chunkeey@gmail.com>
This patch adds the W25N01GV NAND to the table of
known devices. Without this patch the device gets detected:
nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
nand: Unknown NAND 256MiB 1,8V 8-bit
nand: 256 MiB, SLC, erase size: 64 KiB, page size: 1024, OOB size : 16
Whereas the u-boot identifies it as:
spi_nand: spi_nand_flash_probe SF NAND ID 00:ef:aa:21
SF: Detected W25N01GV with page size 2 KiB, total 128 MiB
Due to the page size discrepancy, it's impossible to attach
ubi volumes on the device.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: John Crispin <john@phrozen.org>
---
drivers/mtd/nand/raw/nand_ids.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/nand/raw/nand_ids.c b/drivers/mtd/nand/raw/nand_ids.c
index 5423c3bb388e..1610e1cb6bfc 100644
--- a/drivers/mtd/nand/raw/nand_ids.c
+++ b/drivers/mtd/nand/raw/nand_ids.c
@@ -54,6 +54,10 @@ struct nand_flash_dev nand_flash_ids[] = {
{ .id = {0xad, 0xde, 0x94, 0xda, 0x74, 0xc4} },
SZ_8K, SZ_8K, SZ_2M, NAND_NEED_SCRAMBLING, 6, 640,
NAND_ECC_INFO(40, SZ_1K), 4 },
+ {"W25N01GV 1G 3.3V 8-bit",
+ { .id = {0xef, 0xaa} },
+ SZ_2K, SZ_128, SZ_128K, NAND_NO_SUBPAGE_WRITE,
+ 2, 64, NAND_ECC_INFO(1, SZ_512) },
LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS),
LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS),
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] mtd: nand: add Winbond manufacturer and chip
2018-07-24 14:09 [PATCH] mtd: nand: add Winbond manufacturer and chip John Crispin
@ 2018-07-24 20:58 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-07-24 20:58 UTC (permalink / raw)
To: John Crispin; +Cc: Richard Weinberger, linux-mtd, Christian Lamparter
Hi John,
On Tue, 24 Jul 2018 16:09:14 +0200
John Crispin <john@phrozen.org> wrote:
> From: Christian Lamparter <chunkeey@gmail.com>
>
> This patch adds the W25N01GV NAND to the table of
> known devices. Without this patch the device gets detected:
>
> nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
> nand: Unknown NAND 256MiB 1,8V 8-bit
> nand: 256 MiB, SLC, erase size: 64 KiB, page size: 1024, OOB size : 16
Nice try! You're trying to add support for a SPI NAND in a subsystem
that is supposed to only deal with parallel/raw NANDs :-). I guess
you're using the MT29F driver that lies in staging (or a modified
version of this driver).
>
> Whereas the u-boot identifies it as:
> spi_nand: spi_nand_flash_probe SF NAND ID 00:ef:aa:21
> SF: Detected W25N01GV with page size 2 KiB, total 128 MiB
I'm also surprised you made it work in u-boot using the spi-flash
layer, which, AFAIR, is only supporting SPI NORs.
>
> Due to the page size discrepancy, it's impossible to attach
> ubi volumes on the device.
>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: John Crispin <john@phrozen.org>
> ---
> drivers/mtd/nand/raw/nand_ids.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mtd/nand/raw/nand_ids.c b/drivers/mtd/nand/raw/nand_ids.c
> index 5423c3bb388e..1610e1cb6bfc 100644
> --- a/drivers/mtd/nand/raw/nand_ids.c
> +++ b/drivers/mtd/nand/raw/nand_ids.c
> @@ -54,6 +54,10 @@ struct nand_flash_dev nand_flash_ids[] = {
> { .id = {0xad, 0xde, 0x94, 0xda, 0x74, 0xc4} },
> SZ_8K, SZ_8K, SZ_2M, NAND_NEED_SCRAMBLING, 6, 640,
> NAND_ECC_INFO(40, SZ_1K), 4 },
> + {"W25N01GV 1G 3.3V 8-bit",
> + { .id = {0xef, 0xaa} },
> + SZ_2K, SZ_128, SZ_128K, NAND_NO_SUBPAGE_WRITE,
> + 2, 64, NAND_ECC_INFO(1, SZ_512) },
>
So, obviously that's a nack on this change, but you're lucky, we just
added the SPI NAND framework, so you should be able to add an entry
here [1].
> LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS),
> LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS),
Regards,
Boris
[1]http://git.infradead.org/linux-mtd.git/blob/refs/heads/nand/next:/drivers/mtd/nand/spi/winbond.c#l77
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-24 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-24 14:09 [PATCH] mtd: nand: add Winbond manufacturer and chip John Crispin
2018-07-24 20:58 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox