Skip to content

Commit c8f460d

Browse files
DHowettTzung-Bi Shih
authored andcommitted
platform/chrome: cros_ec_lpc: add quirks for the Framework Laptop (AMD)
The original Framework Laptop 13 platform (Intel 11th, 12th, and 13th Generation at this time) uses a Microchip embedded controller in a standard configuration. The newer devices in this product line--Framework Laptop 13 and 16 (AMD Ryzen)--use a NPCX embedded controller. However, they deviate from the configuration of ChromeOS platforms built with the NPCX EC. * The MMIO region for EC memory begins at port 0xE00 rather than the expected 0x900. cros_ec_lpc's quirks system is used to address this issue. Signed-off-by: Dustin L. Howett <[email protected]> Reviewed-by: Thomas Weißschuh <[email protected]> Tested-by: Thomas Weißschuh <[email protected]> Tested-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent e4dbf9d commit c8f460d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

drivers/platform/chrome/cros_ec_lpc.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,11 @@ static const struct acpi_device_id cros_ec_lpc_acpi_device_ids[] = {
527527
};
528528
MODULE_DEVICE_TABLE(acpi, cros_ec_lpc_acpi_device_ids);
529529

530+
static const struct lpc_driver_data framework_laptop_amd_lpc_driver_data __initconst = {
531+
.quirks = CROS_EC_LPC_QUIRK_REMAP_MEMORY,
532+
.quirk_mmio_memory_base = 0xE00,
533+
};
534+
530535
static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = {
531536
{
532537
/*
@@ -581,7 +586,16 @@ static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = {
581586
},
582587
/* A small number of non-Chromebook/box machines also use the ChromeOS EC */
583588
{
584-
/* the Framework Laptop */
589+
/* the Framework Laptop 13 (AMD Ryzen) and 16 (AMD Ryzen) */
590+
.matches = {
591+
DMI_MATCH(DMI_SYS_VENDOR, "Framework"),
592+
DMI_MATCH(DMI_PRODUCT_NAME, "AMD Ryzen"),
593+
DMI_MATCH(DMI_PRODUCT_FAMILY, "Laptop"),
594+
},
595+
.driver_data = (void *)&framework_laptop_amd_lpc_driver_data,
596+
},
597+
{
598+
/* the Framework Laptop (Intel 11th, 12th, 13th Generation) */
585599
.matches = {
586600
DMI_MATCH(DMI_SYS_VENDOR, "Framework"),
587601
DMI_MATCH(DMI_PRODUCT_NAME, "Laptop"),

0 commit comments

Comments
 (0)