Shelley Chen has submitted this change. ( https://review.coreboot.org/c/coreboot/+/56642 )
Change subject: google/herobrine: configure gpio to detect board ID ......................................................................
google/herobrine: configure gpio to detect board ID
BUG=b:182963902, b:193807794 TEST=Validated on qualcomm sc7280 development board
Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org Change-Id: I6de2a7e7b11ecce8325e0fd44dc7221d73729390 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56642 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/boardid.c 2 files changed, 13 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Shelley Chen: Looks good to me, approved
diff --git a/src/mainboard/google/herobrine/board.h b/src/mainboard/google/herobrine/board.h index b604cf7..9debfb8 100644 --- a/src/mainboard/google/herobrine/board.h +++ b/src/mainboard/google/herobrine/board.h @@ -18,7 +18,6 @@
#define QCOM_SC7280_SKU1 0x0 #define QCOM_SC7280_SKU2 0x1 -#define QCOM_SC7280_SKU3 0x2
/* Fingerprint-specific GPIOs. Only for fingerprint-enabled devices. */ #if CONFIG(HEROBRINE_HAS_FINGERPRINT) diff --git a/src/mainboard/google/herobrine/boardid.c b/src/mainboard/google/herobrine/boardid.c index 7db3e0b..ad90dd9 100644 --- a/src/mainboard/google/herobrine/boardid.c +++ b/src/mainboard/google/herobrine/boardid.c @@ -10,19 +10,25 @@ uint32_t board_id(void) { static uint32_t id = UNDEFINED_STRAPPING_ID; - const gpio_t pins[] = {[2] = GPIO(50), [1] = GPIO(49), [0] = GPIO(48)}; + gpio_t pins[3]; + if (CONFIG(BOARD_GOOGLE_HEROBRINE)) { + pins[2] = GPIO(75); + pins[1] = GPIO(74); + pins[0] = GPIO(73); + } else if (CONFIG(BOARD_GOOGLE_PIGLIN) || CONFIG(BOARD_GOOGLE_HOGLIN) + || CONFIG(BOARD_GOOGLE_SENOR)) { + pins[2] = GPIO(50); + pins[1] = GPIO(49); + pins[0] = GPIO(48); + }
if (id == UNDEFINED_STRAPPING_ID) id = gpio_base3_value(pins, ARRAY_SIZE(pins));
- if ((id == QCOM_SC7280_SKU1) || (id == QCOM_SC7280_SKU2) || - (id == QCOM_SC7280_SKU3)) - printk(BIOS_INFO, "BoardID :%d - " + printk(BIOS_INFO, "BoardID :%d - " "Machine model: " "Qualcomm Technologies, Inc. " - "sc7280 IDP SKU%d platform\n", id, (id+1)); - else - printk(BIOS_ERR, "Invalid BoardId : %d\n", id); + "sc7280 platform\n", id);
return id; }
37 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.