Skip to content

Commit ea5f6ad

Browse files
committed
Merge tag 'platform-drivers-x86-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Hans de Goede: - New drivers/platform/arm64 directory for arm64 embedded-controller drivers - New drivers: - Acer Aspire 1 embedded controllers (for arm64 models) - ACPI quickstart PNP0C32 buttons - Dell All-In-One backlight support (dell-uart-backlight) - Lenovo WMI camera buttons - Lenovo Yoga Tablet 2 Pro 1380F/L fast charging - MeeGoPad ANX7428 Type-C Cross Switch (power sequencing only) - MSI WMI sensors (fan speed sensors only for now) - Asus WMI: - 2024 ROG Mini-LED support - MCU powersave support - Vivobook GPU MUX support - Misc. other improvements - Ideapad laptop: - Export FnLock LED as LED class device - Switch platform profiles using thermal management key - Intel drivers: - IFS: various improvements - PMC: Lunar Lake support - SDSI: various improvements - TPMI/ISST: various improvements - tools: intel-speed-select: various improvements - MS Surface drivers: - Fan profile switching support - Surface Pro thermal sensors support - ThinkPad ACPI: - Reworked hotkey support to use sparse keymaps - Add support for new trackpoint-doubletap, Fn+N and Fn+G hotkeys - WMI core: - New WMI driver development guide - x86 Android tablets: - Lenovo Yoga Tablet 2 Pro 1380F/L support - Xiaomi MiPad 2 status LED and bezel touch buttons backlight support - Miscellaneous cleanups / fixes / improvements * tag 'platform-drivers-x86-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (128 commits) platform/x86: Add new MeeGoPad ANX7428 Type-C Cross Switch driver devm-helpers: Fix a misspelled cancellation in the comments tools arch x86: Add dell-uart-backlight-emulator platform/x86: Add new Dell UART backlight driver platform/x86: x86-android-tablets: Create LED device for Xiaomi Pad 2 bottom bezel touch buttons platform/x86: x86-android-tablets: Xiaomi pad2 RGB LED fwnode updates platform/x86: x86-android-tablets: Pass struct device to init() platform/x86/amd: pmc: Add new ACPI ID AMDI000B platform/x86/amd: pmf: Add new ACPI ID AMDI0105 platform/x86: p2sb: Don't init until unassigned resources have been assigned platform/surface: aggregator: Log critical errors during SAM probing platform/x86: ISST: Support SST-BF and SST-TF per level platform/x86/fujitsu-laptop: Replace sprintf() with sysfs_emit() tools/power/x86/intel-speed-select: v1.19 release tools/power/x86/intel-speed-select: Display CPU as None for -1 tools/power/x86/intel-speed-select: SST BF/TF support per level tools/power/x86/intel-speed-select: Increase number of CPUs displayed tools/power/x86/intel-speed-select: Present all TRL levels for turbo-freq tools/power/x86/intel-speed-select: Fix display for unsupported levels tools/power/x86/intel-speed-select: Support multiple dies ...
2 parents b426433 + 2513563 commit ea5f6ad

File tree

85 files changed

+5938
-1197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+5938
-1197
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
What: /sys/kernel/debug/msi-wmi-platform-<wmi_device_name>/*
2+
Date: April 2024
3+
KernelVersion: 6.10
4+
Contact: Armin Wolf <W_Armin@gmx.de>
5+
Description:
6+
This file allows to execute the associated WMI method with the same name.
7+
8+
To start the execution, write a buffer containing the method arguments
9+
at file offset 0. Partial writes or writes at a different offset are not
10+
supported.
11+
12+
The buffer returned by the WMI method can then be read from the file.
13+
14+
See Documentation/wmi/devices/msi-wmi-platform.rst for details.

Documentation/ABI/testing/sysfs-platform-asus-wmi

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ Description:
126126
Change the mini-LED mode:
127127
* 0 - Single-zone,
128128
* 1 - Multi-zone
129+
* 2 - Multi-zone strong (available on newer generation mini-led)
130+
131+
What: /sys/devices/platform/<platform>/available_mini_led_mode
132+
Date: Apr 2024
133+
KernelVersion: 6.10
134+
Contact: "Luke Jones" <luke@ljones.dev>
135+
Description:
136+
List the available mini-led modes.
129137

130138
What: /sys/devices/platform/<platform>/ppt_pl1_spl
131139
Date: Jun 2023
@@ -186,3 +194,21 @@ Contact: "Luke Jones" <luke@ljones.dev>
186194
Description:
187195
Set the target temperature limit of the Nvidia dGPU:
188196
* min=75, max=87
197+
198+
What: /sys/devices/platform/<platform>/boot_sound
199+
Date: Apr 2024
200+
KernelVersion: 6.10
201+
Contact: "Luke Jones" <luke@ljones.dev>
202+
Description:
203+
Set if the BIOS POST sound is played on boot.
204+
* 0 - False,
205+
* 1 - True
206+
207+
What: /sys/devices/platform/<platform>/mcu_powersave
208+
Date: Apr 2024
209+
KernelVersion: 6.10
210+
Contact: "Luke Jones" <luke@ljones.dev>
211+
Description:
212+
Set if the MCU can go in to low-power mode on system sleep
213+
* 0 - False,
214+
* 1 - True
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/platform/acer,aspire1-ec.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Acer Aspire 1 Embedded Controller
8+
9+
maintainers:
10+
- Nikita Travkin <nikita@trvn.ru>
11+
12+
description:
13+
The Acer Aspire 1 laptop uses an embedded controller to control battery
14+
and charging as well as to provide a set of misc features such as the
15+
laptop lid status and HPD events for the USB Type-C DP alt mode.
16+
17+
properties:
18+
compatible:
19+
const: acer,aspire1-ec
20+
21+
reg:
22+
const: 0x76
23+
24+
interrupts:
25+
maxItems: 1
26+
27+
connector:
28+
$ref: /schemas/connector/usb-connector.yaml#
29+
30+
required:
31+
- compatible
32+
- reg
33+
- interrupts
34+
35+
additionalProperties: false
36+
37+
examples:
38+
- |
39+
#include <dt-bindings/interrupt-controller/irq.h>
40+
i2c {
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
44+
embedded-controller@76 {
45+
compatible = "acer,aspire1-ec";
46+
reg = <0x76>;
47+
48+
interrupts-extended = <&tlmm 30 IRQ_TYPE_LEVEL_LOW>;
49+
50+
connector {
51+
compatible = "usb-c-connector";
52+
53+
port {
54+
ec_dp_in: endpoint {
55+
remote-endpoint = <&mdss_dp_out>;
56+
};
57+
};
58+
};
59+
};
60+
};
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
===================================================
4+
MSI WMI Platform Features driver (msi-wmi-platform)
5+
===================================================
6+
7+
Introduction
8+
============
9+
10+
Many MSI notebooks support various features like reading fan sensors. This features are controlled
11+
by the embedded controller, with the ACPI firmware exposing a standard ACPI WMI interface on top
12+
of the embedded controller interface.
13+
14+
WMI interface description
15+
=========================
16+
17+
The WMI interface description can be decoded from the embedded binary MOF (bmof)
18+
data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility:
19+
20+
::
21+
22+
[WMI, Locale("MS\0x409"),
23+
Description("This class contains the definition of the package used in other classes"),
24+
guid("{ABBC0F60-8EA1-11d1-00A0-C90629100000}")]
25+
class Package {
26+
[WmiDataId(1), read, write, Description("16 bytes of data")] uint8 Bytes[16];
27+
};
28+
29+
[WMI, Locale("MS\0x409"),
30+
Description("This class contains the definition of the package used in other classes"),
31+
guid("{ABBC0F63-8EA1-11d1-00A0-C90629100000}")]
32+
class Package_32 {
33+
[WmiDataId(1), read, write, Description("32 bytes of data")] uint8 Bytes[32];
34+
};
35+
36+
[WMI, Dynamic, Provider("WmiProv"), Locale("MS\0x409"),
37+
Description("Class used to operate methods on a package"),
38+
guid("{ABBC0F6E-8EA1-11d1-00A0-C90629100000}")]
39+
class MSI_ACPI {
40+
[key, read] string InstanceName;
41+
[read] boolean Active;
42+
43+
[WmiMethodId(1), Implemented, read, write, Description("Return the contents of a package")]
44+
void GetPackage([out, id(0)] Package Data);
45+
46+
[WmiMethodId(2), Implemented, read, write, Description("Set the contents of a package")]
47+
void SetPackage([in, id(0)] Package Data);
48+
49+
[WmiMethodId(3), Implemented, read, write, Description("Return the contents of a package")]
50+
void Get_EC([out, id(0)] Package_32 Data);
51+
52+
[WmiMethodId(4), Implemented, read, write, Description("Set the contents of a package")]
53+
void Set_EC([in, id(0)] Package_32 Data);
54+
55+
[WmiMethodId(5), Implemented, read, write, Description("Return the contents of a package")]
56+
void Get_BIOS([in, out, id(0)] Package_32 Data);
57+
58+
[WmiMethodId(6), Implemented, read, write, Description("Set the contents of a package")]
59+
void Set_BIOS([in, out, id(0)] Package_32 Data);
60+
61+
[WmiMethodId(7), Implemented, read, write, Description("Return the contents of a package")]
62+
void Get_SMBUS([in, out, id(0)] Package_32 Data);
63+
64+
[WmiMethodId(8), Implemented, read, write, Description("Set the contents of a package")]
65+
void Set_SMBUS([in, out, id(0)] Package_32 Data);
66+
67+
[WmiMethodId(9), Implemented, read, write, Description("Return the contents of a package")]
68+
void Get_MasterBattery([in, out, id(0)] Package_32 Data);
69+
70+
[WmiMethodId(10), Implemented, read, write, Description("Set the contents of a package")]
71+
void Set_MasterBattery([in, out, id(0)] Package_32 Data);
72+
73+
[WmiMethodId(11), Implemented, read, write, Description("Return the contents of a package")]
74+
void Get_SlaveBattery([in, out, id(0)] Package_32 Data);
75+
76+
[WmiMethodId(12), Implemented, read, write, Description("Set the contents of a package")]
77+
void Set_SlaveBattery([in, out, id(0)] Package_32 Data);
78+
79+
[WmiMethodId(13), Implemented, read, write, Description("Return the contents of a package")]
80+
void Get_Temperature([in, out, id(0)] Package_32 Data);
81+
82+
[WmiMethodId(14), Implemented, read, write, Description("Set the contents of a package")]
83+
void Set_Temperature([in, out, id(0)] Package_32 Data);
84+
85+
[WmiMethodId(15), Implemented, read, write, Description("Return the contents of a package")]
86+
void Get_Thermal([in, out, id(0)] Package_32 Data);
87+
88+
[WmiMethodId(16), Implemented, read, write, Description("Set the contents of a package")]
89+
void Set_Thermal([in, out, id(0)] Package_32 Data);
90+
91+
[WmiMethodId(17), Implemented, read, write, Description("Return the contents of a package")]
92+
void Get_Fan([in, out, id(0)] Package_32 Data);
93+
94+
[WmiMethodId(18), Implemented, read, write, Description("Set the contents of a package")]
95+
void Set_Fan([in, out, id(0)] Package_32 Data);
96+
97+
[WmiMethodId(19), Implemented, read, write, Description("Return the contents of a package")]
98+
void Get_Device([in, out, id(0)] Package_32 Data);
99+
100+
[WmiMethodId(20), Implemented, read, write, Description("Set the contents of a package")]
101+
void Set_Device([in, out, id(0)] Package_32 Data);
102+
103+
[WmiMethodId(21), Implemented, read, write, Description("Return the contents of a package")]
104+
void Get_Power([in, out, id(0)] Package_32 Data);
105+
106+
[WmiMethodId(22), Implemented, read, write, Description("Set the contents of a package")]
107+
void Set_Power([in, out, id(0)] Package_32 Data);
108+
109+
[WmiMethodId(23), Implemented, read, write, Description("Return the contents of a package")]
110+
void Get_Debug([in, out, id(0)] Package_32 Data);
111+
112+
[WmiMethodId(24), Implemented, read, write, Description("Set the contents of a package")]
113+
void Set_Debug([in, out, id(0)] Package_32 Data);
114+
115+
[WmiMethodId(25), Implemented, read, write, Description("Return the contents of a package")]
116+
void Get_AP([in, out, id(0)] Package_32 Data);
117+
118+
[WmiMethodId(26), Implemented, read, write, Description("Set the contents of a package")]
119+
void Set_AP([in, out, id(0)] Package_32 Data);
120+
121+
[WmiMethodId(27), Implemented, read, write, Description("Return the contents of a package")]
122+
void Get_Data([in, out, id(0)] Package_32 Data);
123+
124+
[WmiMethodId(28), Implemented, read, write, Description("Set the contents of a package")]
125+
void Set_Data([in, out, id(0)] Package_32 Data);
126+
127+
[WmiMethodId(29), Implemented, read, write, Description("Return the contents of a package")]
128+
void Get_WMI([out, id(0)] Package_32 Data);
129+
};
130+
131+
Due to a peculiarity in how Windows handles the ``CreateByteField()`` ACPI operator (errors only
132+
happen when a invalid byte field is ultimately accessed), all methods require a 32 byte input
133+
buffer, even if the Binay MOF says otherwise.
134+
135+
The input buffer contains a single byte to select the subfeature to be accessed and 31 bytes of
136+
input data, the meaning of which depends on the subfeature being accessed.
137+
138+
The output buffer contains a singe byte which signals success or failure (``0x00`` on failure)
139+
and 31 bytes of output data, the meaning if which depends on the subfeature being accessed.
140+
141+
WMI method Get_EC()
142+
-------------------
143+
144+
Returns embedded controller information, the selected subfeature does not matter. The output
145+
data contains a flag byte and a 28 byte controller firmware version string.
146+
147+
The first 4 bits of the flag byte contain the minor version of the embedded controller interface,
148+
with the next 2 bits containing the major version of the embedded controller interface.
149+
150+
The 7th bit signals if the embedded controller page chaged (exact meaning is unknown), and the
151+
last bit signals if the platform is a Tigerlake platform.
152+
153+
The MSI software seems to only use this interface when the last bit is set.
154+
155+
WMI method Get_Fan()
156+
--------------------
157+
158+
Fan speed sensors can be accessed by selecting subfeature ``0x00``. The output data contains
159+
up to four 16-bit fan speed readings in big-endian format. Most machines do not support all
160+
four fan speed sensors, so the remaining reading are hardcoded to ``0x0000``.
161+
162+
The fan RPM readings can be calculated with the following formula:
163+
164+
RPM = 480000 / <fan speed reading>
165+
166+
If the fan speed reading is zero, then the fan RPM is zero too.
167+
168+
WMI method Get_WMI()
169+
--------------------
170+
171+
Returns the version of the ACPI WMI interface, the selected subfeature does not matter.
172+
The output data contains two bytes, the first one contains the major version and the last one
173+
contains the minor revision of the ACPI WMI interface.
174+
175+
The MSI software seems to only use this interface when the major version is greater than two.
176+
177+
Reverse-Engineering the MSI WMI Platform interface
178+
==================================================
179+
180+
.. warning:: Randomly poking the embedded controller interface can potentially cause damage
181+
to the machine and other unwanted side effects, please be careful.
182+
183+
The underlying embedded controller interface is used by the ``msi-ec`` driver, and it seems
184+
that many methods just copy a part of the embedded controller memory into the output buffer.
185+
186+
This means that the remaining WMI methods can be reverse-engineered by looking which part of
187+
the embedded controller memory is accessed by the ACPI AML code. The driver also supports a
188+
debugfs interface for directly executing WMI methods. Additionally, any safety checks regarding
189+
unsupported hardware can be disabled by loading the module with ``force=true``.
190+
191+
More information about the MSI embedded controller interface can be found at the
192+
`msi-ec project <https://github.com/BeardOverflow/msi-ec>`_.
193+
194+
Special thanks go to github user `glpnk` for showing how to decode the fan speed readings.

0 commit comments

Comments
 (0)