aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorYidi Lin <yidilin@chromium.org>2023-02-09 14:46:06 +0800
committerRex-BC Chen <rex-bc.chen@mediatek.com>2023-02-18 07:50:56 +0000
commit1000b0f0887cfe6fa5cc8dba8db759ac1d68a164 (patch)
treee4480b11ad1e52d9bc598b16985102bc6fd958ae /src/mainboard
parent309d5a53733592191837ca47cfddd97830dd4a2e (diff)
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>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/geralt/boardid.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mainboard/google/geralt/boardid.c b/src/mainboard/google/geralt/boardid.c
index 19d25c4a10..7a627416be 100644
--- a/src/mainboard/google/geralt/boardid.c
+++ b/src/mainboard/google/geralt/boardid.c
@@ -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);
}