* [PATCH v3 0/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support
@ 2026-03-11 9:50 ziniu.wang_1
2026-03-11 9:50 ` [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width ziniu.wang_1
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: ziniu.wang_1 @ 2026-03-11 9:50 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson, haibo.chen
Cc: Frank.Li, s.hauer, kernel, festevam, imx, linux-mmc, s32,
linux-arm-kernel, linux-kernel
From: Luke Wang <ziniu.wang_1@nxp.com>
This series adds 1-bit bus width support for sdhci-esdhc-imx driver.
Currently sdhci-esdhc-imx doesn't support 1-bit width because it
doesn't call sdhci_get_property() to parse "bus-width = <1>" and
set SDHCI_QUIRK_FORCE_1_BIT_DATA quirk.
After adding sdhci_get_property(), another issue is exposed:
mmc_select_hs200() returns 0 without switching when 1-bit bus is
used, causing mmc_select_timing() to skip mmc_select_hs(). This
leaves eMMC in legacy mode (26MHz) instead of High Speed (52MHz).
Fix by dropping incompatible UHS/DDR/HS200/HS400 caps in
sdhci_setup_host() for 1-bit width, and clean up duplicate code now
handled by common framework.
Luke Wang (4):
mmc: sdhci: fix timing selection for 1-bit bus width
mmc: sdhci-esdhc-imx: add 1-bit bus width support
mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation
mmc: sdhci-pltfm: remove duplicate DTS property parsing
---
Changes in v3:
- Keep SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 check for SDHCI_SUPPORT_HS400
Changes in v2:
- Moved fix from mmc_validate_host_caps() to sdhci_setup_host()
---
drivers/mmc/host/sdhci-esdhc-imx.c | 6 +-----
drivers/mmc/host/sdhci-pltfm.c | 7 -------
drivers/mmc/host/sdhci.c | 9 ++++++++-
3 files changed, 9 insertions(+), 13 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width
2026-03-11 9:50 [PATCH v3 0/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
@ 2026-03-11 9:50 ` ziniu.wang_1
2026-03-11 9:58 ` Adrian Hunter
2026-03-16 15:15 ` Ulf Hansson
2026-03-11 9:50 ` [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
` (2 subsequent siblings)
3 siblings, 2 replies; 12+ messages in thread
From: ziniu.wang_1 @ 2026-03-11 9:50 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson, haibo.chen
Cc: Frank.Li, s.hauer, kernel, festevam, imx, linux-mmc, s32,
linux-arm-kernel, linux-kernel
From: Luke Wang <ziniu.wang_1@nxp.com>
When 1-bit bus width is used with HS200/HS400 capabilities set,
mmc_select_hs200() returns 0 without actually switching. This
causes mmc_select_timing() to skip mmc_select_hs(), leaving eMMC
in legacy mode (26MHz) instead of High Speed SDR (52MHz).
Per JEDEC eMMC spec section 5.3.2, 1-bit mode supports High Speed
SDR. Drop incompatible HS200/HS400/UHS/DDR caps early so timing
selection falls through to mmc_select_hs() correctly.
Fixes: f2119df6b7646 ("mmc: sd: add support for signal voltage switch procedure")
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
---
drivers/mmc/host/sdhci.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index b1a3cd574c84..605be55f8d2d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -4539,8 +4539,15 @@ int sdhci_setup_host(struct sdhci_host *host)
* their platform code before calling sdhci_add_host(), and we
* won't assume 8-bit width for hosts without that CAP.
*/
- if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
+ if (host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA) {
+ host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50);
+ if (host->quirks2 & SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400)
+ host->caps1 &= ~SDHCI_SUPPORT_HS400;
+ mmc->caps2 &= ~(MMC_CAP2_HS200 | MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
+ mmc->caps &= ~(MMC_CAP_DDR | MMC_CAP_UHS);
+ } else {
mmc->caps |= MMC_CAP_4_BIT_DATA;
+ }
if (host->quirks2 & SDHCI_QUIRK2_HOST_NO_CMD23)
mmc->caps &= ~MMC_CAP_CMD23;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support
2026-03-11 9:50 [PATCH v3 0/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
2026-03-11 9:50 ` [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width ziniu.wang_1
@ 2026-03-11 9:50 ` ziniu.wang_1
2026-03-11 10:03 ` Bough Chen
2026-03-16 15:15 ` Ulf Hansson
2026-03-11 9:50 ` [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation ziniu.wang_1
2026-03-11 9:50 ` [PATCH v3 4/4] mmc: sdhci-pltfm: remove duplicate DTS property parsing ziniu.wang_1
3 siblings, 2 replies; 12+ messages in thread
From: ziniu.wang_1 @ 2026-03-11 9:50 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson, haibo.chen
Cc: Frank.Li, s.hauer, kernel, festevam, imx, linux-mmc, s32,
linux-arm-kernel, linux-kernel
From: Luke Wang <ziniu.wang_1@nxp.com>
Add sdhci_get_property() call to parse common SDHCI DT properties,
including "bus-width = <1>" which sets SDHCI_QUIRK_FORCE_1_BIT_DATA
quirk for 1-bit data bus width configuration.
Remove the duplicate "no-1-8-v" property parsing since
sdhci_get_property() already handles it.
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 97461e20425d..b607d4ffc562 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1813,8 +1813,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
of_property_read_u32(np, "fsl,strobe-dll-delay-target",
&boarddata->strobe_dll_delay_target);
- if (of_property_read_bool(np, "no-1-8-v"))
- host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
boarddata->delay_line = 0;
@@ -1833,6 +1831,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
if (ret)
return ret;
+ sdhci_get_property(pdev);
+
/* HS400/HS400ES require 8 bit bus */
if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation
2026-03-11 9:50 [PATCH v3 0/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
2026-03-11 9:50 ` [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width ziniu.wang_1
2026-03-11 9:50 ` [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
@ 2026-03-11 9:50 ` ziniu.wang_1
2026-03-11 10:03 ` Bough Chen
2026-03-16 15:15 ` Ulf Hansson
2026-03-11 9:50 ` [PATCH v3 4/4] mmc: sdhci-pltfm: remove duplicate DTS property parsing ziniu.wang_1
3 siblings, 2 replies; 12+ messages in thread
From: ziniu.wang_1 @ 2026-03-11 9:50 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson, haibo.chen
Cc: Frank.Li, s.hauer, kernel, festevam, imx, linux-mmc, s32,
linux-arm-kernel, linux-kernel
From: Luke Wang <ziniu.wang_1@nxp.com>
mmc_validate_host_caps() already validates that HS400/HS400ES requires
8-bit bus width. Remove the duplicate validation.
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index b607d4ffc562..d49069986efc 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1833,10 +1833,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
sdhci_get_property(pdev);
- /* HS400/HS400ES require 8 bit bus */
- if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
- host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
-
if (mmc_gpio_get_cd(host->mmc) >= 0)
host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 4/4] mmc: sdhci-pltfm: remove duplicate DTS property parsing
2026-03-11 9:50 [PATCH v3 0/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
` (2 preceding siblings ...)
2026-03-11 9:50 ` [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation ziniu.wang_1
@ 2026-03-11 9:50 ` ziniu.wang_1
2026-03-16 15:15 ` Ulf Hansson
3 siblings, 1 reply; 12+ messages in thread
From: ziniu.wang_1 @ 2026-03-11 9:50 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson, haibo.chen
Cc: Frank.Li, s.hauer, kernel, festevam, imx, linux-mmc, s32,
linux-arm-kernel, linux-kernel
From: Luke Wang <ziniu.wang_1@nxp.com>
The "keep-power-in-suspend", "wakeup-source" and "enable-sdio-wakeup"
properties are already parsed in mmc_of_parse(). All sdhci drivers that
call sdhci_get_property() also call mmc_of_parse(). The only exception
is sdhci-of-hlwd, which does not call mmc_of_parse(), but its devicetree
does not use these properties anyway.
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci-pltfm.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index d4fb60c1ef69..933fafe0a0ef 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -95,13 +95,6 @@ void sdhci_get_property(struct platform_device *pdev)
sdhci_get_compatibility(pdev);
device_property_read_u32(dev, "clock-frequency", &pltfm_host->clock);
-
- if (device_property_present(dev, "keep-power-in-suspend"))
- host->mmc->pm_caps |= MMC_PM_KEEP_POWER;
-
- if (device_property_read_bool(dev, "wakeup-source") ||
- device_property_read_bool(dev, "enable-sdio-wakeup")) /* legacy */
- host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
}
EXPORT_SYMBOL_GPL(sdhci_get_property);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width
2026-03-11 9:50 ` [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width ziniu.wang_1
@ 2026-03-11 9:58 ` Adrian Hunter
2026-03-16 15:15 ` Ulf Hansson
1 sibling, 0 replies; 12+ messages in thread
From: Adrian Hunter @ 2026-03-11 9:58 UTC (permalink / raw)
To: ziniu.wang_1, ulf.hansson, haibo.chen
Cc: Frank.Li, s.hauer, kernel, festevam, imx, linux-mmc, s32,
linux-arm-kernel, linux-kernel
On 11/03/2026 11:50, ziniu.wang_1@nxp.com wrote:
> From: Luke Wang <ziniu.wang_1@nxp.com>
>
> When 1-bit bus width is used with HS200/HS400 capabilities set,
> mmc_select_hs200() returns 0 without actually switching. This
> causes mmc_select_timing() to skip mmc_select_hs(), leaving eMMC
> in legacy mode (26MHz) instead of High Speed SDR (52MHz).
>
> Per JEDEC eMMC spec section 5.3.2, 1-bit mode supports High Speed
> SDR. Drop incompatible HS200/HS400/UHS/DDR caps early so timing
> selection falls through to mmc_select_hs() correctly.
>
> Fixes: f2119df6b7646 ("mmc: sd: add support for signal voltage switch procedure")
> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index b1a3cd574c84..605be55f8d2d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -4539,8 +4539,15 @@ int sdhci_setup_host(struct sdhci_host *host)
> * their platform code before calling sdhci_add_host(), and we
> * won't assume 8-bit width for hosts without that CAP.
> */
> - if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
> + if (host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA) {
> + host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50);
> + if (host->quirks2 & SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400)
> + host->caps1 &= ~SDHCI_SUPPORT_HS400;
> + mmc->caps2 &= ~(MMC_CAP2_HS200 | MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
> + mmc->caps &= ~(MMC_CAP_DDR | MMC_CAP_UHS);
> + } else {
> mmc->caps |= MMC_CAP_4_BIT_DATA;
> + }
>
> if (host->quirks2 & SDHCI_QUIRK2_HOST_NO_CMD23)
> mmc->caps &= ~MMC_CAP_CMD23;
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support
2026-03-11 9:50 ` [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
@ 2026-03-11 10:03 ` Bough Chen
2026-03-16 15:15 ` Ulf Hansson
1 sibling, 0 replies; 12+ messages in thread
From: Bough Chen @ 2026-03-11 10:03 UTC (permalink / raw)
To: Luke Wang, adrian.hunter@intel.com, ulf.hansson@linaro.org
Cc: Frank Li, s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, imx@lists.linux.dev,
linux-mmc@vger.kernel.org, dl-S32,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Luke Wang <ziniu.wang_1@nxp.com>
> Sent: 2026年3月11日 17:50
> To: adrian.hunter@intel.com; ulf.hansson@linaro.org; Bough Chen
> <haibo.chen@nxp.com>
> Cc: Frank Li <frank.li@nxp.com>; s.hauer@pengutronix.de;
> kernel@pengutronix.de; festevam@gmail.com; imx@lists.linux.dev;
> linux-mmc@vger.kernel.org; dl-S32 <S32@nxp.com>;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support
>
> From: Luke Wang <ziniu.wang_1@nxp.com>
>
> Add sdhci_get_property() call to parse common SDHCI DT properties, including
> "bus-width = <1>" which sets SDHCI_QUIRK_FORCE_1_BIT_DATA quirk for 1-bit
> data bus width configuration.
>
> Remove the duplicate "no-1-8-v" property parsing since
> sdhci_get_property() already handles it.
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Regards
Haibo Chen
>
> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 97461e20425d..b607d4ffc562 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1813,8 +1813,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device
> *pdev,
>
> of_property_read_u32(np, "fsl,strobe-dll-delay-target",
> &boarddata->strobe_dll_delay_target);
> - if (of_property_read_bool(np, "no-1-8-v"))
> - host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
>
> if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
> boarddata->delay_line = 0;
> @@ -1833,6 +1831,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device
> *pdev,
> if (ret)
> return ret;
>
> + sdhci_get_property(pdev);
> +
> /* HS400/HS400ES require 8 bit bus */
> if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
> host->mmc->caps2 &= ~(MMC_CAP2_HS400 |
> MMC_CAP2_HS400_ES);
> --
> 2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation
2026-03-11 9:50 ` [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation ziniu.wang_1
@ 2026-03-11 10:03 ` Bough Chen
2026-03-16 15:15 ` Ulf Hansson
1 sibling, 0 replies; 12+ messages in thread
From: Bough Chen @ 2026-03-11 10:03 UTC (permalink / raw)
To: Luke Wang, adrian.hunter@intel.com, ulf.hansson@linaro.org
Cc: Frank Li, s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, imx@lists.linux.dev,
linux-mmc@vger.kernel.org, dl-S32,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Luke Wang <ziniu.wang_1@nxp.com>
> Sent: 2026年3月11日 17:50
> To: adrian.hunter@intel.com; ulf.hansson@linaro.org; Bough Chen
> <haibo.chen@nxp.com>
> Cc: Frank Li <frank.li@nxp.com>; s.hauer@pengutronix.de;
> kernel@pengutronix.de; festevam@gmail.com; imx@lists.linux.dev;
> linux-mmc@vger.kernel.org; dl-S32 <S32@nxp.com>;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus
> width validation
>
> From: Luke Wang <ziniu.wang_1@nxp.com>
>
> mmc_validate_host_caps() already validates that HS400/HS400ES requires 8-bit
> bus width. Remove the duplicate validation.
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Regards
Haibo Chen
>
> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> b/drivers/mmc/host/sdhci-esdhc-imx.c
> index b607d4ffc562..d49069986efc 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1833,10 +1833,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device
> *pdev,
>
> sdhci_get_property(pdev);
>
> - /* HS400/HS400ES require 8 bit bus */
> - if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
> - host->mmc->caps2 &= ~(MMC_CAP2_HS400 |
> MMC_CAP2_HS400_ES);
> -
> if (mmc_gpio_get_cd(host->mmc) >= 0)
> host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
>
> --
> 2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width
2026-03-11 9:50 ` [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width ziniu.wang_1
2026-03-11 9:58 ` Adrian Hunter
@ 2026-03-16 15:15 ` Ulf Hansson
1 sibling, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2026-03-16 15:15 UTC (permalink / raw)
To: ziniu.wang_1
Cc: adrian.hunter, haibo.chen, Frank.Li, s.hauer, kernel, festevam,
imx, linux-mmc, s32, linux-arm-kernel, linux-kernel
On Wed, 11 Mar 2026 at 10:48, <ziniu.wang_1@nxp.com> wrote:
>
> From: Luke Wang <ziniu.wang_1@nxp.com>
>
> When 1-bit bus width is used with HS200/HS400 capabilities set,
> mmc_select_hs200() returns 0 without actually switching. This
> causes mmc_select_timing() to skip mmc_select_hs(), leaving eMMC
> in legacy mode (26MHz) instead of High Speed SDR (52MHz).
>
> Per JEDEC eMMC spec section 5.3.2, 1-bit mode supports High Speed
> SDR. Drop incompatible HS200/HS400/UHS/DDR caps early so timing
> selection falls through to mmc_select_hs() correctly.
>
> Fixes: f2119df6b7646 ("mmc: sd: add support for signal voltage switch procedure")
> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Applied for fixes and by adding a stable tag, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index b1a3cd574c84..605be55f8d2d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -4539,8 +4539,15 @@ int sdhci_setup_host(struct sdhci_host *host)
> * their platform code before calling sdhci_add_host(), and we
> * won't assume 8-bit width for hosts without that CAP.
> */
> - if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
> + if (host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA) {
> + host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50);
> + if (host->quirks2 & SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400)
> + host->caps1 &= ~SDHCI_SUPPORT_HS400;
> + mmc->caps2 &= ~(MMC_CAP2_HS200 | MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
> + mmc->caps &= ~(MMC_CAP_DDR | MMC_CAP_UHS);
> + } else {
> mmc->caps |= MMC_CAP_4_BIT_DATA;
> + }
>
> if (host->quirks2 & SDHCI_QUIRK2_HOST_NO_CMD23)
> mmc->caps &= ~MMC_CAP_CMD23;
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support
2026-03-11 9:50 ` [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
2026-03-11 10:03 ` Bough Chen
@ 2026-03-16 15:15 ` Ulf Hansson
1 sibling, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2026-03-16 15:15 UTC (permalink / raw)
To: ziniu.wang_1
Cc: adrian.hunter, haibo.chen, Frank.Li, s.hauer, kernel, festevam,
imx, linux-mmc, s32, linux-arm-kernel, linux-kernel
On Wed, 11 Mar 2026 at 10:48, <ziniu.wang_1@nxp.com> wrote:
>
> From: Luke Wang <ziniu.wang_1@nxp.com>
>
> Add sdhci_get_property() call to parse common SDHCI DT properties,
> including "bus-width = <1>" which sets SDHCI_QUIRK_FORCE_1_BIT_DATA
> quirk for 1-bit data bus width configuration.
>
> Remove the duplicate "no-1-8-v" property parsing since
> sdhci_get_property() already handles it.
>
> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 97461e20425d..b607d4ffc562 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1813,8 +1813,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>
> of_property_read_u32(np, "fsl,strobe-dll-delay-target",
> &boarddata->strobe_dll_delay_target);
> - if (of_property_read_bool(np, "no-1-8-v"))
> - host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
>
> if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
> boarddata->delay_line = 0;
> @@ -1833,6 +1831,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> if (ret)
> return ret;
>
> + sdhci_get_property(pdev);
> +
> /* HS400/HS400ES require 8 bit bus */
> if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
> host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation
2026-03-11 9:50 ` [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation ziniu.wang_1
2026-03-11 10:03 ` Bough Chen
@ 2026-03-16 15:15 ` Ulf Hansson
1 sibling, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2026-03-16 15:15 UTC (permalink / raw)
To: ziniu.wang_1
Cc: adrian.hunter, haibo.chen, Frank.Li, s.hauer, kernel, festevam,
imx, linux-mmc, s32, linux-arm-kernel, linux-kernel
On Wed, 11 Mar 2026 at 10:48, <ziniu.wang_1@nxp.com> wrote:
>
> From: Luke Wang <ziniu.wang_1@nxp.com>
>
> mmc_validate_host_caps() already validates that HS400/HS400ES requires
> 8-bit bus width. Remove the duplicate validation.
>
> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index b607d4ffc562..d49069986efc 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1833,10 +1833,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>
> sdhci_get_property(pdev);
>
> - /* HS400/HS400ES require 8 bit bus */
> - if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
> - host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
> -
> if (mmc_gpio_get_cd(host->mmc) >= 0)
> host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 4/4] mmc: sdhci-pltfm: remove duplicate DTS property parsing
2026-03-11 9:50 ` [PATCH v3 4/4] mmc: sdhci-pltfm: remove duplicate DTS property parsing ziniu.wang_1
@ 2026-03-16 15:15 ` Ulf Hansson
0 siblings, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2026-03-16 15:15 UTC (permalink / raw)
To: ziniu.wang_1
Cc: adrian.hunter, haibo.chen, Frank.Li, s.hauer, kernel, festevam,
imx, linux-mmc, s32, linux-arm-kernel, linux-kernel
On Wed, 11 Mar 2026 at 10:48, <ziniu.wang_1@nxp.com> wrote:
>
> From: Luke Wang <ziniu.wang_1@nxp.com>
>
> The "keep-power-in-suspend", "wakeup-source" and "enable-sdio-wakeup"
> properties are already parsed in mmc_of_parse(). All sdhci drivers that
> call sdhci_get_property() also call mmc_of_parse(). The only exception
> is sdhci-of-hlwd, which does not call mmc_of_parse(), but its devicetree
> does not use these properties anyway.
>
> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-pltfm.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index d4fb60c1ef69..933fafe0a0ef 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -95,13 +95,6 @@ void sdhci_get_property(struct platform_device *pdev)
> sdhci_get_compatibility(pdev);
>
> device_property_read_u32(dev, "clock-frequency", &pltfm_host->clock);
> -
> - if (device_property_present(dev, "keep-power-in-suspend"))
> - host->mmc->pm_caps |= MMC_PM_KEEP_POWER;
> -
> - if (device_property_read_bool(dev, "wakeup-source") ||
> - device_property_read_bool(dev, "enable-sdio-wakeup")) /* legacy */
> - host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
> }
> EXPORT_SYMBOL_GPL(sdhci_get_property);
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-03-16 15:16 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 9:50 [PATCH v3 0/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
2026-03-11 9:50 ` [PATCH v3 1/4] mmc: sdhci: fix timing selection for 1-bit bus width ziniu.wang_1
2026-03-11 9:58 ` Adrian Hunter
2026-03-16 15:15 ` Ulf Hansson
2026-03-11 9:50 ` [PATCH v3 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support ziniu.wang_1
2026-03-11 10:03 ` Bough Chen
2026-03-16 15:15 ` Ulf Hansson
2026-03-11 9:50 ` [PATCH v3 3/4] mmc: sdhci-esdhc-imx: remove duplicate HS400 bus width validation ziniu.wang_1
2026-03-11 10:03 ` Bough Chen
2026-03-16 15:15 ` Ulf Hansson
2026-03-11 9:50 ` [PATCH v3 4/4] mmc: sdhci-pltfm: remove duplicate DTS property parsing ziniu.wang_1
2026-03-16 15:15 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox