diff --git a/kernel_module/legion-laptop.c b/kernel_module/legion-laptop.c index 4a7b96f..d109863 100644 --- a/kernel_module/legion-laptop.c +++ b/kernel_module/legion-laptop.c @@ -513,6 +513,25 @@ static const struct model_config model_kwcn = { .ramio_size = 0x600 }; +static const struct model_config model_m0cn = { + .registers = &ec_register_offsets_v0, + .check_embedded_controller_id = true, + .embedded_controller_id = 0x8227, + .memoryio_physical_ec_start = 0xC400, + .memoryio_size = 0x300, + .has_minifancurve = false, + .has_custom_powermode = true, + .access_method_powermode = ACCESS_METHOD_WMI, + .access_method_keyboard = ACCESS_METHOD_WMI, + .access_method_fanspeed = ACCESS_METHOD_WMI3, + .access_method_temperature = ACCESS_METHOD_WMI3, + .access_method_fancurve = ACCESS_METHOD_WMI3, + .access_method_fanfullspeed = ACCESS_METHOD_WMI, + .acpi_check_dev = false, + .ramio_physical_start = 0xFE0B0400, + .ramio_size = 0x600 +}; + static const struct model_config model_m2cn = { .registers = &ec_register_offsets_v0, .check_embedded_controller_id = true, @@ -1079,6 +1098,15 @@ static const struct dmi_system_id optimistic_allowlist[] = { }, .driver_data = (void *)&model_m2cn }, + { + // e.g. Legion Slim 7 16IRH8 (2023) with RTX 4070 + .ident = "M0CN", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_BIOS_VERSION, "M0CN"), + }, + .driver_data = (void *)&model_m0cn + }, { // e.g. Yoga Slim 7-14ARE05 .ident = "DMCN",