From d9cc35efd3358d7b848fb99de119134f491070e6 Mon Sep 17 00:00:00 2001
From: AnonCoder3 <180214487+AnonCoder3@users.noreply.github.com>
Date: Mon, 30 Dec 2024 07:26:57 -0600
Subject: [PATCH] Added `15M2IMS1.113` (#156)
---
docs/supported_devices.md | 1 +
msi-ec.c | 85 +++++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+)
diff --git a/docs/supported_devices.md b/docs/supported_devices.md
index c5b7b00..ec0c522 100644
--- a/docs/supported_devices.md
+++ b/docs/supported_devices.md
@@ -35,6 +35,7 @@
| Modern 15 A5M | 155LEMS1 | Issues:
- [#4](https://github.com/BeardOverflow/msi-ec/issues/4)
- [#57](https://github.com/BeardOverflow/msi-ec/issues/57)
- [#83](https://github.com/BeardOverflow/msi-ec/issues/83)
PRs:
- [#66](https://github.com/BeardOverflow/msi-ec/pull/66) | 16 | ✔️ Battery thresholds
✔️ Webcam toggle
✔️ Webcam block
✔️ Fn <-> Win
✔️ Cooler boost
✔️ Shift mode
✔️ Fan mode
✔️ Mic mute LED
✔️ Sound mute LED
✔️ Keyboard backlight intensity |
| Modern 15 A11M | 1552EMS1 | Issues:
- [#48](https://github.com/BeardOverflow/msi-ec/issues/48)
- [#174](https://github.com/BeardOverflow/msi-ec/issues/174)
PRs:
- [#40](https://github.com/BeardOverflow/msi-ec/pull/40)
- [#125](https://github.com/BeardOverflow/msi-ec/pull/125)
- [#175](https://github.com/BeardOverflow/msi-ec/pull/175) | 2 | ✔️ Battery thresholds
✔️ Webcam toggle
✔️ Webcam block
✔️ Fn <-> Win
✔️ Cooler boost
✔️ Shift mode
✔️ Fan mode
✔️ Mic mute LED
✔️ Sound mute LED
✔️ Keyboard backlight intensity |
| Modern 15 B7M | 15HKEMS1 | Issues:
- [#89](https://github.com/BeardOverflow/msi-ec/issues/89)
PRs:
- [#91](https://github.com/BeardOverflow/msi-ec/pull/91) | 18 | ✔️ Battery thresholds
✔️ Webcam toggle
✔️ Webcam block
✔️ Fn <-> Win
✔️ Cooler boost
✔️ Shift mode
✔️ Fan mode
✔️ Mic mute LED
✔️ Sound mute LED
✔️ Keyboard backlight intensity |
+| Raider GE68HX | 15M2IMS1 | Issues:
- [#156](https://github.com/BeardOverflow/msi-ec/issues/156)
PRs:
- | 34 | ✔️ Battery thresholds
✔️ Webcam toggle
❌ Webcam block
✔️ Fn <-> Win
✔️ Cooler boost
✔️ Shift mode
✔️ Fan mode
✔️ Mic mute LED
✔️ Sound mute LED
✔️ Keyboard backlight intensity |
| Raider GE78HX SmartTouchpad | 17S2IMS1 | PRs:
- [#50](https://github.com/BeardOverflow/msi-ec/pull/50) | 27 | ✔️ Battery thresholds
✔️ Webcam toggle
✔️ Webcam block
✔️ Fn <-> Win
✔️ Cooler boost
✔️ Shift mode
✔️ Fan mode
✔️ Mic mute LED
✔️ Sound mute LED
❌ Keyboard backlight intensity |
| Summit E14 Evo A12M | 14F1EMS1 | Issues:
- [#24](https://github.com/BeardOverflow/msi-ec/issues/24)
- [#103](https://github.com/BeardOverflow/msi-ec/issues/103)
PRs:
- [#30](https://github.com/BeardOverflow/msi-ec/pull/30)
- [#79](https://github.com/BeardOverflow/msi-ec/pull/79)
- [#110](https://github.com/BeardOverflow/msi-ec/pull/110) | 8 | ✔️ Battery thresholds
✔️ Webcam toggle
✔️ Webcam block
✔️ Fn <-> Win
✔️ Cooler boost
✔️ Shift mode
✔️ Fan mode
❌ Mic mute LED
✔️ Sound mute LED
✔️ Keyboard backlight intensity |
| Summit E14 Flip Evo A13MT | 14F1EMS1 | Issues:
- [#136](https://github.com/BeardOverflow/msi-ec/issues/136)
PRs:
- [#144](https://github.com/BeardOverflow/msi-ec/pull/144) | 25 | ✔️ Battery thresholds
✔️ Webcam toggle
✔️ Webcam block
✔️ Fn <-> Win
✔️ Cooler boost
✔️ Shift mode
⭕ Fan mode
✔️ Mic mute LED
✔️ Sound mute LED
✔️ Keyboard backlight intensity |
diff --git a/msi-ec.c b/msi-ec.c
index f14ba56..d1b8246 100644
--- a/msi-ec.c
+++ b/msi-ec.c
@@ -2705,6 +2705,90 @@ static struct msi_ec_conf CONF32 __initdata = {
},
};
+static const char *ALLOWED_FW_34[] __initconst = {
+ "15M2IMS1.113", // Raider GE68HX 13VG
+ NULL
+};
+
+static struct msi_ec_conf CONF34 __initdata = {
+ .allowed_fw = ALLOWED_FW_34, // WMI2 based
+ .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,
+ // },
+ .webcam = {
+ .address = 0x2e,
+ .block_address = MSI_EC_ADDR_UNSUPP, // not in MSI app
+ .bit = 1,
+ },
+ .fn_win_swap = {
+ .address = 0xe8,
+ .bit = 4,
+ .invert = true,
+ },
+ .cooler_boost = {
+ .address = 0x98,
+ .bit = 7,
+ },
+ .shift_mode = {
+ .address = 0xd2,
+ .modes = {
+ { SM_COMFORT_NAME, 0xc1 }, // Silent / Balanced / AI
+ { SM_ECO_NAME, 0xc2 }, // Super Battery
+ { SM_TURBO_NAME, 0xc4 }, // Performance
+ MSI_EC_MODE_NULL
+ },
+ },
+ .super_battery = {
+ .address = 0xeb,
+ .mask = 0x0f,
+ },
+ .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,
+ // Fan rpm is 480000 / value at combined: c8..c9
+ },
+ .gpu = {
+ .rt_temp_address = 0x80,
+ .rt_fan_speed_address = 0x89,
+ // Fan rpm is 480000 / value at combined: ca..cb
+ },
+ .leds = {
+ .micmute_led_address = 0x2c,
+ .mute_led_address = 0x2d,
+ .bit = 1,
+ },
+ .kbd_bl = {
+ .bl_mode_address = MSI_EC_ADDR_UNSUPP,
+ .bl_modes = { 0x00, 0x08 },
+ .max_mode = 1,
+ .bl_state_address = MSI_EC_ADDR_UNSUPP,
+ .state_base_value = 0x80,
+ .max_state = 3,
+ },
+};
+
static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF0,
&CONF1,
@@ -2739,6 +2823,7 @@ static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF30,
&CONF31,
&CONF32,
+ &CONF34,
NULL
};