Skip to content

Commit

Permalink
Merge pull request #66 from teackot/modern-15-a5m
Browse files Browse the repository at this point in the history
Add MSI Modern 15 A5M (155LEMS1.106) support
  • Loading branch information
teackot authored Feb 5, 2024
2 parents 5ffe01e + a2efbc2 commit 4f0d5eb
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root = true

[*]
indent_style = tab
indent_size = 8
tab_width = 8
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
/msi-ec.mod.c
/Module.symvers
/modules.order
.vscode
.vscode
.cache
compile_commands.json
80 changes: 80 additions & 0 deletions msi-ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,85 @@ static struct msi_ec_conf CONF15 __initdata = {
},
};

/* MSI Modern 15 A5M */
static const char *ALLOWED_FW_16[] __initconst = {
"155LEMS1.105",
"155LEMS1.106",
NULL
};

static struct msi_ec_conf CONF16 __initdata = {
.allowed_fw = ALLOWED_FW_16,
.charge_control = {
.address = 0xef,
.offset_start = 0x8a,
.offset_end = 0x80,
.range_min = 0x8a,
.range_max = 0xe4,
},
.webcam = {
.address = 0x2e,
.block_address = 0x2f,
.bit = 1,
},
.fn_win_swap = {
.address = 0xbf,
.bit = 4,
},
.cooler_boost = {
.address = 0x98,
.bit = 7,
},
.shift_mode = {
.address = 0xf2,
.modes = {
{ SM_ECO_NAME, 0xc2 },
{ SM_COMFORT_NAME, 0xc1 },
{ SM_SPORT_NAME, 0xc0 },
MSI_EC_MODE_NULL
},
},
.super_battery = {
.address = MSI_EC_ADDR_UNKNOWN, // 0xed
.mask = 0x0f, // a5, a4, a2
},
.fan_mode = {
.address = 0xf4,
.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 = 0x19,
.rt_fan_speed_base_max = 0x37,
.bs_fan_speed_address = MSI_EC_ADDR_UNSUPP,
.bs_fan_speed_base_min = 0x00,
.bs_fan_speed_base_max = 0x0f,
},
.gpu = {
.rt_temp_address = MSI_EC_ADDR_UNKNOWN,
.rt_fan_speed_address = MSI_EC_ADDR_UNKNOWN,
},
.leds = {
.micmute_led_address = 0x2b,
.mute_led_address = 0x2c,
.bit = 2,
},
.kbd_bl = {
.bl_mode_address = MSI_EC_ADDR_UNKNOWN,
.bl_modes = { 0x00, 0x08 },
.max_mode = 1,
.bl_state_address = 0xf3,
.state_base_value = 0x80,
.max_state = 3,
},
};

static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF0,
&CONF1,
Expand All @@ -1333,6 +1412,7 @@ static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF13,
&CONF14,
&CONF15,
&CONF16,
NULL
};

Expand Down

0 comments on commit 4f0d5eb

Please sign in to comment.