linux/drivers/mmc/host
Stefan Agner 92748beac0 mmc: sdhci-esdhc-imx: allow 1.8V modes without 100/200MHz pinctrl states
If pinctrl nodes for 100/200MHz are missing, the controller should
not select any mode which need signal frequencies 100MHz or higher.
To prevent such speed modes the driver currently uses the quirk flag
SDHCI_QUIRK2_NO_1_8_V. This works nicely for SD cards since 1.8V
signaling is required for all faster modes and slower modes use 3.3V
signaling only.

However, there are eMMC modes which use 1.8V signaling and run below
100MHz, e.g. DDR52 at 1.8V. With using SDHCI_QUIRK2_NO_1_8_V this
mode is prevented. When using a fixed 1.8V regulator as vqmmc-supply
the stack has no valid mode to use. In this tenuous situation the
kernel continuously prints voltage switching errors:
  mmc1: Switching to 3.3V signalling voltage failed

Avoid using SDHCI_QUIRK2_NO_1_8_V and prevent faster modes by
altering the SDHCI capability register. With that the stack is able
to select 1.8V modes even if no faster pinctrl states are available:
  # cat /sys/kernel/debug/mmc1/ios
  ...
  timing spec:    8 (mmc DDR52)
  signal voltage: 1 (1.80 V)
  ...

Link: http://lkml.kernel.org/r/20180628081331.13051-1-stefan@agner.ch
Signed-off-by: Stefan Agner <stefan@agner.ch>
Fixes: ad93220de7 ("mmc: sdhci-esdhc-imx: change pinctrl state according
to uhs mode")
Cc: <stable@vger.kernel.org> # v4.13+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2018-07-09 11:17:47 +02:00
..
android-goldfish.c mmc: android-goldfish: use sg_copy_{from,to}_buffer 2018-05-21 15:49:19 +02:00
atmel-mci.c mmc: atmel-mci: use sg_copy_{from,to}_buffer 2018-05-21 15:49:19 +02:00
au1xmmc.c mmc: au1xmmc: handle highmem pages 2018-05-29 12:24:26 +02:00
bcm2835.c mmc: bcm2835: Don't overwrite max frequency unconditionally 2018-02-14 11:30:10 +01:00
cavium-octeon.c mmc: cavium-octeon: Convert to use module_platform_driver 2017-08-30 15:03:38 +02:00
cavium-thunderx.c mmc: cavium: Fix use-after-free in of_platform_device_destroy 2017-09-08 15:38:22 +02:00
cavium.c mmc: cavium: catch all errors when getting regulators 2017-10-30 11:50:33 +01:00
cavium.h mmc: cavium: Add scatter-gather DMA support 2017-04-24 21:42:10 +02:00
cb710-mmc.c
cb710-mmc.h
cqhci.c mmc: cqhci: support for command queue enabled host 2017-12-11 12:44:34 +01:00
cqhci.h mmc: cqhci: Ensure macro parameters are wrapped in parentheses 2017-12-11 13:11:21 +01:00
davinci_mmc.c mmc: host: simplify getting .drvdata 2018-05-02 15:08:48 +02:00
dw_mmc-bluefield.c mmc: dw_mmc-bluefield: Add driver extension 2018-05-21 10:44:40 +02:00
dw_mmc-exynos.c mmc: dw_mmc: exynos: fix the suspend/resume issue for exynos5433 2018-03-15 10:34:30 +01:00
dw_mmc-exynos.h
dw_mmc-hi3798cv200.c mmc: dw_mmc: add support for hi3798cv200 specific extensions of dw-mshc 2018-03-15 14:43:22 +01:00
dw_mmc-k3.c mmc: dw_mmc: Fix out-of-bounds access for slot's caps 2018-02-27 15:12:25 +01:00
dw_mmc-pci.c mmc: dw_mmc: remove the deprecated "num-slots" 2018-03-15 09:27:11 +01:00
dw_mmc-pltfm.c mmc: dw_mmc: Remove the public dw_mmc header file 2017-02-13 13:19:59 +01:00
dw_mmc-pltfm.h
dw_mmc-rockchip.c mmc: dw_mmc: fix misleading comment in dw_mci_rk3288_set_ios 2018-05-02 15:08:38 +02:00
dw_mmc-zx.c mmc: dw_mmc: Fix out-of-bounds access for slot's caps 2018-02-27 15:12:25 +01:00
dw_mmc-zx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dw_mmc.c mmc: dw_mmc: fix card threshold control configuration 2018-07-03 10:57:16 +02:00
dw_mmc.h mmc: dw_mmc: add support for hi3798cv200 specific extensions of dw-mshc 2018-03-15 14:43:22 +01:00
jz4740_mmc.c mmc: jz4740: Use dma_request_chan() 2018-05-02 15:08:34 +02:00
Kconfig mmc: dw_mmc-bluefield: Add driver extension 2018-05-21 10:44:40 +02:00
Makefile mmc: dw_mmc-bluefield: Add driver extension 2018-05-21 10:44:40 +02:00
meson-gx-mmc.c mmc: meson-gx: add device reset 2018-05-21 10:50:45 +02:00
meson-mx-sdio.c mmc: Convert timers to use timer_setup() 2017-11-02 15:20:28 +01:00
mmc_spi.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
mmci_qcom_dml.c scripts/spelling.txt: add "intialization" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
mmci_qcom_dml.h
mmci.c mmc: mmci: Remove bogus local_irq_save() 2018-05-02 15:08:51 +02:00
mmci.h mmc: mmci: Add support for setting pad type via pinctrl 2018-01-18 18:14:45 +01:00
moxart-mmc.c mmc: moxart: constify mmc_host_ops structures 2017-08-30 14:01:41 +02:00
mtk-sd.c mmc: mediatek: add 64G DRAM DMA support 2018-05-02 15:08:51 +02:00
mvsdio.c mmc: mvsdio: Enable MMC_CAP_ERASE 2018-05-31 15:02:16 +02:00
mvsdio.h
mxcmmc.c mmc: mxmmc: Use ifdef rather than __maybe_unused 2018-05-30 14:56:45 +02:00
mxs-mmc.c mmc: mxs-mmc: Implement CMD23 support 2017-02-13 13:20:27 +01:00
of_mmc_spi.c mmc: of_mmc_spi: fix restricted cast warning of sparse 2017-08-30 14:01:45 +02:00
omap_hsmmc.c mmc: omap_hsmmc: catch all errors when getting regulators 2017-10-30 11:50:36 +01:00
omap.c mmc: Convert timers to use timer_setup() 2017-11-02 15:20:28 +01:00
pxamci.c mmc: Delete bounce buffer handling 2017-10-04 10:22:55 +02:00
pxamci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
renesas_sdhi_core.c mmc: renesas_sdhi: really fix WP logic regressions 2018-06-04 11:16:58 +02:00
renesas_sdhi_internal_dmac.c mmc: renesas_sdhi_internal_dmac: Cannot clear the RX_IN_USE in abort 2018-07-02 16:13:06 +02:00
renesas_sdhi_sys_dmac.c mmc: renesas_sdhi: really fix WP logic regressions 2018-06-04 11:16:58 +02:00
renesas_sdhi.h mmc: tmio,renesas_sdhi: move ssc_tappos to renesas_sdhi.h 2017-12-19 08:50:04 +01:00
rtsx_pci_sdmmc.c misc: rtsx: Move Realtek Card Reader Driver to misc 2017-11-29 10:16:44 +00:00
rtsx_usb_sdmmc.c mmc: rtsx_usb: Enable MMC_CAP_ERASE to allow erase/discard/trim requests 2018-05-08 09:43:27 +02:00
s3cmci.c Merge branch 'fixes' into next 2018-01-04 12:44:21 +01:00
s3cmci.h
sdhci_f_sdh30.c mmc: sdhci_f_sdh30: add ACPI support 2018-01-11 15:50:53 +01:00
sdhci-acpi.c mmc: sdhci-acpi: Fix IRQ 0 2018-03-21 11:10:20 +01:00
sdhci-bcm-kona.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-brcmstb.c mmc: sdhci: enable/disable the clock in sdhci_pltfm_suspend/resume 2017-08-30 15:03:44 +02:00
sdhci-cadence.c mmc: sdhci-cadence: fix logically and structurally dead code 2018-05-02 15:08:49 +02:00
sdhci-cns3xxx.c mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
sdhci-dove.c mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
sdhci-esdhc-imx.c mmc: sdhci-esdhc-imx: allow 1.8V modes without 100/200MHz pinctrl states 2018-07-09 11:17:47 +02:00
sdhci-esdhc.h mmc: sdhci-of-esdhc: support ESDHC_CAPABILITIES_1 accessing 2017-08-30 15:03:36 +02:00
sdhci-iproc.c mmc: sdhci-iproc: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for cygnus 2018-05-21 13:27:22 +02:00
sdhci-msm.c mmc: sdhci-msm: Remove NO_CARD_NO_RESET quirk 2018-05-31 11:45:00 +02:00
sdhci-of-arasan.c mmc: host: simplify getting .drvdata 2018-05-02 15:08:48 +02:00
sdhci-of-at91.c mmc: sdhci-of-at91: make function sdhci_at91_set_uhs_signaling static 2017-10-30 11:46:01 +01:00
sdhci-of-esdhc.c mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb 2017-12-11 12:53:06 +01:00
sdhci-of-hlwd.c mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
sdhci-omap.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
sdhci-pci-arasan.c mmc:host:sdhci-pci:Addition of Arasan PCI Controller with integrated phy. 2018-01-04 12:46:11 +01:00
sdhci-pci-core.c mmc: sdhci-pci: Fix 3.3V voltage switch for some BYT-based Intel controllers 2018-05-02 15:08:47 +02:00
sdhci-pci-data.c mmc: sdhci-pci: Use ACPI DSM to get driver strength for some Intel devices 2017-04-24 21:41:28 +02:00
sdhci-pci-o2micro.c mmc: sdhci-pci: Tidy o2micro definitions 2017-10-30 11:50:41 +01:00
sdhci-pci.h mmc: sdhci-pci: Avoid 3.3V signaling on some NI 904x 2018-05-02 15:08:44 +02:00
sdhci-pic32.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-pltfm.c mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume 2017-08-30 15:03:45 +02:00
sdhci-pltfm.h mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume 2017-08-30 15:03:45 +02:00
sdhci-pxav2.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-pxav3.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-s3c.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-sirf.c mmc: sdhci: enable/disable the clock in sdhci_pltfm_suspend/resume 2017-08-30 15:03:44 +02:00
sdhci-spear.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-st.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-tegra.c mmc: tegra: remove redundant return statement 2018-05-08 11:03:39 +02:00
sdhci-xenon-phy.c mmc: sdhci-xenon: use match_string() helper 2018-05-28 12:45:28 +02:00
sdhci-xenon.c mmc: sdhci-xenon: wait 5ms after set 1.8V signal enable 2017-12-19 08:53:04 +01:00
sdhci-xenon.h mmc: sdhci-xenon: Fix clock resource by adding an optional bus clock 2017-10-04 10:50:36 +02:00
sdhci.c mmc: sdhci: Program a relatively accurate SW timeout value 2018-05-03 09:36:20 +02:00
sdhci.h mmc: sdhci: Program a relatively accurate SW timeout value 2018-05-03 09:36:20 +02:00
sdricoh_cs.c mmc: sdricoh_cs: constify mmc_host_ops structures 2017-08-30 14:01:44 +02:00
sh_mmcif.c mmc: sh_mmcif: remove some cruft 2018-03-05 09:00:59 +01:00
sunxi-mmc.c mmc: sunxi: Disable irq during pm_suspend 2018-07-05 14:10:59 +02:00
tifm_sd.c mmc: Convert timers to use timer_setup() 2017-11-02 15:20:28 +01:00
tmio_mmc_core.c mmc: tmio: Fix error handling when issuing CMD23 2018-04-04 12:21:27 +02:00
tmio_mmc.c mmc: tmio: remove dma_ops from tmio_mmc_host_probe() argument 2018-01-18 09:08:56 +01:00
tmio_mmc.h mmc: tmio: remove dma_ops from tmio_mmc_host_probe() argument 2018-01-18 09:08:56 +01:00
toshsd.c mmc: toshsd: constify mmc_host_ops structures 2017-08-30 14:01:42 +02:00
toshsd.h
usdhi6rol0.c mmc: usdhi6rol0: catch all errors when getting regulators 2017-10-30 11:50:37 +01:00
ushc.c mmc: ushc: handle highmem pages 2018-05-21 15:49:20 +02:00
via-sdmmc.c mmc: Convert timers to use timer_setup() 2017-11-02 15:20:28 +01:00
vub300.c mmc: vub300: Use common code in __download_offload_pseudocode() 2017-11-02 15:20:29 +01:00
wbsd.c mmc: wbsd: handle highmem pages 2018-05-21 15:49:21 +02:00
wbsd.h
wmt-sdmmc.c mmc: host: simplify getting .drvdata 2018-05-02 15:08:48 +02:00