dt-bindings: mmc: add no-mmc-hs400 flag
Subsystems (5)
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
@@ -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
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
@@ -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
Bough Chen
maintainerRE: [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
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 DTOn 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.
Signed-off-by Lucas Stach <[email protected]>--- drivers/mmc/host/sdhci-esdhc-imx.c | 3 +++ 1 file changed, 3 insertions(+)drivers/mmc/host/sdhci-esdhc-imx.c +0
-0
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
-0if (of_property_read_u32(np, "fsl,delay-line",
&boarddata->delay_line))
Quoted 4 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0
-1boarddata->delay_line =0 ; --2.31.1
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.
Signed-off-by Lucas Stach <[email protected]>--- Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 5 +++++ 1 file changed, 5 insertions(+)