Skip to content

Commit 6930840

Browse files
committed
Merge tag 'platform-drivers-x86-v6.3-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: Improvements to aid s2idle debugging - Dell WMI-DDV: hwmon support - INT3472 camera sensor power-management: Improve privacy LED support - Intel VSEC: Base TPMI (Topology Aware Register and PM Capsule Interface) support - Mellanox: SN5600 and Nvidia L1 switch support - Microsoft Surface Support: Various cleanups + code improvements - tools/intel-speed-select: Various improvements - Miscellaneous other cleanups / fixes * tag 'platform-drivers-x86-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (80 commits) platform/x86: nvidia-wmi-ec-backlight: Add force module parameter platform/x86/amd/pmf: Add depends on CONFIG_POWER_SUPPLY platform/x86: dell-ddv: Prefer asynchronous probing platform/x86: dell-ddv: Add hwmon support Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces platform: mellanox: mlx-platform: Move bus shift assignment out of the loop platform: mellanox: mlx-platform: Add mux selection register to regmap platform_data/mlxreg: Add field with mapped resource address platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration platform: mellanox: Extend all systems with I2C notification callback platform: mellanox: Split logic in init and exit flow platform: mellanox: Split initialization procedure platform: mellanox: Introduce support of new Nvidia L1 switch platform: mellanox: Introduce support for next-generation 800GB/s switch platform: mellanox: Cosmetic changes - rename to more common name platform: mellanox: Change "reset_pwr_converter_fail" attribute platform: mellanox: Introduce support for rack manager switch MAINTAINERS: dell-wmi-sysman: drop Divya Bharathi x86/platform/uv: Make kobj_type structure constant platform/x86: think-lmi: Make kobj_type structure constant ...
2 parents 5f5ce6b + 0d9bdd8 commit 6930840

Some content is hidden

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

69 files changed

+3174
-562
lines changed

Documentation/ABI/stable/sysfs-driver-mlxreg-io

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ Description: These files allow to each of ASICs by writing 1.
522522

523523
The files are write only.
524524

525-
526525
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/comm_chnl_ready
527526
Date: July 2022
528527
KernelVersion: 5.20
@@ -542,3 +541,124 @@ Description: The file indicates COME module hardware configuration.
542541
The purpose is to expose some minor BOM changes for the same system SKU.
543542

544543
The file is read only.
544+
545+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/reset_pwr_converter_fail
546+
Date: February 2023
547+
KernelVersion: 6.3
548+
Contact: Vadim Pasternak <[email protected]>
549+
Description: This file shows the system reset cause due to power converter
550+
devices failure.
551+
Value 1 in file means this is reset cause, 0 - otherwise.
552+
553+
The file is read only.
554+
555+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/erot1_ap_reset
556+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/erot2_ap_reset
557+
Date: February 2023
558+
KernelVersion: 6.3
559+
Contact: Vadim Pasternak <[email protected]>
560+
Description: These files aim to monitor the status of the External Root of Trust (EROT)
561+
processor's RESET output to the Application Processor (AP).
562+
By reading this file, could be determined if the EROT has invalidated or
563+
revoked AP Firmware, at which point it will hold the AP in RESET until a
564+
valid firmware is loaded. This protects the AP from running an
565+
unauthorized firmware. In the normal flow, the AP reset should be released
566+
after the EROT validates the integrity of the FW, and it should be done so
567+
as quickly as possible so that the AP boots before the CPU starts to
568+
communicate to each ASIC.
569+
570+
The files are read only.
571+
572+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/erot1_recovery
573+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/erot2_recovery
574+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/erot1_reset
575+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/erot2_reset
576+
Date: February 2023
577+
KernelVersion: 6.3
578+
Contact: Vadim Pasternak <[email protected]>
579+
Description: These files aim to perform External Root of Trust (EROT) recovery
580+
sequence after EROT device failure.
581+
These EROT devices protect ASICs from unauthorized access and in normal
582+
flow their reset should be released with system power – earliest power
583+
up stage, so that EROTs can begin boot and authentication process before
584+
CPU starts to communicate to ASICs.
585+
Issuing a reset to the EROT while asserting the recovery signal will cause
586+
the EROT Application Processor to enter recovery mode so that the EROT FW
587+
can be updated/recovered.
588+
For reset/recovery the related file should be toggled by 1/0.
589+
590+
The files are read/write.
591+
592+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/erot1_wp
593+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/erot2_wp
594+
Date: February 2023
595+
KernelVersion: 6.3
596+
Contact: Vadim Pasternak <[email protected]>
597+
Description: These files allow access to External Root of Trust (EROT) for reset
598+
and recovery sequence after EROT device failure.
599+
Default is 0 (programming disabled).
600+
If the system is in locked-down mode writing this file will not be allowed.
601+
602+
The files are read/write.
603+
604+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/spi_chnl_select
605+
Date: February 2023
606+
KernelVersion: 6.3
607+
Contact: Vadim Pasternak <[email protected]>
608+
Description: This file allows SPI chip selection for External Root of Trust (EROT)
609+
device Out-of-Band recovery.
610+
File can be written with 0 or with 1. It selects which EROT can be accessed
611+
through SPI device.
612+
613+
The file is read/write.
614+
615+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/asic_pg_fail
616+
Date: February 2023
617+
KernelVersion: 6.3
618+
Contact: Vadim Pasternak [email protected]
619+
Description: This file shows ASIC Power Good status.
620+
Value 1 in file means ASIC Power Good failed, 0 - otherwise.
621+
622+
The file is read only.
623+
624+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/clk_brd1_boot_fail
625+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/clk_brd2_boot_fail
626+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/clk_brd_fail
627+
Date: February 2023
628+
KernelVersion: 6.3
629+
Contact: Vadim Pasternak [email protected]
630+
Description: These files are related to clock boards status in system.
631+
- clk_brd1_boot_fail: warning about 1-st clock board failed to boot from CI.
632+
- clk_brd2_boot_fail: warning about 2-nd clock board failed to boot from CI.
633+
- clk_brd_fail: error about common clock board boot failure.
634+
635+
The files are read only.
636+
637+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/clk_brd_prog_en
638+
Date: February 2023
639+
KernelVersion: 6.3
640+
Contact: Vadim Pasternak <[email protected]>
641+
Description: This file enables programming of clock boards.
642+
Default is 0 (programming disabled).
643+
If the system is in locked-down mode writing this file will not be allowed.
644+
645+
The file is read/write.
646+
647+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_converter_prog_en
648+
Date: February 2023
649+
KernelVersion: 6.3
650+
Contact: Vadim Pasternak <[email protected]>
651+
Description: This file enables programming of power converters.
652+
Default is 0 (programming disabled).
653+
If the system is in locked-down mode writing this file will not be allowed.
654+
655+
The file is read/write.
656+
657+
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/reset_ac_ok_fail
658+
Date: February 2023
659+
KernelVersion: 6.3
660+
Contact: Vadim Pasternak <[email protected]>
661+
Description: This file shows the system reset cause due to AC power failure.
662+
Value 1 in file means this is reset cause, 0 - otherwise.
663+
664+
The file is read only.

Documentation/driver-api/surface_aggregator/client.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
.. |ssam_notifier_unregister| replace:: :c:func:`ssam_notifier_unregister`
2020
.. |ssam_device_notifier_register| replace:: :c:func:`ssam_device_notifier_register`
2121
.. |ssam_device_notifier_unregister| replace:: :c:func:`ssam_device_notifier_unregister`
22-
.. |ssam_request_sync| replace:: :c:func:`ssam_request_sync`
22+
.. |ssam_request_do_sync| replace:: :c:func:`ssam_request_do_sync`
2323
.. |ssam_event_mask| replace:: :c:type:`enum ssam_event_mask <ssam_event_mask>`
2424

2525

@@ -191,7 +191,7 @@ data received from it is converted from little-endian to host endianness.
191191
* they do not correspond to an actual SAM/EC request.
192192
*/
193193
rqst.target_category = SSAM_SSH_TC_SAM;
194-
rqst.target_id = 0x01;
194+
rqst.target_id = SSAM_SSH_TID_SAM;
195195
rqst.command_id = 0x02;
196196
rqst.instance_id = 0x03;
197197
rqst.flags = SSAM_REQUEST_HAS_RESPONSE;
@@ -209,12 +209,12 @@ data received from it is converted from little-endian to host endianness.
209209
* with the SSAM_REQUEST_HAS_RESPONSE flag set in the specification
210210
* above.
211211
*/
212-
status = ssam_request_sync(ctrl, &rqst, &resp);
212+
status = ssam_request_do_sync(ctrl, &rqst, &resp);
213213
214214
/*
215215
* Alternatively use
216216
*
217-
* ssam_request_sync_onstack(ctrl, &rqst, &resp, sizeof(arg_le));
217+
* ssam_request_do_sync_onstack(ctrl, &rqst, &resp, sizeof(arg_le));
218218
*
219219
* to perform the request, allocating the message buffer directly
220220
* on the stack as opposed to allocation via kzalloc().
@@ -230,7 +230,7 @@ data received from it is converted from little-endian to host endianness.
230230
return status;
231231
}
232232
233-
Note that |ssam_request_sync| in its essence is a wrapper over lower-level
233+
Note that |ssam_request_do_sync| in its essence is a wrapper over lower-level
234234
request primitives, which may also be used to perform requests. Refer to its
235235
implementation and documentation for more details.
236236

@@ -241,7 +241,7 @@ one of the generator macros, for example via:
241241
242242
SSAM_DEFINE_SYNC_REQUEST_W(__ssam_tmp_perf_mode_set, __le32, {
243243
.target_category = SSAM_SSH_TC_TMP,
244-
.target_id = 0x01,
244+
.target_id = SSAM_SSH_TID_SAM,
245245
.command_id = 0x03,
246246
.instance_id = 0x00,
247247
});

Documentation/driver-api/surface_aggregator/ssh.rst

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
.. |DATA_NSQ| replace:: ``DATA_NSQ``
1414
.. |TC| replace:: ``TC``
1515
.. |TID| replace:: ``TID``
16+
.. |SID| replace:: ``SID``
1617
.. |IID| replace:: ``IID``
1718
.. |RQID| replace:: ``RQID``
1819
.. |CID| replace:: ``CID``
@@ -219,13 +220,13 @@ following fields, packed together and in order:
219220
- |u8|
220221
- Target category.
221222

222-
* - |TID| (out)
223+
* - |TID|
223224
- |u8|
224-
- Target ID for outgoing (host to EC) commands.
225+
- Target ID for commands/messages.
225226

226-
* - |TID| (in)
227+
* - |SID|
227228
- |u8|
228-
- Target ID for incoming (EC to host) commands.
229+
- Source ID for commands/messages.
229230

230231
* - |IID|
231232
- |u8|
@@ -286,19 +287,20 @@ general, however, a single target category should map to a single reserved
286287
event request ID.
287288

288289
Furthermore, requests, responses, and events have an associated target ID
289-
(``TID``). This target ID is split into output (host to EC) and input (EC to
290-
host) fields, with the respecting other field (e.g. output field on incoming
291-
messages) set to zero. Two ``TID`` values are known: Primary (``0x01``) and
292-
secondary (``0x02``). In general, the response to a request should have the
293-
same ``TID`` value, however, the field (output vs. input) should be used in
294-
accordance to the direction in which the response is sent (i.e. on the input
295-
field, as responses are generally sent from the EC to the host).
296-
297-
Note that, even though requests and events should be uniquely identifiable
298-
by target category and command ID alone, the EC may require specific
299-
target ID and instance ID values to accept a command. A command that is
300-
accepted for ``TID=1``, for example, may not be accepted for ``TID=2``
301-
and vice versa.
290+
(``TID``) and source ID (``SID``). These two fields indicate where a message
291+
originates from (``SID``) and what the intended target of the message is
292+
(``TID``). Note that a response to a specific request therefore has the source
293+
and target IDs swapped when compared to the original request (i.e. the request
294+
target is the response source and the request source is the response target).
295+
See (:c:type:`enum ssh_request_id <ssh_request_id>`) for possible values of
296+
both.
297+
298+
Note that, even though requests and events should be uniquely identifiable by
299+
target category and command ID alone, the EC may require specific target ID and
300+
instance ID values to accept a command. A command that is accepted for
301+
``TID=1``, for example, may not be accepted for ``TID=2`` and vice versa. While
302+
this may not always hold in reality, you can think of different target/source
303+
IDs indicating different physical ECs with potentially different feature sets.
302304

303305

304306
Limitations and Observations

MAINTAINERS

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5773,7 +5773,6 @@ F: Documentation/ABI/testing/sysfs-platform-dell-wmi-ddv
57735773
F: drivers/platform/x86/dell/dell-wmi-ddv.c
57745774

57755775
DELL WMI SYSMAN DRIVER
5776-
M: Divya Bharathi <[email protected]>
57775776
M: Prasanth Ksr <[email protected]>
57785777
57795778
@@ -10535,6 +10534,13 @@ S: Maintained
1053510534
F: arch/x86/include/asm/intel_telemetry.h
1053610535
F: drivers/platform/x86/intel/telemetry/
1053710536

10537+
INTEL TPMI DRIVER
10538+
M: Srinivas Pandruvada <[email protected]>
10539+
10540+
S: Maintained
10541+
F: drivers/platform/x86/intel/tpmi.c
10542+
F: include/linux/intel_tpmi.h
10543+
1053810544
INTEL UNCORE FREQUENCY CONTROL
1053910545
M: Srinivas Pandruvada <[email protected]>
1054010546
@@ -22480,6 +22486,7 @@ S: Maintained
2248022486
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
2248122487
F: drivers/platform/olpc/
2248222488
F: drivers/platform/x86/
22489+
F: include/linux/platform_data/x86/
2248322490

2248422491
X86 PLATFORM DRIVERS - ARCH
2248522492
R: Darren Hart <[email protected]>

drivers/hid/surface-hid/surface_hid.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int ssam_hid_get_descriptor(struct surface_hid_device *shid, u8 entry, u8
8080

8181
rsp.length = 0;
8282

83-
status = ssam_retry(ssam_request_sync_onstack, shid->ctrl, &rqst, &rsp,
83+
status = ssam_retry(ssam_request_do_sync_onstack, shid->ctrl, &rqst, &rsp,
8484
sizeof(*slice));
8585
if (status)
8686
return status;
@@ -131,7 +131,7 @@ static int ssam_hid_set_raw_report(struct surface_hid_device *shid, u8 rprt_id,
131131

132132
buf[0] = rprt_id;
133133

134-
return ssam_retry(ssam_request_sync, shid->ctrl, &rqst, NULL);
134+
return ssam_retry(ssam_request_do_sync, shid->ctrl, &rqst, NULL);
135135
}
136136

137137
static int ssam_hid_get_raw_report(struct surface_hid_device *shid, u8 rprt_id, u8 *buf, size_t len)
@@ -151,7 +151,7 @@ static int ssam_hid_get_raw_report(struct surface_hid_device *shid, u8 rprt_id,
151151
rsp.length = 0;
152152
rsp.pointer = buf;
153153

154-
return ssam_retry(ssam_request_sync_onstack, shid->ctrl, &rqst, &rsp, sizeof(rprt_id));
154+
return ssam_retry(ssam_request_do_sync_onstack, shid->ctrl, &rqst, &rsp, sizeof(rprt_id));
155155
}
156156

157157
static u32 ssam_hid_event_fn(struct ssam_event_notifier *nf, const struct ssam_event *event)
@@ -230,7 +230,7 @@ static void surface_hid_remove(struct ssam_device *sdev)
230230
}
231231

232232
static const struct ssam_device_id surface_hid_match[] = {
233-
{ SSAM_SDEV(HID, SSAM_ANY_TID, SSAM_ANY_IID, 0x00) },
233+
{ SSAM_SDEV(HID, ANY, SSAM_SSH_IID_ANY, 0x00) },
234234
{ },
235235
};
236236
MODULE_DEVICE_TABLE(ssam, surface_hid_match);

drivers/hid/surface-hid/surface_kbd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static int ssam_kbd_get_descriptor(struct surface_hid_device *shid, u8 entry, u8
4949
rsp.length = 0;
5050
rsp.pointer = buf;
5151

52-
status = ssam_retry(ssam_request_sync_onstack, shid->ctrl, &rqst, &rsp, sizeof(entry));
52+
status = ssam_retry(ssam_request_do_sync_onstack, shid->ctrl, &rqst, &rsp, sizeof(entry));
5353
if (status)
5454
return status;
5555

@@ -75,7 +75,7 @@ static int ssam_kbd_set_caps_led(struct surface_hid_device *shid, bool value)
7575
rqst.length = sizeof(value_u8);
7676
rqst.payload = &value_u8;
7777

78-
return ssam_retry(ssam_request_sync_onstack, shid->ctrl, &rqst, NULL, sizeof(value_u8));
78+
return ssam_retry(ssam_request_do_sync_onstack, shid->ctrl, &rqst, NULL, sizeof(value_u8));
7979
}
8080

8181
static int ssam_kbd_get_feature_report(struct surface_hid_device *shid, u8 *buf, size_t len)
@@ -97,7 +97,7 @@ static int ssam_kbd_get_feature_report(struct surface_hid_device *shid, u8 *buf,
9797
rsp.length = 0;
9898
rsp.pointer = buf;
9999

100-
status = ssam_retry(ssam_request_sync_onstack, shid->ctrl, &rqst, &rsp, sizeof(payload));
100+
status = ssam_retry(ssam_request_do_sync_onstack, shid->ctrl, &rqst, &rsp, sizeof(payload));
101101
if (status)
102102
return status;
103103

@@ -250,7 +250,7 @@ static int surface_kbd_probe(struct platform_device *pdev)
250250

251251
shid->uid.domain = SSAM_DOMAIN_SERIALHUB;
252252
shid->uid.category = SSAM_SSH_TC_KBD;
253-
shid->uid.target = 2;
253+
shid->uid.target = SSAM_SSH_TID_KIP;
254254
shid->uid.instance = 0;
255255
shid->uid.function = 0;
256256

0 commit comments

Comments
 (0)