From: Faiz Abbas <faiz_abbas@ti.com>
To: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-mmc@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Cc: <adrian.hunter@intel.com>, <robh+dt@kernel.org>,
<ulf.hansson@linaro.org>, <kishon@ti.com>, <faiz_abbas@ti.com>
Subject: [PATCH 6/6] mmc: sdhci_am654: Enable tuning for SDR50
Date: Wed, 23 Sep 2020 16:22:06 +0530 [thread overview]
Message-ID: <20200923105206.7988-7-faiz_abbas@ti.com> (raw)
In-Reply-To: <20200923105206.7988-1-faiz_abbas@ti.com>
According to the SW tuning App note[1], tuning is required for all
UHS speed modes. Tuning for SDR50 is not enabled in Capabilities by
default so enable it from the CTL_CFG registers.
[1] https://www.ti.com/lit/pdf/spract9
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
drivers/mmc/host/sdhci_am654.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index 5af7638ad606..2bce962bf7e4 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -19,9 +19,11 @@
/* CTL_CFG Registers */
#define CTL_CFG_2 0x14
+#define CTL_CFG_3 0x18
#define SLOTTYPE_MASK GENMASK(31, 30)
#define SLOTTYPE_EMBEDDED BIT(30)
+#define TUNINGFORSDR50_MASK BIT(13)
/* PHY Registers */
#define PHY_CTRL1 0x100
@@ -646,6 +648,10 @@ static int sdhci_am654_init(struct sdhci_host *host)
regmap_update_bits(sdhci_am654->base, CTL_CFG_2, SLOTTYPE_MASK,
ctl_cfg_2);
+ /* Enable tuning for SDR50 */
+ regmap_update_bits(sdhci_am654->base, CTL_CFG_3, TUNINGFORSDR50_MASK,
+ TUNINGFORSDR50_MASK);
+
ret = sdhci_setup_host(host);
if (ret)
return ret;
--
2.17.1
next prev parent reply other threads:[~2020-09-23 10:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 10:52 [PATCH 0/6] Add UHS mode support for TI's AM65x, J721e, J7200 boards Faiz Abbas
2020-09-23 10:52 ` [PATCH 1/6] dt-bindings: mmc: sdhci-am654: Convert sdhci-am654 controller documentation to json schema Faiz Abbas
2020-09-23 10:52 ` [PATCH 2/6] dt-bindings: mmc: sdhci-am654: Add documentation for input tap delay Faiz Abbas
2020-09-23 10:52 ` [PATCH 3/6] mmc: sdhci_am654: Fix hard coded otap delay array size Faiz Abbas
2020-09-23 10:52 ` [PATCH 4/6] mmc: sdhci_am654: Add support for input tap delay Faiz Abbas
2020-09-23 10:52 ` [PATCH 5/6] mmc: sdhci_am654: Add support for software tuning Faiz Abbas
2020-09-25 4:49 ` Kishon Vijay Abraham I
2020-09-23 10:52 ` Faiz Abbas [this message]
2020-09-28 10:34 ` [PATCH 0/6] Add UHS mode support for TI's AM65x, J721e, J7200 boards Ulf Hansson
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=20200923105206.7988-7-faiz_abbas@ti.com \
--to=faiz_abbas@ti.com \
--cc=adrian.hunter@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.org \
/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
all inboxes | Powered by JetHome®