forked from ChimeraOS/chimeraos
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
From f85ba7b3943013178cd242a454dd3f190387f73d Mon Sep 17 00:00:00 2001 | ||
From: honjow <[email protected]> | ||
Date: Tue, 4 Mar 2025 12:15:34 +0800 | ||
Subject: [PATCH] MSI-EC: Add Claw 8 | ||
|
||
--- | ||
msi-ec.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1 file changed, 68 insertions(+) | ||
|
||
diff --git a/msi-ec.c b/msi-ec.c | ||
index 4d55ebb..fe8227e 100644 | ||
--- a/msi-ec.c | ||
+++ b/msi-ec.c | ||
@@ -3018,6 +3018,73 @@ static struct msi_ec_conf CONF42 __initdata = { | ||
}, | ||
}; | ||
|
||
+static const char *ALLOWED_FW_43[] __initconst = { | ||
+ "1T52EMS1.104", // MSI Claw 8 AI+ A2VM | ||
+ NULL | ||
+}; | ||
+ | ||
+static struct msi_ec_conf CONF43 __initdata = { | ||
+ .allowed_fw = ALLOWED_FW_43, | ||
+ .charge_control_address = 0xd7, | ||
+ .webcam = { | ||
+ .address = MSI_EC_ADDR_UNSUPP, | ||
+ .block_address = 0x2f, | ||
+ .bit = 1, | ||
+ }, | ||
+ .fn_win_swap = { | ||
+ .address = MSI_EC_ADDR_UNSUPP, | ||
+ .bit = 4, | ||
+ .invert = false, | ||
+ }, | ||
+ .cooler_boost = { | ||
+ .address = 0x98, | ||
+ .bit = 7, | ||
+ }, | ||
+ .shift_mode = { | ||
+ .address = 0xd2, | ||
+ .modes = { | ||
+ { SM_ECO_NAME, 0xc2 }, | ||
+ { SM_COMFORT_NAME, 0xc1 }, | ||
+ { SM_SPORT_NAME, 0xc0 }, | ||
+ MSI_EC_MODE_NULL | ||
+ }, | ||
+ }, | ||
+ .super_battery = { | ||
+ .address = MSI_EC_ADDR_UNSUPP, | ||
+ .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, | ||
+ }, | ||
+ .gpu = { | ||
+ .rt_temp_address = 0x80, | ||
+ .rt_fan_speed_address = 0x89, | ||
+ }, | ||
+ .leds = { | ||
+ .micmute_led_address = MSI_EC_ADDR_UNSUPP, | ||
+ .mute_led_address = MSI_EC_ADDR_UNSUPP, | ||
+ .bit = 1, | ||
+ }, | ||
+ .kbd_bl = { | ||
+ .bl_mode_address = MSI_EC_ADDR_UNSUPP, // KB auto turn off | ||
+ .bl_modes = { 0x00, 0x08 }, // always on; off after 10 sec | ||
+ .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, | ||
@@ -3062,6 +3129,7 @@ static struct msi_ec_conf *CONFIGURATIONS[] __initdata = { | ||
&CONF40, | ||
&CONF41, | ||
&CONF42, | ||
+ &CONF43, | ||
NULL | ||
}; | ||
|
||
-- | ||
2.39.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Maintainer: steelt <steeltitanium1 at gmail dot com> | ||
|
||
_pkgbase=msi-ec | ||
pkgname=msi-ec-dkms-git | ||
pkgver=r415.f169e6a | ||
pkgrel=1 | ||
pkgdesc="Driver for MSI laptop EC (DKMS)" | ||
arch=('x86_64') | ||
license=('GPL2') | ||
url="https://github.com/BeardOverflow/msi-ec" | ||
depends=('dkms') | ||
makedepends=('git') | ||
conflicts=("${_pkgbase}") | ||
source=( | ||
"git+https://github.com/BeardOverflow/msi-ec.git" | ||
"dkms.conf" | ||
"0001-MSI-EC-Add-Claw-8.patch" | ||
) | ||
sha256sums=('SKIP' | ||
'f2846d9e9b3734dbdeb41dafde34ec5b5fd2353732cb30cf2606ba89083e1875' | ||
'83b5ad63d70420ac0aa20c342fb4e43edae357332584e65b06a8f72257cad475' | ||
) | ||
|
||
pkgver() { | ||
cd ${_pkgbase} | ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | ||
} | ||
|
||
prepare() { | ||
cd ${_pkgbase} | ||
|
||
local src | ||
for src in "${source[@]}"; do | ||
[[ $src = *.patch ]] || continue | ||
patch -p1 < "${srcdir}"/$src | ||
done | ||
} | ||
|
||
package() { | ||
install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf | ||
|
||
sed -e "s/@VERSION@/${pkgver}/" \ | ||
-i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf | ||
|
||
cd "${_pkgbase}" | ||
|
||
install -Dm644 -t "${pkgdir}/usr/src/${_pkgbase}-${pkgver}" \ | ||
Makefile \ | ||
msi-ec.c \ | ||
ec_memory_configuration.h | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
MAKE[0]="make TARGET=${kernelver}" | ||
CLEAN="make clean" | ||
PACKAGE_NAME="msi_ec" | ||
PACKAGE_VERSION="@VERSION@" | ||
BUILT_MODULE_NAME[0]="msi-ec" | ||
DEST_MODULE_LOCATION[0]="/kernel/drivers/platform/x86" | ||
AUTOINSTALL="yes" |