From: Judith Mendez <jm@ti.com>
To: Peng Fan <peng.fan@nxp.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Tom Rini <trini@konsulko.com>
Cc: Nitin Yadav <n-yadav@ti.com>, Simon Glass <sjg@chromium.org>,
<u-boot@lists.denx.de>
Subject: [PATCH v2 5/5] mmc: am654_sdhci: Fix ITAPDLY for HS400 timing
Date: Thu, 18 Apr 2024 14:01:00 -0500 [thread overview]
Message-ID: <20240418190100.1289150-6-jm@ti.com> (raw)
In-Reply-To: <20240418190100.1289150-1-jm@ti.com>
At HS400 mode the ITAPDLY value is that from High Speed mode
which is incorrect and may cause boot failures.
The ITAPDLY for HS400 speed mode should be the same as ITAPDLY
as HS200 timing after tuning is executed. Add the functionality
to save ITAPDLY from HS200 tuning and save as HS400 ITAPDLY.
Fixes: c964447ea3d6 ("mmc: am654_sdhci: Add support for input tap delay")
Signed-off-by: Judith Mendez <jm@ti.com>
---
Changes since v1:
- Use ENABLE macro instead of 0x1
---
drivers/mmc/am654_sdhci.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index e1047812fa8..fadab7d40bb 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -295,6 +295,11 @@ static int am654_sdhci_set_ios_post(struct sdhci_host *host)
return ret;
plat->dll_enable = true;
+ if (mode == MMC_HS_400) {
+ plat->itap_del_ena[mode] = ENABLE;
+ plat->itap_del_sel[mode] = plat->itap_del_sel[mode - 1];
+ }
+
am654_sdhci_write_itapdly(plat, plat->itap_del_sel[mode],
plat->itap_del_ena[mode]);
} else {
@@ -486,6 +491,9 @@ static int am654_sdhci_execute_tuning(struct mmc *mmc, u8 opcode)
itap = am654_sdhci_calculate_itap(dev, fail_window, fail_index,
plat->dll_enable);
+ /* Save ITAPDLY */
+ plat->itap_del_sel[mode] = itap;
+
am654_sdhci_write_itapdly(plat, itap, plat->itap_del_ena[mode]);
return 0;
--
2.43.2
next prev parent reply other threads:[~2024-04-18 19:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 19:00 [PATCH v2 0/5] Fix MMC tuning algorithm Judith Mendez
2024-04-18 19:00 ` [PATCH v2 1/5] mmc: am654_sdhci: Add tuning algorithm for delay chain Judith Mendez
2024-04-18 19:00 ` [PATCH v2 2/5] mmc: am654_sdhci: Fix OTAP/ITAP delay values Judith Mendez
2024-04-18 19:00 ` [PATCH v2 3/5] mmc: am654_sdhci: Add itap_del_ena[] to store itapdlyena bit Judith Mendez
2024-04-18 19:00 ` [PATCH v2 4/5] mmc: am654_sdhci: Set ENDLL=1 for DDR52 mode Judith Mendez
2024-04-18 19:01 ` Judith Mendez [this message]
2024-04-29 23:04 ` [PATCH v2 0/5] Fix MMC tuning algorithm Tom Rini
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=20240418190100.1289150-6-jm@ti.com \
--to=jm@ti.com \
--cc=jh80.chung@samsung.com \
--cc=n-yadav@ti.com \
--cc=peng.fan@nxp.com \
--cc=sjg@chromium.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