From 1e9dfd9d8c8c432b885ed10f25b2101f9aa2d2b1 Mon Sep 17 00:00:00 2001 From: Rex-BC Chen Date: Tue, 4 Jan 2022 22:35:23 +0800 Subject: [PATCH] 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 Change-Id: I903731ea4906328b2f0f5a7c6c06bd9c964d24ec Reviewed-on: https://review.coreboot.org/c/coreboot/+/60780 Reviewed-by: Hung-Te Lin Tested-by: build bot (Jenkins) --- src/mainboard/google/corsola/Kconfig | 3 ++- src/mainboard/google/corsola/gpio.h | 3 +++ src/mainboard/google/corsola/mainboard.c | 5 ++++- 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 #include #include +#include #include #include #include @@ -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();