Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5600236rwi; Tue, 18 Oct 2022 01:08:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ynIKO0k59Fz3KuZjhge+luDpvkr9cQPsNNi7db/TB1kqOK2zzu4LleCAuipy+AcG6OeXi X-Received: by 2002:a17:907:968d:b0:78e:1a4:131 with SMTP id hd13-20020a170907968d00b0078e01a40131mr1371842ejc.439.1666080534054; Tue, 18 Oct 2022 01:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666080534; cv=none; d=google.com; s=arc-20160816; b=jEGxBVc6JTUz7+/VlVqencmUq1THW+cZVYIdrvyQaDgFbR1aVi5lQOu9oAuSGW6INI zv6qWhukR3dahcGeVvewsE3B5kh2VV2mD/xwpRTtSXAapWtakrEYYF4ijfIClw3z7WMM iQe+j/sWWWvELsElZY1M66pqwxTdcyIcAKcE0WncVAn9QS062i2Kw/JG9NdgYGCYI1yp gwxvN1nBlzRACSau2P/R9ZJ0/p3ejCY8gY0tAZ3SSWE131OrT6vAV7CwmJb3wlAxBsKK YyRsZNOSvzWX+Ct+cxNdYlFPnF5+F9AT9J7w8jaI5hk0Br43YoxOxlJmf3zbiDOQ27hL t6ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cSf294mhQbfJuFOuymgNqAtYKIJ2klCDJAg6UwS+qAE=; b=R4VSW4M9epcac0gltfMHcQSsQ7k7sbqd0droTiLsOouPUvAGqSNTE0qh0oew5vWcHP SnSWTTrp1dd4rOByb2nE4R9j9BbdawvfUYKMWhhGUa+JD7JeyqiQJh9o/FjiSFiRljkT 5sVuJN3yMsEFzYXzFIN1hLZQE6DVv8oOpSTkJDgwWu/ccTa5Ax1zC+XxHEyTbc01VAgV UE709ZUKgbYdtiQ+Yfn+h4K1dfcoZySbtmMSwBB25UxNSd5psSwuWHohsHFAWTVlEi9r jG/c3LUdK08wmwL8+1ZiZd9OLPhyYWrFvmhaMpSvVdOxquS8P6M2V3rrNZA5EOWaZTsW CuEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=by09lXvA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a056402064800b00458cdba7a90si9389775edx.471.2022.10.18.01.08.28; Tue, 18 Oct 2022 01:08:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=by09lXvA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbiJRHXI (ORCPT + 99 others); Tue, 18 Oct 2022 03:23:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbiJRHXG (ORCPT ); Tue, 18 Oct 2022 03:23:06 -0400 Received: from smtp-fw-80007.amazon.com (smtp-fw-80007.amazon.com [99.78.197.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD352ABF32 for ; Tue, 18 Oct 2022 00:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1666077783; x=1697613783; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cSf294mhQbfJuFOuymgNqAtYKIJ2klCDJAg6UwS+qAE=; b=by09lXvAwoxTvrtnNLFoMTNGE4BrCfRDfQRdx3MrCnVBo2OQqff61CUy qZN1x9klDDWQuba7ejixyEkZCJg3LV++kil5kPqcfKJr6T15y17rG+d6o Yn+oZqjkljk9/6z7xb49X+TOSgQWc9VmW3nt8TgmmnQDZ764hcKVRx0KZ 4=; X-IronPort-AV: E=Sophos;i="5.95,193,1661817600"; d="scan'208";a="141337025" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-iad-1d-1c3c2014.us-east-1.amazon.com) ([10.25.36.214]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 07:23:00 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1d-1c3c2014.us-east-1.amazon.com (Postfix) with ESMTPS id 3002DE0240; Tue, 18 Oct 2022 07:22:56 +0000 (UTC) Received: from EX19D013UWB002.ant.amazon.com (10.13.138.21) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 18 Oct 2022 07:22:56 +0000 Received: from EX13MTAUEE002.ant.amazon.com (10.43.62.24) by EX19D013UWB002.ant.amazon.com (10.13.138.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.15; Tue, 18 Oct 2022 07:22:56 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.62.224) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Tue, 18 Oct 2022 07:22:55 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id 4A2534B6F; Tue, 18 Oct 2022 07:22:54 +0000 (UTC) From: Eliav Farber To: , , , , , , , CC: , , , , , , , , Subject: [PATCH] mtd: spi-nor: micron-st: Enable locking for n25q256ax1 Date: Tue, 18 Oct 2022 07:22:54 +0000 Message-ID: <20221018072254.21606-1-farbere@amazon.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org n25q256ax1 [1] uses the 4 bit Block Protection scheme and supports Top/Bottom protection via the BP and TB bits of the Status Register. BP3 is located in bit 6 of the Status Register. Tested on n25q256ax1. [1] https://www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/n25q/n25q_256mb_3v.pdf Signed-off-by: Eliav Farber --- 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 3c9681a3f7a3..7cf5fbb28f99 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -206,6 +206,8 @@ static const struct flash_info st_nor_parts[] = { MFR_FLAGS(USE_FSR) }, { "n25q256ax1", INFO(0x20bb19, 0, 64 * 1024, 512) + FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | + SPI_NOR_BP3_SR_BIT6) NO_SFDP_FLAGS(SECT_4K | SPI_NOR_QUAD_READ) MFR_FLAGS(USE_FSR) }, -- 2.37.1