diff options
author | Yidi Lin <yidilin@chromium.org> | 2024-04-08 14:26:05 +0800 |
---|---|---|
committer | Yu-Ping Wu <yupingso@google.com> | 2024-11-27 15:49:38 +0000 |
commit | 8943e40b18911552b28e841394068bed80612829 (patch) | |
tree | 8fc3ee015936dec45d0ebd6ca74653a7aada0739 /src/mainboard/google/rauru | |
parent | 0f80bfd460b1b6e8befb02abcb036177da9ba337 (diff) |
mb/google/rauru: Add configuration for SD card detect pin
Pass SD card detect GPIO to payloads for SD card detection.
BUG=b:317009620
TEST=build pass
Change-Id: I1901fd45833f2415c61b61f9e04ebb54440df80a
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85250
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/rauru')
-rw-r--r-- | src/mainboard/google/rauru/Kconfig | 3 | ||||
-rw-r--r-- | src/mainboard/google/rauru/chromeos.c | 8 | ||||
-rw-r--r-- | src/mainboard/google/rauru/gpio.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/mainboard/google/rauru/Kconfig b/src/mainboard/google/rauru/Kconfig index da6d99cc0d..a85f303d28 100644 --- a/src/mainboard/google/rauru/Kconfig +++ b/src/mainboard/google/rauru/Kconfig @@ -8,6 +8,9 @@ config BOARD_GOOGLE_RAURU_COMMON if BOARD_GOOGLE_RAURU_COMMON +config RAURU_SDCARD_INIT + def_bool BOARD_GOOGLE_RAURU + config VBOOT select VBOOT_VBNV_FLASH select EC_GOOGLE_CHROMEEC_SWITCHES diff --git a/src/mainboard/google/rauru/chromeos.c b/src/mainboard/google/rauru/chromeos.c index 90c826d0e6..7f2fd0587f 100644 --- a/src/mainboard/google/rauru/chromeos.c +++ b/src/mainboard/google/rauru/chromeos.c @@ -10,6 +10,7 @@ void setup_chromeos_gpios(void) { gpio_input(GPIO_EC_AP_INT_ODL); gpio_input(GPIO_GSC_AP_INT_ODL); + gpio_input(GPIO_SD_CD_AP_ODL); gpio_output(GPIO_AP_EC_WARM_RST_REQ, 0); gpio_output(GPIO_AP_FP_FW_UP_STRAP, 0); gpio_output(GPIO_BEEP_ON_OD, 0); @@ -29,6 +30,13 @@ void fill_lb_gpios(struct lb_gpios *gpios) { GPIO_GSC_AP_INT_ODL.id, ACTIVE_HIGH, -1, "TPM interrupt" }, }; lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); + + if (CONFIG(RAURU_SDCARD_INIT)) { + struct lb_gpio sd_card_gpios[] = { + { GPIO_SD_CD_AP_ODL.id, ACTIVE_LOW, -1, "SD card detect" }, + }; + lb_add_gpios(gpios, sd_card_gpios, ARRAY_SIZE(sd_card_gpios)); + } } int cr50_plat_irq_status(void) diff --git a/src/mainboard/google/rauru/gpio.h b/src/mainboard/google/rauru/gpio.h index d97b38d80a..d513dceab8 100644 --- a/src/mainboard/google/rauru/gpio.h +++ b/src/mainboard/google/rauru/gpio.h @@ -7,6 +7,7 @@ #define GPIO_BEEP_ON_OD GPIO(PERIPHERAL_EN1) #define GPIO_EN_SPKR GPIO(PERIPHERAL_EN0) +#define GPIO_SD_CD_AP_ODL GPIO(EINT11) #define GPIO_GSC_AP_INT_ODL GPIO(EINT18) #define GPIO_EC_AP_INT_ODL GPIO(EINT19) #define GPIO_XHCI_INIT_DONE GPIO(EINT28) |