Skip to contentSkip to conversation

platform/chrome: cros_ec_lpc: Add support for newer Google devices using custom coreboot firmware or stock SeaBIOS.

PATCH RESEND In review Vittorio Gambaletta (VittGam) 2 participants 2 messages May 21, 2018

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

PATCH RESEND 1/1 platform/chrome: cros_ec_lpc: Add support for newer Google devices using custom coreboot firmware or stock SeaBIOS.

Custom coreboot firmware does not contain "Google_*" as BIOS version string; also, booting through stock SeaBIOS will present an empty BIOS version string to Linux. So the generic match at the top would not work.

A previous patch added the "GOOGLE" match for DMI system vendor, but newer machines such as Skylake-based Caroline use "Google" instead.

Also amend the previous comment adding a note that this is needed for stock SeaBIOS too.

---

drivers/platform/chrome/cros_ec_lpc.c +12 -1
@@ -347,7 +347,8 @@
 	},
 	{
 		/*
-		 * If the box is running custom coreboot firmware then the
+		 * If the box is running custom coreboot firmware,
+		 * or is booting Linux through stock SeaBIOS, then the
 		 * DMI BIOS version string will not be matched by "Google_",
 		 * but the system vendor string will still be matched by
 		 * "GOOGLE".
@@ -358,6 +359,16 @@
 		},
 	},
 	{
+		/*
+		 * Newer machines use "Google" instead of "GOOGLE" as
+		 * DMI system vendor string.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+		},
+	},
+	{
 		/* x86-link, the Chromebook Pixel. */
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
#1 lore raw

Hi Vittorio,

Quoted 11 lines · Vittorio Gambaletta (VittGam)

Custom coreboot firmware does not contain "Google_*" as BIOS version string; also, booting through stock SeaBIOS will present an empty BIOS version string to Linux. So the generic match at the top would not work.

A previous patch added the "GOOGLE" match for DMI system vendor, but newer machines such as Skylake-based Caroline use "Google" instead.

Also amend the previous comment adding a note that this is needed for stock SeaBIOS too.

I think this driver is incorrectly structured and adding new DMI signatures should not be needed. The newer hardware has the device GOOG0004 in their ACPI tables, we should not need additional DMI checks. DMI checks should only be needed for much older hardware, such as Link/Peppy that did not have EC described in DSDT.

Let me see if I can fix it up.

Quoted 25 lines

---

drivers/platform/chrome/cros_ec_lpc.c +5 -1
@@ -347,7 +347,8 @@
 	},
 	{
 		/*
-		 * If the box is running custom coreboot firmware then the
+		 * If the box is running custom coreboot firmware,
+		 * or is booting Linux through stock SeaBIOS, then the
 		 * DMI BIOS version string will not be matched by "Google_",
 		 * but the system vendor string will still be matched by
 		 * "GOOGLE".
@@ -358,6 +359,16 @@
 		},
 	},
 	{
+		/*
+		 * Newer machines use "Google" instead of "GOOGLE" as
+		 * DMI system vendor string.

drivers/platform/chrome/cros_ec_lpc.c line 374

Quoted 10 lines
drivers/platform/chrome/cros_ec_lpc.c +7 -0
+		 */
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+		},
+	},
+	{
 		/* x86-link, the Chromebook Pixel. */
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),

Thanks.

Signature · 1 line
Dmitry