Skip to content

Commit a5a82e0

Browse files
committed
Merge tag 'platform-drivers-x86-v5.8-1' of git://git.infradead.org/linux-platform-drivers-x86
Pull x86 platform driver updates from Andy Shevchenko: - Add a support of the media keys on the ASUS laptop UX325JA/UX425JA - ASUS WMI driver can now handle 2-in-1 models T100TA, T100CHI, T100HA, T200TA - Big refactoring of Intel SCU driver with Elkhart Lake support has been added - Slim Bootloarder firmware update signaling WMI driver has been added - Thinkpad ACPI driver can handle dual fan configuration on new P and X models - Touchscreen DMI driver has been extended to support - MP-man MPWIN895CL tablet - ONDA V891 v5 tablet - techBite Arc 11.6 - Trekstor Twin 10.1 - Trekstor Yourbook C11B - Vinga J116 - Virtual Button driver got a few fixes to detect mode of 2-in-1 tablet models - Intel Speed Select tools update - Plenty of small cleanups here and there * tag 'platform-drivers-x86-v5.8-1' of git://git.infradead.org/linux-platform-drivers-x86: (89 commits) platform/x86: dcdbas: Check SMBIOS for protected buffer address platform/x86: asus_wmi: Reserve more space for struct bias_args platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type platform/x86: intel-hid: Add a quirk to support HP Spectre X2 (2015) platform/x86: touchscreen_dmi: Update Trekstor Twin 10.1 entry platform/x86: touchscreen_dmi: Add info for the Trekstor Yourbook C11B platform/x86: hp-wmi: Introduce HPWMI_POWER_FW_OR_HW as convenient shortcut platform/x86: hp-wmi: Convert simple_strtoul() to kstrtou32() platform/x86: hp-wmi: Refactor postcode_store() to follow standard patterns platform/x86: acerhdf: replace space by * in modalias platform/x86: ISST: Increase timeout tools/power/x86/intel-speed-select: Fix invalid core mask tools/power/x86/intel-speed-select: Increase CPU count tools/power/x86/intel-speed-select: Fix json perf-profile output output platform/x86: dell-wmi: Ignore keyboard attached / detached events platform/x86: dell-laptop: don't register micmute LED if there is no token platform/x86: thinkpad_acpi: Replace custom approach by kstrtoint() platform/x86: thinkpad_acpi: Use strndup_user() in dispatch_proc_write() platform/x86: thinkpad_acpi: Replace next_cmd(&buf) with strsep(&buf, ",") platform/x86: intel-vbtn: Detect switch position before registering the input-device ...
2 parents c5d6c13 + 47a94c5 commit a5a82e0

Some content is hidden

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

63 files changed

+2327
-1704
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
These files allow sending arbitrary IPC commands to the PMC/SCU which
2+
may be dangerous. These will be removed eventually and should not be
3+
used in any new applications.
4+
5+
What: /sys/bus/platform/devices/INT34D2:00/simplecmd
6+
Date: Jun 2015
7+
KernelVersion: 4.1
8+
Contact: Mika Westerberg <[email protected]>
9+
Description: This interface allows userspace to send an arbitrary
10+
IPC command to the PMC/SCU.
11+
12+
Format: %d %d where first number is command and
13+
second number is subcommand.
14+
15+
What: /sys/bus/platform/devices/INT34D2:00/northpeak
16+
Date: Jun 2015
17+
KernelVersion: 4.1
18+
Contact: Mika Westerberg <[email protected]>
19+
Description: This interface allows userspace to enable and disable
20+
Northpeak through the PMC/SCU.
21+
22+
Format: %u.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
What: /sys/bus/wmi/devices/44FADEB1-B204-40F2-8581-394BBDC1B651/firmware_update_request
2+
Date: April 2020
3+
KernelVersion: 5.7
4+
Contact: "Jithu Joseph" <[email protected]>
5+
Description:
6+
Allow user space entities to trigger update of Slim
7+
Bootloader (SBL). This attribute normally has a value
8+
of 0 and userspace can signal SBL to update firmware,
9+
on next reboot, by writing a value of 1.
10+
There are two available states:
11+
* 0 -> Skip firmware update while rebooting
12+
* 1 -> Attempt firmware update on next reboot

MAINTAINERS

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8529,6 +8529,13 @@ L: [email protected]
85298529
S: Maintained
85308530
F: drivers/platform/x86/intel_atomisp2_pm.c
85318531

8532+
INTEL BROXTON PMC DRIVER
8533+
M: Mika Westerberg <[email protected]>
8534+
M: Zha Qipeng <[email protected]>
8535+
S: Maintained
8536+
F: drivers/mfd/intel_pmc_bxt.c
8537+
F: include/linux/mfd/intel_pmc_bxt.h
8538+
85328539
INTEL C600 SERIES SAS CONTROLLER DRIVER
85338540
M: Intel SCU Linux support <[email protected]>
85348541
M: Artur Paszkiewicz <[email protected]>
@@ -8736,22 +8743,20 @@ F: include/uapi/linux/mic_common.h
87368743
F: include/uapi/linux/mic_ioctl.h
87378744
F: include/uapi/linux/scif_ioctl.h
87388745

8746+
INTEL P-Unit IPC DRIVER
8747+
M: Zha Qipeng <[email protected]>
8748+
8749+
S: Maintained
8750+
F: arch/x86/include/asm/intel_punit_ipc.h
8751+
F: drivers/platform/x86/intel_punit_ipc.c
8752+
87398753
INTEL PMC CORE DRIVER
87408754
M: Rajneesh Bhardwaj <[email protected]>
87418755
M: Vishwanath Somayaji <[email protected]>
87428756
87438757
S: Maintained
87448758
F: drivers/platform/x86/intel_pmc_core*
87458759

8746-
INTEL PMC/P-Unit IPC DRIVER
8747-
M: Zha Qipeng<[email protected]>
8748-
8749-
S: Maintained
8750-
F: arch/x86/include/asm/intel_pmc_ipc.h
8751-
F: arch/x86/include/asm/intel_punit_ipc.h
8752-
F: drivers/platform/x86/intel_pmc_ipc.c
8753-
F: drivers/platform/x86/intel_punit_ipc.c
8754-
87558760
INTEL PMIC GPIO DRIVERS
87568761
M: Andy Shevchenko <[email protected]>
87578762
S: Maintained
@@ -8790,6 +8795,12 @@ S: Supported
87908795
F: drivers/infiniband/hw/i40iw/
87918796
F: include/uapi/rdma/i40iw-abi.h
87928797

8798+
INTEL SCU DRIVERS
8799+
M: Mika Westerberg <[email protected]>
8800+
S: Maintained
8801+
F: arch/x86/include/asm/intel_scu_ipc.h
8802+
F: drivers/platform/x86/intel_scu_*
8803+
87938804
INTEL SPEED SELECT TECHNOLOGY
87948805
M: Srinivas Pandruvada <[email protected]>
87958806
@@ -8856,6 +8867,13 @@ F: Documentation/admin-guide/wimax/i2400m.rst
88568867
F: drivers/net/wimax/i2400m/
88578868
F: include/uapi/linux/wimax/i2400m.h
88588869

8870+
INTEL WMI SLIM BOOTLOADER (SBL) FIRMWARE UPDATE DRIVER
8871+
M: Jithu Joseph <[email protected]>
8872+
R: Maurice Ma <[email protected]>
8873+
S: Maintained
8874+
W: https://slimbootloader.github.io/security/firmware-update.html
8875+
F: drivers/platform/x86/intel-wmi-sbl-fw-update.c
8876+
88598877
INTEL WMI THUNDERBOLT FORCE POWER DRIVER
88608878
M: Mario Limonciello <[email protected]>
88618879
S: Maintained

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ config X86_INTEL_MID
597597
select I2C
598598
select DW_APB_TIMER
599599
select APB_TIMER
600-
select INTEL_SCU_IPC
600+
select INTEL_SCU_PCI
601601
select MFD_INTEL_MSIC
602602
---help---
603603
Select to build a kernel capable of supporting Intel MID (Mobile

arch/x86/include/asm/intel-mid.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,17 @@ static inline bool intel_mid_has_msic(void)
8888
return (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_PENWELL);
8989
}
9090

91+
extern void intel_scu_devices_create(void);
92+
extern void intel_scu_devices_destroy(void);
93+
9194
#else /* !CONFIG_X86_INTEL_MID */
9295

9396
#define intel_mid_identify_cpu() 0
9497
#define intel_mid_has_msic() 0
9598

99+
static inline void intel_scu_devices_create(void) { }
100+
static inline void intel_scu_devices_destroy(void) { }
101+
96102
#endif /* !CONFIG_X86_INTEL_MID */
97103

98104
enum intel_mid_timer_options {
@@ -115,9 +121,6 @@ extern enum intel_mid_timer_options intel_mid_timer_options;
115121
#define SFI_MTMR_MAX_NUM 8
116122
#define SFI_MRTC_MAX 8
117123

118-
extern void intel_scu_devices_create(void);
119-
extern void intel_scu_devices_destroy(void);
120-
121124
/* VRTC timer */
122125
#define MRST_VRTC_MAP_SZ 1024
123126
/* #define MRST_VRTC_PGOFFSET 0xc00 */

arch/x86/include/asm/intel_pmc_ipc.h

Lines changed: 0 additions & 59 deletions
This file was deleted.

arch/x86/include/asm/intel_scu_ipc.h

Lines changed: 61 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,69 @@
22
#ifndef _ASM_X86_INTEL_SCU_IPC_H_
33
#define _ASM_X86_INTEL_SCU_IPC_H_
44

5-
#include <linux/notifier.h>
6-
7-
#define IPCMSG_INDIRECT_READ 0x02
8-
#define IPCMSG_INDIRECT_WRITE 0x05
9-
10-
#define IPCMSG_COLD_OFF 0x80 /* Only for Tangier */
11-
12-
#define IPCMSG_WARM_RESET 0xF0
13-
#define IPCMSG_COLD_RESET 0xF1
14-
#define IPCMSG_SOFT_RESET 0xF2
15-
#define IPCMSG_COLD_BOOT 0xF3
16-
17-
#define IPCMSG_VRTC 0xFA /* Set vRTC device */
18-
/* Command id associated with message IPCMSG_VRTC */
19-
#define IPC_CMD_VRTC_SETTIME 1 /* Set time */
20-
#define IPC_CMD_VRTC_SETALARM 2 /* Set alarm */
21-
22-
/* Read single register */
23-
int intel_scu_ipc_ioread8(u16 addr, u8 *data);
24-
25-
/* Read a vector */
26-
int intel_scu_ipc_readv(u16 *addr, u8 *data, int len);
27-
28-
/* Write single register */
29-
int intel_scu_ipc_iowrite8(u16 addr, u8 data);
30-
31-
/* Write a vector */
32-
int intel_scu_ipc_writev(u16 *addr, u8 *data, int len);
33-
34-
/* Update single register based on the mask */
35-
int intel_scu_ipc_update_register(u16 addr, u8 data, u8 mask);
36-
37-
/* Issue commands to the SCU with or without data */
38-
int intel_scu_ipc_simple_command(int cmd, int sub);
39-
int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
40-
u32 *out, int outlen);
41-
42-
extern struct blocking_notifier_head intel_scu_notifier;
43-
44-
static inline void intel_scu_notifier_add(struct notifier_block *nb)
45-
{
46-
blocking_notifier_chain_register(&intel_scu_notifier, nb);
47-
}
48-
49-
static inline void intel_scu_notifier_remove(struct notifier_block *nb)
50-
{
51-
blocking_notifier_chain_unregister(&intel_scu_notifier, nb);
52-
}
53-
54-
static inline int intel_scu_notifier_post(unsigned long v, void *p)
5+
#include <linux/ioport.h>
6+
7+
struct device;
8+
struct intel_scu_ipc_dev;
9+
10+
/**
11+
* struct intel_scu_ipc_data - Data used to configure SCU IPC
12+
* @mem: Base address of SCU IPC MMIO registers
13+
* @irq: The IRQ number used for SCU (optional)
14+
*/
15+
struct intel_scu_ipc_data {
16+
struct resource mem;
17+
int irq;
18+
};
19+
20+
struct intel_scu_ipc_dev *
21+
__intel_scu_ipc_register(struct device *parent,
22+
const struct intel_scu_ipc_data *scu_data,
23+
struct module *owner);
24+
25+
#define intel_scu_ipc_register(parent, scu_data) \
26+
__intel_scu_ipc_register(parent, scu_data, THIS_MODULE)
27+
28+
void intel_scu_ipc_unregister(struct intel_scu_ipc_dev *scu);
29+
30+
struct intel_scu_ipc_dev *
31+
__devm_intel_scu_ipc_register(struct device *parent,
32+
const struct intel_scu_ipc_data *scu_data,
33+
struct module *owner);
34+
35+
#define devm_intel_scu_ipc_register(parent, scu_data) \
36+
__devm_intel_scu_ipc_register(parent, scu_data, THIS_MODULE)
37+
38+
struct intel_scu_ipc_dev *intel_scu_ipc_dev_get(void);
39+
void intel_scu_ipc_dev_put(struct intel_scu_ipc_dev *scu);
40+
struct intel_scu_ipc_dev *devm_intel_scu_ipc_dev_get(struct device *dev);
41+
42+
int intel_scu_ipc_dev_ioread8(struct intel_scu_ipc_dev *scu, u16 addr,
43+
u8 *data);
44+
int intel_scu_ipc_dev_iowrite8(struct intel_scu_ipc_dev *scu, u16 addr,
45+
u8 data);
46+
int intel_scu_ipc_dev_readv(struct intel_scu_ipc_dev *scu, u16 *addr,
47+
u8 *data, size_t len);
48+
int intel_scu_ipc_dev_writev(struct intel_scu_ipc_dev *scu, u16 *addr,
49+
u8 *data, size_t len);
50+
51+
int intel_scu_ipc_dev_update(struct intel_scu_ipc_dev *scu, u16 addr,
52+
u8 data, u8 mask);
53+
54+
int intel_scu_ipc_dev_simple_command(struct intel_scu_ipc_dev *scu, int cmd,
55+
int sub);
56+
int intel_scu_ipc_dev_command_with_size(struct intel_scu_ipc_dev *scu, int cmd,
57+
int sub, const void *in, size_t inlen,
58+
size_t size, void *out, size_t outlen);
59+
60+
static inline int intel_scu_ipc_dev_command(struct intel_scu_ipc_dev *scu, int cmd,
61+
int sub, const void *in, size_t inlen,
62+
void *out, size_t outlen)
5563
{
56-
return blocking_notifier_call_chain(&intel_scu_notifier, v, p);
64+
return intel_scu_ipc_dev_command_with_size(scu, cmd, sub, in, inlen,
65+
inlen, out, outlen);
5766
}
5867

59-
#define SCU_AVAILABLE 1
60-
#define SCU_DOWN 2
68+
#include <asm/intel_scu_ipc_legacy.h>
6169

6270
#endif

0 commit comments

Comments
 (0)