zanxi chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/57329 )
Change subject: mb/google/trogdor: Read LCM_ID and put into SKU_ID ......................................................................
mb/google/trogdor: Read LCM_ID and put into SKU_ID
Read/return LCM_ID as part of SKU_ID, so the mipi panel can be compatible in this way.
BUG=b:197708579,b:191574572 TEST=LCM_ID should be set correctly. BRANCH=none
Change-Id: I018b3f460f9d084d1a3f0dac026f1cd9dde284e2 Signed-off-by: Zanxi Chen chenzanxi@huaqin.corp-partner.google.com --- M src/mainboard/google/trogdor/boardid.c 1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/57329/1
diff --git a/src/mainboard/google/trogdor/boardid.c b/src/mainboard/google/trogdor/boardid.c index c972160..3c3ba99 100644 --- a/src/mainboard/google/trogdor/boardid.c +++ b/src/mainboard/google/trogdor/boardid.c @@ -42,6 +42,19 @@ return id; }
+static uint8_t lcm_id(void) +{ + static uint32_t id = UNDEFINED_STRAPPING_ID; + const gpio_t pins[] = {[0] = GPIO(4)}; + if (id == UNDEFINED_STRAPPING_ID) { + if (CONFIG(TROGDOR_HAS_MIPI_PANEL)) + id = gpio_base2_value(pins, ARRAY_SIZE(pins)); + else + id = 0; + } + return id; +} + uint32_t sku_id(void) { static uint32_t id = UNDEFINED_STRAPPING_ID; @@ -56,5 +69,7 @@ id = gpio_binary_first_base3_value(pins, ARRAY_SIZE(pins)); }
+ id = lcm_id() << 4 | id; + return id; }