From f4db686c5b498348ce5dcde58b6aa19b42ca5d4e Mon Sep 17 00:00:00 2001 From: GlitchPunk <16731610+glpnk@users.noreply.github.com> Date: Sun, 14 Jan 2024 20:05:30 +0300 Subject: [PATCH] add new model "15K1IMS1.110" MSI CYBORG 12 A12VF --- README.md | 1 + msi-ec.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/README.md b/README.md index 7aba213..cdd8f31 100644 --- a/README.md +++ b/README.md @@ -241,3 +241,4 @@ Set this parameter to a supported EC firmware version to use its configuration a - Prestige 15 A11SCX (16S6EMS1) - Alpha 17 B5EEK (17LLEMS1) - Katana 17 B11UCX (17L2EMS1) +- Cyborg 15 A12VF (15K1IMS1) diff --git a/msi-ec.c b/msi-ec.c index 219bc45..248ca24 100644 --- a/msi-ec.c +++ b/msi-ec.c @@ -1237,6 +1237,88 @@ static struct msi_ec_conf CONF14 __initdata = { }, }; +static const char *ALLOWED_FW_15[] __initconst = { + "15K1IMS1.110", // MSI CYBORG 12 A12VF + NULL +}; + +static struct msi_ec_conf CONF15 __initdata = { + .allowed_fw = ALLOWED_FW_15, + .charge_control = { + .address = 0xd7, + .offset_start = 0x8a, + .offset_end = 0x80, + .range_min = 0x8a, + .range_max = 0xe4, + }, + // .usb_share { + // .address = 0xbf, // states: 0x08 || 0x28 + // .bit = 5, + // }, // Like Katana 17 B11UCX + .webcam = { + .address = 0x2e, + .block_address = 0x2f, + .bit = 1, + }, + .fn_win_swap = { + .address = 0xe8, + .bit = 4, // 0x01-0x11 + }, + .cooler_boost = { + .address = 0x98, + .bit = 7, + }, + .shift_mode = { + .address = 0xd2, + .modes = { + { SM_ECO_NAME, 0xc2 }, // super battery + { SM_COMFORT_NAME, 0xc1 }, // balanced + { SM_TURBO_NAME, 0xc4 }, // extreme + MSI_EC_MODE_NULL + }, + }, + .super_battery = { + .address = 0xeb, // 0x0F ( on ) or 0x00 ( off ) on 0xEB + .mask = 0x0f, // 00, 0f + }, + .fan_mode = { + .address = 0xd4, + .modes = { + { FM_AUTO_NAME, 0x0d }, + { FM_SILENT_NAME, 0x1d }, + { FM_ADVANCED_NAME, 0x8d }, + MSI_EC_MODE_NULL + }, + }, + .cpu = { + .rt_temp_address = 0x68, + .rt_fan_speed_address = 0x71, + .rt_fan_speed_base_min = 0x00, + .rt_fan_speed_base_max = 0x96, + .bs_fan_speed_address = MSI_EC_ADDR_UNSUPP, + .bs_fan_speed_base_min = 0x00, + .bs_fan_speed_base_max = 0x0f, + // n/rpm register is C9 + }, + .gpu = { + .rt_temp_address = 0x80, + .rt_fan_speed_address = 0x89, + }, + .leds = { + .micmute_led_address = 0x2c, + .mute_led_address = 0x2d, + .bit = 1, + }, + .kbd_bl = { + .bl_mode_address = 0x2c, // KB auto turn off + .bl_modes = { 0x00, 0x08 }, // always on; off after 10 sec + .max_mode = 1, + .bl_state_address = 0xd3, + .state_base_value = 0x80, + .max_state = 3, + }, +}; + static struct msi_ec_conf *CONFIGURATIONS[] __initdata = { &CONF0, &CONF1, @@ -1253,6 +1335,7 @@ static struct msi_ec_conf *CONFIGURATIONS[] __initdata = { &CONF12, &CONF13, &CONF14, + &CONF15, NULL };