Skip to content

Commit 088e0c1

Browse files
committed
Merge tag 'platform-drivers-x86-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Hans de Goede: - AMD PMC and PMF drivers: - Numerous bugfixes - Intel Speed Select Technology (ISST): - TPMI (Topology Aware Register and PM Capsule Interface) support for ISST support on upcoming processor models - Various other improvements / new hw support - tools/intel-speed-select: TPMI support + other improvements - Intel In Field Scan (IFS): - Add Array Bist test support - New drivers: - intel_bytcrc_pwrsrc Crystal Cove PMIC pwrsrc / reset-reason driver - lenovo-ymc Yoga Mode Control driver for reporting SW_TABLET_MODE - msi-ec Driver for MSI laptop EC features like battery charging limits - apple-gmux: - Support for new MMIO based models (T2 Macs) - Honor acpi_backlight= auto-detect-code + kernel cmdline option to switch between gmux and apple_bl backlight drivers and remove own custom handling for this - x86-android-tablets: Refactor / cleanup + new hw support - Miscellaneous other cleanups / fixes * tag 'platform-drivers-x86-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (178 commits) platform/x86: x86-android-tablets: Add accelerometer support for Yoga Tablet 2 1050/830 series platform/x86: x86-android-tablets: Add "yogabook-touch-kbd-digitizer-switch" pdev for Lenovo Yoga Book platform/x86: x86-android-tablets: Add Wacom digitizer info for Lenovo Yoga Book platform/x86: x86-android-tablets: Update Yoga Book HiDeep touchscreen comment platform/x86: thinkpad_acpi: Fix Embedded Controller access on X380 Yoga platform/x86/intel/sdsi: Change mailbox timeout platform/x86/intel/pmt: Ignore uninitialized entries platform/x86: amd: pmc: provide user message where s0ix is not supported platform/x86/amd: pmc: Fix memory leak in amd_pmc_stb_debugfs_open_v2() mlxbf-bootctl: Add sysfs file for BlueField boot fifo platform/x86: amd: pmc: Remove __maybe_unused from amd_pmc_suspend_handler() platform/x86/intel/pmc/mtl: Put GNA/IPU/VPU devices in D3 platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init platform/x86/amd: pmc: Utilize SMN index 0 for driver probe platform/x86/amd: pmc: Move idlemask check into `amd_pmc_idlemask_read` platform/x86/amd: pmc: Don't dump data after resume from s0i3 on picasso platform/x86/amd: pmc: Hide SMU version and program attributes for Picasso platform/x86/amd: pmc: Don't try to read SMU version on Picasso platform/x86/amd/pmf: Move out of BIOS SMN pair for driver probe platform/x86: intel-uncore-freq: Add client processors ...
2 parents 07d971a + e578c94 commit 088e0c1

103 files changed

Lines changed: 9613 additions & 3881 deletions

File tree

Some content is hidden

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

Documentation/ABI/testing/sysfs-platform-intel-ifs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Device instance to test mapping
2+
intel_ifs_0 -> Scan Test
3+
intel_ifs_1 -> Array BIST test
4+
15
What: /sys/devices/virtual/misc/intel_ifs_<N>/run_test
26
Date: Nov 16 2022
37
KernelVersion: 6.2
@@ -8,28 +12,33 @@ Description: Write <cpu#> to trigger IFS test for one online core.
812
completes the test for the core containing that thread.
913
Example: to test the core containing cpu5: echo 5 >
1014
/sys/devices/virtual/misc/intel_ifs_<N>/run_test
15+
Devices: all
1116

1217
What: /sys/devices/virtual/misc/intel_ifs_<N>/status
1318
Date: Nov 16 2022
1419
KernelVersion: 6.2
1520
Contact: "Jithu Joseph" <jithu.joseph@intel.com>
1621
Description: The status of the last test. It can be one of "pass", "fail"
1722
or "untested".
23+
Devices: all
1824

1925
What: /sys/devices/virtual/misc/intel_ifs_<N>/details
2026
Date: Nov 16 2022
2127
KernelVersion: 6.2
2228
Contact: "Jithu Joseph" <jithu.joseph@intel.com>
2329
Description: Additional information regarding the last test. The details file reports
24-
the hex value of the SCAN_STATUS MSR. Note that the error_code field
30+
the hex value of the STATUS MSR for this test. Note that the error_code field
2531
may contain driver defined software code not defined in the Intel SDM.
32+
Devices: all
2633

2734
What: /sys/devices/virtual/misc/intel_ifs_<N>/image_version
2835
Date: Nov 16 2022
2936
KernelVersion: 6.2
3037
Contact: "Jithu Joseph" <jithu.joseph@intel.com>
31-
Description: Version (hexadecimal) of loaded IFS binary image. If no scan image
32-
is loaded reports "none".
38+
Description: Version (hexadecimal) of loaded IFS test image. If no test image
39+
is loaded reports "none". Only present for device instances where a test image
40+
is applicable.
41+
Devices: intel_ifs_0
3342

3443
What: /sys/devices/virtual/misc/intel_ifs_<N>/current_batch
3544
Date: Nov 16 2022
@@ -39,3 +48,5 @@ Description: Write a number less than or equal to 0xff to load an IFS test image
3948
The number written treated as the 2 digit suffix in the following file name:
4049
/lib/firmware/intel/ifs_<N>/ff-mm-ss-02x.scan
4150
Reading the file will provide the suffix of the currently loaded IFS test image.
51+
This file is present only for device instances where a test image is applicable.
52+
Devices: intel_ifs_0

Documentation/ABI/testing/sysfs-platform-mellanox-bootctl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,10 @@ Description:
6868
Wasted burnt and invalid
6969
Invalid not burnt but marked as valid (error state).
7070
======= ===============================================
71+
72+
What: /sys/bus/platform/devices/MLNXBF04:00/bootfifo
73+
Date: Apr 2023
74+
KernelVersion: 6.4
75+
Contact: "Liming Sun <limings@nvidia.com>"
76+
Description:
77+
The file used to access the BlueField boot fifo.

MAINTAINERS

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14148,6 +14148,13 @@ S: Odd Fixes
1414814148
F: Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt
1414914149
F: drivers/net/ieee802154/mrf24j40.c
1415014150

14151+
MSI EC DRIVER
14152+
M: Nikita Kravets <teackot@gmail.com>
14153+
L: platform-driver-x86@vger.kernel.org
14154+
S: Maintained
14155+
W: https://github.com/BeardOverflow/msi-ec
14156+
F: drivers/platform/x86/msi-ec.*
14157+
1415114158
MSI LAPTOP SUPPORT
1415214159
M: "Lee, Chun-Yi" <jlee@suse.com>
1415314160
L: platform-driver-x86@vger.kernel.org
@@ -16330,12 +16337,6 @@ S: Maintained
1633016337
F: crypto/pcrypt.c
1633116338
F: include/crypto/pcrypt.h
1633216339

16333-
PEAQ WMI HOTKEYS DRIVER
16334-
M: Hans de Goede <hdegoede@redhat.com>
16335-
L: platform-driver-x86@vger.kernel.org
16336-
S: Maintained
16337-
F: drivers/platform/x86/peaq-wmi.c
16338-
1633916340
PECI HARDWARE MONITORING DRIVERS
1634016341
M: Iwona Winiarska <iwona.winiarska@intel.com>
1634116342
L: linux-hwmon@vger.kernel.org
@@ -22725,7 +22726,7 @@ M: Hans de Goede <hdegoede@redhat.com>
2272522726
L: platform-driver-x86@vger.kernel.org
2272622727
S: Maintained
2272722728
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
22728-
F: drivers/platform/x86/x86-android-tablets.c
22729+
F: drivers/platform/x86/x86-android-tablets/
2272922730

2273022731
X86 PLATFORM DRIVERS
2273122732
M: Hans de Goede <hdegoede@redhat.com>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@
206206

207207
/* Abbreviated from Intel SDM name IA32_INTEGRITY_CAPABILITIES */
208208
#define MSR_INTEGRITY_CAPS 0x000002d9
209+
#define MSR_INTEGRITY_CAPS_ARRAY_BIST_BIT 2
210+
#define MSR_INTEGRITY_CAPS_ARRAY_BIST BIT(MSR_INTEGRITY_CAPS_ARRAY_BIST_BIT)
209211
#define MSR_INTEGRITY_CAPS_PERIODIC_BIST_BIT 4
210212
#define MSR_INTEGRITY_CAPS_PERIODIC_BIST BIT(MSR_INTEGRITY_CAPS_PERIODIC_BIST_BIT)
211213

drivers/platform/mellanox/mlxbf-bootctl.c

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <linux/acpi.h>
1212
#include <linux/arm-smccc.h>
13+
#include <linux/delay.h>
1314
#include <linux/module.h>
1415
#include <linux/platform_device.h>
1516

@@ -44,6 +45,10 @@ static const char * const mlxbf_bootctl_lifecycle_states[] = {
4445
[3] = "RMA",
4546
};
4647

48+
/* Mapped pointer for RSH_BOOT_FIFO_DATA and RSH_BOOT_FIFO_COUNT register. */
49+
static void __iomem *mlxbf_rsh_boot_data;
50+
static void __iomem *mlxbf_rsh_boot_cnt;
51+
4752
/* ARM SMC call which is atomic and no need for lock. */
4853
static int mlxbf_bootctl_smc(unsigned int smc_op, int smc_arg)
4954
{
@@ -244,18 +249,37 @@ static ssize_t secure_boot_fuse_state_show(struct device *dev,
244249
return buf_len;
245250
}
246251

252+
static ssize_t fw_reset_store(struct device *dev,
253+
struct device_attribute *attr,
254+
const char *buf, size_t count)
255+
{
256+
unsigned long key;
257+
int err;
258+
259+
err = kstrtoul(buf, 16, &key);
260+
if (err)
261+
return err;
262+
263+
if (mlxbf_bootctl_smc(MLXBF_BOOTCTL_FW_RESET, key) < 0)
264+
return -EINVAL;
265+
266+
return count;
267+
}
268+
247269
static DEVICE_ATTR_RW(post_reset_wdog);
248270
static DEVICE_ATTR_RW(reset_action);
249271
static DEVICE_ATTR_RW(second_reset_action);
250272
static DEVICE_ATTR_RO(lifecycle_state);
251273
static DEVICE_ATTR_RO(secure_boot_fuse_state);
274+
static DEVICE_ATTR_WO(fw_reset);
252275

253276
static struct attribute *mlxbf_bootctl_attrs[] = {
254277
&dev_attr_post_reset_wdog.attr,
255278
&dev_attr_reset_action.attr,
256279
&dev_attr_second_reset_action.attr,
257280
&dev_attr_lifecycle_state.attr,
258281
&dev_attr_secure_boot_fuse_state.attr,
282+
&dev_attr_fw_reset.attr,
259283
NULL
260284
};
261285

@@ -268,6 +292,45 @@ static const struct acpi_device_id mlxbf_bootctl_acpi_ids[] = {
268292

269293
MODULE_DEVICE_TABLE(acpi, mlxbf_bootctl_acpi_ids);
270294

295+
static ssize_t mlxbf_bootctl_bootfifo_read(struct file *filp,
296+
struct kobject *kobj,
297+
struct bin_attribute *bin_attr,
298+
char *buf, loff_t pos,
299+
size_t count)
300+
{
301+
unsigned long timeout = msecs_to_jiffies(500);
302+
unsigned long expire = jiffies + timeout;
303+
u64 data, cnt = 0;
304+
char *p = buf;
305+
306+
while (count >= sizeof(data)) {
307+
/* Give up reading if no more data within 500ms. */
308+
if (!cnt) {
309+
cnt = readq(mlxbf_rsh_boot_cnt);
310+
if (!cnt) {
311+
if (time_after(jiffies, expire))
312+
break;
313+
usleep_range(10, 50);
314+
continue;
315+
}
316+
}
317+
318+
data = readq(mlxbf_rsh_boot_data);
319+
memcpy(p, &data, sizeof(data));
320+
count -= sizeof(data);
321+
p += sizeof(data);
322+
cnt--;
323+
expire = jiffies + timeout;
324+
}
325+
326+
return p - buf;
327+
}
328+
329+
static struct bin_attribute mlxbf_bootctl_bootfifo_sysfs_attr = {
330+
.attr = { .name = "bootfifo", .mode = 0400 },
331+
.read = mlxbf_bootctl_bootfifo_read,
332+
};
333+
271334
static bool mlxbf_bootctl_guid_match(const guid_t *guid,
272335
const struct arm_smccc_res *res)
273336
{
@@ -285,6 +348,16 @@ static int mlxbf_bootctl_probe(struct platform_device *pdev)
285348
guid_t guid;
286349
int ret;
287350

351+
/* Get the resource of the bootfifo data register. */
352+
mlxbf_rsh_boot_data = devm_platform_ioremap_resource(pdev, 0);
353+
if (IS_ERR(mlxbf_rsh_boot_data))
354+
return PTR_ERR(mlxbf_rsh_boot_data);
355+
356+
/* Get the resource of the bootfifo counter register. */
357+
mlxbf_rsh_boot_cnt = devm_platform_ioremap_resource(pdev, 1);
358+
if (IS_ERR(mlxbf_rsh_boot_cnt))
359+
return PTR_ERR(mlxbf_rsh_boot_cnt);
360+
288361
/* Ensure we have the UUID we expect for this service. */
289362
arm_smccc_smc(MLXBF_BOOTCTL_SIP_SVC_UID, 0, 0, 0, 0, 0, 0, 0, &res);
290363
guid_parse(mlxbf_bootctl_svc_uuid_str, &guid);
@@ -302,11 +375,25 @@ static int mlxbf_bootctl_probe(struct platform_device *pdev)
302375
if (ret < 0)
303376
dev_warn(&pdev->dev, "Unable to reset the EMMC boot mode\n");
304377

378+
ret = sysfs_create_bin_file(&pdev->dev.kobj,
379+
&mlxbf_bootctl_bootfifo_sysfs_attr);
380+
if (ret)
381+
pr_err("Unable to create bootfifo sysfs file, error %d\n", ret);
382+
383+
return ret;
384+
}
385+
386+
static int mlxbf_bootctl_remove(struct platform_device *pdev)
387+
{
388+
sysfs_remove_bin_file(&pdev->dev.kobj,
389+
&mlxbf_bootctl_bootfifo_sysfs_attr);
390+
305391
return 0;
306392
}
307393

308394
static struct platform_driver mlxbf_bootctl_driver = {
309395
.probe = mlxbf_bootctl_probe,
396+
.remove = mlxbf_bootctl_remove,
310397
.driver = {
311398
.name = "mlxbf-bootctl",
312399
.dev_groups = mlxbf_bootctl_groups,

drivers/platform/mellanox/mlxbf-bootctl.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575

7676
#define MLXBF_BOOTCTL_GET_DIMM_INFO 0x82000008
7777

78+
/*
79+
* Initiate Firmware Reset via TYU. This might be invoked during the reset
80+
* flow in isolation mode.
81+
*/
82+
#define MLXBF_BOOTCTL_FW_RESET 0x8200000D
83+
7884
/* SMC function IDs for SiP Service queries */
7985
#define MLXBF_BOOTCTL_SIP_SVC_CALL_COUNT 0x8200ff00
8086
#define MLXBF_BOOTCTL_SIP_SVC_UID 0x8200ff01

drivers/platform/olpc/olpc-xo175-ec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ static struct spi_driver olpc_xo175_ec_spi_driver = {
746746
.of_match_table = olpc_xo175_ec_of_match,
747747
.pm = &olpc_xo175_ec_pm_ops,
748748
},
749+
.id_table = olpc_xo175_ec_id_table,
749750
.probe = olpc_xo175_ec_probe,
750751
.remove = olpc_xo175_ec_remove,
751752
};

drivers/platform/surface/surface_aggregator_registry.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ static const struct software_node *ssam_node_group_sp9[] = {
305305
&ssam_node_bat_ac,
306306
&ssam_node_bat_main,
307307
&ssam_node_tmp_pprof,
308-
/* TODO: Tablet mode switch (via POS subsystem) */
308+
&ssam_node_pos_tablet_switch,
309309
&ssam_node_hid_kip_keyboard,
310310
&ssam_node_hid_kip_penstash,
311311
&ssam_node_hid_kip_touchpad,

0 commit comments

Comments
 (0)