diff options
author | Shaik Sajida Bhanu <sbhanu@codeaurora.org> | 2021-01-19 20:14:48 +0530 |
---|---|---|
committer | Shelley Chen <shchen@google.com> | 2021-07-22 06:39:32 +0000 |
commit | cd1257a1359450194a514ca0184131bcf23d2094 (patch) | |
tree | c80de057527256e48d36d2006f7c0df95a048168 /src | |
parent | 7a6b2ef25e94b88f01fba659d15c92ee525ede0b (diff) |
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 <sbhanu@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50584
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/herobrine/board.h | 2 | ||||
-rw-r--r-- | src/mainboard/google/herobrine/chromeos.c | 7 |
2 files changed, 8 insertions, 1 deletions
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 <boardid.h> #include <gpio.h> +#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)); } |