Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp572689rwi; Thu, 20 Oct 2022 02:27:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM45Hd0zvgS17YYyXBfCG2W93iXLXmEM8vENRxeLZR90gj9SafG/uIZG6cT38yMAyiVk76Um X-Received: by 2002:aa7:d39a:0:b0:458:a612:f805 with SMTP id x26-20020aa7d39a000000b00458a612f805mr11114245edq.49.1666258030592; Thu, 20 Oct 2022 02:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666258030; cv=none; d=google.com; s=arc-20160816; b=DNuUh3BZUq0MF/MYyJJrkoULp9De0EjtgEgFVv8toWTwmWLltF1etMb+o150SIBnrI MhQDLHMHEQV6e//GuhQYCakUkiwz2KBmflT2LnMTxiPfE17yO5CCW4CzTkQSWNLcM/B3 SMgXPesfAMQp1f8AK3RDgyORicfrricuSDkxgylTN/OoNF/4QuxY+P4Khuj+/vL2f4xs eTnHBWJR5x9lpa8gwxWPy1AnE8sQFIPgMdcXVbqQ/cFLGBXG1WRewfWXS0fOxoPfuE3E s+ShKq+iVLhXw5r0ti2W1tHVqLuFvIW7ghRZ+R65qS4F7xxqrmiE41XiFIR+qD+Peo8m Ij0g== 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=gUzH+1qdyWGYtFXjCxZ0XI1LQRnYPZ2F7W0BfgT0mUQ=; b=SuMLtlm7EjiRg6VAaAQrnnKctBWyzPhmQlNycTHGXHLwnsYswUdQnOylbuG5n3y98q sRLvoiRwcejoHha6dxEfn2z2JuRY7fBM5wCMR9NotZ/KfUwxylgzfHGaPy3xGEoNQT19 DnOwnj73HGaF14uV3EyA9ZlkHWy1WOmPI94S+Zc9+feH2d3+yd71/IlnjJl2zOJA6yS8 kbXpvfxNr2RzWHojfTOChRPWUVqKR1vnvLJM/jmlolnOgtmRaWEiLXkalKjC80imzhRn qy8YyrAH0vM7PiQRmjqFTx7aQ9olafkR7jMVRoJLXl/wPPYtZQ3tDu+DFgYTd4eBHqha g+wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=QHL0zXqB; 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 ec12-20020a0564020d4c00b00459779478absi13858278edb.186.2022.10.20.02.26.44; Thu, 20 Oct 2022 02:27:10 -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=QHL0zXqB; 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 S230075AbiJTJVR (ORCPT + 99 others); Thu, 20 Oct 2022 05:21:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbiJTJVP (ORCPT ); Thu, 20 Oct 2022 05:21:15 -0400 Received: from smtp-fw-9103.amazon.com (smtp-fw-9103.amazon.com [207.171.188.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 480D8FF25E for ; Thu, 20 Oct 2022 02:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1666257674; x=1697793674; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gUzH+1qdyWGYtFXjCxZ0XI1LQRnYPZ2F7W0BfgT0mUQ=; b=QHL0zXqBYBVAhGpdMIquWR+eMI6Ex29VWrdGatMIp7zYaqWt8BnNvjW3 hYDdp/fQOMwHXXoYrvPm0IRR4ihD0oppM6Ef7urzhl4icR5oC2A34HXzX B2U92eLPlL/ehK+YDAbT50oRJsgyz5icJ3eSaBpB70FRc3T6iuQEyGMBu A=; X-IronPort-AV: E=Sophos;i="5.95,198,1661817600"; d="scan'208";a="1065876450" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-iad-1e-90d70b14.us-east-1.amazon.com) ([10.25.36.214]) by smtp-border-fw-9103.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 09:21:03 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1e-90d70b14.us-east-1.amazon.com (Postfix) with ESMTPS id AA9B9C4680; Thu, 20 Oct 2022 09:21:00 +0000 (UTC) Received: from EX19D013UWB004.ant.amazon.com (10.13.138.62) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 20 Oct 2022 09:21:00 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX19D013UWB004.ant.amazon.com (10.13.138.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1118.15; Thu, 20 Oct 2022 09:20:59 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.61.243) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Thu, 20 Oct 2022 09:20:58 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id BF3FC4B99; Thu, 20 Oct 2022 09:20:58 +0000 (UTC) From: Eliav Farber To: , , , , , , , CC: , , , , , , , , Subject: [PATCH v3 1/1] mtd: spi-nor: micron-st: Enable locking for mt25qu256a Date: Thu, 20 Oct 2022 09:20:58 +0000 Message-ID: <20221020092058.33844-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,URIBL_BLOCKED, 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 mt25qu256a [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 MT25QU256ABA8ESF-0SIT. [1] https://www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-a/mt25q_qljs_u_256_aba_0.pdf Signed-off-by: Eliav Farber Link: https://lore.kernel.org/lkml/20221019071631.15191-1-farbere@amazon.com --- xxd -p /sys/devices/platform/soc/fd882000.spi/spi_master/spi0/spi0.0/spi-nor/sfdp 53464450060101ff00060110300000ff84000102800000ffffffffffffff ffffffffffffffffffffffffffffffffffffe520fbffffffff0f29eb276b 273b27bbffffffffffff27bbffff29eb0c2010d80f520000244a99008b8e 03d4ac0127387a757a75fbbdd55c4a0f82ff81bd3d36ffffffffffffffff ffffffffffffffffffe7ffff21dcffff md5sum /sys/devices/platform/soc/fd882000.spi/spi_master/spi0/spi0.0/spi-nor/sfdp 5ea738216f68c9f98987bb3725699a32 /sys/devices/platform/soc/fd882000.spi/spi_master/spi0/spi0.0/spi-nor/sfdp cat /sys/devices/platform/soc/fd882000.spi/spi_master/spi0/spi0.0/spi-nor/jedec_id 20bb19104400 cat /sys/devices/platform/soc/fd882000.spi/spi_master/spi0/spi0.0/spi-nor/partname mt25qu256a cat /sys/devices/platform/soc/fd882000.spi/spi_master/spi0/spi0.0/spi-nor/manufacturer st v3 --> v2: - Minimize change only to mt25qu256a which it was tested on. v2 --> v1: - Enable locking also for mt25qu256a. - Dump the SFDP tables. 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..53ff41534977 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -201,6 +201,8 @@ static const struct flash_info st_nor_parts[] = { MFR_FLAGS(USE_FSR) }, { "mt25qu256a", INFO6(0x20bb19, 0x104400, 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_DUAL_READ | SPI_NOR_QUAD_READ) FIXUP_FLAGS(SPI_NOR_4B_OPCODES) MFR_FLAGS(USE_FSR) -- 2.37.1