From patchwork Mon Jan 17 16:17:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12715573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13826C433EF for ; Mon, 17 Jan 2022 16:19:32 +0000 (UTC) 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: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:In-Reply-To:References: List-Owner; bh=oER0f4/Cl1o6K9PgDGlxP4En4VBK8vwO5GDw3QcLr9s=; b=e7pDKA+0OLp3RX Qj5/+z5adPU/iTgy0p/mWbxJdSLBAKa9OCrWYkC3UwH9jQ0V6KQBxunWpww6URcOi8RBAv/eS9Yqb yBV9X1xwnezATvg6yx/NL0HqAMDjDsnxmDchVbIHzNautYs/JbeMO1PB6jjibgMyn0Kex7Nu4C5Vc lLk9Kv98sDwpTsUXgsbTvlSVq+V4FcBe8QXUvPWOGDRCeZrrULaXrksQ2TWm7/W0NF7z9/i5KQy3r sqntkPA9SNeUnfEtuyZWjyhO2o3CdVMdStuKBpXto1DH5B6oxgtTmcuu0KzwivV5QN4ft4P+5jA2/ ZyIQE405IkqaXIYSOMiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9Ui0-00FYRN-Ie; Mon, 17 Jan 2022 16:18:16 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9Uhw-00FYPM-Ap for linux-arm-kernel@lists.infradead.org; Mon, 17 Jan 2022 16:18:13 +0000 Received: by mail-ed1-x52c.google.com with SMTP id j7so19347908edr.4 for ; Mon, 17 Jan 2022 08:18:11 -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:mime-version :content-transfer-encoding; bh=4y5Hl3U1xXQXZw23h6/DO7pv/6iLmoZwNHNPhFYyIt8=; b=H7Kyile8bVbUB1uHXBaUIRyKZ8c7SBGxw1S9Bq1l7v1qCdkBs3OkvwHPBHe1d9tFni P7ZpCPGCpTFPJ3FugYLnQ0uNeH/2X9/xwte20CTIYlILxxuw1ZGakLiHVMgBvDaW/MDa hLACj+lIfyO/bcvaSxpTA2shvjDfo1byUl4m8= 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:mime-version :content-transfer-encoding; bh=4y5Hl3U1xXQXZw23h6/DO7pv/6iLmoZwNHNPhFYyIt8=; b=2mRDknaEgB3SEZ4BGQ1gx9k32hxuUZT6cxFiQzhUk8MPeC3p9rvEOUxTTL1iGJAsG9 dF+UofoM6jWshiBWVBO5f8zdeWdouxXCi6D6wbMeO1Gqi1HwLW7Bu2NDE4RpLdhG7XnW jqKHWm+lgY5UAMd+I/vc4qrKzFKqw0AAbKxSqvHEfwHzamJisCf5wnRltuyHCbeBa0va YqXmhE2BuJB2kCF02sKaPXwLznubQ+p27Hm5RamGWn5c86vs7bRr9dzsz/0B2gP+uEC9 XfkbBdjwItKTykfwowTidL+4W/YZ1vGrboekRPmZ6hnTtwN2iLyEfE/is8vaYTYEqftQ 7PbQ== X-Gm-Message-State: AOAM530AiiDo0NpjTSoQqDUttLkhHxwygvY0QTfdMzhD2KvivGKc+dKE I1z85VPkE7i8uFMsoSLnEp7nWw== X-Google-Smtp-Source: ABdhPJzoKLf0i17Ak3VzqNyVv9Vm8qt47iUJmDiS73Di84vuVY4d6AuUwx7pgXcp35lk5Ixyzj/Ljw== X-Received: by 2002:a17:906:1145:: with SMTP id i5mr16996384eja.317.1642436290556; Mon, 17 Jan 2022 08:18:10 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 08:18:10 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Michael Trimarchi , Dario Binacchi , Boris Brezillon , Fabio Estevam , Han Xu , Miquel Raynal , NXP Linux Team , Pengutronix Kernel Team , Richard Weinberger , Rob Herring , Sascha Hauer , Shawn Guo , Stephen Boyd , Vignesh Raghavendra , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org Subject: [RFC PATCH v3 0/4] Fix and improve gpmi nand on mx28 Date: Mon, 17 Jan 2022 17:17:51 +0100 Message-Id: <20220117161755.1863579-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220117_081812_431410_65B01F5F X-CRM114-Status: GOOD ( 14.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Starting from [1], the series fixes the timings setting of the gpmi controller for the mx28 architecture, also adding support for fast edo mode timings. The whole series has been heavily tested with the mtd kernel test modules, and with repeated write cycles on nand. [1] https://lore.kernel.org/r/20210702065350.209646-5-ebiggers@kernel.org Changes in v3: - Remove the "mtd: rawnand: gpmi: use a table to get EDO mode setup" patch. - Simplify the validation logic (suggested by Sascha Hauer ). Changes in v2: - Reparent by device tree instead of code (drivers/clk/mxs/clk-imx28.c). Suggested by Stephen Boyd. - Improve the commit description. - give examples of frequencies on my setup. - Fix commit description. - Add an example to the commit description to better understand the problem solved by the patch. - Split the patch. - Improve the commit message. - Move the patch to the end of the series. Dario Binacchi (4): ARM: dts: imx28: reparent gpmi clock to ref_gpmi mtd: rawnand: gpmi: fix controller timings setting mtd: rawnand: gpmi: validate controller clock rate mtd: rawnand: gpmi: support fast edo timings for mx28 arch/arm/boot/dts/imx28.dtsi | 2 ++ drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 27 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) Tested-by: Sascha Hauer Reviewed-by: Sascha Hauer