Skip to content

Commit 52ced0d

Browse files
authored
Merge pull request #316 from Paulbouchara/main
Add LOQ 15AHP9
2 parents c9b459d + 7100fe0 commit 52ced0d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

kernel_module/legion-laptop.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,26 @@ static const struct model_config model_necn = {
986986
.ramio_size = 0x600
987987
};
988988

989+
// LOQ 15AHP9
990+
static const struct model_config model_nzcn = {
991+
.registers = &ec_register_offsets_loq_v0,
992+
.check_embedded_controller_id = true,
993+
.embedded_controller_id = 0x8227,
994+
.memoryio_physical_ec_start = 0xC400,
995+
.memoryio_size = 0x300,
996+
.has_minifancurve = true,
997+
.has_custom_powermode = true,
998+
.access_method_powermode = ACCESS_METHOD_WMI,
999+
.access_method_keyboard = ACCESS_METHOD_WMI2,
1000+
.access_method_fanspeed = ACCESS_METHOD_WMI3,
1001+
.access_method_temperature = ACCESS_METHOD_WMI3,
1002+
.access_method_fancurve = ACCESS_METHOD_EC3,
1003+
.access_method_fanfullspeed = ACCESS_METHOD_WMI3,
1004+
.acpi_check_dev = false,
1005+
.ramio_physical_start = 0xFE0B0400,
1006+
.ramio_size = 0x600
1007+
};
1008+
9891009
static const struct dmi_system_id denylist[] = { {} };
9901010

9911011
static const struct dmi_system_id optimistic_allowlist[] = {
@@ -1352,6 +1372,15 @@ static const struct dmi_system_id optimistic_allowlist[] = {
13521372
},
13531373
.driver_data = (void *)&model_necn
13541374
},
1375+
{
1376+
// e.g. LOQ 15AHP9 (AMD Ryzen 7 8845HS + RTX 4060)
1377+
.ident = "NZCN",
1378+
.matches = {
1379+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1380+
DMI_MATCH(DMI_BIOS_VERSION, "NZCN"),
1381+
},
1382+
.driver_data = (void *)&model_nzcn
1383+
},
13551384
{}
13561385
};
13571386

0 commit comments

Comments
 (0)