Skip to content

Commit 84bbfe6

Browse files
committed
Merge tag 'platform-drivers-x86-v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform drivers updates from Hans de Goede: - asus-wmi: Add support for vivobook fan profiles - dell-laptop: Add knobs to change battery charge settings - lg-laptop: Add operation region support - intel-uncore-freq: Add support for efficiency latency control - intel/ifs: Add SBAF test support - intel/pmc: Ignore all LTRs during suspend - platform/surface: Support for arm64 based Surface devices - wmi: Pass event data directly to legacy notify handlers - x86/platform/geode: switch GPIO buttons and LEDs to software properties - bunch of small cleanups, fixes, hw-id additions, etc. * tag 'platform-drivers-x86-v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (65 commits) MAINTAINERS: adjust file entry in INTEL MID PLATFORM platform/x86: x86-android-tablets: Adjust Xiaomi Pad 2 bottom bezel touch buttons LED platform/mellanox: mlxbf-pmc: fix lockdep warning platform/x86/amd: pmf: Add quirk for TUF Gaming A14 platform/x86: touchscreen_dmi: add nanote-next quirk platform/x86: asus-wmi: don't fail if platform_profile already registered platform/x86: asus-wmi: add debug print in more key places platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm MAINTAINERS: Add Intel MID section platform/x86: panasonic-laptop: Add support for programmable buttons platform/olpc: Remove redundant null pointer checks in olpc_ec_setup_debugfs() platform/x86: intel/pmc: Ignore all LTRs during suspend platform/x86: wmi: Call both legacy and WMI driver notify handlers platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data() platform/x86: wmi: Remove wmi_get_event_data() platform/x86: wmi: Pass event data directly to legacy notify handlers platform/x86: thinkpad_acpi: Fix uninitialized symbol 's' warning platform/x86: x86-android-tablets: Fix spelling in the comments platform/x86: ideapad-laptop: Make the scope_guard() clear of its scope ...
2 parents 2a17bb8 + 837acb6 commit 84bbfe6

File tree

101 files changed

+2723
-1060
lines changed

Some content is hidden

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

101 files changed

+2723
-1060
lines changed

Documentation/admin-guide/pm/intel_uncore_frequency_scaling.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,62 @@ to apply at each uncore* level.
113113

114114
Support for "current_freq_khz" is available only at each fabric cluster
115115
level (i.e., in uncore* directory).
116+
117+
Efficiency vs. Latency Tradeoff
118+
-------------------------------
119+
120+
The Efficiency Latency Control (ELC) feature improves performance
121+
per watt. With this feature hardware power management algorithms
122+
optimize trade-off between latency and power consumption. For some
123+
latency sensitive workloads further tuning can be done by SW to
124+
get desired performance.
125+
126+
The hardware monitors the average CPU utilization across all cores
127+
in a power domain at regular intervals and decides an uncore frequency.
128+
While this may result in the best performance per watt, workload may be
129+
expecting higher performance at the expense of power. Consider an
130+
application that intermittently wakes up to perform memory reads on an
131+
otherwise idle system. In such cases, if hardware lowers uncore
132+
frequency, then there may be delay in ramp up of frequency to meet
133+
target performance.
134+
135+
The ELC control defines some parameters which can be changed from SW.
136+
If the average CPU utilization is below a user-defined threshold
137+
(elc_low_threshold_percent attribute below), the user-defined uncore
138+
floor frequency will be used (elc_floor_freq_khz attribute below)
139+
instead of hardware calculated minimum.
140+
141+
Similarly in high load scenario where the CPU utilization goes above
142+
the high threshold value (elc_high_threshold_percent attribute below)
143+
instead of jumping to maximum uncore frequency, frequency is increased
144+
in 100MHz steps. This avoids consuming unnecessarily high power
145+
immediately with CPU utilization spikes.
146+
147+
Attributes for efficiency latency control:
148+
149+
``elc_floor_freq_khz``
150+
This attribute is used to get/set the efficiency latency floor frequency.
151+
If this variable is lower than the 'min_freq_khz', it is ignored by
152+
the firmware.
153+
154+
``elc_low_threshold_percent``
155+
This attribute is used to get/set the efficiency latency control low
156+
threshold. This attribute is in percentages of CPU utilization.
157+
158+
``elc_high_threshold_percent``
159+
This attribute is used to get/set the efficiency latency control high
160+
threshold. This attribute is in percentages of CPU utilization.
161+
162+
``elc_high_threshold_enable``
163+
This attribute is used to enable/disable the efficiency latency control
164+
high threshold. Write '1' to enable, '0' to disable.
165+
166+
Example system configuration below, which does following:
167+
* when CPU utilization is less than 10%: sets uncore frequency to 800MHz
168+
* when CPU utilization is higher than 95%: increases uncore frequency in
169+
100MHz steps, until power limit is reached
170+
171+
elc_floor_freq_khz:800000
172+
elc_high_threshold_percent:95
173+
elc_high_threshold_enable:1
174+
elc_low_threshold_percent:10
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/platform/microsoft,surface-sam.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Surface System Aggregator Module (SAM, SSAM)
8+
9+
maintainers:
10+
- Konrad Dybcio <[email protected]>
11+
12+
description: |
13+
Surface devices use a standardized embedded controller to let the
14+
operating system interface with various hardware functions. The
15+
specific functionalities are modeled as subdevices and matched on
16+
five levels: domain, category, target, instance and function.
17+
18+
properties:
19+
compatible:
20+
const: microsoft,surface-sam
21+
22+
interrupts:
23+
maxItems: 1
24+
25+
current-speed: true
26+
27+
required:
28+
- compatible
29+
- interrupts
30+
31+
additionalProperties: false
32+
33+
examples:
34+
- |
35+
#include <dt-bindings/interrupt-controller/irq.h>
36+
uart {
37+
embedded-controller {
38+
compatible = "microsoft,surface-sam";
39+
40+
interrupts-extended = <&tlmm 91 IRQ_TYPE_EDGE_RISING>;
41+
42+
pinctrl-0 = <&ssam_state>;
43+
pinctrl-names = "default";
44+
45+
current-speed = <4000000>;
46+
};
47+
};

Documentation/devicetree/bindings/serial/serial.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ properties:
8888
TX FIFO threshold configuration (in bytes).
8989

9090
patternProperties:
91-
"^(bluetooth|bluetooth-gnss|gnss|gps|mcu|onewire)$":
91+
"^(bluetooth|bluetooth-gnss|embedded-controller|gnss|gps|mcu|onewire)$":
9292
if:
9393
type: object
9494
then:

MAINTAINERS

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11552,6 +11552,24 @@ S: Maintained
1155211552
F: Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-sec-update
1155311553
F: drivers/fpga/intel-m10-bmc-sec-update.c
1155411554

11555+
INTEL MID (Mobile Internet Device) PLATFORM
11556+
M: Andy Shevchenko <[email protected]>
11557+
11558+
S: Supported
11559+
F: arch/x86/include/asm/intel-mid.h
11560+
F: arch/x86/pci/intel_mid_pci.c
11561+
F: arch/x86/platform/intel-mid/
11562+
F: drivers/extcon/extcon-intel-mrfld.c
11563+
F: drivers/iio/adc/intel_mrfld_adc.c
11564+
F: drivers/mfd/intel_soc_pmic_mrfld.c
11565+
F: drivers/platform/x86/intel/mrfld_pwrbtn.c
11566+
F: drivers/platform/x86/intel_scu_*
11567+
F: drivers/staging/media/atomisp/
11568+
F: drivers/watchdog/intel-mid_wdt.c
11569+
F: include/linux/mfd/intel_soc_pmic_mrfld.h
11570+
F: include/linux/platform_data/x86/intel-mid_wdt.h
11571+
F: include/linux/platform_data/x86/intel_scu_ipc.h
11572+
1155511573
INTEL P-Unit IPC DRIVER
1155611574
M: Zha Qipeng <[email protected]>
1155711575
@@ -11614,8 +11632,8 @@ F: drivers/counter/intel-qep.c
1161411632
INTEL SCU DRIVERS
1161511633
M: Mika Westerberg <[email protected]>
1161611634
S: Maintained
11617-
F: arch/x86/include/asm/intel_scu_ipc.h
1161811635
F: drivers/platform/x86/intel_scu_*
11636+
F: include/linux/platform_data/x86/intel_scu_ipc.h
1161911637

1162011638
INTEL SDSI DRIVER
1162111639
M: David E. Box <[email protected]>
@@ -11690,7 +11708,8 @@ F: drivers/platform/x86/intel/uncore-frequency/
1169011708
INTEL VENDOR SPECIFIC EXTENDED CAPABILITIES DRIVER
1169111709
M: David E. Box <[email protected]>
1169211710
S: Supported
11693-
F: drivers/platform/x86/intel/vsec.*
11711+
F: drivers/platform/x86/intel/vsec.c
11712+
F: include/linux/intel_vsec.h
1169411713

1169511714
INTEL VIRTUAL BUTTON DRIVER
1169611715
M: AceLan Kao <[email protected]>

arch/x86/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3076,9 +3076,13 @@ config OLPC_XO15_SCI
30763076
- AC adapter status updates
30773077
- Battery status updates
30783078

3079+
config GEODE_COMMON
3080+
bool
3081+
30793082
config ALIX
30803083
bool "PCEngines ALIX System Support (LED setup)"
30813084
select GPIOLIB
3085+
select GEODE_COMMON
30823086
help
30833087
This option enables system support for the PCEngines ALIX.
30843088
At present this just sets up LEDs for GPIO control on
@@ -3093,12 +3097,14 @@ config ALIX
30933097
config NET5501
30943098
bool "Soekris Engineering net5501 System Support (LEDS, GPIO, etc)"
30953099
select GPIOLIB
3100+
select GEODE_COMMON
30963101
help
30973102
This option enables system support for the Soekris Engineering net5501.
30983103

30993104
config GEOS
31003105
bool "Traverse Technologies GEOS System Support (LEDS, GPIO, etc)"
31013106
select GPIOLIB
3107+
select GEODE_COMMON
31023108
depends on DMI
31033109
help
31043110
This option enables system support for the Traverse Technologies GEOS.

arch/x86/include/asm/intel_telemetry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define TELEM_MAX_EVENTS_SRAM 28
1111
#define TELEM_MAX_OS_ALLOCATED_EVENTS 20
1212

13-
#include <asm/intel_scu_ipc.h>
13+
#include <linux/platform_data/x86/intel_scu_ipc.h>
1414

1515
enum telemetry_unit {
1616
TELEM_PSS = 0,

arch/x86/include/asm/msr-index.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@
247247
#define MSR_INTEGRITY_CAPS_ARRAY_BIST BIT(MSR_INTEGRITY_CAPS_ARRAY_BIST_BIT)
248248
#define MSR_INTEGRITY_CAPS_PERIODIC_BIST_BIT 4
249249
#define MSR_INTEGRITY_CAPS_PERIODIC_BIST BIT(MSR_INTEGRITY_CAPS_PERIODIC_BIST_BIT)
250+
#define MSR_INTEGRITY_CAPS_SBAF_BIT 8
251+
#define MSR_INTEGRITY_CAPS_SBAF BIT(MSR_INTEGRITY_CAPS_SBAF_BIT)
250252
#define MSR_INTEGRITY_CAPS_SAF_GEN_MASK GENMASK_ULL(10, 9)
251253

252254
#define MSR_LBR_NHM_FROM 0x00000680

arch/x86/platform/geode/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2+
obj-$(CONFIG_GEODE_COMMON) += geode-common.o
23
obj-$(CONFIG_ALIX) += alix.o
34
obj-$(CONFIG_NET5501) += net5501.o
45
obj-$(CONFIG_GEOS) += geos.o

arch/x86/platform/geode/alix.c

Lines changed: 8 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@
1818
#include <linux/io.h>
1919
#include <linux/string.h>
2020
#include <linux/moduleparam.h>
21-
#include <linux/leds.h>
22-
#include <linux/platform_device.h>
23-
#include <linux/input.h>
24-
#include <linux/gpio_keys.h>
25-
#include <linux/gpio/machine.h>
2621
#include <linux/dmi.h>
2722

2823
#include <asm/geode.h>
2924

25+
#include "geode-common.h"
26+
3027
#define BIOS_SIGNATURE_TINYBIOS 0xf0000
3128
#define BIOS_SIGNATURE_COREBOOT 0x500
3229
#define BIOS_REGION_SIZE 0x10000
@@ -41,79 +38,16 @@ module_param(force, bool, 0444);
4138
/* FIXME: Award bios is not automatically detected as Alix platform */
4239
MODULE_PARM_DESC(force, "Force detection as ALIX.2/ALIX.3 platform");
4340

44-
static struct gpio_keys_button alix_gpio_buttons[] = {
45-
{
46-
.code = KEY_RESTART,
47-
.gpio = 24,
48-
.active_low = 1,
49-
.desc = "Reset button",
50-
.type = EV_KEY,
51-
.wakeup = 0,
52-
.debounce_interval = 100,
53-
.can_disable = 0,
54-
}
55-
};
56-
static struct gpio_keys_platform_data alix_buttons_data = {
57-
.buttons = alix_gpio_buttons,
58-
.nbuttons = ARRAY_SIZE(alix_gpio_buttons),
59-
.poll_interval = 20,
60-
};
61-
62-
static struct platform_device alix_buttons_dev = {
63-
.name = "gpio-keys-polled",
64-
.id = 1,
65-
.dev = {
66-
.platform_data = &alix_buttons_data,
67-
}
68-
};
69-
70-
static struct gpio_led alix_leds[] = {
71-
{
72-
.name = "alix:1",
73-
.default_trigger = "default-on",
74-
},
75-
{
76-
.name = "alix:2",
77-
.default_trigger = "default-off",
78-
},
79-
{
80-
.name = "alix:3",
81-
.default_trigger = "default-off",
82-
},
83-
};
84-
85-
static struct gpio_led_platform_data alix_leds_data = {
86-
.num_leds = ARRAY_SIZE(alix_leds),
87-
.leds = alix_leds,
88-
};
89-
90-
static struct gpiod_lookup_table alix_leds_gpio_table = {
91-
.dev_id = "leds-gpio",
92-
.table = {
93-
/* The Geode GPIOs should be on the CS5535 companion chip */
94-
GPIO_LOOKUP_IDX("cs5535-gpio", 6, NULL, 0, GPIO_ACTIVE_LOW),
95-
GPIO_LOOKUP_IDX("cs5535-gpio", 25, NULL, 1, GPIO_ACTIVE_LOW),
96-
GPIO_LOOKUP_IDX("cs5535-gpio", 27, NULL, 2, GPIO_ACTIVE_LOW),
97-
{ }
98-
},
99-
};
100-
101-
static struct platform_device alix_leds_dev = {
102-
.name = "leds-gpio",
103-
.id = -1,
104-
.dev.platform_data = &alix_leds_data,
105-
};
106-
107-
static struct platform_device *alix_devs[] __initdata = {
108-
&alix_buttons_dev,
109-
&alix_leds_dev,
41+
static const struct geode_led alix_leds[] __initconst = {
42+
{ 6, true },
43+
{ 25, false },
44+
{ 27, false },
11045
};
11146

11247
static void __init register_alix(void)
11348
{
114-
/* Setup LED control through leds-gpio driver */
115-
gpiod_add_lookup_table(&alix_leds_gpio_table);
116-
platform_add_devices(alix_devs, ARRAY_SIZE(alix_devs));
49+
geode_create_restart_key(24);
50+
geode_create_leds("alix", alix_leds, ARRAY_SIZE(alix_leds));
11751
}
11852

11953
static bool __init alix_present(unsigned long bios_phys,

0 commit comments

Comments
 (0)