diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/herobrine/board.h | 4 | ||||
-rw-r--r-- | src/mainboard/google/herobrine/boardid.c | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/mainboard/google/herobrine/board.h b/src/mainboard/google/herobrine/board.h index 0d2b2dba68..33c8c7df51 100644 --- a/src/mainboard/google/herobrine/board.h +++ b/src/mainboard/google/herobrine/board.h @@ -8,6 +8,10 @@ #define GPIO_SD_CD_L GPIO(91) +#define QCOM_SC7280_SKU1 0x0 +#define QCOM_SC7280_SKU2 0x1 +#define QCOM_SC7280_SKU3 0x2 + void setup_chromeos_gpios(void); #endif /* _COREBOOT_SRC_MAINBOARD_GOOGLE_HEROBRINE_BOARD_H_ */ diff --git a/src/mainboard/google/herobrine/boardid.c b/src/mainboard/google/herobrine/boardid.c index 6368d25157..7db3e0bc64 100644 --- a/src/mainboard/google/herobrine/boardid.c +++ b/src/mainboard/google/herobrine/boardid.c @@ -2,11 +2,27 @@ #include <boardid.h> #include <ec/google/chromeec/ec.h> +#include "board.h" +#include <commonlib/bsd/cb_err.h> +#include <console/console.h> #include <gpio.h> 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)}; + + 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 - " + "Machine model: " + "Qualcomm Technologies, Inc. " + "sc7280 IDP SKU%d platform\n", id, (id+1)); + else + printk(BIOS_ERR, "Invalid BoardId : %d\n", id); return id; } |