From patchwork Tue Oct 10 08:43:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SHUKLA Mamta Ramendra X-Patchwork-Id: 1845718 Return-Path: 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=NzEeuh5e; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=leica-geosystems.com header.i=@leica-geosystems.com header.a=rsa-sha256 header.s=selector1 header.b=TURo/5Mr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) 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 4S4VGk3x4jz20Xn for ; Tue, 10 Oct 2023 20:00:14 +1100 (AEDT) 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WHS8rWmBDZz67Rty+8hsRhRxOxNT0Pu//7UE+RY1mTk=; b=NzEeuh5eMorcxt g8ibQaEowkQGMnL+24tW6ru1Pta6GpWmgMZAjTrKskdPEmaDhfjfUHYKJX7pSYU6txCHM0heBIBiS WDXQWaQQkRbA2JXumfJaS5UfjxPumZ/1gRmPZJ1UCuJv9klWA0PFMBqiaocyrJefx45hR8MtY0iM3 QcUa3fwKbDFk0Te8eELxrI/q/mkSGJIqgXWya2CkfGtj2s3CGvU+8d+GMoq5tqfXzO/H8L/aZMluu MAymPeVv1HYnIyGvl2i4dCmZPrlRS5NKfyLEMaGiA8NBJAv5khHiZPgaU1FR7VoBVDMn0tIyd4jUl eBg3VVyvpUElqy2LxUMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qq8aa-00CsnD-11; Tue, 10 Oct 2023 08:59:40 +0000 Received: from mail-db5eur01on0721.outbound.protection.outlook.com ([2a01:111:f400:fe02::721] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qq8aX-00CsmM-06 for linux-mtd@lists.infradead.org; Tue, 10 Oct 2023 08:59:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=meAQO9RxwM16IOrW1pXf9erRllpeceRBoN+z36/MZa2aw3dTxqx2Gcd1FP5zL5uy9MvHWzuK/haylqHDfLrko7pk1dBFXD3K/gZ2eizcFl+gsfb7zwEwjiHH2VBvFDfd4cd9k+BZigYCvYwoP6+xTUDSuxaLIs9Z3YcunqrCwh/Uvc9RLDjnsJwUBPWs8LNM3Y7nquGi2s/6l7IWU5OMu1txrkFXIeGVQ1cXwwmYLWlfKPbfDsAP4YrML8jDZ8etciR8EkFjb3exnjfFcZvnJBCz6g+MDCMQyBOceu8PoTyZIS7MSPbbR4Hl7yolSBz3vDbtCjXW4aXUayFLBDb+Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vrfR5Y/88iLjVt5OpNjlWtAop8x4E0hStZQy8D2ICMA=; b=JcLpaJRUQwALxa58Ct4XC8HKBeMH2Obts25+YIO/u4n/ZpoCoLXWxdH4r7niccmrJh+fylt3g0wteZyHcFZsyjSzLl54AVUZXBNDBYrdT0adDW6H7fd1tN5sw6tt5E+wJ+PuBmuInuI1cLUEtXLglrq6LihnFgTCE9/jyZRKOATT4i7S0tcwMYakDHUXpbs2FH3ltBd9VjbKhqQ/kd3buyg+XGLa5XmsOnTq9tbDGjN4VcxIy9R8DUjCRIpfqURy5SeVB564ORhhi543oFWpmG2ADT9Tys72CFPDmuMH7usAd57qgLQ96TbO6EoSie5aHjR4YpQPXIauROny96BqPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 193.8.40.94) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=leica-geosystems.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=leica-geosystems.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vrfR5Y/88iLjVt5OpNjlWtAop8x4E0hStZQy8D2ICMA=; b=TURo/5MrNMdBhPXNUOoNAg5cWPA7DkLgkwUNZXyj08czJloF82o4TG8hkKkBh9GfjcwoUp3sAR/EMNiRFOw3hVXtZ3UDSTEYHXLrYIHhCVhUZi+aiTCrv2bg3dpCLHZVa7rLowmDxdhKA/MFu9yK5sgceK7YGHAaTfaEb+dp1fE= Received: from AM0PR03CA0013.eurprd03.prod.outlook.com (2603:10a6:208:14::26) by PR3PR06MB6779.eurprd06.prod.outlook.com (2603:10a6:102:60::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.37; Tue, 10 Oct 2023 08:43:42 +0000 Received: from AMS1EPF00000047.eurprd04.prod.outlook.com (2603:10a6:208:14:cafe::7a) by AM0PR03CA0013.outlook.office365.com (2603:10a6:208:14::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38 via Frontend Transport; Tue, 10 Oct 2023 08:43:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 193.8.40.94) smtp.mailfrom=leica-geosystems.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=leica-geosystems.com; Received-SPF: Pass (protection.outlook.com: domain of leica-geosystems.com designates 193.8.40.94 as permitted sender) receiver=protection.outlook.com; client-ip=193.8.40.94; helo=hexagon.com; pr=C Received: from hexagon.com (193.8.40.94) by AMS1EPF00000047.mail.protection.outlook.com (10.167.16.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22 via Frontend Transport; Tue, 10 Oct 2023 08:43:41 +0000 Received: from aherlnxbspsrv01.lgs-net.com ([10.60.34.116]) by hexagon.com with Microsoft SMTPSVC(10.0.17763.1697); Tue, 10 Oct 2023 10:43:41 +0200 From: Mamta Shukla To: tudor.ambarus@linaro.org, pratyush@kernel.org, michael@walle.cc, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: bsp-development.geo@leica-geosystems.com, Mamta Shukla Subject: [PATCH v3 1/3] mtd: micron-st: enable lock/unlock for mt25qu512a Date: Tue, 10 Oct 2023 10:43:21 +0200 Message-Id: <6b89ae4e4d7a381050746458cb000cd3c60f7a42.1696849423.git.mamta.shukla@leica-geosystems.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-OriginalArrivalTime: 10 Oct 2023 08:43:41.0729 (UTC) FILETIME=[DF0FD910:01D9FB55] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS1EPF00000047:EE_|PR3PR06MB6779:EE_ X-MS-Office365-Filtering-Correlation-Id: 546e1765-3a49-445a-a150-08dbc96d01ab X-SET-LOWER-SCL-SCANNER: YES X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wjL0M08tAQ0e4I1qtEMmCIAmKLdu/iOebJnRuK+DR3hhOnsYFA3INAl04/VN56tt91kTG26LaSmdll5fIZ9zt6LrwaDCG0uujnCrqMIuFPokEd7hqtuWVp5NfYD/63UqOdcTbnKZ7SSWFEcknN0Fyjp2FjYZ5pmbSN4eJ08KJsG5etT/hnBDhGWr2LYVpWkMoCV+auuWcOszhfvoEgkpjSEVCBtwqMYiSLg18K4PO75feh7cq/ogEtgvSWYeRMsjGr8eHi3fCIUyGnyp2SGpJ4imgbkE0kBDYwBEeqhU6iS+BeTXRiKGuLxE0H1aaVTE10pj+ngUMapcT4LNt7JQu3xkCeshgExrHb8T9YhX0lEQLFPg7LiUzCCD9ogWIFYUZLnuPOmZ4q9uiNDDRp8bRcAqxYfcEy9nfmszOKIsc4KfYXlM8gVqqi6ai/Gk1wkLAwH4xZzPYJdq4Okn3TOTHcXvyLNhzoVR22/aYtCQDKbHXpnycP6P/FWHH7KnFNB5o+RECRZ5yf/pD8bEfvcvVYjbmwlAHeNP1l9+QSbaJMulrrLy8/xm3EKnhFJQj1Jg+gUC2dWAQFYQQxOH394VAJ0p9IN8kze9wEx5H7MxzcVN44kWc1ckbpdJ9WK2KA6vGjzx95xx0N2+6kvE/GFhz6q/pchrodbciVnbveCcGHCGA3+p0J7+9TR9KxNT1pnQcBfE5FZ06bKmgC1d09843rTBEj4VQEU3nXhupRc3a4Cu3bBvnKp7UwdfpdrCq7cK X-Forefront-Antispam-Report: CIP:193.8.40.94;CTRY:CH;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:hexagon.com;PTR:ahersrvdom50.leica-geosystems.com;CAT:NONE;SFS:(13230031)(4636009)(396003)(346002)(39860400002)(136003)(376002)(230922051799003)(451199024)(186009)(64100799003)(1800799009)(82310400011)(40470700004)(36840700001)(46966006)(6666004)(2616005)(107886003)(82740400003)(40460700003)(86362001)(40480700001)(81166007)(36756003)(36860700001)(356005)(44832011)(83380400001)(336012)(2906002)(966005)(47076005)(41300700001)(316002)(478600001)(8676002)(8936002)(70206006)(26005)(4326008)(5660300002)(70586007)(138113003);DIR:OUT;SFP:1102; X-OriginatorOrg: leica-geosystems.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 08:43:41.9388 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 546e1765-3a49-445a-a150-08dbc96d01ab X-MS-Exchange-CrossTenant-Id: 1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a;Ip=[193.8.40.94];Helo=[hexagon.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF00000047.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR06MB6779 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_015937_071010_46D59790 X-CRM114-Status: GOOD ( 10.55 ) X-Spam-Score: 0.8 (/) 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: mt25qu512a[1] supports locking/unlocking through BP bits in SR. Tested using mtd-utils- flash_lock/flash_unlock for MT25QU512ABB8E12. Link: https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-b/mt25q_qlkt_u_512_abb_0.pdf?rev=b259aadc3bea49ea8210a41c9ad58211 Signed-off-b [...] Content analysis details: (0.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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.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 1.0 FORGED_SPF_HELO No description available. X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org mt25qu512a[1] supports locking/unlocking through BP bits in SR. Tested using mtd-utils- flash_lock/flash_unlock for MT25QU512ABB8E12. Link: https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-b/mt25q_qlkt_u_512_abb_0.pdf?rev=b259aadc3bea49ea8210a41c9ad58211 Signed-off-by: Mamta Shukla --- Changes in v2: - add Link tag - fix chip part number mt25ql512a->mt25qu512a Changes in v3: - sync with spi-nor/next:8f407eda173f to align with new FLASH_INFO format - new patch in series for parsing SFDP table - new patch in series to add post bfpt fixup Lock/Unlock Verification: [ 72.584003] spi-nor spi-PRP0001:00: mt25qu512a (65536 Kbytes) # flash_lock -i /dev/mtd0 Device: /dev/mtd0 Start: 0 Len: 0x4000000 Lock status: unlocked Return code: 0 # 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 1048576 [ 203.419693] spi-nor spi-PRP0001:00: at 0x0, len 1048576 [ 203.438616] spi-nor spi-PRP0001:00: Erase operation failed. [ 203.444283] spi-nor spi-PRP0001:00: Attempted to modify a protected sector. MEMERASE: Input/output error # 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 1048576 [ 215.585620] spi-nor spi-PRP0001:00: at 0x0, len 1048576 Erased 1048576 bytes from address 0x00000000 in flash drivers/mtd/spi-nor/micron-st.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c index 4afcfc57c896..6c8cabbead2e 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -405,6 +405,8 @@ static const struct flash_info st_nor_parts[] = { }, { .id = SNOR_ID(0x20, 0xbb, 0x20, 0x10, 0x44, 0x00), .name = "mt25qu512a", + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | + SPI_NOR_BP3_SR_BIT6, .size = SZ_64M, .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, .fixup_flags = SPI_NOR_4B_OPCODES, From patchwork Tue Oct 10 08:43:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SHUKLA Mamta Ramendra X-Patchwork-Id: 1845719 Return-Path: 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=RqSaUO7K; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=leica-geosystems.com header.i=@leica-geosystems.com header.a=rsa-sha256 header.s=selector1 header.b=oJ2QavnV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) 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 4S4VH11Rqbz20Xn for ; Tue, 10 Oct 2023 20:00:29 +1100 (AEDT) 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C/L5uPPCN1BsawL8QnnUQ94CwkwPhcQVHwkP4N2adH0=; b=RqSaUO7Kj162qN w7cAyL5Hr1PrwKs7VEkzs60nbvGMrVcvL7ndspgF7IIOgc8Q47Y+uG4atkE2BTNbfIyHnVfIbWbvL ziFO9/A+e+jU7If9xDe6N7wDGTn7NNSc63wpBEOjY23PaHCjQShh+DjXjDKRHa8hdR0BSfJKnOADC 97BgE5xISVvGlfHzCu5L04/A2r3zVTxKEirpLOZbOuALGLE3W2oYTfmBFQz/zOMwhQc4qvRn2bIoN DvBs5gFIggjpQBKch7ar7EPRl2IgELyZmxrfN9oARLT/UygTKRZGix/JX7FowKhao76AOj3Tn0oyN cpmvGdJfpatixtxTWqAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qq8at-00Cst8-1E; Tue, 10 Oct 2023 08:59:59 +0000 Received: from mail-dbaeur03on2070d.outbound.protection.outlook.com ([2a01:111:f400:fe1a::70d] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qq8aq-00Csrp-2C for linux-mtd@lists.infradead.org; Tue, 10 Oct 2023 08:59:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8Yoi7I19sKaRAG4FCh/OFe6satuJs6H3OsqhJ2u4ydc/KhJ3xRtZ6TSIwUt01khKDc0VRYbx2ZhNRAYBT/OooE/ONgxBJjuGpk0U/1LIz5Ot0mmnwGdZ00YgZoAWfcnDMS39CQP5wkyueJ5fTz2hLLfHXayLXBMRLHeorjdcF83Fi7t1quxDXu6rugDRHldtZq7Ip4kkMXfecJbjlMhzBDZ40vaTck06Gvabvc/q8HIu213Deipedqr3lhaPGzCCdRiEuW5rp+fhDjqmHYr2UMftZhWZIXwel6RpPHy+9u1EfLZgWEO56/GXvQ/2JFUi+53iJkC95lWgI92JmzLXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H6/JzIfqdOmRIwCHeXtPdofy7Dx/+VqKxk7ZIFYeI6g=; b=dZu4lNNaYQEBkY/56hezQP273CeXNf1QIp/sG/XykQ2FJ6grc+Dr/3g4ido3tRXxUbTrKCyW4nxKeFqCugEqvgHkLRwXkeAvJBrKGM7IXbbjTU9YJmC4qChSz6DKpLySVqVFi5Hl+09MUkmEE2CfKbxqpIBmBXPuNAAxLncpUuOnQb85fDnoOuHLgOAPpBBVOfvGpCOF1gsYMT1L3xd44mOlEy4W72FYclZtuxiiVzz4FvMht4zpj7OQ5f8ICn42Y2RTyKtI4Q0Ryhl/AnkQbOMTWeRTKzYL/R1jpg0+ZN1GK2Ry9iPxAp3SglWNko8tqIJBS8pn5JPjuNFEJgGLzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 193.8.40.94) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=leica-geosystems.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=leica-geosystems.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H6/JzIfqdOmRIwCHeXtPdofy7Dx/+VqKxk7ZIFYeI6g=; b=oJ2QavnVTVZKlKgJ7gh4T8qKFdyx9AeZ+AfbjRhTYUbp9OFfLlx29bVA3IsEMqBxaMP/Ftal3VztwhzQurehV7AB8BwpeFtj825hkeP5REatHAwVJf8coqFw9BB8k4IEe3arF3xIn3Szss4nmnIK2pAr0t8SmCLD0Ut+OWpNtcY= Received: from AM6P191CA0057.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::34) by DB8PR06MB6539.eurprd06.prod.outlook.com (2603:10a6:10:12f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Tue, 10 Oct 2023 08:43:46 +0000 Received: from AMS1EPF0000004B.eurprd04.prod.outlook.com (2603:10a6:209:7f:cafe::45) by AM6P191CA0057.outlook.office365.com (2603:10a6:209:7f::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38 via Frontend Transport; Tue, 10 Oct 2023 08:43:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 193.8.40.94) smtp.mailfrom=leica-geosystems.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=leica-geosystems.com; Received-SPF: Pass (protection.outlook.com: domain of leica-geosystems.com designates 193.8.40.94 as permitted sender) receiver=protection.outlook.com; client-ip=193.8.40.94; helo=hexagon.com; pr=C Received: from hexagon.com (193.8.40.94) by AMS1EPF0000004B.mail.protection.outlook.com (10.167.16.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22 via Frontend Transport; Tue, 10 Oct 2023 08:43:45 +0000 Received: from aherlnxbspsrv01.lgs-net.com ([10.60.34.116]) by hexagon.com with Microsoft SMTPSVC(10.0.17763.1697); Tue, 10 Oct 2023 10:43:45 +0200 From: Mamta Shukla To: tudor.ambarus@linaro.org, pratyush@kernel.org, michael@walle.cc, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: bsp-development.geo@leica-geosystems.com, Mamta Shukla Subject: [PATCH v3 2/3] mtd: micron-st: use SFDP table for mt25qu512a Date: Tue, 10 Oct 2023 10:43:22 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: <6b89ae4e4d7a381050746458cb000cd3c60f7a42.1696849423.git.mamta.shukla@leica-geosystems.com> References: <6b89ae4e4d7a381050746458cb000cd3c60f7a42.1696849423.git.mamta.shukla@leica-geosystems.com> MIME-Version: 1.0 X-OriginalArrivalTime: 10 Oct 2023 08:43:45.0385 (UTC) FILETIME=[E13DB590:01D9FB55] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS1EPF0000004B:EE_|DB8PR06MB6539:EE_ X-MS-Office365-Filtering-Correlation-Id: bd9a43aa-7e53-4722-ce4b-08dbc96d03e6 X-SET-LOWER-SCL-SCANNER: YES X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AZHzfYnxoPKfZf6VsPVbs1U2U3f5VfwKtzX8yMaLnIg0G3y2xOSDWQ//rq3fArDHC0NWk7Dka6VT6hGnpfNFQbQK4Qo0imVlpZTa7SSQ6mTuq/nBhJ2gIxWprYX9TpNpmNS8BDr+dOzw5egHJQi5CjbotBbKKkDX1fR4oSaj4oftEm7BvgyXBhxAgdr1UPQfLe6mh8svUFiXc8LJpB768i33u3msnelbxrhmol+eL2oAr/Rfk/mpdqHVLQV28/dNlEERpLBprXOqIIjL319CDsQUutorS1indXh5iolCK39CvfhVXtRW9zEjFUjAbGp7znMrdhToOxYio/ay4ycgC/QwGK2DjvA72qQMePw0FNBUXweT79iREaBc2tEq0hS/es4JP+hsCGa96n73ztyPNOu29Iny88ae+KHqGSsmIUGifIml9niD6UO3XJzgoQvyGSC/GGoPg7OKTnECSQXyEUa4RXuDbjyrGjRfylwBH3xhTRk1Wb0Dr+rmU/HOJD7bC26uflkC+XbSsqZPlLG2sPhy9edGE4NUazVzIAty/T+Ia3EHiTLVmh9uu1ar1rS+QkKG31TliJ4od4ma5GKGvH57HCZHcnhdrZbmC5OVqsLFDi3Rr+34NTvuPVUxyqH59nu6yVDJkCrdOcQNYvLbjuJnj1f5kRbiVtCKyzz8+6lKSVsXCHXS2N9HguqW/GjxNW1+EGPpztVsHXEkfUAkMXJBWoD/TP0WA2UVq/nitr1GAL66M45mqi7eXGcNX7r7 X-Forefront-Antispam-Report: CIP:193.8.40.94;CTRY:CH;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:hexagon.com;PTR:ahersrvdom50.leica-geosystems.com;CAT:NONE;SFS:(13230031)(4636009)(396003)(136003)(346002)(39860400002)(376002)(230922051799003)(82310400011)(64100799003)(451199024)(186009)(1800799009)(46966006)(40470700004)(36840700001)(316002)(70586007)(70206006)(966005)(41300700001)(44832011)(5660300002)(8936002)(4326008)(8676002)(4744005)(40460700003)(36860700001)(107886003)(2616005)(86362001)(83380400001)(81166007)(2906002)(40480700001)(82740400003)(356005)(36756003)(6666004)(336012)(26005)(478600001)(47076005)(138113003);DIR:OUT;SFP:1102; X-OriginatorOrg: leica-geosystems.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 08:43:45.6820 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd9a43aa-7e53-4722-ce4b-08dbc96d03e6 X-MS-Exchange-CrossTenant-Id: 1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a;Ip=[193.8.40.94];Helo=[hexagon.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF0000004B.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR06MB6539 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_015956_724882_A72C253D X-CRM114-Status: UNSURE ( 8.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) 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: Parse SFDP table to get size and functions of mt25qu512a Link: https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-b/mt25q_qlkt_u_512_abb_0.pdf?rev=b259aadc3bea49ea8210a41c9ad58211 Signed-off-b [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -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.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 X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Parse SFDP table to get size and functions of mt25qu512a Link: https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-b/mt25q_qlkt_u_512_abb_0.pdf?rev=b259aadc3bea49ea8210a41c9ad58211 Signed-off-by: Mamta Shukla --- drivers/mtd/spi-nor/micron-st.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c index 6c8cabbead2e..4feb03ee2d13 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -407,9 +407,6 @@ static const struct flash_info st_nor_parts[] = { .name = "mt25qu512a", .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, - .size = SZ_64M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, - .fixup_flags = SPI_NOR_4B_OPCODES, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xbb, 0x20), From patchwork Tue Oct 10 08:43:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SHUKLA Mamta Ramendra X-Patchwork-Id: 1845717 Return-Path: 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=qSVKmjRY; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=leica-geosystems.com header.i=@leica-geosystems.com header.a=rsa-sha256 header.s=selector1 header.b=Yy5Wcrdy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) 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 4S4VGP3H4Wz1ypX for ; Tue, 10 Oct 2023 19:59:57 +1100 (AEDT) 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ikeqe2x1XFefhpO/FTHeE6b5By7Eg4aypxYR9FFAXwA=; b=qSVKmjRY6Z+RFA lQMaTM4oL9yzJv9/wtF9TnbLCr+3j+Wt/va5aMvorenXIkwJh26Ta7RLlqkJ8dwdEY3TYgf+FxEd+ OS/2qGyk6Kx+Ig1xC999KEyDYmO5a9jAXF+QCaFP7Hgupeo1ZDdfgY1Ta/a5J5PTn8l73O5El/Z+A uoo+ls+H/wR4Thq1uhhRwp4sGGYUnFboJgFcMqCTLPcOFfT7aS4TtzwrZF5rUcJIZ/EZtTIBOlKfU oW3v840iXrgpYu/lN1gOk+/cCphQEB5ZqEYUx7/Cl0BNZvIRvDmGhRbs67izaFBhinhjQv6lglN/1 dWhQZ2xcmCjuGpgJ7LPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qq8aL-00Cskc-1F; Tue, 10 Oct 2023 08:59:25 +0000 Received: from mail-db3eur04on0728.outbound.protection.outlook.com ([2a01:111:f400:fe0c::728] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qq8aI-00CsjX-0d for linux-mtd@lists.infradead.org; Tue, 10 Oct 2023 08:59:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JRau3QBfqmB+P7CI7ELzZRhre0J2JrAjq3SQ0/T/c/49fyttJ5rG+2x0Moeakl+oNa44+bMulA6P4kGTUgiR6aSMMaLi6JcVao+QGiWwOD/tsy6tE6FRqboZIOl4odNZo7IJzxVootb1jnd+pAlcdzmikuR/Xbw7Nc1Et8SBIIz3Lh8uFVOVZLb76Qehh8EO3i7hTxy+4si9mVhEQzUiCPJy1scjlohQ9zZgkGuKqlgMCpIpRCnAq9dHPKviQ7YLrbEjP9TooilvnI/EhNvTl9CQImpaNirz1C8l36lxkGNSlB5DbIgihH4N1VNFHKqOhoBujw5L4ETyaWG0ZAEZrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oVo26xdZqOAILJa8xeBMwi007uLApMIutQP2DssQ7No=; b=aOVVcjG66aNme8vzTzqt3HtHkx+KYWnUBAVFZsTK4CylqFLEu/jqdZKoaoVtSBX3J+AwYxINHlNHDJQ9RjQTYcq4GdFRjUaWB0YDVICn9BctvqPDvRIO69NlEBSVLrIyhFl5EFczjL/2QRxsZ8LvZ2A1ptb4hbPe94BZjgRPqy9tlwTzsfWVSfIxfX1/f3FUvanZA2S8/3d/etRL5mXPE0s5an/SWIq3ACbQILnR7ykyIIQV8FSgFVsMHRfdDN+WjJT0gnSUp627Gbw0MdTPvyI7GEh2qIqxRYWIXosZpAQIk+960wBlbMxmI2A5PSKk84Yz9y6Fj79jwBs5STrY9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 193.8.40.94) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=leica-geosystems.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=leica-geosystems.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oVo26xdZqOAILJa8xeBMwi007uLApMIutQP2DssQ7No=; b=Yy5WcrdymlDeimsQTKjdRdVO5O9BRb64VPOCUsJcjkb73y3axXP8jKi8jEmpiOxP903D2WPg4fDOTuQf3H6X9nZgP2K3oaSBMjttCp3yYbbkhVkgeREoA6Y+IFBncYciHm1y4BA+yXNHTnJyvA+8NmHIPRqyIhZ9bEW07qMjnoI= Received: from AM6PR05CA0033.eurprd05.prod.outlook.com (2603:10a6:20b:2e::46) by AM8PR06MB6945.eurprd06.prod.outlook.com (2603:10a6:20b:1d6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.37; Tue, 10 Oct 2023 08:43:47 +0000 Received: from AMS1EPF00000049.eurprd04.prod.outlook.com (2603:10a6:20b:2e:cafe::2d) by AM6PR05CA0033.outlook.office365.com (2603:10a6:20b:2e::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.33 via Frontend Transport; Tue, 10 Oct 2023 08:43:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 193.8.40.94) smtp.mailfrom=leica-geosystems.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=leica-geosystems.com; Received-SPF: Pass (protection.outlook.com: domain of leica-geosystems.com designates 193.8.40.94 as permitted sender) receiver=protection.outlook.com; client-ip=193.8.40.94; helo=hexagon.com; pr=C Received: from hexagon.com (193.8.40.94) by AMS1EPF00000049.mail.protection.outlook.com (10.167.16.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22 via Frontend Transport; Tue, 10 Oct 2023 08:43:47 +0000 Received: from aherlnxbspsrv01.lgs-net.com ([10.60.34.116]) by hexagon.com with Microsoft SMTPSVC(10.0.17763.1697); Tue, 10 Oct 2023 10:43:47 +0200 From: Mamta Shukla To: tudor.ambarus@linaro.org, pratyush@kernel.org, michael@walle.cc, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: bsp-development.geo@leica-geosystems.com, Mamta Shukla Subject: [PATCH v3 3/3] mtd: micron-st: add post bfpt fix for mt25qu512a Date: Tue, 10 Oct 2023 10:43:23 +0200 Message-Id: <28b5597f13ca6baab602e076b4beff4c893e4d11.1696849423.git.mamta.shukla@leica-geosystems.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <6b89ae4e4d7a381050746458cb000cd3c60f7a42.1696849423.git.mamta.shukla@leica-geosystems.com> References: <6b89ae4e4d7a381050746458cb000cd3c60f7a42.1696849423.git.mamta.shukla@leica-geosystems.com> MIME-Version: 1.0 X-OriginalArrivalTime: 10 Oct 2023 08:43:47.0510 (UTC) FILETIME=[E281F560:01D9FB55] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS1EPF00000049:EE_|AM8PR06MB6945:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cb437a7-b31b-472d-e2f9-08dbc96d0520 X-SET-LOWER-SCL-SCANNER: YES X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JpG/fb4V+btwkANP7vWFG4md8k5NBT6quJrCUm4d/t4K8qLAOFE8FCA9RZl6wDkSi0Hmju1q2TrmdrSTMqP8LSFbYOdbDAE+ZmI5Ci/PjQnFdtyoBwVqifQp1r57UgIBVmVlSPlHCArG8tmFwr14lgLBp93yaYbqF6Q+qVtoyPzmR0nQW+QpJtWPZJMN+HYdXwzk7CCEz4yuwGYZIpAeO8032FryX3eV2blfK4HcQ/wfgXwdrG4KhYgo/Mrmi1Jwdgk+CjzAGR9IQplefxgR3hzjbnNPukwiN0Sn3ffltt0i+ecEsxdFvTmck2VKOpey7JMUar8ftqtiPbwkhNNPLEONF7NUeBHL6YtnLdYmlK/oIERx9FQqREsS48PZ5WkQprllbMHxrDEpSdF/PdFwIwWuKRshT2t/FRbKFkPL3GO/CTP9Mu+D/7XSk3X0fjxQWdqOMAhQG+CbeQ/KICIBU37wgK1ZJnub152nvaKP3MvaPaGjkgfB8VPyiC1QE9IzDJNaHyN3DAFUUxUdJfbBJWqQrBNcZV9JDqz1ATzCtOrgDEQs2RKrTauVuheUYkVNOi3taE20pEhSc6Dpf/6llRb8QQ1Nd+NzD/6O5ezSVb0ponxM4egymLdQpNZCm4QP4BTRJn3yUE7lzMUBarh0eazKytA3Q6r3bkHVrrK/o9Wn1SguqTmrC0HpM8HgsXHAVhWvB/jtvj2s4k6lWfo/7ZG6QTccyYAgkzK6J6azLupHoraslL4NgXYFt8TuQUoMBNYTKi7aojMPdMI1BHP7gA== X-Forefront-Antispam-Report: CIP:193.8.40.94;CTRY:CH;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:hexagon.com;PTR:ahersrvdom50.leica-geosystems.com;CAT:NONE;SFS:(13230031)(4636009)(396003)(346002)(376002)(39860400002)(136003)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(82310400011)(46966006)(40470700004)(36840700001)(40480700001)(47076005)(40460700003)(336012)(83380400001)(2616005)(107886003)(70586007)(36860700001)(26005)(70206006)(316002)(4326008)(8936002)(8676002)(6666004)(44832011)(41300700001)(5660300002)(2906002)(478600001)(36756003)(81166007)(86362001)(82740400003)(356005)(138113003);DIR:OUT;SFP:1102; X-OriginatorOrg: leica-geosystems.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 08:43:47.7404 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cb437a7-b31b-472d-e2f9-08dbc96d0520 X-MS-Exchange-CrossTenant-Id: 1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a;Ip=[193.8.40.94];Helo=[hexagon.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF00000049.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR06MB6945 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_015922_239887_549489E9 X-CRM114-Status: GOOD ( 10.39 ) X-Spam-Score: 0.8 (/) 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: Parsing SFDP Table for mt25qu512a adds flag for 16Bit Status Register. cat /sys/kernel/debug/spi-nor/spi-PRP0001:00/params name mt25qu512a id 20 bb 20 10 44 00 size 64.0 MiB write size 1 page size 256 address nbytes 4 flags HAS_SR_TB | 4B_OPCODES | HAS_4BAIT | HAS_LOCK [...] Content analysis details: (0.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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.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 1.0 FORGED_SPF_HELO No description available. X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Parsing SFDP Table for mt25qu512a adds flag for 16Bit Status Register. cat /sys/kernel/debug/spi-nor/spi-PRP0001:00/params name mt25qu512a id 20 bb 20 10 44 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_16BIT_SR | HAS_4BIT_BP | HAS_SR_BP3_BIT6 | SOFT_RESET This Flag leads to miscalculation of BP bits and thus causes failure of lock/ unlock functionality of chip. Hence, add post bfpt fixups to fix parsed sfdp setting. Signed-off-by: Mamta Shukla Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/micron-st.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c index 4feb03ee2d13..b7bf0570c01f 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -180,6 +180,19 @@ static const struct flash_info micron_nor_parts[] = { }, }; + +static int mt25qu512a_post_bfpt_fixup(struct spi_nor *nor, + const struct sfdp_parameter_header *bfpt_header, + const struct sfdp_bfpt *bfpt) +{ + nor->flags &= ~SNOR_F_HAS_16BIT_SR; + return 0; +} + +static struct spi_nor_fixups mt25qu512a_fixups = { + .post_bfpt = mt25qu512a_post_bfpt_fixup, +}; + static const struct flash_info st_nor_parts[] = { { .name = "m25p05-nonjedec", @@ -408,6 +421,7 @@ static const struct flash_info st_nor_parts[] = { .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, .mfr_flags = USE_FSR, + .fixups = &mt25qu512a_fixups, }, { .id = SNOR_ID(0x20, 0xbb, 0x20), .name = "n25q512a",