[coreboot-gerrit] Change in coreboot[master]: google/grunt: Enable keyboard backlight for careena specific SKU

Kevin Chiu (Code Review) gerrit at coreboot.org
Tue Jun 12 07:22:06 CEST 2018


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 at 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;
+		}
+	}
 }

-- 
To view, visit https://review.coreboot.org/27021
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d302c4f50528b0e6b7ef4d990f342a69cff34f5
Gerrit-Change-Number: 27021
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Chiu <Kevin.Chiu at quantatw.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180612/096e1505/attachment.html>


More information about the coreboot-gerrit mailing list