summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/host.c
diff options
context:
space:
mode:
authorSarthak Garg <quic_sartgarg@quicinc.com>2025-09-08 16:11:21 +0530
committerUlf Hansson <ulf.hansson@linaro.org>2025-09-12 14:49:36 +0200
commitf338529ca9279e3bea392cb53cec8bd292909cb1 (patch)
tree26adc71748b4c165012bee04a348a362fbe1694d /drivers/mmc/core/host.c
parent98682689a1a443067e1981d9eed8c6ddcef8cdf3 (diff)
mmc: core: Parse and use the new max-sd-hs-hz DT property
Introduce a new device tree flag to cap the maximum High-Speed (HS) mode frequency for SD cards, accommodating board-specific electrical limitations which cannot support the default 50Mhz HS frequency and others. Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/host.c')
-rw-r--r--drivers/mmc/core/host.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 5f0ec23aeff5..88c95dbfd9cf 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -302,6 +302,8 @@ int mmc_of_parse(struct mmc_host *host)
/* f_max is obtained from the optional "max-frequency" property */
device_property_read_u32(dev, "max-frequency", &host->f_max);
+ device_property_read_u32(dev, "max-sd-hs-hz", &host->max_sd_hs_hz);
+
/*
* Configure CD and WP pins. They are both by default active low to
* match the SDHCI spec. If GPIOs are provided for CD and / or WP, the