Skip to content
Open
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
67 changes: 64 additions & 3 deletions Documentation/wmi/devices/lenovo-wmi-other.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,32 @@ under the following path:

/sys/class/firmware-attributes/lenovo-wmi-other/attributes/<attribute>/

Additionally, this driver also exports attributes to HWMON.

LENOVO_CAPABILITY_DATA_00
-------------------------

WMI GUID ``362A3AFE-3D96-4665-8530-96DAD5BB300E``

The LENOVO_CAPABILITY_DATA_00 interface provides various information that
does not rely on the gamezone thermal mode.

The following HWMON attributes are implemented:
- fanX_div: internal RPM divisor
- fanX_input: current RPM
- fanX_target: target RPM (tunable, 0=auto)

Due to the internal RPM divisor, the current/target RPMs are rounded down to
its nearest multiple. The divisor itself is not necessary to be a power of two.

LENOVO_CAPABILITY_DATA_01
-------------------------

WMI GUID ``7A8F5407-CB67-4D6E-B547-39B3BE018154``

The LENOVO_CAPABILITY_DATA_01 interface provides information on various
power limits of integrated CPU and GPU components.
The LENOVO_CAPABILITY_DATA_01 interface provides various information that
relies on the gamezone thermal mode, including power limits of integrated
CPU and GPU components.

Each attribute has the following properties:
- current_value
Expand All @@ -48,11 +67,43 @@ Each attribute has the following properties:
- scalar_increment
- type

The following attributes are implemented:
The following firmware-attributes are implemented:
- cpu_oc_stat: CPU Overlocking Status
- cpu_temp: CPU Thermal Load Limit
- dgpu_boost_clk: Dedicated GPU Boost Clock
- dgpu_enable: Dedicated GPU Enabled Status
- gpu_didvid: GPU Device Identifier and Vendor Identifier
- gpu_mode: GPU Mode by Power Limit
- gpu_nv_ac_offset: Nvidia GPU AC Total Processing Power Baseline Offset
- gpu_nv_bpl: Nvidia GPU Base Power Limit
- gpu_nv_cpu_boost: Nvidia GPU to CPU Dynamic Boost Limit
- gpu_nv_ctgp: Nvidia GPU Configurable Total Graphics Power
- gpu_nv_ppab: Nvidia GPU Power Performance Aware Boost Limit
- gpu_oc_stat: GPU Overclocking Status
- gpu_temp: GPU Thermal Load Limit
- ppt_cpu_cl: CPU Cross Loading Power Limit
- ppt_pl1_apu_spl: Platform Profile Tracking APU Sustained Power Limit
- ppt_pl1_spl: Platform Profile Tracking Sustained Power Limit
- ppt_pl1_spl_cl: Platform Profile Tracking Cross Loading Sustained Power Limit
- ppt_pl1_tau: Exceed Duration for Platform Profile Tracking Sustained Power Limit
- ppt_pl2_sppt: Platform Profile Tracking Slow Package Power Tracking
- ppt_pl2_sppt_cl: Platform Profile Tracking Cross Loading Slow Package Tracking
- ppt_pl3_fppt: Platform Profile Tracking Fast Package Power Tracking
- ppt_pl3_fppt_cl: Platform Profile Tracking Cross Loading Fast Package Power Tracking
- ppt_pl4_ipl: Platform Profile Trakcing Instantaneous Power Limit
- ppt_pl4_ipl_cl: Platform Profile Tracking Cross Loading Instantaneous Power Limit

LENOVO_FAN_TEST_DATA
-------------------------

WMI GUID ``B642801B-3D21-45DE-90AE-6E86F164FB21``

The LENOVO_FAN_TEST_DATA interface provides reference data for self-test of
cooling fans.

The following HWMON attributes are implemented:
- fanX_max: maximum RPM
- fanX_min: minimum RPM

WMI interface description
=========================
Expand Down Expand Up @@ -106,3 +157,13 @@ data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility:
[WmiDataId(3), read, Description("Data Size.")] uint32 DataSize;
[WmiDataId(4), read, Description("Default Value"), WmiSizeIs("DataSize")] uint8 DefaultValue[];
};

[WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("Definition of Fan Test Data"), guid("{B642801B-3D21-45DE-90AE-6E86F164FB21}")]
class LENOVO_FAN_TEST_DATA {
[key, read] string InstanceName;
[read] boolean Active;
[WmiDataId(1), read, Description("Mode.")] uint32 NumOfFans;
[WmiDataId(2), read, Description("Fan ID."), WmiSizeIs("NumOfFans")] uint32 FanId[];
[WmiDataId(3), read, Description("Maximum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMaxSpeed[];
[WmiDataId(4), read, Description("Minumum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMinSpeed[];
};
5 changes: 3 additions & 2 deletions drivers/platform/x86/lenovo/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ config YT2_1380
To compile this driver as a module, choose M here: the module will
be called lenovo-yogabook.

config LENOVO_WMI_DATA01
config LENOVO_WMI_CAPDATA
tristate
depends on ACPI_WMI

Expand Down Expand Up @@ -263,8 +263,9 @@ config LENOVO_WMI_GAMEZONE
config LENOVO_WMI_TUNING
tristate "Lenovo Other Mode WMI Driver"
depends on ACPI_WMI
select HWMON
select FW_ATTR_CLASS
select LENOVO_WMI_DATA01
select LENOVO_WMI_CAPDATA
select LENOVO_WMI_EVENTS
select LENOVO_WMI_HELPERS
help
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/x86/lenovo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lenovo-target-$(CONFIG_LENOVO_YMC) += ymc.o
lenovo-target-$(CONFIG_YOGABOOK) += yogabook.o
lenovo-target-$(CONFIG_YT2_1380) += yoga-tab2-pro-1380-fastcharger.o
lenovo-target-$(CONFIG_LENOVO_WMI_CAMERA) += wmi-camera.o
lenovo-target-$(CONFIG_LENOVO_WMI_DATA01) += wmi-capdata01.o
lenovo-target-$(CONFIG_LENOVO_WMI_CAPDATA) += wmi-capdata.o
lenovo-target-$(CONFIG_LENOVO_WMI_EVENTS) += wmi-events.o
lenovo-target-$(CONFIG_LENOVO_WMI_HELPERS) += wmi-helpers.o
lenovo-target-$(CONFIG_LENOVO_WMI_GAMEZONE) += wmi-gamezone.o
Expand Down
Loading