Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2197793/?format=api
{ "id": 2197793, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2197793/?format=api", "project": { "id": 3, "url": "http://patchwork.ozlabs.org/api/1.0/projects/3/?format=api", "name": "Linux MTD development", "link_name": "linux-mtd", "list_id": "linux-mtd.lists.infradead.org", "list_email": "linux-mtd@lists.infradead.org", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20260218143523.17467-4-farbere@amazon.com>", "date": "2026-02-18T14:35:23", "name": "[v2,3/3] mtd: spi-nor: winbond: Fix locking support for w25q64jvm", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f6234deb3fb2002777938e5680ca42328fd350a1", "submitter": { "id": 84667, "url": "http://patchwork.ozlabs.org/api/1.0/people/84667/?format=api", "name": "Farber, Eliav", "email": "farbere@amazon.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20260218143523.17467-4-farbere@amazon.com/mbox/", "series": [ { "id": 492562, "url": "http://patchwork.ozlabs.org/api/1.0/series/492562/?format=api", "date": "2026-02-18T14:35:20", "name": "mtd: spi-nor: winbond: Fix protection handling", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/492562/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197793/checks/", "tags": {}, "headers": { "Return-Path": "\n <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;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TbNDLE/G;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=amazon.com header.i=@amazon.com header.a=rsa-sha256\n header.s=amazoncorp2 header.b=gR4SpbGK;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fGJwF4QWNz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 19 Feb 2026 01:35:54 +1100 (AEDT)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vsieV-00000009xTe-0zSo;\n\tWed, 18 Feb 2026 14:35:43 +0000", "from pdx-out-014.esa.us-west-2.outbound.mail-perimeter.amazon.com\n ([35.83.148.184])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vsieR-00000009xSM-2sEE\n\tfor linux-mtd@lists.infradead.org;\n\tWed, 18 Feb 2026 14:35:41 +0000", "from ip-10-5-6-203.us-west-2.compute.internal (HELO\n smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.6.203])\n by internal-pdx-out-014.esa.us-west-2.outbound.mail-perimeter.amazon.com\n with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2026 14:35:34 +0000", "from EX19MTAUWA002.ant.amazon.com [205.251.233.178:6576]\n by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.54.230:2525]\n with esmtp (Farcaster)\n id 5b4211f6-9967-4c43-9e03-3f10d56dcfd0;\n Wed, 18 Feb 2026 14:35:34 +0000 (UTC)", "from EX19D001UWA001.ant.amazon.com (10.13.138.214) by\n EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35;\n Wed, 18 Feb 2026 14:35:34 +0000", "from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com\n (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Wed, 18 Feb 2026\n 14:35:32 +0000" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=a9mAApg2TDmmZHsxnPIlsRVuf7sGV+Ur0mn44tmkOSA=; b=TbNDLE/GodWHkE\n\t/VnwDoDSqcMnBine5QwY7DOiIR/sFfU0xtHgLiW4ouiFXUf0vR30SRBjdx1Cle7WKty9X9DhAm97/\n\tSlSmK5tqvwcPSuTSuGigdgKwpff3j6DkRlY/Fy0OfvQZzkd0LJGGebAc24wpqQ3mfEXQxD+fyvhwP\n\tCHupoQDq4eU2hqPKJeFlNvGk3GWFS+9OWD2OxCZXzRF9ii3pSvltn8oPVSXrcIXM9Tm7BtdEym7Yp\n\t96j/4aTnQp8LkZStFq9BaP7GTPXNOT2bXeL+CyRN2bPyA2k/82jlJL9eZHNbzT163owLiNCDH9sJ4\n\tUg6nTeyA1hM7i77aDx6w==;", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2;\n t=1771425339; x=1802961339;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=KB0yIBc6Y4ZCpbQ8D6+n6Qw1JeejQ9xAVki9iGAlDFw=;\n b=gR4SpbGKiCwbsQj0olR8RQNKbOhJSSm2soubfYFtEFNHBG63EX08P2jT\n 4eX+0GLb4Uu9wC8IdU8ZS8TvABXhRYZ2upRzSaTyLqxfmv/Wvpbn0D61O\n dYvihPvk7MzgCPEiR1JV5X+9UR8v5RjapzG/7KGWYgANNScbfHMnbb2QI\n XEfzO8PKRL9uPLSFpS0EwoAmiXq0E9S69qZift+CIpKNv7YHLF1z/XhiI\n SwZxswPW8vKIwunO7Sk9MSEp2uygFBoCO+br/nNS68nmoZf0tZqV5sGxo\n gAAU2ZBA7Blw8SIfCu8HX3lZn7wPrb4fb+++PuDNZcGkKXw/+c2d7yX7R\n A==;" ], "X-CSE-ConnectionGUID": "NJ9+012ARQew5AS26ss9PA==", "X-CSE-MsgGUID": "Berulvv4QNy0msLToLvVyQ==", "X-IronPort-AV": "E=Sophos;i=\"6.21,298,1763424000\";\n d=\"scan'208\";a=\"13068629\"", "X-Farcaster-Flow-ID": "5b4211f6-9967-4c43-9e03-3f10d56dcfd0", "From": "Eliav Farber <farbere@amazon.com>", "To": "<tudor.ambarus@linaro.org>, <pratyush@kernel.org>, <mwalle@kernel.org>,\n\t<miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,\n\t<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>", "CC": "<farbere@amazon.com>", "Subject": "[PATCH v2 3/3] mtd: spi-nor: winbond: Fix locking support for\n w25q64jvm", "Date": "Wed, 18 Feb 2026 14:35:23 +0000", "Message-ID": "<20260218143523.17467-4-farbere@amazon.com>", "X-Mailer": "git-send-email 2.47.3", "In-Reply-To": "<20260218143523.17467-1-farbere@amazon.com>", "References": "<20260218143523.17467-1-farbere@amazon.com>", "MIME-Version": "1.0", "X-Originating-IP": "[172.19.116.181]", "X-ClientProxiedBy": "EX19D042UWA002.ant.amazon.com (10.13.139.17) To\n EX19D001UWA001.ant.amazon.com (10.13.138.214)", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260218_063539_771758_9E7BFCD8 ", "X-CRM114-Status": "GOOD ( 12.12 )", "X-Spam-Score": "-9.6 (---------)", "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n the administrator of that system for details.\n Content preview: The Winbond w25q64jvm supports block protection through the\n Status Register (SR) and provides a Top/Bottom (TB) protection bit. Enable\n SPI_NOR_HAS_LOCK and SPI_NOR_HAS_TB for this device to properly describe\n its locking capabilities.\n Content analysis details: (-9.6 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no\n trust\n [35.83.148.184 listed in list.dnswl.org]\n -7.5 USER_IN_DEF_SPF_WL From: address is in the default SPF welcome-list\n -0.0 SPF_PASS SPF: sender matches SPF record\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n author's\n domain\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from\n envelope-from domain\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]\n 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n query to Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [35.83.148.184 listed in\n sa-trusted.bondedsender.org]\n 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [35.83.148.184 listed in sa-accredit.habeas.com]\n 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [35.83.148.184 listed in\n bl.score.senderscore.com]\n 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay\n lines\n -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender", "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>,\n <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>,\n <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" }, "content": "The Winbond w25q64jvm supports block protection through the Status\nRegister (SR) and provides a Top/Bottom (TB) protection bit.\n\nEnable SPI_NOR_HAS_LOCK and SPI_NOR_HAS_TB for this device to\nproperly describe its locking capabilities.\n\nThe device uses Status Register bit 5 as the TB bit and supports only\nthree Block Protect (BP) bits. Therefore, do not set SPI_NOR_TB_SR_BIT6\nor SPI_NOR_4BIT_BP.\n\nReference:\nhttps://www.winbond.com/hq/support/documentation/levelOne.jsp?__locale=en&DocNo=DA00-W25Q64JV.1\n\nSigned-off-by: Eliav Farber <farbere@amazon.com>\n---\nThis flash is populated on the al10_k2v5_jrd_aio_makalu board and was\ntested at 35700000 frequency using the amazon,alpine-dw-apb-ssi SPI\ncontroller.\n\n~ # cat /sys/bus/spi/devices/spi0.2/spi-nor/partname\nw25q64jvm\n~ # cat /sys/bus/spi/devices/spi0.2/spi-nor/jedec_id\nef7017\n~ # cat /sys/bus/spi/devices/spi0.2/spi-nor/manufacturer\nwinbond\n\n~ # xxd -p /sys/bus/spi/devices/spi0.2/spi-nor/sfdp \n53464450050100ff00050110800000ffffffffffffffffffffffffffffff\nffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\nffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\nffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\nffffffffffffffffe520f9ffffffff0344eb086b083b42bbfeffffffffff\n0000ffff40eb0c200f5210d800003602a60082ea14c4e96376337a757a75\nf7a2d55c19f74dffe930f880 \n\n~ # cat /sys/kernel/debug/spi-nor/spi0.2/capabilities\nSupported read modes by the flash\n 1S-1S-1S\n opcode 0x03\n mode cycles 0\n dummy cycles 0\n 1S-1S-2S\n opcode 0x3b\n mode cycles 0\n dummy cycles 8\n 1S-2S-2S\n opcode 0xbb\n mode cycles 2\n dummy cycles 2\n 1S-1S-4S\n opcode 0x6b\n mode cycles 0\n dummy cycles 8\n 1S-4S-4S\n opcode 0xeb\n mode cycles 2\n dummy cycles 4\n 4S-4S-4S\n opcode 0xeb\n mode cycles 2\n dummy cycles 0\n\nSupported page program modes by the flash\n 1S-1S-1S\n opcode 0x02\n \n~ # cat /sys/kernel/debug/spi-nor/spi0.2/params \nname w25q64jvm\nid ef 70 17 00 00 00\nsize 8.00 MiB\nwrite size 1\npage size 256\naddress nbytes 3\nflags HAS_SR_TB | HAS_LOCK | HAS_16BIT_SR | NO_READ_CR | SOFT_RESET\n\nopcodes\n read 0x03\n dummy cycles 0\n erase 0x20\n program 0x02\n 8D extension none\n\nprotocols\n read 1S-1S-1S\n write 1S-1S-1S\n register 1S-1S-1S\n\nerase commands\n 20 (4.00 KiB) [1]\n 52 (32.0 KiB) [2]\n d8 (64.0 KiB) [3]\n c7 (8.00 MiB)\n\nsector map\n region (in hex) | erase mask | overlaid\n ------------------+------------+----------\n 00000000-007fffff | [ 1 ] | no\n\n/tmp # dd if=/dev/urandom of=./spi_test bs=1M count=2\n2+0 records in\n2+0 records out\n2097152 bytes (2.0MB) copied, 0.010381 seconds, 192.7MB/s\n\n/tmp # ./mtd_debug erase /dev/mtd2 0 2097152\nErased 2097152 bytes from address 0x00000000 in flash\n\n/tmp # ./mtd_debug read /dev/mtd2 0 2097152 spi_read\nCopied 2097152 bytes from address 0x00000000 in flash to spi_read\n\n/tmp # hexdump spi_read\n0000000 ffff ffff ffff ffff ffff ffff ffff ffff\n*\n0200000\n/tmp # sha256sum spi_read\n4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read\n\n/tmp # mtd_debug write /dev/mtd0 0 2097152 spi_test\n-sh: mtd_debug: not found\n/tmp # ./mtd_debug write /dev/mtd2 0 2097152 spi_test\nCopied 2097152 bytes from spi_test to address 0x00000000 in flash\n\n/tmp # ./mtd_debug read /dev/mtd2 0 2097152 spi_read\nCopied 2097152 bytes from address 0x00000000 in flash to spi_read\n\n/tmp # sha256sum spi*\n555b3718aa92b1313ff7f93e75306267a8ed0c5f4d92cc63c1eac4366731059b spi_read\n555b3718aa92b1313ff7f93e75306267a8ed0c5f4d92cc63c1eac4366731059b spi_test\n\n/tmp # ./mtd_debug erase /dev/mtd2 0 2097152\nErased 2097152 bytes from address 0x00000000 in flash\n\n/tmp # ./mtd_debug read /dev/mtd2 0 2097152 spi_read\nCopied 2097152 bytes from address 0x00000000 in flash to spi_read\n\n/tmp # sha256sum spi*\n4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read\n555b3718aa92b1313ff7f93e75306267a8ed0c5f4d92cc63c1eac4366731059b spi_test\n\n/tmp # ./mtd_debug info /dev/mtd2\nmtd.type = MTD_NORFLASH\nmtd.flags = MTD_CAP_NORFLASH\nmtd.size = 8388608 (8M)\nmtd.erasesize = 4096 (4K)\nmtd.writesize = 1 \nmtd.oobsize = 0 \nregions = 0\n\n drivers/mtd/spi-nor/winbond.c | 1 +\n 1 file changed, 1 insertion(+)", "diff": "diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c\nindex 6d325da121b4..eaa547d36aad 100644\n--- a/drivers/mtd/spi-nor/winbond.c\n+++ b/drivers/mtd/spi-nor/winbond.c\n@@ -296,6 +296,7 @@ static const struct flash_info winbond_nor_parts[] = {\n \t\t.id = SNOR_ID(0xef, 0x70, 0x17),\n \t\t.name = \"w25q64jvm\",\n \t\t.size = SZ_8M,\n+\t\t.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,\n \t\t.no_sfdp_flags = SECT_4K,\n \t}, {\n \t\t.id = SNOR_ID(0xef, 0x70, 0x18),\n", "prefixes": [ "v2", "3/3" ] }