Message ID | 20210508205658.91105-2-dev@lynxeye.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] dt-bindings: mmc: add no-mmc-hs400 flag | expand |
> -----Original Message----- > From: Lucas Stach [mailto:dev@lynxeye.de] > Sent: 2021年5月9日 4:57 > To: Rob Herring <robh+dt@kernel.org>; Ulf Hansson <ulf.hansson@linaro.org>; > Adrian Hunter <adrian.hunter@intel.com> > Cc: Pengutronix Kernel Team <kernel@pengutronix.de>; Fabio Estevam > <festevam@gmail.com>; linux-mmc@vger.kernel.org; > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org > Subject: [PATCH 2/2] mmc: sdhci-esdhc-imx: add support for disabling HS400 > mode via DT > > On some boards the data strobe line isn't wired up, rendering HS400 support > broken, even if both the controller and the eMMC claim to support it. Allow to > disable HS400 mode via DT. > > Signed-off-by: Lucas Stach <dev@lynxeye.de> > --- > drivers/mmc/host/sdhci-esdhc-imx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c > b/drivers/mmc/host/sdhci-esdhc-imx.c > index a20459744d21..1d6068507fb6 100644 > --- a/drivers/mmc/host/sdhci-esdhc-imx.c > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c > @@ -1483,6 +1483,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device > *pdev, > if (of_find_property(np, "no-1-8-v", NULL)) > host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; > > + if (of_find_property(np, "no-mmc-hs400", NULL)) > + host->quirks2 &= ~SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400; > + Hi Lucas I suggest you move the change to mmc_of_parse() in drivers/mmc/core/host.c You also need to take care of the HS400ES mode. Regards Haibo Chen > if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) > boarddata->delay_line = 0; > > -- > 2.31.1
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index a20459744d21..1d6068507fb6 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1483,6 +1483,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, if (of_find_property(np, "no-1-8-v", NULL)) host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; + if (of_find_property(np, "no-mmc-hs400", NULL)) + host->quirks2 &= ~SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400; + if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) boarddata->delay_line = 0;
On some boards the data strobe line isn't wired up, rendering HS400 support broken, even if both the controller and the eMMC claim to support it. Allow to disable HS400 mode via DT. Signed-off-by: Lucas Stach <dev@lynxeye.de> --- drivers/mmc/host/sdhci-esdhc-imx.c | 3 +++ 1 file changed, 3 insertions(+)