Message ID | 20221018072254.21606-1-farbere@amazon.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1821779wrs; Tue, 18 Oct 2022 00:32:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5959MbO8A36YET1H1z+OnLod52mth22tlo4dyuEVoUkQ32D7/kkyOzmJ+mdm9uHD4APd3F X-Received: by 2002:a63:4850:0:b0:45d:6ee6:1c18 with SMTP id x16-20020a634850000000b0045d6ee61c18mr1594115pgk.255.1666078346011; Tue, 18 Oct 2022 00:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666078346; cv=none; d=google.com; s=arc-20160816; b=X3qAKziUMhxz2kv5Zf2Gg8/1952uPfJ+PoaANaJFjc3OMbkupVvIhsYT6FjxLHIEIe T/J/e7AOT2edMFVwPoVTohcn4IGan2RARbiUkiT25FmmoyE6JMnExnUwj4yxosYQU/SY rKo1TfV9pZOColzbphgYsfLxhGhwsxDstWRAADCFVISBR2Ls3cOv2BB8o3NTjM3ZkQ5V VbMJuMtVSfMSZMNImOYqnxsDEkPoHl4yr99+9ooHYtMaTxj4wgbiy97ikPE0EcxYdcnU t1pwEuLCDwitJ0xoXHoqUJukBA39/KmHhtOP5PAH9DueGcX3c4KCO/EZVL7rE6l/FNBe V/bg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v3-20020a17090ad58300b00203336ddd4asi12566760pju.56.2022.10.18.00.32.12; Tue, 18 Oct 2022 00:32:25 -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 <rfc822;carlos.wei.hk@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <farbere@amazon.com> To: <tudor.ambarus@microchip.com>, <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: <talel@amazon.com>, <jonnyc@amazon.com>, <hhhawa@amazon.com>, <hanochu@amazon.com>, <farbere@amazon.com>, <itamark@amazon.com>, <shellykz@amazon.com>, <amitlavi@amazon.com>, <dkl@amazon.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747009767460320173?= X-GMAIL-MSGID: =?utf-8?q?1747009767460320173?= |
Series |
mtd: spi-nor: micron-st: Enable locking for n25q256ax1
|
|
Commit Message
Farber, Eliav
Oct. 18, 2022, 7:22 a.m. UTC
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 <farbere@amazon.com>
---
drivers/mtd/spi-nor/micron-st.c | 2 ++
1 file changed, 2 insertions(+)
Comments
Hi, Am 2022-10-18 09:22, schrieb Eliav Farber: > 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 <farbere@amazon.com> Looks good. But could you please dump the SFDP tables as described in [1]. -michael [1] https://lore.kernel.org/linux-mtd/4304e19f3399a0a6e856119d01ccabe0@walle.cc/
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) },