All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: mmc: add no-mmc-hs400 flag
@ 2021-05-08 20:56 ` Lucas Stach
  0 siblings, 0 replies; 8+ messages in thread
From: Lucas Stach @ 2021-05-08 20:56 UTC (permalink / raw)
  To: Rob Herring, Ulf Hansson, Adrian Hunter
  Cc: Pengutronix Kernel Team, Fabio Estevam, linux-mmc, devicetree,
	linux-arm-kernel

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(+)

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
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/2] dt-bindings: mmc: add no-mmc-hs400 flag
@ 2021-05-08 20:56 ` Lucas Stach
  0 siblings, 0 replies; 8+ messages in thread
From: Lucas Stach @ 2021-05-08 20:56 UTC (permalink / raw)
  To: Rob Herring, Ulf Hansson, Adrian Hunter
  Cc: Pengutronix Kernel Team, Fabio Estevam, linux-mmc, devicetree,
	linux-arm-kernel

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(+)

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
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] mmc: sdhci-esdhc-imx: add support for disabling HS400 mode via DT
  2021-05-08 20:56 ` Lucas Stach
@ 2021-05-08 20:56   ` Lucas Stach
  -1 siblings, 0 replies; 8+ messages in thread
From: Lucas Stach @ 2021-05-08 20:56 UTC (permalink / raw)
  To: Rob Herring, Ulf Hansson, Adrian Hunter
  Cc: Pengutronix Kernel Team, Fabio Estevam, linux-mmc, devicetree,
	linux-arm-kernel

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;
+
 	if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
 		boarddata->delay_line = 0;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] mmc: sdhci-esdhc-imx: add support for disabling HS400 mode via DT
@ 2021-05-08 20:56   ` Lucas Stach
  0 siblings, 0 replies; 8+ messages in thread
From: Lucas Stach @ 2021-05-08 20:56 UTC (permalink / raw)
  To: Rob Herring, Ulf Hansson, Adrian Hunter
  Cc: Pengutronix Kernel Team, Fabio Estevam, linux-mmc, devicetree,
	linux-arm-kernel

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;
+
 	if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
 		boarddata->delay_line = 0;
 
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH 2/2] mmc: sdhci-esdhc-imx: add support for disabling HS400 mode via DT
  2021-05-08 20:56   ` Lucas Stach
@ 2021-05-10  6:29     ` Bough Chen
  -1 siblings, 0 replies; 8+ messages in thread
From: Bough Chen @ 2021-05-10  6:29 UTC (permalink / raw)
  To: Lucas Stach, Rob Herring, Ulf Hansson, Adrian Hunter
  Cc: Pengutronix Kernel Team, Fabio Estevam, linux-mmc, devicetree,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]

> -----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


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 9571 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 2/2] mmc: sdhci-esdhc-imx: add support for disabling HS400 mode via DT
@ 2021-05-10  6:29     ` Bough Chen
  0 siblings, 0 replies; 8+ messages in thread
From: Bough Chen @ 2021-05-10  6:29 UTC (permalink / raw)
  To: Lucas Stach, Rob Herring, Ulf Hansson, Adrian Hunter
  Cc: Pengutronix Kernel Team, Fabio Estevam, linux-mmc, devicetree,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1670 bytes --]

> -----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


[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 9571 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: mmc: add no-mmc-hs400 flag
  2021-05-08 20:56 ` Lucas Stach
@ 2021-05-10 16:16   ` Rob Herring
  -1 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2021-05-10 16:16 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Fabio Estevam, Pengutronix Kernel Team, linux-mmc, devicetree,
	Rob Herring, Adrian Hunter, linux-arm-kernel, Ulf Hansson

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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: mmc: add no-mmc-hs400 flag
@ 2021-05-10 16:16   ` Rob Herring
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2021-05-10 16:16 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Fabio Estevam, Pengutronix Kernel Team, linux-mmc, devicetree,
	Rob Herring, Adrian Hunter, linux-arm-kernel, Ulf Hansson

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>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-10 16:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 20:56 [PATCH 1/2] dt-bindings: mmc: add no-mmc-hs400 flag Lucas Stach
2021-05-08 20:56 ` Lucas Stach
2021-05-08 20:56 ` [PATCH 2/2] mmc: sdhci-esdhc-imx: add support for disabling HS400 mode via DT Lucas Stach
2021-05-08 20:56   ` Lucas Stach
2021-05-10  6:29   ` Bough Chen
2021-05-10  6:29     ` Bough Chen
2021-05-10 16:16 ` [PATCH 1/2] dt-bindings: mmc: add no-mmc-hs400 flag Rob Herring
2021-05-10 16:16   ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.