Kevin Chiu has uploaded this change for review. ( https://review.coreboot.org/27021
Change subject: google/grunt: Enable keyboard backlight for careena specific SKU ......................................................................
google/grunt: Enable keyboard backlight for careena specific SKU
Enable keyboard backlight by Careena SKUID
BUG=none BRANCH=master TEST=emerge-grunt coreboot Change-Id: I7d302c4f50528b0e6b7ef4d990f342a69cff34f5 Signed-off-by: Kevin Chiu Kevin.Chiu@quantatw.com --- M src/mainboard/google/kahlee/variants/baseboard/romstage.c 1 file changed, 24 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/27021/1
diff --git a/src/mainboard/google/kahlee/variants/baseboard/romstage.c b/src/mainboard/google/kahlee/variants/baseboard/romstage.c index f87a9d6..fd771bc 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/romstage.c +++ b/src/mainboard/google/kahlee/variants/baseboard/romstage.c @@ -15,9 +15,31 @@
#include <baseboard/variants.h> #include <ec/google/chromeec/ec.h> +#include <console/console.h> + +/* SKU ID enumeration */ +enum careena_sku { + SKU_UNKNOWN = -1, + SKU_CAREENA_KB_NO_BACKLIGHT16 = 16, + SKU_CAREENA_KB_BACKLIGHT18 = 18, + SKU_CAREENA_KB_BACKLIGHT19 = 19, + SKU_CAREENA_KB_BACKLIGHT22 = 22, + SKU_CAREENA_KB_BACKLIGHT23 = 23, +};
void variant_romstage_entry(int s3_resume) { - if (!s3_resume) - google_chromeec_kbbacklight(75); + uint32_t sku = google_chromeec_get_sku_id(); + + if (!s3_resume) { + /* Based on SKU, turn on keyboard backlight to show system is booting */ + switch (sku) { + case SKU_CAREENA_KB_BACKLIGHT18: + case SKU_CAREENA_KB_BACKLIGHT19: + case SKU_CAREENA_KB_BACKLIGHT22: + case SKU_CAREENA_KB_BACKLIGHT23: + google_chromeec_kbbacklight(75); + break; + } + } }