dt-bindings: mmc: add an option to disable HS400 for fsl
Subsystems (5)
PATCH 1/2 dt-bindings: mmc: add an option to disable HS400 for fsl
Add an option to disable the hs400 support in the fsl esdhc driver.
--- Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml +4 -0
@@ -101,6 +101,10 @@ properties: If not use this property, driver default set the delay target to value 7. Only eMMC HS400 mode need to take care of this property. default: 0 + fsl,no-mmc-hs400: + description: | + boolean, if present, indicate to disable mmc-hs400 support. + type: boolean required: - compatible
Signature · 1 line
2.20.1
PATCH 2/2 mmc: sdhci-esdhc-imx: allow to disable HS400 support
This patch adds the posibility to remove the HS400 support directly from the devicetree.
This is useful for example for the sdcard slot of the Nitrogen8M mini that doesn't support the HS400 standard.
--- drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/mmc/host/sdhci-esdhc-imx.c +6 -0
@@ -294,6 +294,7 @@ struct pltfm_imx_data { } multiblock_status;u32 is_ddr;struct pm_qos_request pm_qos_req; +u32 disable_caps; };static const struct platform_device_id imx_esdhc_devtype[] = {
@@ -454,6 +455,8 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg) IS_ERR_OR_NULL(imx_data->pins_200mhz)) val &= ~(SDHCI_SUPPORT_SDR50 |SDHCI_SUPPORT_DDR50 |SDHCI_SUPPORT_SDR104 |SDHCI_SUPPORT_HS400 ); + + val &= ~imx_data->disable_caps; } }
@@ -1502,6 +1505,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,if (of_property_read_u32 (np,"fsl,delay-line" , &boarddata->delay_line)) boarddata->delay_line =0 ; +if (of_find_property (np,"fsl,no-mmc-hs400" ,NULL )) + imx_data->disable_caps |=SDHCI_SUPPORT_HS400 ; +mmc_of_parse_voltage (np, &host->ocr_mask);if (esdhc_is_usdhc (imx_data)) {
Signature · 1 line
2.20.1
Quoted 14 lines · Adrien Grassein
Add an option to disable the hs400 support in the fsl esdhc driver.
Signed-off-by Adrien Grassein <[email protected]>--- Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 4 ++++ 1 file changed, 4 insertions(+)Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml +0
-0
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml properties: · line 107
Quoted 7 lines
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml +4
-0@@ -101,6 +101,10 @@ properties: If not use this property, driver default set the delay target to value 7. Only eMMC HS400 mode need to take care of this property. default: 0 + fsl,no-mmc-hs400: + description: | + boolean, if present, indicate to disable mmc-hs400 support. + type: boolean
You need to disable hs400, because the sdhci capability register wrongly claims it to be supported, right?
May I suggest using the DT property "sdhci-caps-mask" instead?
Kind regards
Uffe
Hello,
Thanks, it's working with your suggestion.
You can delete/abandon these patches.
Thanks a lot,
Regards,
Adrien
Quoted 31 lines · Ulf Hansson
Quoted 14 lines · Adrien Grassein
Add an option to disable the hs400 support in the fsl esdhc driver.
Signed-off-by Adrien Grassein <[email protected]>--- Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 4 ++++ 1 file changed, 4 insertions(+)Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml +0
-0Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml properties: · line 107
Quoted 7 lines
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml +4
-0@@ -101,6 +101,10 @@ properties: If not use this property, driver default set the delay target to value 7. Only eMMC HS400 mode need to take care of this property. default: 0 + fsl,no-mmc-hs400: + description: | + boolean, if present, indicate to disable mmc-hs400 support. + type: booleanYou need to disable hs400, because the sdhci capability register wrongly claims it to be supported, right?
May I suggest using the DT property "sdhci-caps-mask" instead?
Kind regards
Uffe