summaryrefslogtreecommitdiff
path: root/src/mainboard/google/kahlee
diff options
context:
space:
mode:
authorKevin Chiu <Kevin.Chiu@quantatw.com>2018-06-12 13:19:57 +0800
committerMartin Roth <martinroth@google.com>2018-06-15 08:14:11 +0000
commit56dfc9375101e63987dba42626cd2ef2bd3badfa (patch)
treeb0ff7d779c03e279c54c4a43d3f11dd29208d1ca /src/mainboard/google/kahlee
parentfaa5f9869d67ab1a963e1c49afaaf353503586c9 (diff)
downloadcoreboot-56dfc9375101e63987dba42626cd2ef2bd3badfa.tar.xz
mainboard/google/kahlee: Enable keyboard backlight for careena specific SKU
Enable keyboard backlight by Careena SKUID Set to 10% as the same as google/snappy project BUG=b:110065836 BRANCH=master TEST=emerge-grunt coreboot Change-Id: I7d302c4f50528b0e6b7ef4d990f342a69cff34f5 Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com> Reviewed-on: https://review.coreboot.org/27021 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/mainboard/google/kahlee')
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/romstage.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/mainboard/google/kahlee/variants/baseboard/romstage.c b/src/mainboard/google/kahlee/variants/baseboard/romstage.c
index f87a9d668d..36f72d8539 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/romstage.c
+++ b/src/mainboard/google/kahlee/variants/baseboard/romstage.c
@@ -16,8 +16,32 @@
#include <baseboard/variants.h>
#include <ec/google/chromeec/ec.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 */
+ switch (sku) {
+ default:
+ google_chromeec_kbbacklight(75);
+ break;
+ case SKU_CAREENA_KB_BACKLIGHT18:
+ case SKU_CAREENA_KB_BACKLIGHT19:
+ case SKU_CAREENA_KB_BACKLIGHT22:
+ case SKU_CAREENA_KB_BACKLIGHT23:
+ google_chromeec_kbbacklight(10);
+ break;
+ }
+ }
}