diff mbox series

[1/2] dt-bindings: mmc: add no-mmc-hs400 flag

Message ID 20210508205658.91105-1-dev@lynxeye.de
State Not Applicable
Headers show
Series [1/2] dt-bindings: mmc: add no-mmc-hs400 flag | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success
robh/dtbs-check success

Commit Message

Lucas Stach May 8, 2021, 8:56 p.m. UTC
HS400 requires a data strobe line in addition to the other MMC signal
lines, so if a board design neglects to wire up this signal, HS400 mode
is no available, even if both the controller and the eMMC are claiming
to support this mode. Add a DT flag to allow boards to disable the
HS400 support in this case.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Bough Chen May 10, 2021, 6:29 a.m. UTC | #1
> -----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
Rob Herring May 10, 2021, 4:16 p.m. UTC | #2
On Sat, 08 May 2021 22:56:57 +0200, Lucas Stach wrote:
> HS400 requires a data strobe line in addition to the other MMC signal
> lines, so if a board design neglects to wire up this signal, HS400 mode
> is no available, even if both the controller and the eMMC are claiming
> to support this mode. Add a DT flag to allow boards to disable the
> HS400 support in this case.
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
>  Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml
index e141330c1114..ac80d09df3a9 100644
--- a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml
+++ b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml
@@ -220,6 +220,11 @@  properties:
     description:
       eMMC HS400 enhanced strobe mode is supported
 
+  no-mmc-hs400:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      All eMMC HS400 modes are not supported.
+
   dsr:
     description:
       Value the card Driver Stage Register (DSR) should be programmed