Browse Source

mmc: dw_mmc: Add StarFive VisionFive 2 board support

Make the code be compatible with the StarFive VisionFive 2 board.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: William Qiu <william.qiu@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Hal Feng 8 months ago
parent
commit
7a6dd69c9d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      drivers/mmc/dw_mmc.c

+ 4 - 0
drivers/mmc/dw_mmc.c

@@ -685,7 +685,11 @@ void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host,
 		cfg->host_caps |= MMC_MODE_4BIT;
 		cfg->host_caps &= ~MMC_MODE_8BIT;
 	}
+#if CONFIG_IS_ENABLED(TARGET_STARFIVE_VISIONFIVE2)
+	cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_HS200;
+#else
 	cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS200;
+#endif
 
 	cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }