Re: [PATCH RFC v1 2/2] mtd: spi-nor: expose internal parameters via debugfs
From: Michael Walle
Date: Mon Apr 18 2022 - 08:13:34 EST
Am 2022-04-18 14:10, schrieb Michael Walle:
There is no way to gather all information to verify support for a new
flash chip. Also if you want to convert an existing flash chip to the
new SFDP parsing, there is not enough information to determine if the
flash will work like before. To ease this development, expose internal
parameters via the debugfs.
Here's an example:
# cat params
name w25q32dw
id ef6016
size 4.00 MiB
write size 1
page size 256
address width 3
flags HAS_SR_TB|HAS_LOCK|HAS_16BIT_SR|NO_READ_CR|SOFT_RESET
opcodes
read 3b
dummy cycles 8
erase 20
program 02
8D extension none
protocols
read 1S-1S-2S
write 1S-1S-1S
register 1S-1S-1S
erase commands
20 (4.00 KiB) [1]
52 (32.0 KiB) [2]
d8 (64.0 KiB) [3]
c7 (4.00 MiB)
sector map
region | erase mask | flags
--------------------+------------+----------
00000000 - 003fffff | [ 123] |
# cat capabilities
Supported read modes by the flash
1S-1S-1S
opcode 03
mode cycles 00
dummy cycles 00
1S-1S-1S (fast read)
opcode 0b
mode cycles 00
dummy cycles 08
1S-1S-2S
opcode 3b
mode cycles 00
dummy cycles 08
1S-2S-2S
opcode bb
mode cycles 02
dummy cycles 02
1S-1S-4S
opcode 6b
mode cycles 00
dummy cycles 08
1S-4S-4S
opcode eb
mode cycles 02
dummy cycles 04
4S-4S-4S
opcode eb
mode cycles 02
dummy cycles 00
Supported page program modes by the flash
1S-1S-1S
opcode 02