From patchwork Sat Sep 17 11:16:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rabara, Niravkumar L" X-Patchwork-Id: 1678888 X-Patchwork-Delegate: michael@walle.cc Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=JfLb8dfz; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=XbglassJ; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MV7hm5KZ1z1ync for ; Sat, 17 Sep 2022 21:18:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Vhgsiz4C/mDX6sIl5i1VR9ZQoOlpFuoa/CwnMaOg5Fs=; b=JfLb8dfzRbcYuN 1/tTwayRvY9RKsdESu8VGbALcm84w8kEI0MOIF6CI+/+VWZq/cDe10Az08EolOvK2VDt9UHG2l7x3 EoySliM5UKTA755ZPInNixnxgVmokhdM6f01pyghVBl7Kj4wA1ljZBaYdqZIRFubEMQQCYDh3cKVM R2b8d/Jo5y+eGAC2O9i5ObqSG79qglkZ+Nr0DqqCP07sB2aBFCnOJt97fjK8ETklbnDecQkJDOWz8 fqjAUCK+Xn6JlidvKhYX6QOBOiCeij5I36pn/go3hxQe9SabboEcbbgzBsG/egVaX/VdgjwZJfXtJ etafToTaZIN+zSGJ5P9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oZVop-005PYt-Pu; Sat, 17 Sep 2022 11:17:07 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oZVom-005PWx-IY for linux-mtd@lists.infradead.org; Sat, 17 Sep 2022 11:17:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663413424; x=1694949424; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=r5R83j4pOSZlr5q6a2Hps+vq4FBEXptw1GqH09jMVRM=; b=XbglassJqY3+XbawYVNXS/wEXorINuLU4qsI9sluuEByNO0hlxFe4Iyv xHjTfR9KnZR7omC0MesLgLuBIdaFsks7NzEtB4MdA16sTVgB/5uEEsMQh kNTgyyXXCUCdzqTUvT6mI5f1lf+uUiXE9Tox7calJ0TB0egT3pbdN7hmH bRGhoF5oN7ovWbsdB5EwJEsE1xQ4Pyzz6Kh9arqmYznTSEPEhUpM8i1oU Sd3bURW+tBrwbn99ZMSRFyNAq0+5At7ckYVJ1/AnRgx8jVCAPAbDHU0LU Arpo14gA3CxQIOpSuAS+z/S+dG86MsxIg1IzeaU7+D4JqWC9Kzu62QnqE Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10472"; a="286188077" X-IronPort-AV: E=Sophos;i="5.93,323,1654585200"; d="scan'208";a="286188077" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2022 04:17:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,323,1654585200"; d="scan'208";a="743609171" Received: from unknown (HELO localhost.localdomain) ([10.226.216.116]) by orsmga004.jf.intel.com with ESMTP; 17 Sep 2022 04:16:59 -0700 From: niravkumar.l.rabara@intel.com To: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Niravkumar L Rabara Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] mtd: spi-nor: macronix: Add support for mx66u1g45g Date: Sat, 17 Sep 2022 19:16:40 +0800 Message-Id: <20220917111640.977243-1-niravkumar.l.rabara@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220916082215.883184-1-niravkumar.l.rabara@intel.com> References: <20220916082215.883184-1-niravkumar.l.rabara@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220917_041704_760771_9194D1A7 X-CRM114-Status: GOOD ( 12.82 ) X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [134.134.136.20 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: intel.com] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [134.134.136.20 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- 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) + 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) },