From patchwork Wed Nov 9 20:23:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 17805 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp544972wru; Wed, 9 Nov 2022 12:27:22 -0800 (PST) X-Google-Smtp-Source: AMsMyM6ZWsKCgRJQxpUbarx6mWZR98EVus9pyZq/LKq2JCB9n16xjSy/QvAtB8UlYBeS0n9t5mE5 X-Received: by 2002:a17:906:2b57:b0:7ad:90dc:eaf2 with SMTP id b23-20020a1709062b5700b007ad90dceaf2mr1731338ejg.526.1668025642523; Wed, 09 Nov 2022 12:27:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668025642; cv=none; d=google.com; s=arc-20160816; b=rmqrnemuT7EWueGOLvfbokTYeJlfVrDFG9V0+gC7HV6ERdqN+jrbRCXs7BZ2DFG11D zYcvt8m/Piib72yq4POxCt+S1zwY5UyyvGKssPJK7hIluAN3q+kw0NCDJVHZU3xiEjhS 8KAT0KKe94yeEMkOWsY52qwu0BkC97Em8/s58MtZtnEu22jtK2pwJpEUmx1ScRkLNwKU qzTbOf8eewJyWo/syY45t+R1fvSQja87hJAccHO4s85fmL7CsOQfFHhlkD9sjyxwZaNa NGvoYvZ3qDBME+RHsfH+0JL9OnoPaPiXud3V+bBhG1+7ZXXCyK8ZACabz/MFjXiFq5gx g1qg== 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=Ntyf2SqV3Ptk4mEe1bu2Gewc1u6/sGCGvZ/+S2hlQDQ=; b=sz5wh0tBdwY5O0digqwr7skuhp6eupPdkZHVrxSFMz2OLBongbpFEotEvJzxxQ7jYV M7JNF8FcE3kdwwnL1pg2RXOg/JMf84i9IAYgBJ/w/AAu0I7spLKyAGZYvICvttnJ6egy cN33BsJ2OkdABcC6ZMTFtJoxeDjcmgB0t83bnCo35iOQ5LQf5pylhbR2fYEysjOPi7xr OVrAWMshJZhz42PNUcf5rhpfcS0tHXv1IFNIFDAp1QkGJ1vVJ3Q4/cEF87QdhMuAgONq od0WIlmpz2oGMfUREhDocDz68oQ4zAPIs72vlKSxu5fndJMkWui4DcXlfiw2qmHFtT9k WApg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T8ooVs2p; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne39-20020a1709077ba700b00783ac0b4d32si16756991ejc.941.2022.11.09.12.26.59; Wed, 09 Nov 2022 12:27:22 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=T8ooVs2p; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231136AbiKIUYD (ORCPT + 99 others); Wed, 9 Nov 2022 15:24:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiKIUYB (ORCPT ); Wed, 9 Nov 2022 15:24:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54F1ABC27 for ; Wed, 9 Nov 2022 12:24:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CEF4E61CAF for ; Wed, 9 Nov 2022 20:24:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 343CEC433D7; Wed, 9 Nov 2022 20:23:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668025440; bh=7+5jyTKDsBSnzUCypgmhEzafnQWwO3MDHgaXspdMOVI=; h=From:To:Cc:Subject:Date:From; b=T8ooVs2pwLN7kWzDt7NoDC1RaNGkZQxrFFi205GVftjQlo2Nioki0YrA+fcUEIahG VzQ1hUkw9QguGB37xPLlBVA0ntWVhfZhPLFLL7mkx7pT918QKQl53AtoVFFCGN1Yi6 BnjWCN9s6g6CXcagFjozEsiHV8k1ZF4SazO3di3RuN8xmzuH199BiO78xtXzrmtJwt Z3nCmj1o9gxdDrMEK2PHSGjSn1IdA5ahBDr/sE1QWZCSqePni6scTKXAA6LOnS9aPp l9dxUsv19Fe/soI9y7iaeIx0b23ng9hP0lDEPdiyPH3Mi8Y6+V8zUWPM0soFBxp4t4 dYcaSgmKNQrYA== From: Dinh Nguyen To: linux-mtd@lists.infradead.org Cc: dinguyen@kernel.org, tudor.ambarus@microchip.com, pratyush@kernel.org, michael@walle.cc, linux-kernel@vger.kernel.org, Niravkumar L Rabara Subject: [PATCH] mtd: spi-nor: macronix: Add support for mx66u1g45g Date: Wed, 9 Nov 2022 14:23:47 -0600 Message-Id: <20221109202348.93666-1-dinguyen@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749051656170931372?= X-GMAIL-MSGID: =?utf-8?q?1749051656170931372?= 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 Signed-off-by: Dinh Nguyen --- 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..46ba898f3dd0 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) },