Skip to contentSkip to conversation

platform/chrome: cros_ec_lpc: Add support for Google devices using custom coreboot firmware

PATCH RESEND In review Salvatore Bellizzi 2 participants 2 messages Mar 7, 2018 – Mar 20, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 platform/chrome: cros_ec_lpc: Add support for Google devices using custom coreboot firmware

This patch adds generic device information to the DMI table of the cros_ec_lpc driver, needed for Chromebooks/boxes using a custom coreboot firmware.

The DMI info would not contain "Google_*" as BIOS version string, instead the system vendor string would still be "GOOGLE", so this seems to be a reasonable match for every Chromebook/box running a custom firmware.

---
 drivers/platform/chrome/cros_ec_lpc.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/platform/chrome/cros_ec_lpc.c +12 -0
index af89e82eecd2..c8450ae3cd60 100644
@@ -341,6 +341,18 @@ static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_BIOS_VERSION, "Google_"),
 		},
 	},
+	{
+		/*
+		 * If the box is running custom coreboot firmware then the
+		 * DMI BIOS version string will not be matched by "Google_",
+		 * but the system vendor string will still be matched by
+		 * "GOOGLE".
+		 */
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+		},
+	},
 	{
 		/* x86-link, the Chromebook Pixel. */
 		.matches = {
Signature · 1 line
2.16.2
#1 lore raw

Hi Salvatore,

Quoted 11 lines · Salvatore Bellizzi

This patch adds generic device information to the DMI table of the cros_ec_lpc driver, needed for Chromebooks/boxes using a custom coreboot firmware.

The DMI info would not contain "Google_*" as BIOS version string, instead the system vendor string would still be "GOOGLE", so this seems to be a reasonable match for every Chromebook/box running a custom firmware.

Applied for v4.17.

Thanks!
Benson

Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]