Skip to content

Commit c5a6843

Browse files
jmentigregkh
authored andcommitted
mmc: sdhci_am654: Disable HS400 for AM62P SR1.0 and SR1.1
commit d2d7a96 upstream. This adds SDHCI_AM654_QUIRK_DISABLE_HS400 quirk which shall be used to disable HS400 support. AM62P SR1.0 and SR1.1 do not support HS400 due to errata i2458 [0] so disable HS400 for these SoC revisions. [0] https://www.ti.com/lit/er/sprz574a/sprz574a.pdf Fixes: 37f2816 ("arm64: dts: ti: k3-am62p: Add ITAP/OTAP values for MMC") Cc: stable@vger.kernel.org Signed-off-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20250820193047.4064142-1-jm@ti.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4ab8829 commit c5a6843

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/mmc/host/sdhci_am654.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ struct sdhci_am654_data {
156156

157157
#define SDHCI_AM654_QUIRK_FORCE_CDTEST BIT(0)
158158
#define SDHCI_AM654_QUIRK_SUPPRESS_V1P8_ENA BIT(1)
159+
#define SDHCI_AM654_QUIRK_DISABLE_HS400 BIT(2)
159160
};
160161

161162
struct window {
@@ -765,6 +766,7 @@ static int sdhci_am654_init(struct sdhci_host *host)
765766
{
766767
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
767768
struct sdhci_am654_data *sdhci_am654 = sdhci_pltfm_priv(pltfm_host);
769+
struct device *dev = mmc_dev(host->mmc);
768770
u32 ctl_cfg_2 = 0;
769771
u32 mask;
770772
u32 val;
@@ -820,6 +822,12 @@ static int sdhci_am654_init(struct sdhci_host *host)
820822
if (ret)
821823
goto err_cleanup_host;
822824

825+
if (sdhci_am654->quirks & SDHCI_AM654_QUIRK_DISABLE_HS400 &&
826+
host->mmc->caps2 & (MMC_CAP2_HS400 | MMC_CAP2_HS400_ES)) {
827+
dev_info(dev, "HS400 mode not supported on this silicon revision, disabling it\n");
828+
host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
829+
}
830+
823831
ret = __sdhci_add_host(host);
824832
if (ret)
825833
goto err_cleanup_host;
@@ -883,6 +891,12 @@ static int sdhci_am654_get_of_property(struct platform_device *pdev,
883891
return 0;
884892
}
885893

894+
static const struct soc_device_attribute sdhci_am654_descope_hs400[] = {
895+
{ .family = "AM62PX", .revision = "SR1.0" },
896+
{ .family = "AM62PX", .revision = "SR1.1" },
897+
{ /* sentinel */ }
898+
};
899+
886900
static const struct of_device_id sdhci_am654_of_match[] = {
887901
{
888902
.compatible = "ti,am654-sdhci-5.1",
@@ -975,6 +989,10 @@ static int sdhci_am654_probe(struct platform_device *pdev)
975989
goto err_pltfm_free;
976990
}
977991

992+
soc = soc_device_match(sdhci_am654_descope_hs400);
993+
if (soc)
994+
sdhci_am654->quirks |= SDHCI_AM654_QUIRK_DISABLE_HS400;
995+
978996
host->mmc_host_ops.start_signal_voltage_switch = sdhci_am654_start_signal_voltage_switch;
979997
host->mmc_host_ops.execute_tuning = sdhci_am654_execute_tuning;
980998

0 commit comments

Comments
 (0)