diff options
author | Hung-Te Lin <hungte@chromium.org> | 2020-07-24 08:49:41 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-07-26 21:29:45 +0000 |
commit | 7fc228171523838a0537ced9f6e05be002bce1bb (patch) | |
tree | 3ec621717d11c0efde1286dd5f7d9b3ac887e6d7 /src/mainboard | |
parent | ea63f80e108167b26b19333f3fd70285e214fbf5 (diff) |
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 <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43788
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/kukui/mainboard.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 <console/console.h> #include <delay.h> #include <device/device.h> +#include <ec/google/chromeec/ec.h> #include <edid.h> #include <gpio.h> #include <soc/ddp.h> @@ -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"); |