summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-06-09 07:59:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-06-17 08:28:55 +0200
commitdcad9abe7b60d765279c408846160f2720cae545 (patch)
treebdcb02f07ebfa3e6b1207ef1e92845e9990ece1e
parent23c160091076319da6e3e0b302aa8d36c7ac64af (diff)
downloadbarebox-dcad9abe7b60d765279c408846160f2720cae545.tar.gz
barebox-dcad9abe7b60d765279c408846160f2720cae545.tar.xz
mci: bcm2835: add bcm2711-emmc2 (Rpi4) support
While older Raspberry Pis didn't mind the POWER_CONTROL register being 0x00, the BCM2711 on the Raspberry Pi 4 does mind, so initialize it for 3.3V like we do in many other SDHCI drivers. With the compatible added, this can access the SD-Card on the Raspberry Pi 4. Change tested on both Raspberry Pi 3b and Raspberry Pi 4b. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609055922.667016-17-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/mci/mci-bcm2835.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
index 3380fa2afc..f092156f9a 100644
--- a/drivers/mci/mci-bcm2835.c
+++ b/drivers/mci/mci-bcm2835.c
@@ -324,7 +324,7 @@ static int bcm2835_mci_reset(struct mci_host *mci, struct device_d *mci_dev)
sdhci_write32(&host->sdhci,
SDHCI_HOST_CONTROL__POWER_CONTROL__BLOCK_GAP_CONTROL,
- 0x00);
+ (SDHCI_BUS_VOLTAGE_330 | SDHCI_BUS_POWER_EN) << 8);
sdhci_write32(&host->sdhci, SDHCI_ACMD12_ERR__HOST_CONTROL2,
0x00);
sdhci_write32(&host->sdhci,
@@ -424,6 +424,8 @@ static __maybe_unused struct of_device_id bcm2835_mci_compatible[] = {
{
.compatible = "brcm,bcm2835-sdhci",
}, {
+ .compatible = "brcm,bcm2711-emmc2",
+ }, {
/* sentinel */
}
};