From patchwork Mon Jul 20 16:36:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Clear X-Patchwork-Id: 1332510 X-Patchwork-Delegate: tudor.ambarus@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=pensando.io Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=d6tM1GDS; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=pensando.io header.i=@pensando.io header.a=rsa-sha256 header.s=google header.b=SGZxtn7d; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B9S9p6fmzzB3vr for ; Tue, 21 Jul 2020 02:39:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ngX8346kgwIsRawOVEcfWxKXLCk+n7BkJuLXVoqVQXg=; b=d6tM1GDSMXnBjCaB4PKVKrIt85 t9eFPerqlhDvFItHR3sLrHHXsgxzCmYzxuKMxYBtK/dkgNFoyWJxs9NeZL47DOlOdrN4QkAWtQb7H aTDImZq1CJO5Z2uCQT0bOFazYHTlTT+gDvbMqsYtqBADp6zx0F6Oy0I2/wYORSdmAHEVWZbAgzOD/ nk7xllWIzh+Ru01TNo5aQU/CUMjnLm2k2aK14+bsqhc0f2cgk1Nr9ITVIy3FEqdzNJCKWt2tB2/kK ZsfJw7lGNn7dzxsgWV51zmjypYSnem3T2nOt6qChJeJjRC2gDrsNf6OJlJBkMynnGKOtf8sALFAoj OHnuRelA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxYn4-00051V-BZ; Mon, 20 Jul 2020 16:37:22 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxYmz-0004zx-Ro for linux-mtd@lists.infradead.org; Mon, 20 Jul 2020 16:37:18 +0000 Received: by mail-pf1-x443.google.com with SMTP id u185so9305839pfu.1 for ; Mon, 20 Jul 2020 09:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t/wsqitDH/IKupF1Pg0APNb3W7481blDQ8OyAChCDMc=; b=SGZxtn7d1Wn3Q/KK9UcWDgL9grg7/deGrmwwOJICQUBsg+r8gFYsf3AmL0LUfOX+o/ IyLcnERkBS7S8ykTRdGz79fJH7loqEjNY9N2u3CmaO6ofAIYqOsyl5SwSYuqJ5OIRIVA VNX0ohzkHpKm5VEPDoh5301goyvcknT3RcvWBnhNXZ9lQD+r7+YgvDYMU/26OLzJesLy GIG3+/gOaj+HU+RatiGrX0pRfp0ODf47TeRWOSCR5SUb71qypjNmsDAOsHP8hkjJB8m5 8zwbMGtIrAeDZrtITDQS0Xgl8uu5oFE1pNK5AeolzIyb2uzQ4iFpzvW2aBnedpvwRxQ/ /Ldw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t/wsqitDH/IKupF1Pg0APNb3W7481blDQ8OyAChCDMc=; b=ew09fR0zCLNg78A//zkbNr6Y10m42dfdUzG7o0ZZhIuXY9+2VwSX1HxcwLCfP1qn3A Vbtc4smW9NWka9VCLpKpe2o0Tm1L2ddF+NURtorN+9cgXeuNKPm0nc8zHhTJOw0y7Do4 Ea5F6enDnC0q+ny26n5zWmNR6QFsITXYXRedIRc4cnOYlnNMeVBlF4mLG5GijNm8GJpv 9P8j0KpRj/QCxcy/HQrQNaAYOr2V/C5Zuj6ekLXjoRT+5br294fldkGd6WmqxSZJwNeB sehKv23iaR+ROBRUr7BfX4nU1suicIuvjAFtoMRapysEawrgOJnCGaibsGCj6hfJvAlK Urzg== X-Gm-Message-State: AOAM53105OEVHve3M9w2e1QXebVggR5zi8WhOAh9hMA3AKCmlU3XRJZS JQkO4cLBX6ViMSYcSQCfJox7AA== X-Google-Smtp-Source: ABdhPJy2xKpoASkAe/PXF/9R7MXJhnt6H/ngvFvfOid68NDWkPY4LWa0DLfrUVjRCRpP7DtPJBDT3Q== X-Received: by 2002:a63:d44e:: with SMTP id i14mr19546620pgj.280.1595263034947; Mon, 20 Jul 2020 09:37:14 -0700 (PDT) Received: from platform-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id z25sm17342472pfg.140.2020.07.20.09.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 09:37:14 -0700 (PDT) From: David Clear To: tudor.ambarus@microchip.com, linux-mtd@lists.infradead.org Subject: [PATCH v2 1/2] mtd: spi-nor: Add support for Macronix mx66u2g45g. Date: Mon, 20 Jul 2020 09:36:55 -0700 Message-Id: <20200720163656.38006-2-dac2@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720163656.38006-1-dac2@pensando.io> References: <20200720163656.38006-1-dac2@pensando.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_123717_949534_D441AA39 X-CRM114-Status: GOOD ( 12.89 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:443 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: snelson@pensando.io, David Clear MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The Macronix mx66u2g45g is a 1.8V, 2Gbit (256MB) device that supports x1, x2, or x4 operation. Tested on Pensando SoC hardware with a cadence quadspi controller via drivers/spi/spi-cadence-quadspi.c, in x2 mode at 50MHz. - random data write, erase, read - verified erase operations - random data write, read/compare - verified write/read operations Signed-off-by: David Clear Acked-by: Shannon Nelson --- drivers/mtd/spi-nor/macronix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c index 0ae0815a3633..f97f3d127575 100644 --- a/drivers/mtd/spi-nor/macronix.c +++ b/drivers/mtd/spi-nor/macronix.c @@ -87,6 +87,9 @@ static const struct flash_info macronix_parts[] = { SPI_NOR_QUAD_READ) }, { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, + { "mx66u2g45g", INFO(0xc2253c, 0, 64 * 1024, 4096, + SECT_4K | SPI_NOR_DUAL_READ | + SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, }; static void macronix_default_init(struct spi_nor *nor) From patchwork Mon Jul 20 16:36:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Clear X-Patchwork-Id: 1332508 X-Patchwork-Delegate: tudor.ambarus@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=pensando.io Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Y++7Ec3R; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=pensando.io header.i=@pensando.io header.a=rsa-sha256 header.s=google header.b=z6Jxw5Yt; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B9S8Z0dpDzB3vd for ; Tue, 21 Jul 2020 02:38:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uB8e7RlZFgBuAyv6h6/xx3S8kx1aKOxL4FfLNfc7T1w=; b=Y++7Ec3RLYtkQtzHd6NGA4WMqY gSA3/kJ/+R3Yt9huNCcHELiZwx6SyN8r9zoFpa3YCK6OIjyAQ3VT0c//Utwcb9tn8l4it446YqaMN Wbza6uIrrwdITmWePnSvd1fCh2F/x/gNcV+QyrauhXlvWbonkAsEhytyGibIdInZTrKO7izVvLGGj GMVJbEa/BnauUUV/WVRnY0FScG70v15dpVxHG7vTUNvjraSXkfISiU/w01iWfBVgNPKV/JALmPzzE rnjPNOExxjDjzSBlvkk4/mSk6ERs1ybbbt1GK3e7rn6AKW8DRwN1ikNiD48J2Om1BD9dcqR4exyh7 6L37I9tg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxYn3-00051J-02; Mon, 20 Jul 2020 16:37:21 +0000 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxYmz-0004zy-Q0 for linux-mtd@lists.infradead.org; Mon, 20 Jul 2020 16:37:18 +0000 Received: by mail-pj1-x1042.google.com with SMTP id o22so77480pjw.2 for ; Mon, 20 Jul 2020 09:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KCI3+RDetWEx+s/cPhHvvqI88PUTdljEQSGALBxHz6E=; b=z6Jxw5YtnMzutZA5yWF8StehyY2jilAE3aM6P5/hRK8rvvioZ7+wahuDy7DVkyfUO/ wordk5LmtuEwK81BHoEu4n36ghhc4O6Q6nOx9Xm8x4MMg7W1UL52egDMXwXASWXW6l8I 4T4ZjELUJJhPGznseTg6wgyechZsgX01Bn0GwVqHGIm95nHxa00ajeMoBa8v3FBgpAuU t/qXRnssC228WOeWjhgyyaStYywtJy/ZLO08yHKSICeVhdCpxkCj4lLcahRpDx6cSZuq BWOru3A5utKdlThAl/S0poMYSVLKhsFga9au8IQnRuqS1EVIu9z9CTp4DMMiTuLoZnWt g0WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KCI3+RDetWEx+s/cPhHvvqI88PUTdljEQSGALBxHz6E=; b=SJfbzRzAQZGkdoQQjQQGxinjfEBH4/0t0HXnmTjOOAkCXCVFPwnh3iH4fohz/gosvo yCnrVKjRzsm2PQABMbjLHkPmbzdQ/ZgcfNhuk0LHKnMJWzwV/LnJZ8IeCX+7tjYWNeep GL8SoOjH6E72G5e/8klvmlZqgcdIuHG9iCNUxZIlwbA7wN7mK0FCxhh7jLqBMCBG49Uf jbKVfPvEB93CWgSvQCyXiOGftnG5fPZISyUlqzx5krn9gl9orGCFvsi0QvxVao1+Q02Y x6MlzqOnIVz6/xGN911uzChxhAbWHWCf/ylbaFnHo6qDKjNaJOgNH0Gpbgzj/iSHwPfN Y84g== X-Gm-Message-State: AOAM530ecdmmhD1WBXeFhfPLXP/3q0Zb05WNNZ4UDy04rOjdsWe2wt4M p/WkskEhyyYNRoYeSCHBPALnz7fhGTg= X-Google-Smtp-Source: ABdhPJxWTYGZl2YwC8y0DmVl3GvM/GalVHlhslDnjDpB7TnblmE7Sxa+oxzdJeTVdnJNvSwf5qFlCA== X-Received: by 2002:a17:90b:1b4e:: with SMTP id nv14mr295792pjb.30.1595263035993; Mon, 20 Jul 2020 09:37:15 -0700 (PDT) Received: from platform-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id z25sm17342472pfg.140.2020.07.20.09.37.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 09:37:15 -0700 (PDT) From: David Clear To: tudor.ambarus@microchip.com, linux-mtd@lists.infradead.org Subject: [PATCH v2 2/2] mtd: spi-nor: Support SPI_NOR_DUAL_READ on Micron mt25qu02g. Date: Mon, 20 Jul 2020 09:36:56 -0700 Message-Id: <20200720163656.38006-3-dac2@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720163656.38006-1-dac2@pensando.io> References: <20200720163656.38006-1-dac2@pensando.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_123717_904432_A720F84B X-CRM114-Status: GOOD ( 13.13 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1042 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: snelson@pensando.io, David Clear MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The Micron mt25qu02g supports both x2 and x4 transactions. Add the SPI_NOR_DUAL_READ to its spi_nor_ids[] table entry. Tested on Pensando SoC hardware with a cadence quadspi controller via drivers/spi/spi-cadence-quadspi.c, in x2 mode at 50MHz. - random data write, erase, read - verified erase operations - random data write, read/compare - verified write/read operations Signed-off-by: David Clear Acked-by: Shannon Nelson --- drivers/mtd/spi-nor/micron-st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c index 3dca5b9af3b6..ef3695080710 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -71,8 +71,8 @@ static const struct flash_info st_parts[] = { SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, { "mt25qu02g", INFO(0x20bb22, 0, 64 * 1024, 4096, - SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | - NO_CHIP_ERASE) }, + SECT_4K | USE_FSR | SPI_NOR_DUAL_READ | + SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, { "m25p05", INFO(0x202010, 0, 32 * 1024, 2, 0) }, { "m25p10", INFO(0x202011, 0, 32 * 1024, 4, 0) },