From cd1257a1359450194a514ca0184131bcf23d2094 Mon Sep 17 00:00:00 2001 From: Shaik Sajida Bhanu Date: Tue, 19 Jan 2021 20:14:48 +0530 Subject: mainboard/google/herobrine: Add configuration for SD card detect pin Without this configuration, even though there is no SD card it shows as SD card is present and host controller waits for card to respond. BUG=b:182963902 TEST=Validated on qualcomm sc7280 development board with SD card and without SD card, make sure if SD card not present then host controller should not wait for card to respond. Change-Id: I5dc5ba10c98d606d98e7d4f4c41c3e4f45e94452 Signed-off-by: Shaik Sajida Bhanu Reviewed-on: https://review.coreboot.org/c/coreboot/+/50584 Tested-by: build bot (Jenkins) Reviewed-by: Shelley Chen --- src/mainboard/google/herobrine/board.h | 2 ++ src/mainboard/google/herobrine/chromeos.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google/herobrine') diff --git a/src/mainboard/google/herobrine/board.h b/src/mainboard/google/herobrine/board.h index c91a238987..0d2b2dba68 100644 --- a/src/mainboard/google/herobrine/board.h +++ b/src/mainboard/google/herobrine/board.h @@ -6,6 +6,8 @@ #include #include +#define GPIO_SD_CD_L GPIO(91) + void setup_chromeos_gpios(void); #endif /* _COREBOOT_SRC_MAINBOARD_GOOGLE_HEROBRINE_BOARD_H_ */ diff --git a/src/mainboard/google/herobrine/chromeos.c b/src/mainboard/google/herobrine/chromeos.c index c46bf7c2ad..643dcc2477 100644 --- a/src/mainboard/google/herobrine/chromeos.c +++ b/src/mainboard/google/herobrine/chromeos.c @@ -6,10 +6,15 @@ void setup_chromeos_gpios(void) { - + gpio_input_pullup(GPIO_SD_CD_L); } void fill_lb_gpios(struct lb_gpios *gpios) { + struct lb_gpio chromeos_gpios[] = { + {GPIO_SD_CD_L.addr, ACTIVE_LOW, gpio_get(GPIO_SD_CD_L), + "SD card detect"}, + }; + lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); } -- cgit v1.2.3