| Message ID | 20260902-winbond-v7-1-spi-nor-rv-addition-v4-21-779d35303dff@bootlin.com |
|---|---|
| State | New |
| Headers | show
Return-Path:
<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
secure) header.d=lists.infradead.org header.i=@lists.infradead.org
header.a=rsa-sha256 header.s=bombadil.20210309 header.b=vYgxYAaT;
dkim=fail reason="signature verification failed" (2048-bit key;
secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256
header.s=desiato.20200630 header.b=qLKBKfng;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256
header.s=dkim header.b=SNJ9uZPX;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.infradead.org
(client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;
envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;
receiver=patchwork.ozlabs.org)
Received: from bombadil.infradead.org (bombadil.infradead.org
[IPv6:2607:7c80:54:3::133])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4hZpsN09DZz1xvf
for <incoming@patchwork.ozlabs.org>; Thu, 03 Sep 2026 03:01:12 +1000 (AEST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20210309; h=Sender:
Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:
List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id
:MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Owner; bh=tPIg8vMBn2XgFaNEwTdOKC8ROroNy/jaxqAKZgnIAjc=; b=vYgxYAaTYiqo0P
TYKtjqindKmoCMGV0ns/biIBD5FGL6aAyIWdrzr1C5IO1xWzydAKewND7VsFcGPmwPSZ6t80a01RQ
UXQEAvwhvAdMA9ERHvirmC56Le/j+yfKSeMTFMDSzRvBeuFXqMD4erEemLXPEZeyg3gJbCX6CacuM
joY8gq0X3DMBb4Vb6xREPIS0g4WWTCxj3hZGx1VP+MvVL1ys6+CkHPgqqxn3lXqcCzVd0erqwu2rq
0o0hDCDkvkWPASPjOTgCuLkLEtHl3ei5/IHUWSxxSBLiYSuipwaMGQSBroz9BaZhZ1pwyU8mUw27u
YkHWKnKtjKJHi5oK1qgQ==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
id 1x1oKd-0000000FM78-09FE;
Wed, 02 Sep 2026 17:01:03 +0000
Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05])
by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
id 1x1oKa-0000000FLwJ-0QWV
for linux-mtd@bombadil.infradead.org;
Wed, 02 Sep 2026 17:01:00 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References:
Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:
From:Sender:Reply-To:Content-ID:Content-Description;
bh=TnSrYaFi7FP0kY1XrMvuTopl+Gw9zeIFtTZRr+Ga/VI=; b=qLKBKfngg07btvyjvvaxjkguS7
eKY8LZwnQJEUSPTNMrbDrtrPgz3YhXow7Rsl2ugboLA3NPVvEt8AKhpPJUjsK7ezBsZy5YBitkE2R
Vk87eQkaP8ggqgtklbB23MRY57vO4ElA2bbPIopcs8BIFoujse8+vFieIlnXql+Xa82wWumyvy5bV
So7GiS0D7mftljJY+KgWFNCyNTv4Ia7/nnvgpcip039UAmYzXuqznBjyG+NLieDqTNUCYkOKc2MZd
SKxf3NI6EcXJhp+KY2QQBVBobtGfiBcJft2kxtLaDM3PynwsPLSJ93Kz/uoPtaQrHzorDra9p6a81
DUlBDqzQ==;
Received: from smtpout-03.galae.net ([185.246.85.4])
by desiato.infradead.org with esmtps (Exim 4.99.2 #2 (Red Hat Linux))
id 1x1oKU-0000000CEv1-3jqK
for linux-mtd@lists.infradead.org;
Wed, 02 Sep 2026 17:00:58 +0000
Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])
by smtpout-03.galae.net (Postfix) with ESMTPS id 224924E414E1;
Wed, 2 Sep 2026 17:00:54 +0000 (UTC)
Received: from mail.galae.net (mail.galae.net [212.83.136.155])
by smtpout-01.galae.net (Postfix) with ESMTPS id E32166054B;
Wed, 2 Sep 2026 17:00:53 +0000 (UTC)
Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)
with ESMTPSA id 60E4111C79C04;
Wed, 2 Sep 2026 19:00:50 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;
t=1788368452; h=from:subject:date:message-id:to:cc:mime-version:content-type:
content-transfer-encoding:in-reply-to:references;
bh=TnSrYaFi7FP0kY1XrMvuTopl+Gw9zeIFtTZRr+Ga/VI=;
b=SNJ9uZPXcIVn7NcwxrQDupQDerECbK3YvB+nyvGy+KgBv7cGEHhrPJnfJCpeIc6wuKl9Gt
cZaS0ew+QXWc3z5YF0mTc4Sh4vPC58TPWua7Os7TkBqLvFihg+LzaE7POAdVDKfbl1reWD
HL+Q0A+gZ4gxpy2aDLcG0bG//93KbmfAaa++qQ7dzdpsC2H3ujTfG3uoZCPmaADU3aJimh
AOlKcqD4XJUveq0xDBa7iHWCOffmn5VJw5N9jQErN45yjdBok8jOVG7iSBiEDBzNy45+ch
ItZBC92Bsx7dRzd+ZgxDOD4Knhq3QJZCxYHtMv1LoQROuPnGG/7neYCnhit7IQ==
From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: Wed, 02 Sep 2026 18:59:35 +0200
Subject: [PATCH v4 21/25] mtd: spi-nor: winbond: Add support for W25Q25RV-M
MIME-Version: 1.0
Message-Id:
<20260902-winbond-v7-1-spi-nor-rv-addition-v4-21-779d35303dff@bootlin.com>
References:
<20260902-winbond-v7-1-spi-nor-rv-addition-v4-0-779d35303dff@bootlin.com>
In-Reply-To:
<20260902-winbond-v7-1-spi-nor-rv-addition-v4-0-779d35303dff@bootlin.com>
To: Pratyush Yadav <pratyush@kernel.org>, Michael Walle <mwalle@kernel.org>,
Takahiro Kuwano <takahiro.kuwano@infineon.com>,
Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>
Cc: Steam Lin <STLin2@winbond.com>, Hsin-Yi Wang <hsinyi@chromium.org>,
Thomas Petazzoni <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,
Miquel Raynal <miquel.raynal@bootlin.com>
X-Mailer: b4 0.14.3
X-Last-TLS-Session-Version: TLSv1.3
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20260902_180055_187982_7D5B5F34
X-CRM114-Status: GOOD ( 15.00 )
X-Spam-Score: -0.2 (/)
X-Spam-Report: Spam detection software,
running on the system "desiato.infradead.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: 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 lowe [...]
Content analysis details: (-0.2 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 SPF_PASS SPF: sender matches SPF record
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's
domain
-0.1 DKIM_VALID Message has at least one valid DKIM or DK
signature
-0.0 DMARC_PASS DMARC pass policy
X-BeenThere: linux-mtd@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>,
<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/>
List-Post: <mailto:linux-mtd@lists.infradead.org>
List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>,
<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org>
Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org
|
| Series |
mtd: spi-nor: QE handling cleanup + fixup reworks + Winbond RV chips addition
|
expand
|
diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c index 5c7a4c7ec76e..7c3592cd81a2 100644 --- a/drivers/mtd/spi-nor/winbond.c +++ b/drivers/mtd/spi-nor/winbond.c @@ -387,7 +387,7 @@ static const struct flash_info winbond_nor_parts[] = { .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, .flags = SPI_NOR_QUAD_PP | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_HAS_CMP, }, { - /* W25Q256JV-M */ + /* W25Q256JV-M, W25Q25RV-M */ .id = SNOR_ID(0xef, 0x70, 0x19), .name = "w25q256jvm", .flags = SPI_NOR_QUAD_PP | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB |
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 ef7019 + 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 ffffffffffffffffe520fbffffffff0f44eb086b083b42bbfeffffffffff 0000ffff44eb0c200f5210d80000d639a50081d614cee96376337a757a75 f7a4d55c39f66dffe970f9a50000000000002c0000000000f6f5ffff0f00 0000060d44bd27ed080dffffffffff8a00fe21ffdcff + sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp 56eaf575ae5e825fad7c531694021ca11976c2adc9a4c78144c87edbe6ad7dfd /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 70 19 00 00 00 size 32.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 SR1 read 0x05 SR2 read 0x35 SR1 write 0x01 SR2 write 0x31 QE SR2 bit 1 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 (32.0 MiB) sector map region (in hex) | erase mask | overlaid ------------------+------------+--------- 00000000-01ffffff | [ 3] | no locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-01ffffff | unlocked | 512 + dd 'if=/dev/urandom' 'of=./spi_test' 'bs=1M' 'count=2' [ 19.151938] random: crng init done 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 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 spi_read 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 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 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 spi_test + mtd_debug info /dev/mtd0 mtd.type = MTD_NORFLASH mtd.flags = MTD_CAP_NORFLASH mtd.size = 33554432 (32M) 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: 0x2000000 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 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 spi_read 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 spi_test + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-01ffffff | unlocked | 512 + flash_lock -l /dev/mtd0 + flash_lock -i /dev/mtd0 Device: /dev/mtd0 Start: 0 Len: 0x2000000 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 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 spi_read 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 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 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 spi_read 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 spi_read2 7990e6e28bde1e97ce3d83c353fbcf0ea1955591d111e63cebbac02c0b7f10d3 spi_test d9dd42514cb65612993217744485b4cd0201c1c28a66d5a03a7acf5e2c9bf419 spi_test2 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-01ffffff | locked | 512 + flash_lock -u /dev/mtd0 + cat /sys/class/mtd/mtd0/size + size=33554432 + cat /sys/class/mtd/mtd0/erasesize + bs=65536 + grep unlocked /sys/kernel/debug/spi-nor/spi0.0/params + sed -e 's/.*unlocked | //' + nsectors=512 + ss=65536 + bps=1 + flash_lock -u /dev/mtd0 + flash_lock -l /dev/mtd0 33423360 2 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-01fdffff | unlocked | 510 01fe0000-01ffffff | locked | 2 + flash_lock -u /dev/mtd0 33423360 1 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-01feffff | unlocked | 511 01ff0000-01ffffff | locked | 1 + flash_lock -u /dev/mtd0 + flash_lock -l /dev/mtd0 25165824 128 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-017fffff | unlocked | 384 01800000-01ffffff | 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-01ffffff | unlocked | 510 + 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-01ffffff | unlocked | 511 + all_but_one=511 + flash_lock -u /dev/mtd0 + flash_lock -l /dev/mtd0 65536 511 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-0000ffff | unlocked | 1 00010000-01ffffff | locked | 511 + 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-01ffffff | locked | 510 + flash_lock -u /dev/mtd0 + flash_lock -l /dev/mtd0 0 511 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-01feffff | locked | 511 01ff0000-01ffffff | unlocked | 1 + flash_lock -u /dev/mtd0 33423360 1 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-01fdffff | locked | 510 01fe0000-01ffffff | unlocked | 2 --- drivers/mtd/spi-nor/winbond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)