]> git.ipfire.org Git - thirdparty/u-boot.git/commit
mmc: cv1800b_sdhci: honor 'no-1-8-v' DT property
authorHiago De Franco <hfranco@baylibre.com>
Thu, 7 May 2026 23:48:36 +0000 (20:48 -0300)
committerPeng Fan <peng.fan@nxp.com>
Fri, 15 May 2026 03:46:39 +0000 (11:46 +0800)
commit3a4a8963aace2eb04610af6d944d002f146af55f
tree002bc081f880256a05c3dd392c4aa7b8593d6c40
parent993c405ed7ef097f60e4c58ba33379268861eb1e
mmc: cv1800b_sdhci: honor 'no-1-8-v' DT property

CV1800B SDHCI controller does support 1.8V, however, boards like
MilkV-Duo 256M do not have a VCCIO 1.8V regulator (the bus is wired for
3.3V only).

These boards set 'no-1-8-v' in their device tree, and mmc_of_parse()
does respect this property. Later, when sdhci_setup_cfg() is called, it
reads SDHCI_CAPABILITIES_1 from the hardware and unconditionally adds
the UHS caps again based on what the controller advertises. Since the
board cannot switch to 1.8V, the host issues CMD11 (voltage switch
request), the card transitions, but the bus stays at 3.3V. The SD card
stops responding until the next power cycle.

Before calling sdhci_setup_cfg(), set the SDHCI_QUIRK_NO_1_8_V quirk
when 'no-1-8-v' is present. The quirk causes the SDR104/SDR50/DDR50 bits
to be masked out of the caps, allowing the card to initialize properly.

This matches the pattern used by zynq_sdhci.

Fixes: eb36f28ff721 ("mmc: cv1800b: Add sdhci driver support for cv1800b SoC")
Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/cv1800b_sdhci.c