Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * drivers/mtd/nandids.c |
| 3 | * |
| 4 | * Copyright (C) 2002 Thomas Gleixner (tglx@linutronix.de) |
Thomas Gleixner | bd7bcf5 | 2005-06-23 10:38:54 +0100 | [diff] [blame] | 5 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | * |
| 10 | */ |
| 11 | #include <linux/module.h> |
| 12 | #include <linux/mtd/nand.h> |
Artem Bityutskiy | 7d321ec | 2013-03-04 13:39:30 +0200 | [diff] [blame] | 13 | |
| 14 | #define LP_OPTIONS NAND_SAMSUNG_LP_OPTIONS |
| 15 | #define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16) |
| 16 | |
Brian Norris | 5bc7c33 | 2013-03-13 09:51:31 -0700 | [diff] [blame] | 17 | #define SP_OPTIONS NAND_NEED_READRDY |
| 18 | #define SP_OPTIONS16 (SP_OPTIONS | NAND_BUSWIDTH_16) |
Thomas Gleixner | 1cf9827 | 2007-04-17 18:30:57 +0100 | [diff] [blame] | 19 | |
Artem Bityutskiy | 7d321ec | 2013-03-04 13:39:30 +0200 | [diff] [blame] | 20 | /* |
| 21 | * The chip ID list: |
| 22 | * name, device ID, page size, chip size in MiB, eraseblock size, options |
| 23 | * |
| 24 | * If page size and eraseblock size are 0, the sizes are taken from the |
| 25 | * extended chip ID. |
| 26 | */ |
| 27 | struct nand_flash_dev nand_flash_ids[] = { |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 28 | LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 512, 4, 0x2000, SP_OPTIONS), |
| 29 | LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 512, 4, 0x2000, SP_OPTIONS), |
| 30 | LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE5, 512, 4, 0x2000, SP_OPTIONS), |
| 31 | LEGACY_ID_NAND("NAND 8MiB 3,3V 8-bit", 0xD6, 512, 8, 0x2000, SP_OPTIONS), |
| 32 | LEGACY_ID_NAND("NAND 8MiB 3,3V 8-bit", 0xE6, 512, 8, 0x2000, SP_OPTIONS), |
Thomas Gleixner | 61b03bd | 2005-11-07 11:15:49 +0000 | [diff] [blame] | 33 | |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 34 | LEGACY_ID_NAND("NAND 16MiB 1,8V 8-bit", 0x33, 512, 16, 0x4000, SP_OPTIONS), |
| 35 | LEGACY_ID_NAND("NAND 16MiB 3,3V 8-bit", 0x73, 512, 16, 0x4000, SP_OPTIONS), |
| 36 | LEGACY_ID_NAND("NAND 16MiB 1,8V 16-bit", 0x43, 512, 16, 0x4000, SP_OPTIONS16), |
| 37 | LEGACY_ID_NAND("NAND 16MiB 3,3V 16-bit", 0x53, 512, 16, 0x4000, SP_OPTIONS16), |
Thomas Gleixner | 61b03bd | 2005-11-07 11:15:49 +0000 | [diff] [blame] | 38 | |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 39 | LEGACY_ID_NAND("NAND 32MiB 1,8V 8-bit", 0x35, 512, 32, 0x4000, SP_OPTIONS), |
| 40 | LEGACY_ID_NAND("NAND 32MiB 3,3V 8-bit", 0x75, 512, 32, 0x4000, SP_OPTIONS), |
| 41 | LEGACY_ID_NAND("NAND 32MiB 1,8V 16-bit", 0x45, 512, 32, 0x4000, SP_OPTIONS16), |
| 42 | LEGACY_ID_NAND("NAND 32MiB 3,3V 16-bit", 0x55, 512, 32, 0x4000, SP_OPTIONS16), |
Thomas Gleixner | 61b03bd | 2005-11-07 11:15:49 +0000 | [diff] [blame] | 43 | |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 44 | LEGACY_ID_NAND("NAND 64MiB 1,8V 8-bit", 0x36, 512, 64, 0x4000, SP_OPTIONS), |
| 45 | LEGACY_ID_NAND("NAND 64MiB 3,3V 8-bit", 0x76, 512, 64, 0x4000, SP_OPTIONS), |
| 46 | LEGACY_ID_NAND("NAND 64MiB 1,8V 16-bit", 0x46, 512, 64, 0x4000, SP_OPTIONS16), |
| 47 | LEGACY_ID_NAND("NAND 64MiB 3,3V 16-bit", 0x56, 512, 64, 0x4000, SP_OPTIONS16), |
Thomas Gleixner | 61b03bd | 2005-11-07 11:15:49 +0000 | [diff] [blame] | 48 | |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 49 | LEGACY_ID_NAND("NAND 128MiB 1,8V 8-bit", 0x78, 512, 128, 0x4000, SP_OPTIONS), |
| 50 | LEGACY_ID_NAND("NAND 128MiB 1,8V 8-bit", 0x39, 512, 128, 0x4000, SP_OPTIONS), |
| 51 | LEGACY_ID_NAND("NAND 128MiB 3,3V 8-bit", 0x79, 512, 128, 0x4000, SP_OPTIONS), |
| 52 | LEGACY_ID_NAND("NAND 128MiB 1,8V 16-bit", 0x72, 512, 128, 0x4000, SP_OPTIONS16), |
| 53 | LEGACY_ID_NAND("NAND 128MiB 1,8V 16-bit", 0x49, 512, 128, 0x4000, SP_OPTIONS16), |
| 54 | LEGACY_ID_NAND("NAND 128MiB 3,3V 16-bit", 0x74, 512, 128, 0x4000, SP_OPTIONS16), |
| 55 | LEGACY_ID_NAND("NAND 128MiB 3,3V 16-bit", 0x59, 512, 128, 0x4000, SP_OPTIONS16), |
Thomas Gleixner | 61b03bd | 2005-11-07 11:15:49 +0000 | [diff] [blame] | 56 | |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 57 | LEGACY_ID_NAND("NAND 256MiB 3,3V 8-bit", 0x71, 512, 256, 0x4000, SP_OPTIONS), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | |
Thomas Gleixner | 7a30601 | 2006-05-25 09:50:16 +0200 | [diff] [blame] | 59 | /* |
Artem Bityutskiy | 7d321ec | 2013-03-04 13:39:30 +0200 | [diff] [blame] | 60 | * These are the new chips with large page size. Their page size and |
| 61 | * eraseblock size are determined from the extended ID bytes. |
Thomas Gleixner | 7a30601 | 2006-05-25 09:50:16 +0200 | [diff] [blame] | 62 | */ |
Thomas Gleixner | 7a30601 | 2006-05-25 09:50:16 +0200 | [diff] [blame] | 63 | |
Brian Norris | c01804e | 2011-11-02 13:34:43 -0700 | [diff] [blame] | 64 | /* 512 Megabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 65 | EXTENDED_ID_NAND("NAND 64MiB 1,8V 8-bit", 0xA2, 64, LP_OPTIONS), |
| 66 | EXTENDED_ID_NAND("NAND 64MiB 1,8V 8-bit", 0xA0, 64, LP_OPTIONS), |
| 67 | EXTENDED_ID_NAND("NAND 64MiB 3,3V 8-bit", 0xF2, 64, LP_OPTIONS), |
| 68 | EXTENDED_ID_NAND("NAND 64MiB 3,3V 8-bit", 0xD0, 64, LP_OPTIONS), |
| 69 | EXTENDED_ID_NAND("NAND 64MiB 3,3V 8-bit", 0xF0, 64, LP_OPTIONS), |
| 70 | EXTENDED_ID_NAND("NAND 64MiB 1,8V 16-bit", 0xB2, 64, LP_OPTIONS16), |
| 71 | EXTENDED_ID_NAND("NAND 64MiB 1,8V 16-bit", 0xB0, 64, LP_OPTIONS16), |
| 72 | EXTENDED_ID_NAND("NAND 64MiB 3,3V 16-bit", 0xC2, 64, LP_OPTIONS16), |
| 73 | EXTENDED_ID_NAND("NAND 64MiB 3,3V 16-bit", 0xC0, 64, LP_OPTIONS16), |
Thomas Gleixner | 61b03bd | 2005-11-07 11:15:49 +0000 | [diff] [blame] | 74 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | /* 1 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 76 | EXTENDED_ID_NAND("NAND 128MiB 1,8V 8-bit", 0xA1, 128, LP_OPTIONS), |
| 77 | EXTENDED_ID_NAND("NAND 128MiB 3,3V 8-bit", 0xF1, 128, LP_OPTIONS), |
| 78 | EXTENDED_ID_NAND("NAND 128MiB 3,3V 8-bit", 0xD1, 128, LP_OPTIONS), |
| 79 | EXTENDED_ID_NAND("NAND 128MiB 1,8V 16-bit", 0xB1, 128, LP_OPTIONS16), |
| 80 | EXTENDED_ID_NAND("NAND 128MiB 3,3V 16-bit", 0xC1, 128, LP_OPTIONS16), |
| 81 | EXTENDED_ID_NAND("NAND 128MiB 1,8V 16-bit", 0xAD, 128, LP_OPTIONS16), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | |
| 83 | /* 2 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 84 | EXTENDED_ID_NAND("NAND 256MiB 1,8V 8-bit", 0xAA, 256, LP_OPTIONS), |
| 85 | EXTENDED_ID_NAND("NAND 256MiB 3,3V 8-bit", 0xDA, 256, LP_OPTIONS), |
| 86 | EXTENDED_ID_NAND("NAND 256MiB 1,8V 16-bit", 0xBA, 256, LP_OPTIONS16), |
| 87 | EXTENDED_ID_NAND("NAND 256MiB 3,3V 16-bit", 0xCA, 256, LP_OPTIONS16), |
Thomas Gleixner | 61b03bd | 2005-11-07 11:15:49 +0000 | [diff] [blame] | 88 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | /* 4 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 90 | EXTENDED_ID_NAND("NAND 512MiB 1,8V 8-bit", 0xAC, 512, LP_OPTIONS), |
| 91 | EXTENDED_ID_NAND("NAND 512MiB 3,3V 8-bit", 0xDC, 512, LP_OPTIONS), |
| 92 | EXTENDED_ID_NAND("NAND 512MiB 1,8V 16-bit", 0xBC, 512, LP_OPTIONS16), |
| 93 | EXTENDED_ID_NAND("NAND 512MiB 3,3V 16-bit", 0xCC, 512, LP_OPTIONS16), |
Thomas Gleixner | 61b03bd | 2005-11-07 11:15:49 +0000 | [diff] [blame] | 94 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | /* 8 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 96 | EXTENDED_ID_NAND("NAND 1GiB 1,8V 8-bit", 0xA3, 1024, LP_OPTIONS), |
| 97 | EXTENDED_ID_NAND("NAND 1GiB 3,3V 8-bit", 0xD3, 1024, LP_OPTIONS), |
| 98 | EXTENDED_ID_NAND("NAND 1GiB 1,8V 16-bit", 0xB3, 1024, LP_OPTIONS16), |
| 99 | EXTENDED_ID_NAND("NAND 1GiB 3,3V 16-bit", 0xC3, 1024, LP_OPTIONS16), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | |
| 101 | /* 16 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 102 | EXTENDED_ID_NAND("NAND 2GiB 1,8V 8-bit", 0xA5, 2048, LP_OPTIONS), |
| 103 | EXTENDED_ID_NAND("NAND 2GiB 3,3V 8-bit", 0xD5, 2048, LP_OPTIONS), |
| 104 | EXTENDED_ID_NAND("NAND 2GiB 1,8V 16-bit", 0xB5, 2048, LP_OPTIONS16), |
| 105 | EXTENDED_ID_NAND("NAND 2GiB 3,3V 16-bit", 0xC5, 2048, LP_OPTIONS16), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 106 | |
Brian Norris | 24cc7b8 | 2010-06-17 12:35:11 -0700 | [diff] [blame] | 107 | /* 32 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 108 | EXTENDED_ID_NAND("NAND 4GiB 1,8V 8-bit", 0xA7, 4096, LP_OPTIONS), |
| 109 | EXTENDED_ID_NAND("NAND 4GiB 3,3V 8-bit", 0xD7, 4096, LP_OPTIONS), |
| 110 | EXTENDED_ID_NAND("NAND 4GiB 1,8V 16-bit", 0xB7, 4096, LP_OPTIONS16), |
| 111 | EXTENDED_ID_NAND("NAND 4GiB 3,3V 16-bit", 0xC7, 4096, LP_OPTIONS16), |
Brian Norris | 13ed7ae | 2010-08-20 12:36:12 -0700 | [diff] [blame] | 112 | |
| 113 | /* 64 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 114 | EXTENDED_ID_NAND("NAND 8GiB 1,8V 8-bit", 0xAE, 8192, LP_OPTIONS), |
| 115 | EXTENDED_ID_NAND("NAND 8GiB 3,3V 8-bit", 0xDE, 8192, LP_OPTIONS), |
| 116 | EXTENDED_ID_NAND("NAND 8GiB 1,8V 16-bit", 0xBE, 8192, LP_OPTIONS16), |
| 117 | EXTENDED_ID_NAND("NAND 8GiB 3,3V 16-bit", 0xCE, 8192, LP_OPTIONS16), |
Brian Norris | 13ed7ae | 2010-08-20 12:36:12 -0700 | [diff] [blame] | 118 | |
| 119 | /* 128 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 120 | EXTENDED_ID_NAND("NAND 16GiB 1,8V 8-bit", 0x1A, 16384, LP_OPTIONS), |
| 121 | EXTENDED_ID_NAND("NAND 16GiB 3,3V 8-bit", 0x3A, 16384, LP_OPTIONS), |
| 122 | EXTENDED_ID_NAND("NAND 16GiB 1,8V 16-bit", 0x2A, 16384, LP_OPTIONS16), |
| 123 | EXTENDED_ID_NAND("NAND 16GiB 3,3V 16-bit", 0x4A, 16384, LP_OPTIONS16), |
Brian Norris | 13ed7ae | 2010-08-20 12:36:12 -0700 | [diff] [blame] | 124 | |
| 125 | /* 256 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 126 | EXTENDED_ID_NAND("NAND 32GiB 1,8V 8-bit", 0x1C, 32768, LP_OPTIONS), |
| 127 | EXTENDED_ID_NAND("NAND 32GiB 3,3V 8-bit", 0x3C, 32768, LP_OPTIONS), |
| 128 | EXTENDED_ID_NAND("NAND 32GiB 1,8V 16-bit", 0x2C, 32768, LP_OPTIONS16), |
| 129 | EXTENDED_ID_NAND("NAND 32GiB 3,3V 16-bit", 0x4C, 32768, LP_OPTIONS16), |
Brian Norris | 13ed7ae | 2010-08-20 12:36:12 -0700 | [diff] [blame] | 130 | |
| 131 | /* 512 Gigabit */ |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 132 | EXTENDED_ID_NAND("NAND 64GiB 1,8V 8-bit", 0x1E, 65536, LP_OPTIONS), |
| 133 | EXTENDED_ID_NAND("NAND 64GiB 3,3V 8-bit", 0x3E, 65536, LP_OPTIONS), |
| 134 | EXTENDED_ID_NAND("NAND 64GiB 1,8V 16-bit", 0x2E, 65536, LP_OPTIONS16), |
| 135 | EXTENDED_ID_NAND("NAND 64GiB 3,3V 16-bit", 0x4E, 65536, LP_OPTIONS16), |
Brian Norris | 24cc7b8 | 2010-06-17 12:35:11 -0700 | [diff] [blame] | 136 | |
Artem Bityutskiy | 8dbfae1 | 2013-03-04 15:39:18 +0200 | [diff] [blame^] | 137 | {NULL} |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 138 | }; |
| 139 | |
Artem Bityutskiy | 7d321ec | 2013-03-04 13:39:30 +0200 | [diff] [blame] | 140 | /* Manufacturer IDs */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 141 | struct nand_manufacturers nand_manuf_ids[] = { |
| 142 | {NAND_MFR_TOSHIBA, "Toshiba"}, |
| 143 | {NAND_MFR_SAMSUNG, "Samsung"}, |
| 144 | {NAND_MFR_FUJITSU, "Fujitsu"}, |
| 145 | {NAND_MFR_NATIONAL, "National"}, |
| 146 | {NAND_MFR_RENESAS, "Renesas"}, |
| 147 | {NAND_MFR_STMICRO, "ST Micro"}, |
David Woodhouse | e0c7d76 | 2006-05-13 18:07:53 +0100 | [diff] [blame] | 148 | {NAND_MFR_HYNIX, "Hynix"}, |
sshahrom@micron.com | 8c60e54 | 2007-03-21 18:48:02 -0700 | [diff] [blame] | 149 | {NAND_MFR_MICRON, "Micron"}, |
Brian Norris | 9d9a881 | 2012-06-20 16:14:02 -0700 | [diff] [blame] | 150 | {NAND_MFR_AMD, "AMD/Spansion"}, |
Brian Norris | c1257b4 | 2011-11-02 13:34:42 -0700 | [diff] [blame] | 151 | {NAND_MFR_MACRONIX, "Macronix"}, |
Brian Norris | b1ccfab | 2012-05-22 07:30:47 -0700 | [diff] [blame] | 152 | {NAND_MFR_EON, "Eon"}, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 153 | {0x0, "Unknown"} |
| 154 | }; |
| 155 | |
David Woodhouse | e0c7d76 | 2006-05-13 18:07:53 +0100 | [diff] [blame] | 156 | EXPORT_SYMBOL(nand_manuf_ids); |
| 157 | EXPORT_SYMBOL(nand_flash_ids); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 158 | |
David Woodhouse | e0c7d76 | 2006-05-13 18:07:53 +0100 | [diff] [blame] | 159 | MODULE_LICENSE("GPL"); |
| 160 | MODULE_AUTHOR("Thomas Gleixner <tglx@linutronix.de>"); |
| 161 | MODULE_DESCRIPTION("Nand device & manufacturer IDs"); |