summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/gru/mainboard.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 649f16296c..c24584e1b5 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -15,9 +15,22 @@
*/
#include <device/device.h>
+#include <gpio.h>
+#include <soc/clock.h>
+#include <soc/grf.h>
+
+static void configure_sdmmc(void)
+{
+ gpio_output(GPIO(4, D, 5), 1); /* SDMMC_PWR_EN */
+ gpio_output(GPIO(2, A, 2), 1); /* SDMMC_SDIO_PWR_EN */
+ gpio_input(GPIO(4, D, 2)); /* SDMMC_DET_L */
+ gpio_output(GPIO(2, D, 4), 0); /* Keep the max voltage */
+ write32(&rk3399_grf->iomux_sdmmc, IOMUX_SDMMC);
+}
static void mainboard_init(device_t dev)
{
+ configure_sdmmc();
}
static void mainboard_enable(device_t dev)