mmc: fsl_esdhc: enable EVDD automatic control for SD/MMC Legacy Adapter Card
authorYangbo Lu <yangbo.lu@freescale.com>
Thu, 17 Sep 2015 02:27:48 +0000 (10:27 +0800)
committerYork Sun <yorksun@freescale.com>
Mon, 2 Nov 2015 16:50:29 +0000 (08:50 -0800)
When detecting SDHC Adapter Card Type 2(SD/MMC Legacy Adapter Card),
enable EVDD automatic control via SDHC_VS. This could support SD card
IO voltage switching for UHS-1 speed mode.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
board/freescale/common/qixis.h
drivers/mmc/fsl_esdhc.c

index 450cd0ddbd553b4a20b8a8ddb1e9dd751abee7b2..0aa56a090ed2e7bf65ca9204556b5322fadc88e4 100644 (file)
@@ -125,10 +125,13 @@ void qixis_write_i2c(unsigned int reg, u8 value);
 #define QIXIS_ESDHC_ADAPTER_TYPE_MMC            0x5    /* MMC Card */
 #define QIXIS_ESDHC_ADAPTER_TYPE_SD             0x6    /* SD Card Rev2.0 3.0 */
 #define QIXIS_ESDHC_NO_ADAPTER                  0x7    /* No Card is Present*/
+
 #define QIXIS_SDCLKIN          0x08
 #define QIXIS_SDCLKOUT         0x02
 #define QIXIS_DAT5_6_7         0X02
 #define QIXIS_DAT4             0X01
+
+#define QIXIS_EVDD_BY_SDHC_VS  0x0c
 #endif
 
 #endif
index 5c20627c1c18da0c99a8dbc1db2bf856223732d2..c5054d66bdcda029f0485958c87bd5154ccee591 100644 (file)
@@ -753,6 +753,9 @@ void mmc_adapter_card_type_ident(void)
                QIXIS_WRITE(brdcfg[5], value);
                break;
        case QIXIS_ESDHC_ADAPTER_TYPE_SDMMC_LEGACY:
+               value = QIXIS_READ(pwr_ctl[1]);
+               value |= QIXIS_EVDD_BY_SDHC_VS;
+               QIXIS_WRITE(pwr_ctl[1], value);
                break;
        case QIXIS_ESDHC_ADAPTER_TYPE_EMMC44:
                value = QIXIS_READ(brdcfg[5]);