083-mtd-nand-add-Winbond-manufacturer-and-chip.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 07b6d0cdbbda8c917480eceaec668f09e4cf24a5 Mon Sep 17 00:00:00 2001
  2. From: Christian Lamparter <[email protected]>
  3. Date: Mon, 14 Nov 2016 23:49:22 +0100
  4. Subject: [PATCH] mtd: nand: add Winbond manufacturer and chip
  5. This patch adds the W25N01GV NAND to the table of
  6. known devices. Without this patch the device gets detected:
  7. nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
  8. nand: Unknown NAND 256MiB 1,8V 8-bit
  9. nand: 256 MiB, SLC, erase size: 64 KiB, page size: 1024, OOB size : 16
  10. Whereas the u-boot identifies it as:
  11. spi_nand: spi_nand_flash_probe SF NAND ID 00:ef:aa:21
  12. SF: Detected W25N01GV with page size 2 KiB, total 128 MiB
  13. Due to the page size discrepancy, it's impossible to attach
  14. ubi volumes on the device.
  15. Signed-off-by: Christian Lamparter <[email protected]>
  16. ---
  17. drivers/mtd/nand/nand_ids.c | 4 ++++
  18. include/linux/mtd/nand.h | 1 +
  19. 2 files changed, 5 insertions(+)
  20. --- a/drivers/mtd/nand/nand_ids.c
  21. +++ b/drivers/mtd/nand/nand_ids.c
  22. @@ -54,6 +54,10 @@ struct nand_flash_dev nand_flash_ids[] =
  23. { .id = {0xad, 0xde, 0x94, 0xda, 0x74, 0xc4} },
  24. SZ_8K, SZ_8K, SZ_2M, NAND_NEED_SCRAMBLING, 6, 640,
  25. NAND_ECC_INFO(40, SZ_1K), 4 },
  26. + {"W25N01GV 1G 3.3V 8-bit",
  27. + { .id = {0xef, 0xaa} },
  28. + SZ_2K, SZ_128, SZ_128K, NAND_NO_SUBPAGE_WRITE,
  29. + 2, 64, NAND_ECC_INFO(1, SZ_512) },
  30. LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS),
  31. LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS),