From patchwork Fri Nov 11 16:40:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 18910 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp852705wru; Fri, 11 Nov 2022 08:48:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf7tfOSRyPmR9YEBrZdck6P2PoVcqUc2KjcdtMmjEpHc5h+QwH71sasVR0zdFWq9ZBGx9r2w X-Received: by 2002:a17:90b:4a51:b0:213:aa5f:a026 with SMTP id lb17-20020a17090b4a5100b00213aa5fa026mr2640560pjb.243.1668185335303; Fri, 11 Nov 2022 08:48:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668185335; cv=none; d=google.com; s=arc-20160816; b=mZTs2NE/DdIvmuUmHXTWmWFdOq9zDJPDb4BYRCC4Gyu90D8NHep7DX099XU/33/u+h bsOuaMqExIDrf0XQbdVxBq5zjNNV//wTp2/sghyaM08kl38tCaUY4hPJCpPXWvZijspL Y/uNB8exjx/eGCaf/64raFV+ScPvT68S2uvPzzZPGieywW4cGesSxQ19OdcMbejsqQWR pKFN7WEFp0VRbTGTZwmXqm8nkNPp5mGf8Qga0mhil2RvYn0sky7Gp9QDAYDlgA1QlZpW 4kCjl9oqa3EZnLO8VlVEkDm3375dT2vIGbbjW1+N54c74mqDtuvE37bqg6J0/pT755/W lkhw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ClXJpQRicOZf7bHN9zO0nQ7GV+gMP6ngTiOhzuwXsmc=; b=q8N+hJVL7wDKxEMkfa4aw4UpSuYHHOKUpzWdhvINQnvuwuUvpVunVOgFEJMr4Vj0RO euxRtKEQYCQZedw0a9UKYIJ7gHQ5eue3E3fLfF+XTKJJP7U/d41eZ0CRX/8X9jppAza2 1kJsoFTUmhetTY0qqj0Nh7cDCwGjcdJtbSXsY+Y6lwZUC9xjSfWmt7N60UMZ+ayldpzv m78+PkHzQIfVuc3F9BTadqyU+1/vhF/eAeH+SysBJCn33fxoOpEXpddpbTDlBtrGgkBB 6NbgPEf3t7L2NgvujRBjbHuPDagGxactcYYxCxXbxbLHU+4r2k/BDqNiyRWGWqTfMe1G BaIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T8uu2XBu; 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 l4-20020a170902d04400b0017f802fcffesi2588847pll.410.2022.11.11.08.48.41; Fri, 11 Nov 2022 08:48:55 -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=T8uu2XBu; 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 S234253AbiKKQkd (ORCPT + 99 others); Fri, 11 Nov 2022 11:40:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233654AbiKKQk2 (ORCPT ); Fri, 11 Nov 2022 11:40:28 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63D0061778 for ; Fri, 11 Nov 2022 08:40:28 -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 F3FEF62040 for ; Fri, 11 Nov 2022 16:40:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A07EDC4347C; Fri, 11 Nov 2022 16:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668184827; bh=T+/dE65GaUmXRopapuVAGdXHeGWYexFvnU1S9HJYdgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T8uu2XBuI+JCfADUb0zYonmDF0juv9PNq590lCkGXQ5rItYD+qXuNM3Vrz5p9OVh2 7nv+1xUj66rjFUFg5zUHEWBtUK2KkW6k04roEWZTd/yR/5VmFUeH5iAnkUCoiyUP7n vbzBSKpzWO5RaRNoIF08v85IlZEodhvJW4+JgM5aufp/7zxKxmx0Zunc3fP/DpZTA6 0qG9cGuq3ZHxTZsc6zTXCmybtUYre4egsDlaktUcK9pZhLVpYqERvBglKuG4UFHf1b /b/SZ/0NK0+DpXk1ovKFxQDt9FdLGxS3yTvj4IwlUHLYK3MNFNKiMB8lBAuoy7Do6o 80hhY8U7wO0KQ== 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: [PATCHv2] mtd: spi-nor: macronix: Add support for mx66u1g45g Date: Fri, 11 Nov 2022 10:40:15 -0600 Message-Id: <20221111164015.165581-2-dinguyen@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111164015.165581-1-dinguyen@kernel.org> References: <20221111164015.165581-1-dinguyen@kernel.org> 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?1749218992222315682?= X-GMAIL-MSGID: =?utf-8?q?1749219106041653497?= 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 --- v2: fixed compile error by removing , after PARSE_SFDP --- 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) },