MT25Q Advanced Sector Protection support
Hi,
I'm right now working on a board equipped with an MT25QU128ABA1ESE. And after doing some intensive QSPI NOR tests, one sector (at 0x40000) seems to be permanently locked. The normal unlocking does not seem to help:
# flash_eraseall -u /dev/mtd0
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
Erasing 64 Kibyte @ 40000 -- 22 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 4 (mtd0)
error 5 (Input/output error)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 5 (Input/output error)
Erasing 64 Kibyte @ 110000 -- 100 % completeMy best guess right now is that somehow the nonvolatile locking via the advanced sector protection is active and locking this sector.
Does anyone have some ideas on how to continue here? Is there some ongoing work to support the Micron advanced sector protection in Linux? Or did I miss something trivial perhaps?
Thanks,
Stefan
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 3 lines · Stefan Roese
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hi,
Hi,
Quoted 7 lines
I'm right now working on a board equipped with an MT25QU128ABA1ESE. And after doing some intensive QSPI NOR tests, one sector (at
0x40000) seems to be permanently locked. The normal unlocking does not seem to help:# flash_eraseall -u /dev/mtd0
have you tried to unlock it before erasing? You can use flash_unlock.
Quoted 9 lines
flash_eraseallhas been replaced byflash_erase <mtddev> 0 0; please use it
Erasing 64 Kibyte @ 40000 -- 22 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 4 (mtd0)
error 5 (Input/output error)flash_erase: error!:/dev/mtd0: MTD Erase failure
error 5 (Input/output error)
Erasing 64 Kibyte @ 110000 -- 100 % complete
Quoted 4 lines
My best guess right now is that somehow the nonvolatile locking via the advanced sector protection is active and locking this sector.
Does anyone have some ideas on how to continue here? Is there some
If it's indeed about the individual block protection, you'll have to read the register that describes which registers are locked.
Quoted 1 line
ongoing work to support the Micron advanced sector protection in Linux?
I'm adding support for individual block protection on sst26 flashes, which should be similar.
Cheers,
ta
Quoted 4 lines
Or did I miss something trivial perhaps?
Thanks,
Stefan
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Hi Tudor,
Quoted 8 lines · On 15.04.21 11:40, [email protected] wrote:
Quoted 3 lines · Stefan Roese
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hi,
Hi,
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
I'm right now working on a board equipped with an MT25QU128ABA1ESE. And after doing some intensive QSPI NOR tests, one sector (at
0x40000) seems to be permanently locked. The normal unlocking does not seem to help:# flash_eraseall -u /dev/mtd0have you tried to unlock it before erasing? You can use
flash_unlock.
IIUTC, the "-u" parameter in eraseall should provide this unlocking as well. But hey, I also tried "flash_unlock" without any success. I assume that this command unlocks all sectors in the MTD device automatically.
Quoted 9 lines
Quoted 9 lines
flash_eraseallhas been replaced byflash_erase <mtddev> 0 0; please use it
Erasing 64 Kibyte @ 40000 -- 22 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 4 (mtd0)
error 5 (Input/output error)flash_erase: error!:/dev/mtd0: MTD Erase failure
error 5 (Input/output error)
Erasing 64 Kibyte @ 110000 -- 100 % complete
Quoted 7 lines
Quoted 4 lines
My best guess right now is that somehow the nonvolatile locking via the advanced sector protection is active and locking this sector.
Does anyone have some ideas on how to continue here? Is there some
If it's indeed about the individual block protection, you'll have to read the register that describes which registers are locked.
Yes, I'm digging into it right now. ;)
Quoted 4 lines
Quoted 1 line
ongoing work to support the Micron advanced sector protection in Linux?
I'm adding support for individual block protection on sst26 flashes, which should be similar.
Do you by any chance have a WIP version to share, so that I could base my work on this?
Thanks,
Stefan
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 18 lines · Stefan Roese
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hi Tudor,
Quoted 13 lines · On 15.04.21 11:40, [email protected] wrote:
Quoted 3 lines · Stefan Roese
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hi,
Hi,
Quoted 6 lines
I'm right now working on a board equipped with an MT25QU128ABA1ESE. And after doing some intensive QSPI NOR tests, one sector (at
0x40000) seems to be permanently locked. The normal unlocking does not seem to help:
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
# flash_eraseall -u /dev/mtd0have you tried to unlock it before erasing? You can use
flash_unlock.IIUTC, the "-u" parameter in eraseall should provide this unlocking as
oh yes, I missed that.
Quoted 2 lines
well. But hey, I also tried "
flash_unlock" without any success. I assume that this command unlocks all sectors in the MTD device automatically.
yes, this is what I would expect.
Quoted 20 lines
Quoted 10 lines
Quoted 10 lines
flash_eraseallhas been replaced byflash_erase <mtddev> 0 0; please use it
Erasing 64 Kibyte @ 40000 -- 22 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 4 (mtd0)
error 5 (Input/output error)flash_erase: error!:/dev/mtd0: MTD Erase failure
error 5 (Input/output error)
Erasing 64 Kibyte @ 110000 -- 100 % completeQuoted 7 lines
Quoted 4 lines
My best guess right now is that somehow the nonvolatile locking via the advanced sector protection is active and locking this sector.
Does anyone have some ideas on how to continue here? Is there some
If it's indeed about the individual block protection, you'll have to read the register that describes which registers are locked.
Yes, I'm digging into it right now. ;)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
ongoing work to support the Micron advanced sector protection in Linux?
I'm adding support for individual block protection on sst26 flashes, which should be similar.
Do you by any chance have a WIP version to share, so that I could base my work on this?
The sst26 individual block protection is vendor specific, has some read and write locking features, the individual block protection is discovered by parsing a vendor specific table, etc. My implementation will reside in sst.c.
You have to check if the Individual Block Protection scheme supported by micron is used by other vendors as well, and if yes, the code should reside in swp.c. Similar flash support, but different implementations. I have 2 patches at:
To https://github.com/ambarus/linux-0day.git
* [new branch] spi-nor/next-sst26-locking -> spi-nor/next-sst26-locking
Cheers,
ta
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/