<p>Kevin Chiu has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21319">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">google/snappy: Override Keyboard Backlight by SKU ID<br><br>Since Snappy will have specific SKU to support keyboard backlight.<br>we will need to report whether ACPI device exists or not by SKU ID<br>to prevent keyboard backlight OSD on non supported system.<br><br>BUG=none<br>BRANCH=reef<br>TEST=emerge-snappy coreboot<br>Change-Id: I7c963bfd932df9297ee18a62617e48acead7b68a<br>Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com><br>---<br>M src/arch/x86/smbios.c<br>M src/mainboard/google/reef/dsdt.asl<br>A src/mainboard/google/reef/variants/snappy/include/variant/acpi/keyboard_backlight.asl<br>M src/mainboard/google/reef/variants/snappy/include/variant/ec.h<br>M src/vendorcode/google/chromeos/acpi/gnvs.asl<br>M src/vendorcode/google/chromeos/gnvs.h<br>6 files changed, 65 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/21319/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c<br>index 89951a1..a46a887 100644<br>--- a/src/arch/x86/smbios.c<br>+++ b/src/arch/x86/smbios.c<br>@@ -372,6 +372,7 @@<br> {<br> struct smbios_type1 *t = (struct smbios_type1 *)*current;<br> int len = sizeof(struct smbios_type1);<br>+ char skuid[7];<br> <br> memset(t, 0, sizeof(struct smbios_type1));<br> t->type = SMBIOS_SYSTEM_INFORMATION;<br>@@ -388,6 +389,11 @@<br> #ifdef CONFIG_MAINBOARD_FAMILY<br> t->family = smbios_add_string(t->eos, smbios_mainboard_family());<br> #endif<br>+<br>+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)<br>+ strcpy(skuid, smbios_mainboard_sku());<br>+ vboot_data->skuid = skuid[3] - '0';<br>+#endif<br> smbios_mainboard_set_uuid(t->uuid);<br> len = t->length + smbios_string_table_len(t->eos);<br> *current += len;<br>diff --git a/src/mainboard/google/reef/dsdt.asl b/src/mainboard/google/reef/dsdt.asl<br>index dc63436..a1f40be 100644<br>--- a/src/mainboard/google/reef/dsdt.asl<br>+++ b/src/mainboard/google/reef/dsdt.asl<br>@@ -65,4 +65,8 @@<br> /* Include common dptf ASL files */<br> #include <soc/intel/common/acpi/dptf/dptf.asl><br> }<br>+<br>+ #ifdef BOARD_EC_ENABLE_KEYBOARD_BACKLIGHT<br>+ #include <variant/acpi/keyboard_backlight.asl><br>+ #endif<br> }<br>diff --git a/src/mainboard/google/reef/variants/snappy/include/variant/acpi/keyboard_backlight.asl b/src/mainboard/google/reef/variants/snappy/include/variant/acpi/keyboard_backlight.asl<br>new file mode 100644<br>index 0000000..706dc8b<br>--- /dev/null<br>+++ b/src/mainboard/google/reef/variants/snappy/include/variant/acpi/keyboard_backlight.asl<br>@@ -0,0 +1,50 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2015 Google Inc.<br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+Scope (\_SB)<br>+{<br>+ /*<br>+ * Chrome EC Keyboard Backlight interface<br>+ */<br>+ Device (KBLT)<br>+ {<br>+ Name (_HID, "GOOG0002")<br>+ Name (_UID, 1)<br>+<br>+ /* Read current backlight value */<br>+ Method (KBQC, 0, NotSerialized)<br>+ {<br>+ Return (\_SB.PCI0.LPCB.EC0.KBLV)<br>+ }<br>+<br>+ /* Write new backlight value */<br>+ Method (KBCM, 1, NotSerialized)<br>+ {<br>+ Store (Arg0, \_SB.PCI0.LPCB.EC0.KBLV)<br>+ }<br>+<br>+ Method (_STA)<br>+ {<br>+ /* SKU2 supports Keyboard Backlight */<br>+ If (LEqual(\SKID,2))<br>+ {<br>+ Return (0xF)<br>+ }<br>+ Else {<br>+ Return (0)<br>+ }<br>+ }<br>+ }<br>+}<br>diff --git a/src/mainboard/google/reef/variants/snappy/include/variant/ec.h b/src/mainboard/google/reef/variants/snappy/include/variant/ec.h<br>index 4f5051b..8b0a96d 100644<br>--- a/src/mainboard/google/reef/variants/snappy/include/variant/ec.h<br>+++ b/src/mainboard/google/reef/variants/snappy/include/variant/ec.h<br>@@ -19,6 +19,6 @@<br> #include <baseboard/ec.h><br> <br> /* Enable EC backed Keyboard Backlight in ACPI */<br>-#define EC_ENABLE_KEYBOARD_BACKLIGHT<br>+#define BOARD_EC_ENABLE_KEYBOARD_BACKLIGHT<br> <br> #endif<br>diff --git a/src/vendorcode/google/chromeos/acpi/gnvs.asl b/src/vendorcode/google/chromeos/acpi/gnvs.asl<br>index 52d3a0d..8901d7e 100644<br>--- a/src/vendorcode/google/chromeos/acpi/gnvs.asl<br>+++ b/src/vendorcode/google/chromeos/acpi/gnvs.asl<br>@@ -32,4 +32,5 @@<br> MEHH, 256, // 0xd9e - Management Engine Hash<br> RMOB, 32, // 0xdbe - RAM oops base address<br> RMOL, 32, // 0xdc2 - RAM oops length<br>- // 0xdc6<br>+SKID, 8, // 0xdc6 - SKU ID<br>+ // 0xdc7-0xeff<br>diff --git a/src/vendorcode/google/chromeos/gnvs.h b/src/vendorcode/google/chromeos/gnvs.h<br>index 82cd409..0fe767a 100644<br>--- a/src/vendorcode/google/chromeos/gnvs.h<br>+++ b/src/vendorcode/google/chromeos/gnvs.h<br>@@ -58,7 +58,8 @@<br> u32 mehh[8]; // d9e management engine hash<br> u32 ramoops_base; // dbe ramoops base address<br> u32 ramoops_len; // dc2 ramoops length<br>- u8 pad[314]; // dc6-eff<br>+ u8 skuid; // dc6 sku id<br>+ u8 pad[313]; // dc7-eff<br> } __packed chromeos_acpi_t;<br> <br> extern chromeos_acpi_t *vboot_data;<br></pre><p>To view, visit <a href="https://review.coreboot.org/21319">change 21319</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21319"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I7c963bfd932df9297ee18a62617e48acead7b68a </div>
<div style="display:none"> Gerrit-Change-Number: 21319 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Chiu <Kevin.Chiu@quantatw.com> </div>