Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp944622rwb; Thu, 22 Sep 2022 08:14:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6eGvgXR6WfGZhRwLVw/6Z2npNG7iRnkL4p/mA4pwwQiL8SE5sFe4a6EFRnJ0M9XmOmHLTW X-Received: by 2002:a63:8648:0:b0:43b:5126:73fb with SMTP id x69-20020a638648000000b0043b512673fbmr3551363pgd.290.1663859682508; Thu, 22 Sep 2022 08:14:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663859682; cv=none; d=google.com; s=arc-20160816; b=S3rQ4fpV68YYWJRUHvBKihelsLV0id5E7o2DMU+Pu/BVJZgNXnTSlluwz5R0INgKoR 9afmEdX7pXNRHaB0OB48SlubHhh4lNSIq3oQs5OPo/1ngBDjkRQw5KAwnWJjKvtDBcm3 Ara9o6/ZOexfRg2UzTzs1CyUlus0JasYboPzVy1g5+8ghHj08nm1ZRC6Ydw6zruPLYME nHfPfcWC2Os2LzgJuroQBPKlO8HGMhPbAikI2LUdIHnE/2yau6MmOkXcfwiYqrM6Wrlt wn+8jc3ymoCSonPJudgaBjqU/8X+qAD3St0PLDHF8jqF3MW3ir7koDPcbu3gp1Di09xz AhJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=hOWRDOnllpNwbanrF29Aqs2hVKHR42wg1rNwmpJb/xQ=; b=ao/c+EEjOjTmAu2dXqFqDfDOIbcfCje2vHeRdR7MDmJXiE7SpSo6eX9+ZguzPgJpRa NnBWooBHSMCScWXKub2Mk6lZXF9nWUFtTy9FSaPuejpdcmR2nALq9eE3j4wuILw1kLxa jL/wBi0dLzGnklxp4VaQs2sTEX2dnrGbkT1KZZQcs7MqKHu+/SaWfvptrIJO0Vtb6En7 h0V+eu296PA8Cb9zc5vGT/kiGfhV3zHQ36kpuFmMp9BMfiUbJzoyzoatLAoqrRBgOrsn tHq70U+sRv6MhYUBh62w32yrrcwqYbo/04cH2j7miD+07824MaRhisscMl/5ZMipxTxX LB3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=mu1g4rLk; 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=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i7-20020a170902cf0700b0016786f2d1d8si13875plg.475.2022.09.22.08.14.29; Thu, 22 Sep 2022 08:14:42 -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=@walle.cc header.s=mail2022082101 header.b=mu1g4rLk; 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=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231545AbiIVOzh (ORCPT + 99 others); Thu, 22 Sep 2022 10:55:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229641AbiIVOzf (ORCPT ); Thu, 22 Sep 2022 10:55:35 -0400 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AF00D74C0 for ; Thu, 22 Sep 2022 07:55:34 -0700 (PDT) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 2613D1D4A; Thu, 22 Sep 2022 16:55:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1663858532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hOWRDOnllpNwbanrF29Aqs2hVKHR42wg1rNwmpJb/xQ=; b=mu1g4rLkNWR9+D0ehFJ1fSNC3kQx8uuzlWeGr0dZegssaD2KkhnWdyDahKcgHUZajVsvpT VYAZHhnV8DOBiXEKX49vwhuuV7XFynFKlsUjLQPmcmGzsA3V5sAQu6xFoywCsT71uIll4n Y3LdLBM7tIgT9ySefC3ValDCWQ9khV75Zb2piNbCH7g6LJkcPkl6vVUfqy7ugd6A3TCycj 24HU1N90YFkth+VB+PtZefWlnL+im1+/4rc9NkJUY1e5KwNdY+evDk9b1E9BBiv6ShioVq pN5ec6Z711vt8dZecxcffgn1Cu4H2rnVLc/buLTq6Gl0VgFmg7ALxX0AXrRA2g== MIME-Version: 1.0 Date: Thu, 22 Sep 2022 16:55:32 +0200 From: Michael Walle To: niravkumar.l.rabara@intel.com Cc: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mtd: spi-nor: macronix: Add support for mx66u1g45g In-Reply-To: <20220917111640.977243-1-niravkumar.l.rabara@intel.com> References: <20220916082215.883184-1-niravkumar.l.rabara@intel.com> <20220917111640.977243-1-niravkumar.l.rabara@intel.com> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 Am 2022-09-17 13:16, schrieb niravkumar.l.rabara@intel.com: > From: Niravkumar L Rabara > > The MX66U1G45G is the smaller sibling (128MB) of the MX66U2G45G (256MB) > that is already supported. > > Tested on Intel N5X socdk board, > - random data write, erase, read - verified erase operations > - random data write, read and compare - verified write/read operations > > Signed-off-by: Niravkumar L Rabara > --- > root@n5x:~# find / -iname spi-nor > /sys/kernel/debug/spi-nor > /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor > /sys/bus/spi/drivers/spi-nor > root@n5x:~# ls -al > /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/ > drwxr-xr-x 2 root root 0 Dec 16 17:26 . > drwxr-xr-x 6 root root 0 Dec 16 17:25 .. > -r--r--r-- 1 root root 4096 Dec 16 17:26 jedec_id > -r--r--r-- 1 root root 4096 Dec 16 17:26 manufacturer > -r--r--r-- 1 root root 4096 Dec 16 17:26 partname > -r--r--r-- 1 root root 0 Dec 16 17:26 sfdp > root@n5x:~# cat > /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/jedec_id > c2253b > root@n5x:~# cat > /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/manufacturer > macronix > root@n5x:~# cat > /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/partname > mx66u1g45g > root@n5x:~# cat > /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/sfdp > > mx66u1g45g-sfdp > root@n5x:~# hexdump mx66u1g45g-sfdp > 0000000 4653 5044 0106 ff02 0600 1001 0030 ff00 > 0000010 00c2 0401 0110 ff00 0084 0201 00c0 ff00 > 0000020 ffff ffff ffff ffff ffff ffff ffff ffff > 0000030 20e5 fffb ffff 3fff eb44 6b08 3b08 bb04 > 0000040 fffe ffff ffff ff00 ffff eb44 200c 520f > 0000050 d810 ff00 4987 00b5 d282 e204 0344 3867 > 0000060 b030 b030 bdf7 5cd5 9e4a ff29 50f0 85f9 > 0000070 ffff ffff ffff ffff ffff ffff ffff ffff > * > 00000c0 8f7f ffff 5c21 ffdc ffff ffff ffff ffff > 00000d0 ffff ffff ffff ffff ffff ffff ffff ffff > * > 0000110 2000 1600 f99d 64c0 cb85 ffff ffff ffff > 0000120 md5sum of this is missing. > --- > drivers/mtd/spi-nor/macronix.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/mtd/spi-nor/macronix.c > b/drivers/mtd/spi-nor/macronix.c > index d81a4cb2812b..07ace9da74b7 100644 > --- a/drivers/mtd/spi-nor/macronix.c > +++ b/drivers/mtd/spi-nor/macronix.c > @@ -97,6 +97,10 @@ static const struct flash_info macronix_nor_parts[] > = { > SPI_NOR_QUAD_READ) }, > { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048) > NO_SFDP_FLAGS(SPI_NOR_QUAD_READ) }, > + { "mx66u1g45g", INFO(0xc2253b, 0, 64 * 1024, 2048) > + PARSE_SFDP > + FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) With PARSE_SFDP this shouldn't be needed. Also, could you try with INFO(0xc2253b, 0, 0, 0), this information should come from the SFDP, too. -michael > + FIXUP_FLAGS(SPI_NOR_4B_OPCODES) }, > { "mx66u2g45g", INFO(0xc2253c, 0, 64 * 1024, 4096) > NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) > FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },