Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3362937pxb; Mon, 17 Jan 2022 18:38:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3XdfWDVi0HyHoPWdMU9QTMPDKt0fNYjdDWRR5mys1xHpQYHgqsCa4TaFfkBoIluAWsZ0N X-Received: by 2002:a17:902:d486:b0:14a:8e9f:1960 with SMTP id c6-20020a170902d48600b0014a8e9f1960mr18654060plg.1.1642473501090; Mon, 17 Jan 2022 18:38:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642473501; cv=none; d=google.com; s=arc-20160816; b=Vw4lXedSYk7fxzaOTj7BGTcpjX2pvL1fKmhQVICjbiI87roJ9Ay4Ft5QTZIdW87IRS Ed97ly23Ni+Vm7qEllb2lSoGWJYDLLWYQyIydkZ3FZgQ4nqEPTvCdHKHsoOv029GOjKO gq8RXPW8WJnlmII7m2Pa8qJQBv2umjWHzdOH94+dyoJkpWeJRTWt5kaUpislcZTF2EPi B6bnajpKhm793MX3vfqbXBfICYX8WuoaXvfvrtyNsU2fGOXSntCJMLHUSuC++iXV4903 8Lyj4eZDS2LygIa0EICfLbgqLRpEqIre60ae2p9nWMVxQFYkmMKKMD8QN4nB1mkBi5bK 24Zg== 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=XLwG7XRfre6R+aQSdeErC+1iFRSY828R4VD71xP5o0w=; b=ivbQH7w15T2ltNTJdu3UksmHElzfZvSDUvsQTwJntF1YBBBMWc3aM2k6cWuIaI4MI4 32QAKzV79kCTpG441Jt2M1FI71XWvU+MCJML75JbZeOTLi4IR/j2LRepu4adt8+7NzTy myBtSc4KABJO0CxdztxgkSuqYWVdHBozFXsevbrni0AjLeeJ9J8C1JvIfMmg5jHFajgD 47YLwQPvQ28JekUyIPPRpKi92Q9P4wyi7aCtlSZEjJk/9mHoXhIQ3M8CRnQQ2Cn7pzmb HSAGAgNzj5Kyfl5aGXFuQtKiCbtGz/QXYeB6yK4HbwIaimvVT0BEZ6NTqlnwI+RP4x54 Jt7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MiN7ibyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pf1si1390570pjb.120.2022.01.17.18.38.08; Mon, 17 Jan 2022 18:38:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MiN7ibyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241055AbiAQQSV (ORCPT + 99 others); Mon, 17 Jan 2022 11:18:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241019AbiAQQSR (ORCPT ); Mon, 17 Jan 2022 11:18:17 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 366ECC06161C for ; Mon, 17 Jan 2022 08:18:17 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id k15so67649237edk.13 for ; Mon, 17 Jan 2022 08:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XLwG7XRfre6R+aQSdeErC+1iFRSY828R4VD71xP5o0w=; b=MiN7ibyXaw8dNl1iR4wiSvvN1GMlk9PZOGdk4g7mr7DrP1/Th/2U4RbDWc/BBnGvfP dl23vitA6D3p4CrilUxRiWqONsoZTTyT1M/J1k1kMMyKQllo7JI6Gvo2QonGAdlpvP3q LdjaIE5eRd7bJqDeBzFvYmFEC1uRw7gtVPy28= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XLwG7XRfre6R+aQSdeErC+1iFRSY828R4VD71xP5o0w=; b=eggO/EkEYygjiSYgCacx2zMBNLLflkjw+qxmuJiZ23HiB7iDh80hGJLYEe2qA5P1U1 ZGgCexkFQ4iw242PO9dEBsXbIAPOi9rTT9pxTSX3PlCoCBnDh0aNU/7lVcsw6Sm8RiYY vzYry6V+h7woCA+gA7dfYl6iMtboMOjKOQlqzTHdc0lXhboe7GTWT0XalkaHq0qr/Bsq 6A87ZnZtsKv/eQO6iGvqVk6YE1Vb3HsRTFZYvYeZ9+7cQZi+4humGIiWaJxy+z4OVpsJ iPYJwvKbgQjBHyLSjPw7Bub97hrAX4+UggUUTGOZTY4lgo0IacSRwI7alqbbWJPDrd92 kTfw== X-Gm-Message-State: AOAM530vheOtP8GRZGA1Nn0p4Y8oSrlmeQwUfIFlnmKc4SzEVRrKKeYc zH2mJbNxxGrL/qEykLFEp3qkIgfE9YeSNg== X-Received: by 2002:aa7:c79a:: with SMTP id n26mr14887264eds.350.1642436295531; Mon, 17 Jan 2022 08:18:15 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-82-52-8-210.retail.telecomitalia.it. [82.52.8.210]) by smtp.gmail.com with ESMTPSA id s4sm4147652ejm.146.2022.01.17.08.18.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 08:18:15 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Michael Trimarchi , Dario Binacchi , Han Xu , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org Subject: [RFC PATCH v3 4/4] mtd: rawnand: gpmi: support fast edo timings for mx28 Date: Mon, 17 Jan 2022 17:17:55 +0100 Message-Id: <20220117161755.1863579-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220117161755.1863579-1-dario.binacchi@amarulasolutions.com> References: <20220117161755.1863579-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the i.MX28 manual (MCIMX28RM, Rev. 1, 2010) you can find an example (15.2.4 High-Speed NAND Timing) of how to configure the GPMI controller to manage High-Speed ​​NAND devices, so it was wrong to assume that only i.MX6 can achieve EDO timings. This patch has been tested on a 2048/64 byte NAND (Micron MT29F2G08ABAEAH4). Kernel mtd tests: - mtd_nandbiterrs - mtd_nandecctest - mtd_oobtest - mtd_pagetest - mtd_readtest - mtd_speedtest - mtd_stresstest - mtd_subpagetest - mtd_torturetest [cycles_count = 10000000] run without errors. Before this patch (mode 0): --------------------------- eraseblock write speed is 2098 KiB/s eraseblock read speed is 2680 KiB/s page write speed is 1689 KiB/s page read speed is 2522 KiB/s 2 page write speed is 1899 KiB/s 2 page read speed is 2579 KiB/s erase speed is 128000 KiB/s 2x multi-block erase speed is 73142 KiB/s 4x multi-block erase speed is 204800 KiB/s 8x multi-block erase speed is 256000 KiB/s 16x multi-block erase speed is 256000 KiB/s 32x multi-block erase speed is 256000 KiB/s 64x multi-block erase speed is 256000 KiB/s After this patch (mode 5): ------------------------- eraseblock write speed is 3390 KiB/s eraseblock read speed is 5688 KiB/s page write speed is 2680 KiB/s page read speed is 4876 KiB/s 2 page write speed is 2909 KiB/s 2 page read speed is 5224 KiB/s erase speed is 170666 KiB/s 2x multi-block erase speed is 204800 KiB/s 4x multi-block erase speed is 256000 KiB/s 8x multi-block erase speed is 256000 KiB/s 16x multi-block erase speed is 256000 KiB/s 32x multi-block erase speed is 256000 KiB/s 64x multi-block erase speed is 256000 KiB/s Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v2) Changes in v2: - Improve the commit message. - Move the patch to the end of the series. drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c index cf35f4206030..d96899fa90b7 100644 --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c @@ -787,8 +787,8 @@ static int gpmi_setup_interface(struct nand_chip *chip, int chipnr, if (IS_ERR(sdr)) return PTR_ERR(sdr); - /* Only MX6 GPMI controller can reach EDO timings */ - if (sdr->tRC_min <= 25000 && !GPMI_IS_MX6(this)) + /* Only MX28/MX6 GPMI controller can reach EDO timings */ + if (sdr->tRC_min <= 25000 && !GPMI_IS_MX28(this) && !GPMI_IS_MX6(this)) return -ENOTSUPP; /* Stop here if this call was just a check */ -- 2.32.0