mb/google/geralt: Report SKU ID and panel ID for unprovisioned devices
To make MIPI/eDP panel functional on unprovisioned devices, it requires
passing SKU ID and panel ID info to the payload(depthcharge) to load the
corresponded device tree for kernel.
BUG=b:247415660
TEST=cbmem -1 |grep "SKU Code".
Change-Id: Id2254729b7bd621d1e9bc520e8f40916d0f81030
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73076
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
diff --git a/src/mainboard/google/geralt/boardid.c b/src/mainboard/google/geralt/boardid.c
index 19d25c4..7a62741 100644
--- a/src/mainboard/google/geralt/boardid.c
+++ b/src/mainboard/google/geralt/boardid.c
@@ -96,9 +96,14 @@
if (cached_sku_code == BOARD_ID_INIT) {
cached_sku_code = google_chromeec_get_board_sku();
- if (cached_sku_code == CROS_SKU_UNKNOWN) {
- printk(BIOS_WARNING, "Failed to get SKU code from EC\n");
- cached_sku_code = get_adc_index(SKU_ID_CHANNEL);
+ if (cached_sku_code == CROS_SKU_UNKNOWN ||
+ cached_sku_code == CROS_SKU_UNPROVISIONED) {
+ printk(BIOS_WARNING, "SKU code from EC: %s\n",
+ (cached_sku_code == CROS_SKU_UNKNOWN) ?
+ "CROS_SKU_UNKNOWN" : "CROS_SKU_UNPROVISIONED");
+ /* Reserve last 8 bits to report SKU_ID and PANEL_ID */
+ cached_sku_code = 0x7FFFFF00UL | get_adc_index(SKU_ID_CHANNEL) << 4 |
+ panel_id();
}
printk(BIOS_DEBUG, "SKU Code: %#02x\n", cached_sku_code);
}