From: Michael Trimarchi <michael@amarulasolutions.com>
To: u-boot@lists.denx.de
Cc: Michael Trimarchi <michael@amarulasolutions.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH 3/4] mtd: nand: Add support for EDO mode 1-5 to IMX6ULL platform
Date: Sun, 25 May 2025 14:23:11 +0200 [thread overview]
Message-ID: <20250525122316.661999-3-michael@amarulasolutions.com> (raw)
In-Reply-To: <20250525122316.661999-1-michael@amarulasolutions.com>
The clock driver allow to burst the performance of the nand
controller. Make changes to let it use the new clock driver
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
drivers/mtd/nand/raw/mxs_nand.c | 12 ++++++++++++
drivers/mtd/nand/raw/mxs_nand_dt.c | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c
index 80d9307cdd1..2679b6ab650 100644
--- a/drivers/mtd/nand/raw/mxs_nand.c
+++ b/drivers/mtd/nand/raw/mxs_nand.c
@@ -1507,8 +1507,20 @@ static void mxs_compute_timings(struct nand_chip *chip,
writel(GPMI_CTRL1_CLEAR_MASK, &nand_info->gpmi_regs->hw_gpmi_ctrl1_clr);
writel(ctrl1n, &nand_info->gpmi_regs->hw_gpmi_ctrl1_set);
+ /* Clock dividers do NOT guarantee a clean clock signal on its output
+ * during the change of the divide factor on i.MX6Q/UL/SX. On i.MX7/8,
+ * all clock dividers provide these guarantee.
+ */
+ if (IS_ENABLED(CONFIG_MX6ULL)) {
+ clk_disable(nand_info->gpmi_clk);
+ }
+
clk_set_rate(nand_info->gpmi_clk, clk_rate);
+ if (IS_ENABLED(CONFIG_MX6ULL)) {
+ clk_enable(nand_info->gpmi_clk);
+ }
+
/* Wait 64 clock cycles before using the GPMI after enabling the DLL */
dll_wait_time_us = USEC_PER_SEC / clk_rate * 64;
if (!dll_wait_time_us)
diff --git a/drivers/mtd/nand/raw/mxs_nand_dt.c b/drivers/mtd/nand/raw/mxs_nand_dt.c
index b62474bc5ab..90eefa2558d 100644
--- a/drivers/mtd/nand/raw/mxs_nand_dt.c
+++ b/drivers/mtd/nand/raw/mxs_nand_dt.c
@@ -99,7 +99,7 @@ static int mxs_nand_dt_probe(struct udevice *dev)
info->use_minimum_ecc = dev_read_bool(dev, "fsl,use-minimum-ecc");
if (IS_ENABLED(CONFIG_CLK) &&
- (IS_ENABLED(CONFIG_IMX8) || IS_ENABLED(CONFIG_IMX8M))) {
+ (IS_ENABLED(CONFIG_IMX8) || IS_ENABLED(CONFIG_IMX8M) || IS_ENABLED(CONFIG_MX6ULL))) {
struct clk_bulk clk_bulk;
info->gpmi_clk = devm_clk_get(dev, "gpmi_io");
--
2.43.0
base-commit: df2ed552f0b05591090369a7fe7ddc92439dea5c
next prev parent reply other threads:[~2025-05-25 12:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-25 12:23 [PATCH 1/4] clk: imx: add i.MX6UL clk driver Michael Trimarchi
2025-05-25 12:23 ` [PATCH 2/4] mtd: mxs_nand_dt: Move from clk_get/clk_enable to clk_bulk api Michael Trimarchi
2025-05-26 8:43 ` Peng Fan
2025-05-26 7:38 ` Michael Nazzareno Trimarchi
2025-05-26 7:42 ` Michael Nazzareno Trimarchi
2025-05-26 9:25 ` Michael Nazzareno Trimarchi
2025-05-25 12:23 ` Michael Trimarchi [this message]
2025-05-26 14:27 ` [PATCH 3/4] mtd: nand: Add support for EDO mode 1-5 to IMX6ULL platform Fabio Estevam
2025-05-26 19:33 ` Michael Nazzareno Trimarchi
2025-05-25 12:23 ` [PATCH 4/4] configs/imx6ulz_smm_m2_defconfig: Enable clock framework Michael Trimarchi
2025-05-26 14:30 ` Fabio Estevam
2025-05-26 8:25 ` [PATCH 1/4] clk: imx: add i.MX6UL clk driver Peng Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250525122316.661999-3-michael@amarulasolutions.com \
--to=michael@amarulasolutions.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox