From aa9bb445043e15b9da5ed1429cc14a2ae6941a9e Mon Sep 17 00:00:00 2001 From: Liju-Clr Chen Date: Tue, 20 Dec 2022 15:52:50 +0800 Subject: mb/google/geralt: Pass SD card detect GPIO to payloads 1. Add an option for SD card initialization. 2. If CONFIG SDCARD_INIT is configured, pass SD card detect GPIO to payloads for SD card detection and initialize MSDC for SD card configuration. BUG=b:244250437 TEST=build pass Signed-off-by: Liju-Clr Chen Change-Id: I2d3683eb673f438c9190c11d4679a3ca97c76a98 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71136 Reviewed-by: Rex-BC Chen Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/mainboard/google/geralt/chromeos.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mainboard/google/geralt/chromeos.c') diff --git a/src/mainboard/google/geralt/chromeos.c b/src/mainboard/google/geralt/chromeos.c index 83c0ddcc2729..2de1b6ccd899 100644 --- a/src/mainboard/google/geralt/chromeos.c +++ b/src/mainboard/google/geralt/chromeos.c @@ -31,6 +31,13 @@ void fill_lb_gpios(struct lb_gpios *gpios) lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); fill_lp_backlight_gpios(gpios); + + if (CONFIG(SDCARD_INIT)) { + struct lb_gpio sd_card_gpios[] = { + {GPIO_SD_CD_ODL.id, ACTIVE_LOW, -1, "SD card detect"}, + }; + lb_add_gpios(gpios, sd_card_gpios, ARRAY_SIZE(sd_card_gpios)); + } } int tis_plat_irq_status(void) -- cgit v1.2.3