sd: enable 4 bit bus width for high speed cards

Enable 4 bit bus width for high speed cards, so that host and card
combinations that cannot use UHS mode will still benefit from the
speed increase of using 4 data lines.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-09-13 16:39:06 -05:00 committed by Carles Cufí
commit 11e3344909

View file

@ -950,6 +950,14 @@ static int sdmmc_init_hs(struct sd_card *card)
LOG_ERR("Failed to switch card to HS mode");
return ret;
}
if (card->flags & SD_4BITS_WIDTH) {
/* Raise bus width to 4 bits */
ret = sdmmc_set_bus_width(card, SDHC_BUS_WIDTH4BIT);
if (ret) {
LOG_ERR("Failed to change card bus width to 4 bits");
return ret;
}
}
return 0;
}