]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci-esdhc-imx: allow 1.8V modes without 100/200MHz pinctrl states
authorStefan Agner <stefan@agner.ch>
Wed, 4 Jul 2018 15:07:45 +0000 (17:07 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 9 Jul 2018 09:17:47 +0000 (11:17 +0200)
commit7810fc443dcf8884c85764dbb9adf7b8f013b6d1
treed8aae251186eda610d2d01ce70894f105672393e
parent7299e8c16b519d0707de660253c1ac86ac8378e9
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: 33edb9877c73 ("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>
drivers/mmc/host/sdhci-esdhc-imx.c