summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2022-01-04 22:35:23 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-01-07 15:29:06 +0000
commit1e9dfd9d8c8c432b885ed10f25b2101f9aa2d2b1 (patch)
tree440a78a3c6f4ab36c58c71e18ed5388c22ccd164 /src/mainboard/google
parent8eedca3e9e0bd0d076915ba1f0da344c4fb3de9a (diff)
mb/google/corsola: Enable the SD card reader
The Kingler board has an SD card reader connected via USB and can be enabled by setting GPIO EN_PP3300_SDBRDG_X to output mode and activated. BUG=b:211385131 TEST=boot kernel using SD card. Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: I903731ea4906328b2f0f5a7c6c06bd9c964d24ec Reviewed-on: https://review.coreboot.org/c/coreboot/+/60780 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/corsola/Kconfig3
-rw-r--r--src/mainboard/google/corsola/gpio.h3
-rw-r--r--src/mainboard/google/corsola/mainboard.c5
3 files changed, 9 insertions, 2 deletions
diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig
index 88b390d987..7bf557fd2c 100644
--- a/src/mainboard/google/corsola/Kconfig
+++ b/src/mainboard/google/corsola/Kconfig
@@ -55,7 +55,8 @@ config BOOT_DEVICE_SPI_FLASH_BUS
config SDCARD_INIT
bool
- default n
+ default y if BOARD_GOOGLE_KINGLER_COMMON
+ default n if BOARD_GOOGLE_KRABBY_COMMON
config DRIVER_TPM_SPI_BUS
hex
diff --git a/src/mainboard/google/corsola/gpio.h b/src/mainboard/google/corsola/gpio.h
index 8f8fb72776..d42a5ef0f8 100644
--- a/src/mainboard/google/corsola/gpio.h
+++ b/src/mainboard/google/corsola/gpio.h
@@ -26,6 +26,9 @@
#define GPIO_EN_SPK GPIO(PERIPHERAL_EN3)
#define GPIO_BEEP_ON GPIO(PERIPHERAL_EN4)
+/* GPIOs for SD card */
+#define GPIO_EN_PP3300_SDBRDG_X GPIO(PERIPHERAL_EN7)
+
/* GPIOs for display */
#define GPIO_AP_EDP_BKLTEN GPIO(PERIPHERAL_EN5)
#define GPIO_BL_PWM_1V8 GPIO(DISP_PWM)
diff --git a/src/mainboard/google/corsola/mainboard.c b/src/mainboard/google/corsola/mainboard.c
index 959dca6767..c0a6449b39 100644
--- a/src/mainboard/google/corsola/mainboard.c
+++ b/src/mainboard/google/corsola/mainboard.c
@@ -4,6 +4,7 @@
#include <bootmode.h>
#include <console/console.h>
#include <device/device.h>
+#include <gpio.h>
#include <soc/msdc.h>
#include <soc/spm.h>
#include <soc/usb.h>
@@ -41,7 +42,9 @@ static void mainboard_init(struct device *dev)
if (CONFIG(SDCARD_INIT)) {
printk(BIOS_INFO, "SD card init\n");
- mtk_msdc_configure_sdcard();
+
+ /* External SD Card connected via USB */
+ gpio_output(GPIO_EN_PP3300_SDBRDG_X, 1);
}
setup_usb_host();