From 7fc228171523838a0537ced9f6e05be002bce1bb Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Fri, 24 Jul 2020 08:49:41 +0800 Subject: [PATCH] mb/google/kukui: send SKU ID to EC for device-specific configuration For devices sharing same firmware, there may be few customization based on SKU ID - for example being clamshell or form factor. On Kukui and Jacuzzi platforms the SKU ID is defined on AP SOC, so we have to send the information to EC. BUG=b:161767717 TEST=make -j # builds and boots on Juniper BRANCH=kukui Change-Id: I8ffdd9fd1e609c1dd4b0e22dc7aab560ccdc842e Signed-off-by: Hung-Te Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/43788 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/mainboard/google/kukui/mainboard.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index 6622286135..268b7caf65 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,13 @@ static void configure_audio(void) gpio_set_mode(GPIO(EINT3), PAD_EINT3_FUNC_I2S3_DO); } +static void configure_ec(void) +{ + /* EC may need SKU ID to identify if it is clamshell or convertible. */ + if (CONFIG(BOARD_GOOGLE_JACUZZI_COMMON)) + google_chromeec_set_sku_id(sku_id()); +} + /* Default implementation for boards without panels defined yet. */ struct panel_description __weak *get_panel_description(int panel_id) { @@ -191,6 +199,7 @@ static void mainboard_init(struct device *dev) configure_emmc(); configure_usb(); configure_audio(); + configure_ec(); if (spm_init()) printk(BIOS_ERR, "SPM initialization failed, suspend/resume may fail.\n");