Skip to contentSkip to conversation

dt-bindings: mmc: add no-mmc-hs400 flag

PATCH In review Lucas Stach 3 participants 4 messages May 8, 2021 – May 10, 2021

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

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

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.

---
 Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/mmc/mmc-controller.yaml +5 -0
index e141330c1114..ac80d09df3a9 100644
@@ -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
Signature · 1 line
2.31.1
#1 lore raw

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.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/sdhci-esdhc-imx.c +3 -0
index a20459744d21..1d6068507fb6 100644
@@ -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;
 
Signature · 1 line
2.31.1
maintainer
#2 lore raw

RE: [PATCH 2/2] mmc: sdhci-esdhc-imx: add support for disabling HS400 mode via DT

Quoted 4 lines

-----Original Message-----
From: Lucas Stach [mailto:[email protected]]
Sent: 2021年5月9日 4:57
To: Rob Herring <[email protected]>; Ulf Hansson

<[email protected]>;

Quoted 8 lines

Adrian Hunter <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>; Fabio Estevam <[email protected]>; [email protected]; [email protected]; [email protected]
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

Quoted 1 line

broken, even if both the controller and the eMMC claim to support it.

Allow to

Quoted 13 lines

disable HS400 mode via DT.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
index a20459744d21..1d6068507fb6 100644

drivers/mmc/host/sdhci-esdhc-imx.c sdhci_esdhc_imx_probe_dt(struct platform_device · line 1489

Quoted 7 lines
drivers/mmc/host/sdhci-esdhc-imx.c +3 -0
@@ -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

drivers/mmc/host/sdhci-esdhc-imx.c sdhci_esdhc_imx_probe_dt(struct platform_device · line 1490

Quoted 1 line
drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
 	if (of_property_read_u32(np, "fsl,delay-line",

&boarddata->delay_line))

Quoted 4 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -1
 		boarddata->delay_line = 0;
 
--

2.31.1

maintainer Acked-by on v1 1/2
#3 lore raw
In reply to Lucas Stach
Quoted 11 lines · Lucas Stach

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.

---
 Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 5 +++++
 1 file changed, 5 insertions(+)