Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSI Bravo 15 B7E support #165

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/supported_devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
| Alpha 15 B5EE / B5EEK | 158LEMS1 | Issues:<br>- [#16](https://github.com/BeardOverflow/msi-ec/issues/16)<br> PRs:<br>- [#22](https://github.com/BeardOverflow/msi-ec/pull/22) | 5 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ✔️ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ❌ Keyboard backlight intensity |
| Alpha 17 B5EEK | 17LLEMS1 | Issues:<br>- [#45](https://github.com/BeardOverflow/msi-ec/issues/45)<br> PRs:<br>- [#122](https://github.com/BeardOverflow/msi-ec/pull/122) | 22 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ✔️ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ❌ Keyboard backlight intensity |
| Bravo 15 A4DDR | 16WKEMS1 | Issues:<br>- [#134](https://github.com/BeardOverflow/msi-ec/issues/134)<br> PRs:<br>- [#135](https://github.com/BeardOverflow/msi-ec/pull/135) | 23 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ❌ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ❌ Mic mute LED <br> ❌ Sound mute LED <br> ✔️ Keyboard backlight intensity |
| Bravo 15 B7E | 158PIMS1 | PRs:<br>- [#165](https://github.com/BeardOverflow/msi-ec/pull/165) | 29 | ✔️ Battery thresholds <br> ❌ Webcam toggle <br> ❌ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ✔️ Keyboard backlight intensity |
| Bravo 17 A4DDR / A4DDK | 17FKEMS1 | Issues:<br>- [#20](https://github.com/BeardOverflow/msi-ec/issues/20)<br> PRs:<br>- [#22](https://github.com/BeardOverflow/msi-ec/pull/22) | 7 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ❌ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ❌ Mic mute LED <br> ✔️ Sound mute LED <br> ✔️ Keyboard backlight intensity |
| Delta 15 A5EFK | 15CKEMS1 | Issues:<br>- [#41](https://github.com/BeardOverflow/msi-ec/issues/41)<br> PRs:<br>- [#107](https://github.com/BeardOverflow/msi-ec/pull/107) | 15 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ✔️ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ❌ Keyboard backlight intensity |
| Cyborg 15 A12VF | 15K1IMS1 | Issues:<br>- [#90](https://github.com/BeardOverflow/msi-ec/issues/90)<br> PRs:<br>- [#102](https://github.com/BeardOverflow/msi-ec/pull/102) | 17 | ✔️ Battery thresholds <br> ✔️ Webcam toggle <br> ✔️ Webcam block <br> ✔️ Fn <-> Win <br> ✔️ Cooler boost <br> ✔️ Shift mode <br> ✔️ Fan mode <br> ✔️ Mic mute LED <br> ✔️ Sound mute LED <br> ✔️ Keyboard backlight intensity |
Expand Down
79 changes: 79 additions & 0 deletions msi-ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2381,6 +2381,84 @@ static struct msi_ec_conf CONF28 __initdata = {
},
};

static const char *ALLOWED_FW_29[] __initconst = {
"158PIMS1.207", // Bravo 15 B7E
NULL
};

static struct msi_ec_conf CONF29 __initdata = {
.allowed_fw = ALLOWED_FW_29,
.charge_control = {
.address = 0xd7,
.offset_start = 0x8a,
.offset_end = 0x80,
.range_min = 0x8a,
.range_max = 0xe4,
},
.webcam = {
.address = MSI_EC_ADDR_UNSUPP,
.block_address = MSI_EC_ADDR_UNSUPP,
.bit = 1,
},
.fn_win_swap = {
.address = 0xe8,
.bit = 4,
.invert = false,
},
.cooler_boost = {
.address = 0x98,
.bit = 7,
},
.shift_mode = {
.address = 0xd2,
.modes = {
{ SM_ECO_NAME, 0xc2 },
{ SM_COMFORT_NAME, 0xc1 },
{ SM_TURBO_NAME, 0xc4 },
MSI_EC_MODE_NULL
},
},
.super_battery = {
.address = MSI_EC_ADDR_UNKNOWN,
.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 = MSI_EC_ADDR_UNKNOWN,
.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,
},
.gpu = {
.rt_temp_address = MSI_EC_ADDR_UNSUPP,
.rt_fan_speed_address = MSI_EC_ADDR_UNKNOWN,
},
.leds = {
.micmute_led_address = 0x2c,
.mute_led_address = 0x2d,
.bit = 1,
},
.kbd_bl = {
.bl_mode_address = MSI_EC_ADDR_UNSUPP,
.bl_modes = { },
.max_mode = 1,
.bl_state_address = 0xd3,
.state_base_value = 0x80,
.max_state = 3,
},
};

static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF0,
&CONF1,
Expand Down Expand Up @@ -2411,6 +2489,7 @@ static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF26,
&CONF27,
&CONF28,
&CONF29,
NULL
};

Expand Down