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>
This commit is contained in:
Yidi Lin 2023-02-09 14:46:06 +08:00 committed by Rex-BC Chen
parent 309d5a5373
commit 1000b0f088
1 changed files with 8 additions and 3 deletions

View File

@ -96,9 +96,14 @@ uint32_t sku_id(void)
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);
}