summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/kukui/boardid.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainboard/google/kukui/boardid.c b/src/mainboard/google/kukui/boardid.c
index 2420e78f4f..2af93c8a0a 100644
--- a/src/mainboard/google/kukui/boardid.c
+++ b/src/mainboard/google/kukui/boardid.c
@@ -16,8 +16,11 @@
#include <assert.h>
#include <boardid.h>
#include <soc/auxadc.h>
+#include <ec/google/chromeec/ec.h>
#include <stddef.h>
+#define FLAPJACK_UNDEF_SKU_ID 2 /* For all un-provisioned Flapjack boards */
+
static uint32_t get_index(unsigned int channel, uint32_t *cached_id)
{
static const int voltages[] = {
@@ -64,6 +67,14 @@ uint32_t sku_id(void)
{
static uint32_t cached_sku_id = BOARD_ID_INIT;
+ /* On Flapjack, getting the SKU via CBI */
+ if (IS_ENABLED(CONFIG_BOARD_GOOGLE_FLAPJACK)) {
+ if (cached_sku_id == BOARD_ID_INIT &&
+ google_chromeec_cbi_get_sku_id(&cached_sku_id))
+ cached_sku_id = FLAPJACK_UNDEF_SKU_ID;
+ return cached_sku_id;
+ }
+
/* Quirk for KUKUI: All P1/SKU0 had incorrectly set SKU=1. */
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KUKUI)) {
if (cached_sku_id == BOARD_ID_INIT && board_id() == 1) {