drivers/mtd/spi-nor/micron-st.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
This reverts commit 44dd635cd632824f412ff2a6b320d9302a277ad0.
Find two batches mt35xu512aba has different SFDP but with same
jedec ID. To make all batches of mt35xu512aba work well and
support OCT DTR mode, back to hardcode the flags.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
mt35xu512aba chip with label 4KA17 RW303:
root@imx943evk:/sys/bus/spi/devices/spi8.0/spi-nor# cat jedec_id
2c5b1a
root@imx943evk:/sys/bus/spi/devices/spi8.0/spi-nor# cat manufacturer
micron
root@imx943evk:/sys/bus/spi/devices/spi8.0/spi-nor# hexdump -Cv sfdp
00000000 53 46 44 50 0a 01 03 ff 00 08 01 17 30 00 00 ff |SFDP........0...|
00000010 84 00 01 02 90 00 00 ff 05 01 01 06 a0 00 00 ff |................|
00000020 0a 00 01 08 b0 00 00 ff ff ff ff ff ff ff ff ff |................|
00000030 e5 20 8a ff ff ff ff 1f 00 00 00 00 00 00 00 00 |. ..............|
00000040 ee ff ff ff ff ff 00 00 ff ff 00 00 0c 20 11 d8 |............. ..|
00000050 0f 52 00 00 39 61 99 00 87 8e 03 d3 ac a1 27 3d |.R..9a........'=|
00000060 7a 75 7a 75 fb bd d5 5c 00 00 70 ff 81 50 f8 a1 |zuzu...\..p..P..|
00000070 2f cb 27 8b 00 00 04 01 00 06 01 00 ff ff ff 8e |/.'.............|
00000080 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
00000090 43 0e ff ff 21 dc 5c ff ff ff ff ff ff ff ff ff |C...!.\.........|
000000a0 00 0b 80 9e b1 81 b5 85 00 f0 ff 9f 00 0a 00 00 |................|
000000b0 00 0a 1a 88 10 00 00 00 ff ff ff ff ff ff ff ff |................|
000000c0 00 00 06 01 00 00 00 00 14 01 81 03 00 00 00 00 |................|
000000d0
mt35xu512aba chip with label 0DA15 RW303:
root@imx8qmmek:/sys/bus/spi/devices/spi4.0/spi-nor# ls
jedec_id manufacturer sfdp
root@imx8qmmek:/sys/bus/spi/devices/spi4.0/spi-nor# cat jedec_id
2c5b1a
root@imx8qmmek:/sys/bus/spi/devices/spi4.0/spi-nor# cat manufacturer
micron
root@imx8qmmek:/sys/bus/spi/devices/spi4.0/spi-nor# hexdump -Cv sfdp
00000000 53 46 44 50 06 01 01 ff 00 06 01 10 30 00 00 ff |SFDP........0...|
00000010 84 00 01 02 80 00 00 ff ff ff ff ff ff ff ff ff |................|
00000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
00000030 e5 20 8a ff ff ff ff 1f 00 00 00 00 00 00 00 00 |. ..............|
00000040 ee ff ff ff ff ff 00 00 ff ff 00 00 0c 20 11 d8 |............. ..|
00000050 0f 52 00 00 24 5a 99 00 8b 8e 03 e1 ac 01 27 38 |.R..$Z........'8|
00000060 7a 75 7a 75 fb bd d5 5c 00 00 70 ff 81 b0 38 36 |zuzu...\..p...86|
00000070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
00000080 43 0e ff ff 21 dc 5c ff |C...!.\.|
00000088
---
drivers/mtd/spi-nor/micron-st.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
index 88033384a71e5d19f5a26ca91f56a49e3017183a..0a67053a60693684080554db5b4688aefc00062e 100644
--- a/drivers/mtd/spi-nor/micron-st.c
+++ b/drivers/mtd/spi-nor/micron-st.c
@@ -192,10 +192,14 @@ static const struct spi_nor_fixups mt35xu01gbba_fixups = {
static const struct flash_info micron_nor_parts[] = {
{
- /* MT35XU512ABA */
.id = SNOR_ID(0x2c, 0x5b, 0x1a),
+ .name = "mt35xu512aba",
+ .sector_size = SZ_128K,
+ .size = SZ_64M,
+ .no_sfdp_flags = SECT_4K | SPI_NOR_OCTAL_READ |
+ SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP,
.mfr_flags = USE_FSR,
- .fixup_flags = SPI_NOR_IO_MODE_EN_VOLATILE,
+ .fixup_flags = SPI_NOR_4B_OPCODES | SPI_NOR_IO_MODE_EN_VOLATILE,
.fixups = &mt35xu512aba_fixups,
}, {
/* MT35XU01GBBA */
---
base-commit: d9771d0dbe18dd643760431870a6abf9b0866bb0
change-id: 20251212-nor-2f37cf12eeca
Best regards,
--
Haibo Chen <haibo.chen@nxp.com>
Hi, On Fri Dec 12, 2025 at 9:30 AM CET, Haibo Chen wrote: > This reverts commit 44dd635cd632824f412ff2a6b320d9302a277ad0. > > Find two batches mt35xu512aba has different SFDP but with same > jedec ID. To make all batches of mt35xu512aba work well and > support OCT DTR mode, back to hardcode the flags. What are "batches" in this case? A new revision of the same flash chip? Why would they use a different ID then. What's wrong with the parsed flags? Both support SFDP, so if you really need to fixup any flags, please use a fixup callback to actually fix them. But first, what will go wrong? -michael > Signed-off-by: Haibo Chen <haibo.chen@nxp.com> > --- > mt35xu512aba chip with label 4KA17 RW303: > root@imx943evk:/sys/bus/spi/devices/spi8.0/spi-nor# cat jedec_id > 2c5b1a > root@imx943evk:/sys/bus/spi/devices/spi8.0/spi-nor# cat manufacturer > micron > root@imx943evk:/sys/bus/spi/devices/spi8.0/spi-nor# hexdump -Cv sfdp > 00000000 53 46 44 50 0a 01 03 ff 00 08 01 17 30 00 00 ff |SFDP........0...| > 00000010 84 00 01 02 90 00 00 ff 05 01 01 06 a0 00 00 ff |................| > 00000020 0a 00 01 08 b0 00 00 ff ff ff ff ff ff ff ff ff |................| > 00000030 e5 20 8a ff ff ff ff 1f 00 00 00 00 00 00 00 00 |. ..............| > 00000040 ee ff ff ff ff ff 00 00 ff ff 00 00 0c 20 11 d8 |............. ..| > 00000050 0f 52 00 00 39 61 99 00 87 8e 03 d3 ac a1 27 3d |.R..9a........'=| > 00000060 7a 75 7a 75 fb bd d5 5c 00 00 70 ff 81 50 f8 a1 |zuzu...\..p..P..| > 00000070 2f cb 27 8b 00 00 04 01 00 06 01 00 ff ff ff 8e |/.'.............| > 00000080 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................| > 00000090 43 0e ff ff 21 dc 5c ff ff ff ff ff ff ff ff ff |C...!.\.........| > 000000a0 00 0b 80 9e b1 81 b5 85 00 f0 ff 9f 00 0a 00 00 |................| > 000000b0 00 0a 1a 88 10 00 00 00 ff ff ff ff ff ff ff ff |................| > 000000c0 00 00 06 01 00 00 00 00 14 01 81 03 00 00 00 00 |................| > 000000d0 > > mt35xu512aba chip with label 0DA15 RW303: > root@imx8qmmek:/sys/bus/spi/devices/spi4.0/spi-nor# ls > jedec_id manufacturer sfdp > root@imx8qmmek:/sys/bus/spi/devices/spi4.0/spi-nor# cat jedec_id > 2c5b1a > root@imx8qmmek:/sys/bus/spi/devices/spi4.0/spi-nor# cat manufacturer > micron > root@imx8qmmek:/sys/bus/spi/devices/spi4.0/spi-nor# hexdump -Cv sfdp > 00000000 53 46 44 50 06 01 01 ff 00 06 01 10 30 00 00 ff |SFDP........0...| > 00000010 84 00 01 02 80 00 00 ff ff ff ff ff ff ff ff ff |................| > 00000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 00000030 e5 20 8a ff ff ff ff 1f 00 00 00 00 00 00 00 00 |. ..............| > 00000040 ee ff ff ff ff ff 00 00 ff ff 00 00 0c 20 11 d8 |............. ..| > 00000050 0f 52 00 00 24 5a 99 00 8b 8e 03 e1 ac 01 27 38 |.R..$Z........'8| > 00000060 7a 75 7a 75 fb bd d5 5c 00 00 70 ff 81 b0 38 36 |zuzu...\..p...86| > 00000070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| > 00000080 43 0e ff ff 21 dc 5c ff |C...!.\.| > 00000088 Thanks! -michael
© 2016 - 2025 Red Hat, Inc.