| Message ID | 20261002-winbond-master-spi-nor-w35t-v1-10-a22a2f95c26e@bootlin.com |
|---|---|
| State | Superseded |
| 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=c0iIHhE2;
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=chpMdz0S;
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 4hx7FP3SxCz1yGJ
for <incoming@patchwork.ozlabs.org>; Fri, 02 Oct 2026 22:22:01 +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=MfEQOf8YVW2JqSM5Qky1x9+pY1mn84LfXhh55lbYMdE=; b=c0iIHhE2DL/Mz6
aG1DnJZGIehKJg8az1BM09vqbq9eLSCXyPECTgEnl4BRtlqxOkWgykYx8Z8XjTo83mqbWb84FJesF
9yMC+kTNzfCVQr+0u8XQ3qsdG3ol7diNSTbBjOrKjmTyk212IXpo06LMVECkH3pfiSYTWI0uyxPWh
PUTUoIZq15fo13bmxrTbL2oJUrb3iFQpgSpkIgrS/FjyrGVnEm4ILyHzU4nDaYZWq25TSc5IypYSS
l9qFu8AMo/NNIs9oot1JvppL71vvPnRu27UpDCmnoO5FTo3xDMXjldtUugEZInDoDqJyu6q83gxBu
mXNi0l6M7uDGqgvhHQ9w==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
id 1xCcGx-0000000BYkc-3NFs;
Fri, 02 Oct 2026 12:21:55 +0000
Received: from smtpout-02.galae.net ([185.246.84.56])
by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
id 1xCcGr-0000000BYct-3iYd
for linux-mtd@lists.infradead.org;
Fri, 02 Oct 2026 12:21:52 +0000
Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])
by smtpout-02.galae.net (Postfix) with ESMTPS id 68F3D1A10E3;
Fri, 2 Oct 2026 12:21:48 +0000 (UTC)
Received: from mail.galae.net (mail.galae.net [212.83.136.155])
by smtpout-01.galae.net (Postfix) with ESMTPS id 3EB21603DC;
Fri, 2 Oct 2026 12:21:48 +0000 (UTC)
Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)
with ESMTPSA id 4B26B10328213;
Fri, 2 Oct 2026 14:21:46 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;
t=1790943707; h=from:subject:date:message-id:to:cc:mime-version:content-type:
content-transfer-encoding:in-reply-to:references;
bh=1CaMz+GYV+vFo66ZFyt/IaTpTAxRHfvphmB989Lsjds=;
b=chpMdz0S8nbtIhslQwHzHEa4VKWZw3yL8tmDNWFPOc66xo2hIMm+0cfjXoXP3hg0qa5grX
B5sr/ATlUkbfqZCkbEY1lxPs5+zAZY0/Zw6yuFyHoTjC9heRvsIMP3AK126ZtRKU+QYahe
HOTpFV6XW9ddIzp2rfajkqhT7d/Apk/n3nM8rtenzfAIPyu7rQrXUqAqNPTPe6prm6Cp/F
oNYedfRJX/IsU5YbBsDo8UHxqrRrhXDUhHgJVsNj0iOaFgPQIgypjG6AZPJpPqC+492eth
ynu6odOv4UF/P77hBbs7SSwG7RDCR/VlIDJAkaEdj2V719L2Fw9EwDldNBq95A==
From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: Fri, 02 Oct 2026 14:21:23 +0200
Subject: [PATCH 10/15] mtd: spi-nor: winbond: Add support for W35T64NW-C
MIME-Version: 1.0
Message-Id:
<20261002-winbond-master-spi-nor-w35t-v1-10-a22a2f95c26e@bootlin.com>
References:
<20261002-winbond-master-spi-nor-w35t-v1-0-a22a2f95c26e@bootlin.com>
In-Reply-To:
<20261002-winbond-master-spi-nor-w35t-v1-0-a22a2f95c26e@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>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Steam Lin <STLin2@winbond.com>, linux-mtd@lists.infradead.org,
linux-kernel@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-20261002_052150_101762_D7C81308
X-CRM114-Status: GOOD ( 12.56 )
X-Spam-Score: -2.1 (--)
X-Spam-Report: Spam detection software,
running on the system "bombadil.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: W35T devices are Winbond new octal DTR capable SPI-NORs. 16
bytes chunks are protected against single errors. In case a non-aligned
write
happens,
ECC is locally disabled until the next erase. These chips may leverage
lock CMP support,
by using a Winbond specific register instead of SR2 which
is gone. This feature is therefore not supported nor flagged.
Content analysis details: (-2.1 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 SPF_PASS SPF: sender matches SPF record
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-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
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
-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: winbond: Add support for the W35TxxNW family
|
expand
|
diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c index d33e693ed711..e1a93f27f24c 100644 --- a/drivers/mtd/spi-nor/winbond.c +++ b/drivers/mtd/spi-nor/winbond.c @@ -620,6 +620,10 @@ static const struct flash_info winbond_nor_parts[] = { .id = SNOR_ID(0xef, 0xa0, 0x22), .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 | SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP, + }, { + /* W35T64NW-C */ + .id = SNOR_ID(0xef, 0x5b, 0x17), + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6, }, { /* * Catch all entry to make sure all chips solely relying
W35T devices are Winbond new octal DTR capable SPI-NORs. 16 bytes chunks are protected against single errors. In case a non-aligned write happens, ECC is locally disabled until the next erase. These chips may leverage lock CMP support, by using a Winbond specific register instead of SR2 which is gone. This feature is therefore not supported nor flagged. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- + cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id ef5b17 + cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer winbond + xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp 534644500a0104ff00080117800000ff84010102e00000ff05010106e800 00ff8701011c000100ff0a000108700100ffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffe5208affffffff030000000000000000eeffffffffff 0000ffff00000c200f5210d800003452b50082e31444e96376337a757a75 ffc3d55c008070ffe950f8a110cb088b0000ac0000000000ffffff860000 00000000000000000000ffffffff430ef0ff215cdcff000b0016b181b585 00d87b9d580b000030f6de9c10000000000000000000000000feffe300fe ffe300058880060588a10070888400708885818501f0b1b501f0d8b8cefb b02e2cd388a489aa00000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000081850310 b1b503100000000000000601000000000000b1050000e700000000000000 00000000000000000000 + sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp 30be7c3bf1f6a00ea4e56585dc9c929026555f2e2c16ab5f6fdfbc3819fc0d21 /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-8S opcode 0x7c mode cycles 0 dummy cycles 8 1S-8S-8S opcode 0xcc mode cycles 0 dummy cycles 16 8D-8D-8D opcode 0x0b mode cycles 0 dummy cycles 22 Supported page program modes by the flash 1S-1S-1S opcode 0x12 8D-8D-8D opcode 0x12 + cat /sys/kernel/debug/spi-nor/spi0.0/params name (null) id ef 5b 17 02 00 00 size 8.00 MiB write size 16 page size 256 address nbytes 4 flags HAS_SR_TB | 4B_OPCODES | HAS_4BAIT | HAS_LOCK | HAS_SR_TB_BIT6 | IO_MODE_EN_VOLATILE | SOFT_RESET | ECC | NO_WP opcodes read 0x0b dummy cycles 22 erase 0xdc program 0x12 SR1 read 0x05 SR1 write 0x01 8D extension repeat protocols read 8D-8D-8D write 8D-8D-8D register 8D-8D-8D erase commands 21 (4.00 KiB) [1] 5c (32.0 KiB) [2] dc (64.0 KiB) [3] c7 (8.00 MiB) sector map region (in hex) | erase mask | overlaid ------------------+------------+--------- 00000000-007fffff | [ 3] | no locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-007fffff | unlocked | 64 + dd 'if=/dev/urandom' 'of=./spi_test' 'bs=1M' 'count=2' [ 24.901260] 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 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 spi_read 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 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 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 spi_test + mtd_debug info /dev/mtd0 mtd.type = MTD_NORFLASH mtd.flags = MTD_CAP_NANDFLASH mtd.size = 8388608 (8M) mtd.erasesize = 65536 (64K) mtd.writesize = 16 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: 0x800000 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 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 spi_read 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 spi_test + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-007fffff | unlocked | 64 + flash_lock -l /dev/mtd0 + flash_lock -i /dev/mtd0 Device: /dev/mtd0 Start: 0 Len: 0x800000 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 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 spi_read 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 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 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 spi_read 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 spi_read2 1f43b7c8eba44e56b616e12b515ff61c3d31307e3f9cedab13d3de08c15fb0b8 spi_test 731475d3e8b53d9a8c4e86ef609a765a590ac6a325ed450eeec725531ce6734a spi_test2 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-007fffff | locked | 64 + flash_lock -u /dev/mtd0 + cat /sys/class/mtd/mtd0/size + size=8388608 + cat /sys/class/mtd/mtd0/erasesize + bs=65536 + grep unlocked /sys/kernel/debug/spi-nor/spi0.0/params + sed -e 's/.*unlocked | //' + nsectors=64 + ss=131072 + bps=2 + flash_lock -u /dev/mtd0 + flash_lock -l /dev/mtd0 8126464 4 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-007bffff | unlocked | 62 007c0000-007fffff | locked | 2 + flash_lock -u /dev/mtd0 8126464 2 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-007dffff | unlocked | 63 007e0000-007fffff | locked | 1 + flash_lock -u /dev/mtd0 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-007fffff | unlocked | 64 + flash_lock -u /dev/mtd0 + flash_lock -l /dev/mtd0 0 4 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-0003ffff | locked | 2 00040000-007fffff | unlocked | 62 + flash_lock -u /dev/mtd0 131072 2 + grep -A4 'locked sectors' /sys/kernel/debug/spi-nor/spi0.0/params locked sectors region (in hex) | status | #sectors ------------------+----------+--------- 00000000-0001ffff | locked | 1 00020000-007fffff | unlocked | 63 --- drivers/mtd/spi-nor/winbond.c | 4 ++++ 1 file changed, 4 insertions(+)