From nobody Thu Apr 9 10:28:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A8B9C433FE for ; Tue, 18 Oct 2022 07:23:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230341AbiJRHXJ (ORCPT ); Tue, 18 Oct 2022 03:23:09 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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-sh= eet/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-s= t.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[] =3D { 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) }, --=20 2.37.1