Shelley Chen submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Shelley Chen: Looks good to me, approved
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>
---
M src/mainboard/google/herobrine/board.h
M src/mainboard/google/herobrine/chromeos.c
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/mainboard/google/herobrine/board.h b/src/mainboard/google/herobrine/board.h
index c91a238..0d2b2dba6 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 c46bf7c..643dcc2 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));
}

To view, visit change 50584. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5dc5ba10c98d606d98e7d4f4c41c3e4f45e94452
Gerrit-Change-Number: 50584
Gerrit-PatchSet: 57
Gerrit-Owner: Ravi kumar <rbokka@codeaurora.org>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Sajida Bhanu <sbhanu@codeaurora.org>
Gerrit-Reviewer: Shelley Chen <shchen@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: mturney mturney <mturney@codeaurora.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-CC: Ravi Kumar Bokka <c_rbokka@qualcomm.corp-partner.google.com>
Gerrit-MessageType: merged