All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Takahiro.Kuwano@infineon.com>
To: <miquel.raynal@bootlin.com>, <pratyush@kernel.org>,
	<mwalle@kernel.org>, <richard@nod.at>, <vigneshr@ti.com>,
	<nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
	<claudiu.beznea@tuxon.dev>, <corbet@lwn.net>,
	<skhan@linuxfoundation.org>
Cc: <STLin2@winbond.com>, <hsinyi@chromium.org>,
	<thomas.petazzoni@bootlin.com>, <linux-mtd@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>
Subject: RE: [PATCH v3 13/23] mtd: spi-nor: winbond: Add support for W25Q01RV-Q/N
Date: Thu, 20 Aug 2026 06:15:08 +0000	[thread overview]
Message-ID: <4d7597839fc542ea846fe0ddb3eb6683@infineon.com> (raw)
In-Reply-To: <20260813-winbond-v7-1-spi-nor-rv-addition-v3-13-b637cf120d5c@bootlin.com>

Hi Miquel,

> There is an ID collision with the chip of same density from the JV
> family. Both chips are very similar in practice, it is mostly a matter
> of electrical differences (mostly power consumption being lower).
> 
> As a significant difference, RV chips identify themselves as supporting
> the new SFDP (rev F) field which forces an alternate write SR2
> opcode (0x31).
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> + cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id
> ef4020

ef4021?
I think you copied wrong log (this looks same as patch #12).

> + cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer
> winbond
> + xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
> 534644500a0101ff00080117800000ff84010102e00000ffffffffffffff
> ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> ffffffffffffffffe520f3ffffffff1f44eb086b083b42bbfeffffffffff
> 0000ffff44eb0c200f5210d800001602a60081e214dde96376337a757a75
> f7a4d55c39f66dffe970f9a50000000000002c0c0000000066ffffff0000
> 00000000000000000000ffffffffff0a00fe21ffdcff
> + sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
> 74d21fecc7faa297b3f77f1136b1dc53f78b2a432629e226675b6384153fd9f9  /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
> + cat /sys/kernel/debug/spi-nor/spi0.0/capabilities
> Supported read modes by the flash
>  1S-1S-1S
>   opcode        0x13
>   mode cycles   0
>   dummy cycles  0
>  1S-1S-2S
>   opcode        0x3c
>   mode cycles   0
>   dummy cycles  8
>  1S-2S-2S
>   opcode        0xbc
>   mode cycles   2
>   dummy cycles  2
>  1S-1S-4S
>   opcode        0x6c
>   mode cycles   0
>   dummy cycles  8
>  1S-4S-4S
>   opcode        0xec
>   mode cycles   2
>   dummy cycles  4
>  4S-4S-4S
>   opcode        0xec
>   mode cycles   2
>   dummy cycles  4
> 
> Supported page program modes by the flash
>  1S-1S-1S
>   opcode        0x12
>  1S-1S-4S
>   opcode        0x34
> + cat /sys/kernel/debug/spi-nor/spi0.0/params
> name            (null)
> id              ef 40 20 00 00 00
> size            64.0 MiB
> write size      1
> page size       256
> address nbytes  4
> flags           HAS_SR_TB | 4B_OPCODES | HAS_4BAIT | HAS_LOCK | HAS_SR_TB_BIT6 | HAS_4BIT_BP | SOFT_RESET | NO_WP |
> HAS_SR2_CMP_BIT6
> 
> opcodes
>  read           0xec
>   dummy cycles  6
>  erase          0xdc
>  program        0x34
>  8D extension   repeat
> 
> protocols
>  read           1S-4S-4S
>  write          1S-1S-4S
>  register       1S-1S-1S
> 
> erase commands
>  21 (4.00 KiB) [1]
>  dc (64.0 KiB) [3]
>  c7 (64.0 MiB)
> 
> sector map
>  region (in hex)   | erase mask | overlaid
>  ------------------+------------+---------
>  00000000-03ffffff |     [   3] | no
> 
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03ffffff | unlocked | 1024
> + dd 'if=/dev/urandom' 'of=./spi_test' 'bs=1M' 'count=2'
> 2+0 records in
> 2+0 records out
> + mtd_debug erase /dev/mtd0 0 2097152
> Erased 2097152 bytes from address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + hexdump spi_read
> 0000000 ffff ffff ffff ffff ffff ffff ffff ffff
> *
> 0200000
> + sha256sum spi_read
> 4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5  spi_read
> + mtd_debug write /dev/mtd0 0 2097152 spi_test
> Copied 2097152 bytes from spi_test to address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + sha256sum spi_read spi_test
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> + mtd_debug erase /dev/mtd0 0 2097152
> Erased 2097152 bytes from address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + sha256sum spi_read spi_test
> 4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> + mtd_debug info /dev/mtd0
> mtd.type = MTD_NORFLASH
> mtd.flags = MTD_CAP_NORFLASH
> mtd.size = 67108864 (64M)
> mtd.erasesize = 65536 (64K)
> mtd.writesize = 1
> mtd.oobsize = 0
> regions = 0
> 
> + alias 'show_sectors=grep -A4 "locked sectors" /sys/kernel/debug/spi-nor/spi0.0/params'
> + flash_lock -u /dev/mtd0
> + flash_lock -i /dev/mtd0
> Device: /dev/mtd0
> Start: 0
> Len: 0x4000000
> Lock status: unlocked
> Return code: 0
> + mtd_debug erase /dev/mtd0 0 2097152
> Erased 2097152 bytes from address 0x00000000 in flash
> + mtd_debug write /dev/mtd0 0 2097152 spi_test
> Copied 2097152 bytes from spi_test to address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + sha256sum spi_read spi_test
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03ffffff | unlocked | 1024
> + flash_lock -l /dev/mtd0
> + flash_lock -i /dev/mtd0
> Device: /dev/mtd0
> Start: 0
> Len: 0x4000000
> Lock status: locked
> Return code: 1
> + mtd_debug erase /dev/mtd0 0 2097152
> Erased 2097152 bytes from address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + sha256sum spi_read spi_test
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> + dd 'if=/dev/urandom' 'of=./spi_test2' 'bs=1M' 'count=2'
> 2+0 records in
> 2+0 records out
> + mtd_debug write /dev/mtd0 0 2097152 spi_test2
> Copied 2097152 bytes from spi_test2 to address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read2
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read2
> + sha256sum spi_read spi_read2 spi_test spi_test2
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read2
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> 643412dbe0f46c2780ec8d4f609d369923829945f4bc3d7842138b2fbbc86046  spi_test2
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03ffffff |   locked | 1024
> + flash_lock -u /dev/mtd0
> + cat /sys/class/mtd/mtd0/size
> + size=67108864
> + cat /sys/class/mtd/mtd0/erasesize
> + bs=65536
> + grep unlocked /sys/kernel/debug/spi-nor/spi0.0/params
> + sed -e 's/.*unlocked | //'
> + nsectors=1024
> + ss=65536
> + bps=1
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 66977792 2
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03fdffff | unlocked | 1022
>  03fe0000-03ffffff |   locked | 2
> + flash_lock -u /dev/mtd0 66977792 1
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03feffff | unlocked | 1023
>  03ff0000-03ffffff |   locked | 1
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 58720256 128
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-037fffff | unlocked | 896
>  03800000-03ffffff |   locked | 128
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 0 2
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-0001ffff |   locked | 2
>  00020000-03ffffff | unlocked | 1022
> + flash_lock -u /dev/mtd0 65536 1
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-0000ffff |   locked | 1
>  00010000-03ffffff | unlocked | 1023
> + all_but_one=1023
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 65536 1023
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-0000ffff | unlocked | 1
>  00010000-03ffffff |   locked | 1023
> + flash_lock -u /dev/mtd0 65536 1
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-0001ffff | unlocked | 2
>  00020000-03ffffff |   locked | 1022
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 0 1023
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03feffff |   locked | 1023
>  03ff0000-03ffffff | unlocked | 1
> + flash_lock -u /dev/mtd0 66977792 1
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03fdffff |   locked | 1022
>  03fe0000-03ffffff | unlocked | 2
> ---
>  drivers/mtd/spi-nor/winbond.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
> index 47a5c2cf71de..1c67a652ddcd 100644
> --- a/drivers/mtd/spi-nor/winbond.c
> +++ b/drivers/mtd/spi-nor/winbond.c
> @@ -281,7 +281,7 @@ static const struct flash_info winbond_nor_parts[] = {
>                 .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 |
>                          SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP,
>         }, {
> -               /* W25Q01JV-Q/N */
> +               /* W25Q01JV-Q/N, W25Q01RV-Q/N */
>                 .id = SNOR_ID(0xef, 0x40, 0x21),
>                 .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 |
>                          SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP,
> 
> --
> 2.54.0


WARNING: multiple messages have this Message-ID (diff)
From: <Takahiro.Kuwano@infineon.com>
To: <miquel.raynal@bootlin.com>, <pratyush@kernel.org>,
	<mwalle@kernel.org>, <richard@nod.at>, <vigneshr@ti.com>,
	<nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
	<claudiu.beznea@tuxon.dev>, <corbet@lwn.net>,
	<skhan@linuxfoundation.org>
Cc: <STLin2@winbond.com>, <hsinyi@chromium.org>,
	<thomas.petazzoni@bootlin.com>, <linux-mtd@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>
Subject: RE: [PATCH v3 13/23] mtd: spi-nor: winbond: Add support for W25Q01RV-Q/N
Date: Thu, 20 Aug 2026 06:15:08 +0000	[thread overview]
Message-ID: <4d7597839fc542ea846fe0ddb3eb6683@infineon.com> (raw)
In-Reply-To: <20260813-winbond-v7-1-spi-nor-rv-addition-v3-13-b637cf120d5c@bootlin.com>

Hi Miquel,

> There is an ID collision with the chip of same density from the JV
> family. Both chips are very similar in practice, it is mostly a matter
> of electrical differences (mostly power consumption being lower).
> 
> As a significant difference, RV chips identify themselves as supporting
> the new SFDP (rev F) field which forces an alternate write SR2
> opcode (0x31).
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> + cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id
> ef4020

ef4021?
I think you copied wrong log (this looks same as patch #12).

> + cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer
> winbond
> + xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
> 534644500a0101ff00080117800000ff84010102e00000ffffffffffffff
> ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
> ffffffffffffffffe520f3ffffffff1f44eb086b083b42bbfeffffffffff
> 0000ffff44eb0c200f5210d800001602a60081e214dde96376337a757a75
> f7a4d55c39f66dffe970f9a50000000000002c0c0000000066ffffff0000
> 00000000000000000000ffffffffff0a00fe21ffdcff
> + sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
> 74d21fecc7faa297b3f77f1136b1dc53f78b2a432629e226675b6384153fd9f9  /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
> + cat /sys/kernel/debug/spi-nor/spi0.0/capabilities
> Supported read modes by the flash
>  1S-1S-1S
>   opcode        0x13
>   mode cycles   0
>   dummy cycles  0
>  1S-1S-2S
>   opcode        0x3c
>   mode cycles   0
>   dummy cycles  8
>  1S-2S-2S
>   opcode        0xbc
>   mode cycles   2
>   dummy cycles  2
>  1S-1S-4S
>   opcode        0x6c
>   mode cycles   0
>   dummy cycles  8
>  1S-4S-4S
>   opcode        0xec
>   mode cycles   2
>   dummy cycles  4
>  4S-4S-4S
>   opcode        0xec
>   mode cycles   2
>   dummy cycles  4
> 
> Supported page program modes by the flash
>  1S-1S-1S
>   opcode        0x12
>  1S-1S-4S
>   opcode        0x34
> + cat /sys/kernel/debug/spi-nor/spi0.0/params
> name            (null)
> id              ef 40 20 00 00 00
> size            64.0 MiB
> write size      1
> page size       256
> address nbytes  4
> flags           HAS_SR_TB | 4B_OPCODES | HAS_4BAIT | HAS_LOCK | HAS_SR_TB_BIT6 | HAS_4BIT_BP | SOFT_RESET | NO_WP |
> HAS_SR2_CMP_BIT6
> 
> opcodes
>  read           0xec
>   dummy cycles  6
>  erase          0xdc
>  program        0x34
>  8D extension   repeat
> 
> protocols
>  read           1S-4S-4S
>  write          1S-1S-4S
>  register       1S-1S-1S
> 
> erase commands
>  21 (4.00 KiB) [1]
>  dc (64.0 KiB) [3]
>  c7 (64.0 MiB)
> 
> sector map
>  region (in hex)   | erase mask | overlaid
>  ------------------+------------+---------
>  00000000-03ffffff |     [   3] | no
> 
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03ffffff | unlocked | 1024
> + dd 'if=/dev/urandom' 'of=./spi_test' 'bs=1M' 'count=2'
> 2+0 records in
> 2+0 records out
> + mtd_debug erase /dev/mtd0 0 2097152
> Erased 2097152 bytes from address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + hexdump spi_read
> 0000000 ffff ffff ffff ffff ffff ffff ffff ffff
> *
> 0200000
> + sha256sum spi_read
> 4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5  spi_read
> + mtd_debug write /dev/mtd0 0 2097152 spi_test
> Copied 2097152 bytes from spi_test to address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + sha256sum spi_read spi_test
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> + mtd_debug erase /dev/mtd0 0 2097152
> Erased 2097152 bytes from address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + sha256sum spi_read spi_test
> 4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> + mtd_debug info /dev/mtd0
> mtd.type = MTD_NORFLASH
> mtd.flags = MTD_CAP_NORFLASH
> mtd.size = 67108864 (64M)
> mtd.erasesize = 65536 (64K)
> mtd.writesize = 1
> mtd.oobsize = 0
> regions = 0
> 
> + alias 'show_sectors=grep -A4 "locked sectors" /sys/kernel/debug/spi-nor/spi0.0/params'
> + flash_lock -u /dev/mtd0
> + flash_lock -i /dev/mtd0
> Device: /dev/mtd0
> Start: 0
> Len: 0x4000000
> Lock status: unlocked
> Return code: 0
> + mtd_debug erase /dev/mtd0 0 2097152
> Erased 2097152 bytes from address 0x00000000 in flash
> + mtd_debug write /dev/mtd0 0 2097152 spi_test
> Copied 2097152 bytes from spi_test to address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + sha256sum spi_read spi_test
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03ffffff | unlocked | 1024
> + flash_lock -l /dev/mtd0
> + flash_lock -i /dev/mtd0
> Device: /dev/mtd0
> Start: 0
> Len: 0x4000000
> Lock status: locked
> Return code: 1
> + mtd_debug erase /dev/mtd0 0 2097152
> Erased 2097152 bytes from address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read
> + sha256sum spi_read spi_test
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> + dd 'if=/dev/urandom' 'of=./spi_test2' 'bs=1M' 'count=2'
> 2+0 records in
> 2+0 records out
> + mtd_debug write /dev/mtd0 0 2097152 spi_test2
> Copied 2097152 bytes from spi_test2 to address 0x00000000 in flash
> + mtd_debug read /dev/mtd0 0 2097152 spi_read2
> Copied 2097152 bytes from address 0x00000000 in flash to spi_read2
> + sha256sum spi_read spi_read2 spi_test spi_test2
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_read2
> 950cbc701e7f6ed69837b30bbf4145fe776e6c07a7bc5b8f346d42242bdd7a63  spi_test
> 643412dbe0f46c2780ec8d4f609d369923829945f4bc3d7842138b2fbbc86046  spi_test2
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03ffffff |   locked | 1024
> + flash_lock -u /dev/mtd0
> + cat /sys/class/mtd/mtd0/size
> + size=67108864
> + cat /sys/class/mtd/mtd0/erasesize
> + bs=65536
> + grep unlocked /sys/kernel/debug/spi-nor/spi0.0/params
> + sed -e 's/.*unlocked | //'
> + nsectors=1024
> + ss=65536
> + bps=1
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 66977792 2
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03fdffff | unlocked | 1022
>  03fe0000-03ffffff |   locked | 2
> + flash_lock -u /dev/mtd0 66977792 1
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03feffff | unlocked | 1023
>  03ff0000-03ffffff |   locked | 1
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 58720256 128
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-037fffff | unlocked | 896
>  03800000-03ffffff |   locked | 128
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 0 2
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-0001ffff |   locked | 2
>  00020000-03ffffff | unlocked | 1022
> + flash_lock -u /dev/mtd0 65536 1
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-0000ffff |   locked | 1
>  00010000-03ffffff | unlocked | 1023
> + all_but_one=1023
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 65536 1023
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-0000ffff | unlocked | 1
>  00010000-03ffffff |   locked | 1023
> + flash_lock -u /dev/mtd0 65536 1
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-0001ffff | unlocked | 2
>  00020000-03ffffff |   locked | 1022
> + flash_lock -u /dev/mtd0
> + flash_lock -l /dev/mtd0 0 1023
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03feffff |   locked | 1023
>  03ff0000-03ffffff | unlocked | 1
> + flash_lock -u /dev/mtd0 66977792 1
> + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params
> locked sectors
>  region (in hex)   | status   | #sectors
>  ------------------+----------+---------
>  00000000-03fdffff |   locked | 1022
>  03fe0000-03ffffff | unlocked | 2
> ---
>  drivers/mtd/spi-nor/winbond.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
> index 47a5c2cf71de..1c67a652ddcd 100644
> --- a/drivers/mtd/spi-nor/winbond.c
> +++ b/drivers/mtd/spi-nor/winbond.c
> @@ -281,7 +281,7 @@ static const struct flash_info winbond_nor_parts[] = {
>                 .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 |
>                          SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP,
>         }, {
> -               /* W25Q01JV-Q/N */
> +               /* W25Q01JV-Q/N, W25Q01RV-Q/N */
>                 .id = SNOR_ID(0xef, 0x40, 0x21),
>                 .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 |
>                          SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP,
> 
> --
> 2.54.0

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2026-08-20  6:15 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 15:19 [PATCH v3 00/23] mtd: spi-nor: QE handling cleanup + fixup reworks + Winbond RV chips addition Miquel Raynal
2026-08-13 15:19 ` Miquel Raynal
2026-08-13 15:19 ` [PATCH v3 01/23] mtd: spi-nor: Rename BFPT_DWORD15_QER_SR2_BIT1_BUGGY Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  7:30   ` Michael Walle
2026-08-14  7:30     ` Michael Walle
2026-08-20  5:50   ` Takahiro.Kuwano
2026-08-20  5:50     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 02/23] mtd: spi-nor: Create a structure containing the flash opcodes Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  7:31   ` Michael Walle
2026-08-14  7:31     ` Michael Walle
2026-08-20  5:52   ` Takahiro.Kuwano
2026-08-20  5:52     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 03/23] mtd: spi-nor: Refactor Read Status/Write Status support Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14 12:25   ` Michael Walle
2026-08-14 12:25     ` Michael Walle
2026-08-13 15:19 ` [PATCH v3 04/23] mtd: spi-nor: Add support for the new JESD216 rev F QER field Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14 12:26   ` Michael Walle
2026-08-14 12:26     ` Michael Walle
2026-08-20  5:53   ` Takahiro.Kuwano
2026-08-20  5:53     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 05/23] mtd: spi-nor: Create the concept of fixup table with match function Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:40   ` Michael Walle
2026-08-14  9:40     ` Michael Walle
2026-08-20  5:56   ` Takahiro.Kuwano
2026-08-20  5:56     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 06/23] mtd: spi-nor: Create an indirection on the part name Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:41   ` Michael Walle
2026-08-14  9:41     ` Michael Walle
2026-08-20  5:57   ` Takahiro.Kuwano
2026-08-20  5:57     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 07/23] mtd: spi-nor: Move the SFDP header structure to a C header Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:41   ` Michael Walle
2026-08-14  9:41     ` Michael Walle
2026-08-20  5:57   ` Takahiro.Kuwano
2026-08-20  5:57     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 08/23] mtd: spi-nor: winbond: Prepare introduction of W25QxxRV-Q/N parts Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:46   ` Michael Walle
2026-08-14  9:46     ` Michael Walle
2026-08-20  5:58   ` Takahiro.Kuwano
2026-08-20  5:58     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 09/23] mtd: spi-nor: winbond: Add support for W25Q32RV-Q/N Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:46   ` Michael Walle
2026-08-14  9:46     ` Michael Walle
2026-08-20  6:03   ` Takahiro.Kuwano
2026-08-20  6:03     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 10/23] mtd: spi-nor: winbond: Add support for W25Q64RV-Q/N Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:46   ` Michael Walle
2026-08-14  9:46     ` Michael Walle
2026-08-20  6:03   ` Takahiro.Kuwano
2026-08-20  6:03     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 11/23] mtd: spi-nor: winbond: Add support for W25Q12RV-Q/N Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:47   ` Michael Walle
2026-08-14  9:47     ` Michael Walle
2026-08-20  6:04   ` Takahiro.Kuwano
2026-08-20  6:04     ` Takahiro.Kuwano
2026-08-20  7:32   ` Takahiro.Kuwano
2026-08-20  7:32     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 12/23] mtd: spi-nor: winbond: Add support for W25Q51RV-Q/N Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:47   ` Michael Walle
2026-08-14  9:47     ` Michael Walle
2026-08-20  6:04   ` Takahiro.Kuwano
2026-08-20  6:04     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 13/23] mtd: spi-nor: winbond: Add support for W25Q01RV-Q/N Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:47   ` Michael Walle
2026-08-14  9:47     ` Michael Walle
2026-08-20  6:15   ` Takahiro.Kuwano [this message]
2026-08-20  6:15     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 14/23] mtd: spi-nor: winbond: Add support for W25Q02RV-Q/N Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:48   ` Michael Walle
2026-08-14  9:48     ` Michael Walle
2026-08-20  6:17   ` Takahiro.Kuwano
2026-08-20  6:17     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 15/23] mtd: spi-nor: winbond: Prepare introduction of W25QxxRV-M parts Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:50   ` Michael Walle
2026-08-14  9:50     ` Michael Walle
2026-08-20  6:18   ` Takahiro.Kuwano
2026-08-20  6:18     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 16/23] mtd: spi-nor: winbond: Add support for W25Q32RV-M Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:50   ` Michael Walle
2026-08-14  9:50     ` Michael Walle
2026-08-20  6:19   ` Takahiro.Kuwano
2026-08-20  6:19     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 17/23] mtd: spi-nor: winbond: Add support for W25Q64RV-M Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:51   ` Michael Walle
2026-08-14  9:51     ` Michael Walle
2026-08-20  6:21   ` Takahiro.Kuwano
2026-08-20  6:21     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 18/23] mtd: spi-nor: winbond: Add support for W25Q12RV-M Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:51   ` Michael Walle
2026-08-14  9:51     ` Michael Walle
2026-08-20  6:44   ` Takahiro.Kuwano
2026-08-20  6:44     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 19/23] mtd: spi-nor: winbond: Add support for W25Q51RV-M Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:52   ` Michael Walle
2026-08-14  9:52     ` Michael Walle
2026-08-20  6:48   ` Takahiro.Kuwano
2026-08-20  6:48     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 20/23] mtd: spi-nor: winbond: Add support for W25Q01RV-M Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:52   ` Michael Walle
2026-08-14  9:52     ` Michael Walle
2026-08-20  6:50   ` Takahiro.Kuwano
2026-08-20  6:50     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 21/23] mtd: spi-nor: winbond: Add support for W25Q02RV-M Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:52   ` Michael Walle
2026-08-14  9:52     ` Michael Walle
2026-08-20  6:52   ` Takahiro.Kuwano
2026-08-20  6:52     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 22/23] mtd: spi-nor: winbond: Add support for W25Q51RV-Q/N/M Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-14  9:53   ` Michael Walle
2026-08-14  9:53     ` Michael Walle
2026-08-20  7:42   ` Takahiro.Kuwano
2026-08-20  7:42     ` Takahiro.Kuwano
2026-08-13 15:19 ` [PATCH v3 23/23] mtd: spi-nor: debugfs: Expose SR opcodes and QE mask Miquel Raynal
2026-08-13 15:19   ` Miquel Raynal
2026-08-20  7:03   ` Takahiro.Kuwano
2026-08-20  7:03     ` Takahiro.Kuwano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d7597839fc542ea846fe0ddb3eb6683@infineon.com \
    --to=takahiro.kuwano@infineon.com \
    --cc=STLin2@winbond.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=corbet@lwn.net \
    --cc=hsinyi@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=skhan@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.