mtd: spi-nor-ids: Add Winbond W25Q128JW ID
PATCH 1/1 mtd: spi-nor-ids: Add Winbond W25Q128JW ID
Add ID for Winbond W25Q128JW device. This is a 128 Mbit QSPI NOR. Tested on W25Q128JWPIM part.
--- drivers/mtd/spi/spi-nor-ids.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mtd/spi/spi-nor-ids.c +5 -0
@@ -345,6 +345,11 @@ const struct flash_info spi_nor_ids[] = {SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, + { +INFO ("w25q128jw" ,0xef8018 ,0 ,64 *1024 ,256 , +SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ | +SPI_NOR_HAS_LOCK |SPI_NOR_HAS_TB ) + }, { INFO("w25q256fw", 0xef6019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
Signature · 1 line
2.34.1
On 3/9/22 05:18, Marek Vasut wrote:
Hi!
Quoted 20 lines
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Add ID for Winbond W25Q128JW device. This is a 128 Mbit QSPI NOR. Tested on W25Q128JWPIM part.
Signed-off-by Marek Vasut <[email protected]>Cc Horatiu Vultur <[email protected]>Cc Jagan Teki <[email protected]>Cc Simon Goldschmidt <[email protected]>Cc Stefan Roese <[email protected]>Cc Vignesh R <[email protected]>--- drivers/mtd/spi/spi-nor-ids.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mtd/spi/spi-nor-ids.c +0
-0
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 349
Quoted 5 lines
drivers/mtd/spi/spi-nor-ids.c +2
-0@@ -345,6 +345,11 @@ const struct flash_info spi_nor_ids[] = {SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, + { + INFO("w25q128jw", 0xef8018, 0, 64 * 1024, 256,
I'm glad I can discuss with you about the name of these winbond flashes, you can help with an advice. In linux we name this flash "w25q128jwm", but maybe we should change it.
Winbond names this flash "W25Q128JW_DTR", you can find the name on the top right of each page from [1].
What I propose:
1/ according to [1] W25Q128JW_IM/JM is W25Q128JW_DTR, let's use "-dtr"
for the M flavor.
2/ according to [2] W25Q128JW has two flavors: W25Q128JW-IQ/JQ and
W25Q128JW-IM/JM*. Since W25Q128JW_IM/JM is called W25Q128JW_DTR, let's use just "W25Q128JW" for W25Q128JW-IQ/JQ, as winbond uses too.
Looking at [3], I see that W25Q128JV and W25Q128FV use the same flash ID, I wonder what's the difference between them. I made a proposal in linux on how to handle flash collisions, a v5 will follow.
Cheers,
ta
[1] https://www.winbond.com/resource-files/W25Q128JW_DTR%20RevF1%2005212021.pdf
[2] https://www.winbond.com/resource-files/W25Q128JW_RevG_07292021%20Plus.pdf
[3] https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/?__locale=en&selected=128Mb#Density
Quoted 9 lines
drivers/mtd/spi/spi-nor-ids.c +3
-1+SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ | + SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) + }, { INFO("w25q256fw", 0xef6019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | --2.34.1
On 3/9/22 05:33, [email protected] wrote:
Hi,
[...]
Quoted 17 lines
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 349
Quoted 13 lines
drivers/mtd/spi/spi-nor-ids.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mtd/spi/spi-nor-ids.c +2
-0@@ -345,6 +345,11 @@ const struct flash_info spi_nor_ids[] = {SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, + { + INFO("w25q128jw", 0xef8018, 0, 64 * 1024, 256,I'm glad I can discuss with you about the name of these winbond flashes, you can help with an advice. In linux we name this flash "w25q128jwm", but maybe we should change it.
How did you arrive at "jwm" suffix ? Per both [1] and [2] "11.1 Valid Part Numbers and Top Side Marking" there is no "M" PACKAGE TYPE, so that seems wrong.
Quoted 2 lines
Winbond names this flash "
W25Q128JW_DTR", you can find the name on the top right of each page from [1].
Per 8.1 the IDs are the same for both _DTR [1] and non-DTR [2] variants.
Quoted 6 lines
What I propose:
1/ according to [1] W25Q128JW_IM/JM isW25Q128JW_DTR, let's use "-dtr"
for the M flavor.
2/ according to [2] W25Q128JW has two flavors: W25Q128JW-IQ/JQ andW25Q128JW-IM/JM*. Since W25Q128JW_IM/JM is called W25Q128JW_DTR, let's use just "W25Q128JW" for W25Q128JW-IQ/JQ, as winbond uses too.
1/ That looks wrong to me. The W25Q128JW and W25Q128JW_DTR are two different products of Winbond, see "Features" column in:
https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/
Density -> 128Mb
W25Q128JW
1.7V - 1.95V
133MHz
SPI 4 I/O Fixed <------
W25Q128JW_DTR
1.7V - 1.95V
133MHz
SPI / QPI / DTR <------
Then, compare the datasheets [1] and [2], notice how the _DTR variant supports more functionality compared to the non-DTR variant:
8.1.4 Instruction Set Table 3 (QPI Instructions) 8.1.5 Instruction Set Table 4 (DTR with SPI Instructions) 8.1.6 Instruction Set Table 5 (DTR with QPI Instructions)
So my counter-proposal would be to call it just "w25q128jw" , that's the lowest common denominator of the DTR and non-DTR variant. And then, use SFDP to determine whether the QPI/DTR extras are supported by the flash (and thus whether it is the DTR variant or not).
The only downside is, I only have the non-DTR variant, so I cannot dump the SFDP tables of the DTR variant and check whether it differs from the non-DTR variant. I would expect it does.
2/ That looks wrong to me too. Look at [1] for the meaning of -xM/-xQ suffix of the flash, it has nothing to do with the DTR support. It just says what is the QE bit setting in SR2:
11. ORDERING INFORMATION
Q ... with QE = 1 (fixed) in Status register-2.
N ... with QE = 1 (fixed) in Status register-2 & DRV=75%. Backward compatible to FW family. M ... with QE = 0 (programmable) in Status register-2. New device ID is used to identify FW family
Quoted 3 lines
Looking at [3], I see that W25Q128JV and W25Q128FV use the same flash ID, I wonder what's the difference between them. I made a proposal in linux on how to handle flash collisions, a v5 will follow.
https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/
Density -> 128Mb
W25Q128FV
2.7V - 3.6V
104MHz <-----------
SPI / QPI <--------
W25Q128JV
2.7V - 3.6V
133MHz <-----------
SPI 4 I/O Fixed <--
Unlike the -JV, the -FV has
Instruction Set Table 3 (QPI Instructions)
See my suggestion above, use the lowest common denominator flash (in this case JV) as a base and then use SFDP to determine whether extra features are available. Would that work ?
Quoted 16 lines
Cheers,
ta
[1] https://www.winbond.com/resource-files/W25Q128JW_DTR%20RevF1%2005212021.pdf
[2] https://www.winbond.com/resource-files/W25Q128JW_RevG_07292021%20Plus.pdf
[3] https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/?__locale=en&selected=128Mb#DensityQuoted 9 lines
drivers/mtd/spi/spi-nor-ids.c +3
-1+SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ | + SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) + }, { INFO("w25q256fw", 0xef6019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | --2.34.1
[...]
Quoted 5 lines · Marek Vasut
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
On 3/9/22 05:33, [email protected] wrote:
Hi,
Hi,
Quoted 21 lines
[...]
Quoted 17 lines
Quoted 8 lines
drivers/mtd/spi/spi-nor-ids.c| 5 +++++1 file changed, 5 insertions(+)drivers/mtd/spi/spi-nor-ids.c +0
-0@@ -345,6 +345,11 @@ const struct flash_info spi_nor_ids[] = {Quoted 5 lines
SECT_4K|SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_HAS_LOCK|SPI_NOR_HAS_TB)
},
+ {
+ INFO("w25q128jw",0xef8018, 0, 64 * 1024, 256,I'm glad I can discuss with you about the name of these winbond flashes, you can help with an advice. In linux we name this flash "w25q128jwm", but maybe we should change it.
Quoted 1 line
How did you arrive at "jwm" suffix ? Per both [1] and [2] "11.1 Valid
by checking sections "8.1.1 Manufacturer and Device Identification" and "11. ORDERING INFORMATION" from the datasheets.
Package type and temperature info doesn't matter for naming convention, but seems that the last suffix does: when M, QE = 0 (and it is programmable), when Q or N, Quad Enable is fixed and always enabled (QE = 1).
Quoted 2 lines
Part Numbers and Top Side Marking" there is no "M" PACKAGE TYPE, so that seems wrong.
mm, ok.
Quoted 75 lines
Quoted 3 lines
Winbond names this flash "
W25Q128JW_DTR", you can find the name on the top right of each page from [1].Per 8.1 the IDs are the same for both
_DTR[1] and non-DTR [2] variants.Quoted 6 lines
What I propose:
1/ according to [1] W25Q128JW_IM/JM isW25Q128JW_DTR, let's use "-dtr" for the M flavor.
2/ according to [2] W25Q128JW has two flavors: W25Q128JW-IQ/JQ and W25Q128JW-IM/JM*. Since W25Q128JW_IM/JM is calledW25Q128JW_DTR, let's use just "W25Q128JW" for W25Q128JW-IQ/JQ, as winbond uses too.1/ That looks wrong to me. The W25Q128JW and
W25Q128JW_DTRare two different products of Winbond, see "Features" column in:https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/
Density -> 128Mb
W25Q128JW
1.7V - 1.95V
133MHz
SPI 4 I/O Fixed <------
W25Q128JW_DTR
1.7V - 1.95V
133MHz
SPI / QPI / DTR <------Then, compare the datasheets [1] and [2], notice how the
_DTRvariant supports more functionality compared to the non-DTR variant:8.1.4 Instruction Set Table 3 (QPI Instructions) 8.1.5 Instruction Set Table 4 (DTR with SPI Instructions) 8.1.6 Instruction Set Table 5 (DTR with QPI Instructions)
So my counter-proposal would be to call it just "w25q128jw" , that's the lowest common denominator of the DTR and non-DTR variant. And then, use SFDP to determine whether the QPI/DTR extras are supported by the flash (and thus whether it is the DTR variant or not).
The only downside is, I only have the non-DTR variant, so I cannot dump the SFDP tables of the DTR variant and check whether it differs from the non-DTR variant. I would expect it does.
2/ That looks wrong to me too. Look at [1] for the meaning of -xM/-xQ suffix of the flash, it has nothing to do with the DTR support. It just says what is the QE bit setting in SR2:
11. ORDERING INFORMATION
Q ... with QE = 1 (fixed) in Status register-2.
N ... with QE = 1 (fixed) in Status register-2 & DRV=75%. Backward compatible to FW family.
M ... with QE = 0 (programmable) in Status register-2. New device ID is used to identify FW familyQuoted 3 lines
Looking at [3], I see that W25Q128JV and W25Q128FV use the same flash ID, I wonder what's the difference between them. I made a proposal in linux on how to handle flash collisions, a v5 will follow.
https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/
Density -> 128Mb
W25Q128FV
2.7V - 3.6V
104MHz <-----------
SPI / QPI <--------W25Q128JV
2.7V - 3.6V
133MHz <-----------
SPI 4 I/O Fixed <--
Quoted 6 lines
Unlike the -JV, the -FV has
Instruction Set Table 3 (QPI Instructions)See my suggestion above, use the lowest common denominator flash (in this case JV) as a base and then use SFDP to determine whether extra features are available. Would that work ?
I don't think it will work because the -DTR and non-DTR have different flash IDs.
ta
Quoted 19 lines
Quoted 17 lines
Cheers,
ta
[1] https://www.winbond.com/resource-files/W25Q128JW_DTR%20RevF1%2005212021.pdf
[2] https://www.winbond.com/resource-files/W25Q128JW_RevG_07292021%20Plus.pdf
[3] https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/?__locale=en&selected=128Mb#DensityQuoted 9 lines
+
SECT_4K|SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ| +SPI_NOR_HAS_LOCK|SPI_NOR_HAS_TB)
+ },
{
INFO("w25q256fw",0xef6019, 0, 64 * 1024, 512,SECT_4K|SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|Signature · 1 line
2.34.1[...]
On 3/16/22 04:55, [email protected] wrote:
Hi,
Quoted 20 lines
Quoted 20 lines
[...]
Quoted 17 lines
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 349
Quoted 13 lines
drivers/mtd/spi/spi-nor-ids.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mtd/spi/spi-nor-ids.c +2
-0@@ -345,6 +345,11 @@ const struct flash_info spi_nor_ids[] = { SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, + { + INFO("w25q128jw", 0xef8018, 0, 64 * 1024, 256,I'm glad I can discuss with you about the name of these winbond flashes, you can help with an advice. In linux we name this flash "w25q128jwm", but maybe we should change it.
Quoted 8 lines
Quoted 1 line
How did you arrive at "jwm" suffix ? Per both [1] and [2] "11.1 Valid
by checking sections "8.1.1 Manufacturer and Device Identification" and "11. ORDERING INFORMATION" from the datasheets.
Package type and temperature info doesn't matter for naming convention, but seems that the last suffix does: when M, QE = 0 (and it is programmable), when Q or N, Quad Enable is fixed and always enabled (QE = 1).
Oh, so that would be w25q128jw--m / w25q128jw--q then ?
Quoted 4 lines
Quoted 2 lines
Part Numbers and Top Side Marking" there is no "M" PACKAGE TYPE, so that seems wrong.
mm, ok.
See above.
Quoted 77 lines
Quoted 77 lines
Quoted 2 lines
Winbond names this flash "
W25Q128JW_DTR", you can find the name on the top right of each page from [1].Per 8.1 the IDs are the same for both
_DTR[1] and non-DTR [2] variants.Quoted 6 lines
What I propose:
1/ according to [1] W25Q128JW_IM/JM isW25Q128JW_DTR, let's use "-dtr"
for the M flavor.
2/ according to [2] W25Q128JW has two flavors: W25Q128JW-IQ/JQ and
W25Q128JW-IM/JM*. Since W25Q128JW_IM/JM is calledW25Q128JW_DTR, let's use just "W25Q128JW" for W25Q128JW-IQ/JQ, as winbond uses too.1/ That looks wrong to me. The W25Q128JW and
W25Q128JW_DTRare two different products of Winbond, see "Features" column in:https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/
Density -> 128Mb
W25Q128JW
1.7V - 1.95V
133MHz
SPI 4 I/O Fixed <------
W25Q128JW_DTR
1.7V - 1.95V
133MHz
SPI / QPI / DTR <------Then, compare the datasheets [1] and [2], notice how the
_DTRvariant supports more functionality compared to the non-DTR variant:8.1.4 Instruction Set Table 3 (QPI Instructions) 8.1.5 Instruction Set Table 4 (DTR with SPI Instructions) 8.1.6 Instruction Set Table 5 (DTR with QPI Instructions)
So my counter-proposal would be to call it just "w25q128jw" , that's the lowest common denominator of the DTR and non-DTR variant. And then, use SFDP to determine whether the QPI/DTR extras are supported by the flash (and thus whether it is the DTR variant or not).
The only downside is, I only have the non-DTR variant, so I cannot dump the SFDP tables of the DTR variant and check whether it differs from the non-DTR variant. I would expect it does.
2/ That looks wrong to me too. Look at [1] for the meaning of -xM/-xQ suffix of the flash, it has nothing to do with the DTR support. It just says what is the QE bit setting in SR2:
11. ORDERING INFORMATION
Q ... with QE = 1 (fixed) in Status register-2.
N ... with QE = 1 (fixed) in Status register-2 & DRV=75%. Backward compatible to FW family.
M ... with QE = 0 (programmable) in Status register-2. New device ID is used to identify FW familyQuoted 3 lines
Looking at [3], I see that W25Q128JV and W25Q128FV use the same flash ID, I wonder what's the difference between them. I made a proposal in linux on how to handle flash collisions, a v5 will follow.
https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/
Density -> 128Mb
W25Q128FV
2.7V - 3.6V
104MHz <-----------
SPI / QPI <--------W25Q128JV
2.7V - 3.6V
133MHz <-----------
SPI 4 I/O Fixed <--Unlike the -JV, the -FV has
Instruction Set Table 3 (QPI Instructions)
Quoted 6 lines
Quoted 3 lines
See my suggestion above, use the lowest common denominator flash (in this case JV) as a base and then use SFDP to determine whether extra features are available. Would that work ?
I don't think it will work because the -DTR and non-DTR have different flash IDs.
Be careful, I think you are conflating -xM/-xQ and _DTR and non-DTR variants of this W25Q128 flash. Look at [1] and [2] again, the ID 0x8018:
8.1.1 Manufacturer and Device Identification
Device ID | (ID7 - ID0) | (ID15 - ID0) Instruction | ABh, 90h, 92h, 94h | 9Fh
(non-DTR variant)
W25Q128JW-IQ/JQ | 17h | 6018h W25Q128JW-IM/JM*| 17h | 8018h
-DTR variant:
W25Q128JW_IM/JM | 17h | 8018h
So you should be able to tell the non-DTR variant of w25q128jw based purely on flash ID . You should also be able to tell whether the 0x8018 flash is in fact DTR variant based on the presence of the extra DTR opcodes in SFDP. This:
if (id == 0x6018) {
return W25Q128JWxxQ with QE=1
} else if (id == 0x8018) {
if (SFDP indicates DTR commands present)
return W25Q128JWxxM_DTR;
else
return W25Q128JWxxM (non-DTR);
}Same thing applies to W25Q128JV/FV with id 0x4018:
Device ID | (ID7 - ID0) | (ID15 - ID0) Instruction | ABh, 90h, 92h, 94h | 9Fh W25Q128FV (SPI Mode) | 17h | 4018h W25Q128FV (QPI Mode) | 17h | 6018h
Device ID | (ID7 - ID0) | (ID15 - ID0) Instruction | ABh, 90h, 92h, 94h | 9Fh W25Q128JV-IN/IQ/JQ | 17h | 4018h W25Q128JV-IM*/JM* | 17h | 7018h
There the lowest common denominator is w25q128jv and we should be able to tell whether it is really w25q128fv by checking SFDP and see whether the QPI opcodes are supported.
[...]
Quoted 19 lines · Marek Vasut
Add ID for Winbond W25Q128JW device. This is a 128 Mbit QSPI NOR. Tested on W25Q128JWPIM part.
Signed-off-by Marek Vasut <[email protected]>Cc Horatiu Vultur <[email protected]>Cc Jagan Teki <[email protected]>Cc Simon Goldschmidt <[email protected]>Cc Stefan Roese <[email protected]>Cc Vignesh R <[email protected]>--- drivers/mtd/spi/spi-nor-ids.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mtd/spi/spi-nor-ids.c +0
-0@@ -345,6 +345,11 @@ const struct flash_info spi_nor_ids[] = { SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 355
Quoted 10 lines
drivers/mtd/spi/spi-nor-ids.c +5
-0SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, + { +INFO ("w25q128jw" ,0xef8018 ,0 ,64 *1024 ,256 , +SECT_4K |SPI_NOR_DUAL_READ |SPI_NOR_QUAD_READ | +SPI_NOR_HAS_LOCK |SPI_NOR_HAS_TB ) + }, { INFO("w25q256fw", 0xef6019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
It would be good to apply this patch.