Yang Wu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84342?usp=email )
Change subject: mb/google/corsola: Make compatible with MT8186T by modifing skuid ......................................................................
mb/google/corsola: Make compatible with MT8186T by modifing skuid
For MT8186, factory pre-flashed 0x7fffffff as default skuid and kernel can load the corresponded dts file. To make MT8186T functional on 0x7fffffff devices, coreboot will pass skuid to kernel by 0x7ffffffe, so kernel can get the corresponded dts file for system boot.
BUG=b:365730137 TEST=1.Pre-flashed 0x7fffffff and boot OS. 2.Check OS boot normally by 0x7ffffffe. BRANCH=corsola
Change-Id: I91306d3abd508e104851916882fb36a4fd302036 Signed-off-by: Yang Wu wuyang5@huaqin.corp-partner.google.com --- M src/mainboard/google/corsola/boardid.c 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/84342/1
diff --git a/src/mainboard/google/corsola/boardid.c b/src/mainboard/google/corsola/boardid.c index 443c3d1..5fb6457 100644 --- a/src/mainboard/google/corsola/boardid.c +++ b/src/mainboard/google/corsola/boardid.c @@ -5,6 +5,7 @@ #include <console/console.h> #include <ec/google/chromeec/ec.h> #include <soc/auxadc.h> +#include <soc/cpu_id.h>
#include "panel.h"
@@ -12,6 +13,9 @@
#define ADC_LEVELS 12
+/* Define compatible sku_id value */ +#define CROS_SKU_COM 0x7FFFFFFE + enum { /* RAM IDs */ RAM_ID_LOW_CHANNEL = 2, @@ -125,6 +129,12 @@ printk(BIOS_WARNING, "Failed to get SKU code from EC\n"); cached_sku_code = (get_adc_index(SKU_ID_HIGH_CHANNEL) << 4 | get_adc_index(SKU_ID_LOW_CHANNEL)); + } else if (CONFIG(BOARD_GOOGLE_STEELIX) && + get_cpu_id() == MTK_CPU_ID_MT8186T) { + printk(BIOS_DEBUG, "enter configure_ec: current is MT8686T\n"); + if (cached_sku_code == CROS_SKU_UNPROVISIONED) { + cached_sku_code = CROS_SKU_COM; + } }
printk(BIOS_DEBUG, "SKU Code: %#02x\n", cached_sku_code);