Skip to contentSkip to conversation

mtd: nand: add SanDisk manufacturer ID

PATCH Applied Huang Shijie 2 participants 7 messages Dec 26, 2013 – Jan 29, 2014

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

PATCH 1/1 mtd: nand: add SanDisk manufacturer ID

Add the manufactor ID for SanDisk.
Make preparation for SanDisk SDTNRGAMA-008G.

---
 drivers/mtd/nand/nand_ids.c |    1 +
 include/linux/mtd/nand.h    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand_ids.c +1 -0
index a87b0a3..136a463 100644
@@ -169,6 +169,7 @@ struct nand_manufacturers nand_manuf_ids[] = {
 	{NAND_MFR_AMD, "AMD/Spansion"},
 	{NAND_MFR_MACRONIX, "Macronix"},
 	{NAND_MFR_EON, "Eon"},
+	{NAND_MFR_SANDISK, "SanDisk"},
 	{0x0, "Unknown"}
 };
 
include/linux/mtd/nand.h +1 -0
index f3ea8da..c13fbf3 100644
@@ -600,6 +600,7 @@ struct nand_chip {
 #define NAND_MFR_AMD		0x01
 #define NAND_MFR_MACRONIX	0xc2
 #define NAND_MFR_EON		0x92
+#define NAND_MFR_SANDISK	0x45
 
 /* The maximum expected count of bytes in the NAND ID sequence */
 #define NAND_MAX_ID_LEN 8
Signature · 1 line
1.7.2.rc3
#1 lore raw

PATCH 1/1 mtd: nand: add support for SanDisk SDTNRGAMA-008G

The datasheet does not tell us how to parse out the ID data, so handle it as a full ID nand.

---
 drivers/mtd/nand/nand_ids.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand_ids.c +3 -0
index 136a463..d3dbf59 100644
@@ -43,6 +43,9 @@ struct nand_flash_dev nand_flash_ids[] = {
 	{"TC58NVG6D2 64G 3.3V 8-bit",
 		{ .id = {0x98, 0xde, 0x94, 0x82, 0x76, 0x56, 0x04, 0x20} },
 		  SZ_8K, SZ_8K, SZ_2M, 0, 8, 640, NAND_ECC_INFO(40, SZ_1K) },
+	{"SDTNRGAMA 64G 3.3V 8-bit",
+		{ .id = {0x45, 0xde, 0x94, 0x93, 0x76, 0x50} },
+		  SZ_16K, SZ_8K, SZ_4M, 0, 6, 1280, NAND_ECC_INFO(40, SZ_1K) },
 
 	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),
Signature · 1 line
1.7.2.rc3
#4 lore raw

PATCH 1/1 mtd: nand: add Intel manufacturer ID

In reply to Huang Shijie

Add the Intel manufacturer Id.
Tested with Intel JS29F32G08ACMD1(4096 + 224) which is ONFI 2.0 compliant nand.

---
 drivers/mtd/nand/nand_ids.c |    1 +
 include/linux/mtd/nand.h    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand_ids.c +1 -0
index d3dbf59..3d7c89f 100644
@@ -173,6 +173,7 @@ struct nand_manufacturers nand_manuf_ids[] = {
 	{NAND_MFR_MACRONIX, "Macronix"},
 	{NAND_MFR_EON, "Eon"},
 	{NAND_MFR_SANDISK, "SanDisk"},
+	{NAND_MFR_INTEL, "Intel"},
 	{0x0, "Unknown"}
 };
 
include/linux/mtd/nand.h +1 -0
index 6ccc3ef..773bd93 100644
@@ -675,6 +675,7 @@ struct nand_chip {
 #define NAND_MFR_MACRONIX	0xc2
 #define NAND_MFR_EON		0x92
 #define NAND_MFR_SANDISK	0x45
+#define NAND_MFR_INTEL		0x89
 
 /* The maximum expected count of bytes in the NAND ID sequence */
 #define NAND_MAX_ID_LEN 8
Signature · 1 line
1.7.2.rc3
#2 lore raw

Re: [PATCH] mtd: nand: add support for SanDisk SDTNRGAMA-008G

In reply to Huang Shijie
Quoted 13 lines · Huang Shijie

The datasheet does not tell us how to parse out the ID data, so handle it as a full ID nand.

---
 drivers/mtd/nand/nand_ids.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand_ids.c +0 -0
index 136a463..d3dbf59 100644

drivers/mtd/nand/nand_ids.c struct nand_flash_dev nand_flash_ids[] = { · line 48

Quoted 6 lines
drivers/mtd/nand/nand_ids.c +3 -0
@@ -43,6 +43,9 @@ struct nand_flash_dev nand_flash_ids[] = {
 	{"TC58NVG6D2 64G 3.3V 8-bit",
 		{ .id = {0x98, 0xde, 0x94, 0x82, 0x76, 0x56, 0x04, 0x20} },
 		  SZ_8K, SZ_8K, SZ_2M, 0, 8, 640, NAND_ECC_INFO(40, SZ_1K) },
+	{"SDTNRGAMA 64G 3.3V 8-bit",
+		{ .id = {0x45, 0xde, 0x94, 0x93, 0x76, 0x50} },
+		  SZ_16K, SZ_8K, SZ_4M, 0, 6, 1280, NAND_ECC_INFO(40, SZ_1K) },

Looks OK, but I haven't pushed your 16KB page support (killing NAND_MAX_PAGESIZE) yet, so this will have to wait until that has settled. I'll probably either bump NAND_MAX_PAGESIZE to 16K temporarily, or I'll squeeze your patch into the 3.14 pull request.

drivers/mtd/nand/nand_ids.c struct nand_flash_dev nand_flash_ids[] = { · line 51

Quoted 3 lines
drivers/mtd/nand/nand_ids.c +0 -0
 	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),

Brian

#3 lore raw

Re: [PATCH] mtd: nand: add support for SanDisk SDTNRGAMA-008G

Quoted 10 lines · Brian Norris
Quoted 4 lines · Huang Shijie

The datasheet does not tell us how to parse out the ID data, so handle it as a full ID nand.

Looks OK, but I haven't pushed your 16KB page support (killing NAND_MAX_PAGESIZE) yet, so this will have to wait until that has settled. I'll probably either bump NAND_MAX_PAGESIZE to 16K temporarily, or I'll squeeze your patch into the 3.14 pull request.

I queued your NAND_MAX_PAGESIZE patch series for 3.15, so I've pushed this patch to l2-mtd.git/next. Thanks!

Brian