@@ -98,6 +98,9 @@ void sdhci_get_of_property(struct platform_device *pdev)
of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+ if (of_device_is_compatible(np, "fsl,t4240-esdhc"))
+ host->quirks2 |= SDHCI_QUIRK2_CIRCUIT_SUPPORT_VS33;
+
clk = of_get_property(np, "clock-frequency", &size);
if (clk && size == sizeof(*clk) && *clk)
pltfm_host->clock = be32_to_cpup(clk);
@@ -2730,6 +2730,9 @@ int sdhci_add_host(struct sdhci_host *host)
host->caps1 :
sdhci_readl(host, SDHCI_CAPABILITIES_1);
+ if (host->quirks2 & SDHCI_QUIRK2_CIRCUIT_SUPPORT_VS33)
+ caps[0] = caps[0] | SDHCI_CAN_VDD_330;
+
if (host->quirks & SDHCI_QUIRK_FORCE_DMA)
host->flags |= SDHCI_USE_SDMA;
else if (!(caps[0] & SDHCI_CAN_DO_SDMA))
@@ -95,6 +95,10 @@ struct sdhci_host {
/* The system physically doesn't support 1.8v, even if the host does */
#define SDHCI_QUIRK2_NO_1_8_V (1<<2)
#define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3)
+/* Controller can only supports 1.8V, but the peripheral hardware
+ * circuit has capability to support 3.3V
+ */
+#define SDHCI_QUIRK2_CIRCUIT_SUPPORT_VS33 (1<<4)
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */
On the t4240 platform, sdhci controller can only support 1.8V voltage, but the peripheral hardware circuit has capability to support 3.3V voltage. Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com> Cc: Chris Ball <cjb@laptop.org> --- drivers/mmc/host/sdhci-pltfm.c | 3 +++ drivers/mmc/host/sdhci.c | 3 +++ include/linux/mmc/sdhci.h | 4 ++++ 3 files changed, 10 insertions(+), 0 deletions(-)