From a92b0717f936df0bcf6adaf67e5f39fe9f11bcb0 Mon Sep 17 00:00:00 2001 From: Lars Schellhas van Kisfeld Date: Mon, 9 Nov 2026 18:04:52 +0100 Subject: [PATCH 1/5] platform/surface: aggregator_registry: Add thermal sensors and fan speed for Surface Book 3 The Surface Book 3 EC provides the same thermal sensor (TMP, function 2) and fan speed (FAN, instance 1) interfaces as the newer devices that already list them, but the Surface Book 3 node group does not include them. Add both nodes so that surface_temp and surface_fan can bind. Tested on a Surface Book 3 (15", i7-1065G7) by registering the same two nodes from an out-of-tree module: surface_temp exposes the nine EC sensors (I_RTS1 to I_RTS8 and I_VTS1, names reported by the EC) and surface_fan reports the fan speed. The values match the raw EC readings obtained through the SSAM cdev. The fan maximum already follows the platform profile on this device (about 6000 to 8000 rpm from low-power to performance), so keep the platform profile node without the has_fan property. The analysis, the out-of-tree test module and this changelog were prepared with the help of an AI coding assistant (Claude, Anthropic). I reviewed the change and tested it on the device as described above. Link: https://github.com/linux-surface/kernel/issues/117 Signed-off-by: Lars Schellhas van Kisfeld --- drivers/platform/surface/surface_aggregator_registry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index ef87965fcc930..ce1ffd2838e0c 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -241,6 +241,8 @@ static const struct software_node *ssam_node_group_sb3[] = { &ssam_node_bat_main, &ssam_node_bat_sb3base, &ssam_node_tmp_perf_profile, + &ssam_node_tmp_sensors, + &ssam_node_fan_speed, &ssam_node_bas_dtx, &ssam_node_hid_base_keyboard, &ssam_node_hid_base_touchpad, From dffb1ae394cd6989ca418da442540850e9f3b051 Mon Sep 17 00:00:00 2001 From: Lars Schellhas van Kisfeld Date: Sun, 15 Nov 2026 12:33:06 +0100 Subject: [PATCH 2/5] hwmon: surface_temp: Add support for the KIP thermal sensors On the Surface Book 3, the base (keyboard and peripheral controller, KIP) has its own set of thermal sensors behind the same TMP interface as the ones on the main controller (SAM). Add a match entry for the KIP target so that the driver can bind to such a node. Devices only get a TMP node on the KIP target if the registry lists one for them, so this does not change anything for other devices. Tested on a Surface Book 3 (15", i7-1065G7) with the registry node from the next patch, registered from an out-of-tree module: the driver binds and exposes the nine base sensors (I_RTS1 to I_RTS8 and I_VTS1, names reported by the EC). The analysis, the out-of-tree test module and this changelog were prepared with the help of an AI coding assistant (Claude, Anthropic). I reviewed the change and tested it on the device as described above. Link: https://github.com/linux-surface/kernel/issues/117 Signed-off-by: Lars Schellhas van Kisfeld --- drivers/hwmon/surface_temp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwmon/surface_temp.c b/drivers/hwmon/surface_temp.c index cd21f331f1576..ba51c567aff09 100644 --- a/drivers/hwmon/surface_temp.c +++ b/drivers/hwmon/surface_temp.c @@ -216,6 +216,7 @@ static int ssam_temp_probe(struct ssam_device *sdev) static const struct ssam_device_id ssam_temp_match[] = { { SSAM_SDEV(TMP, SAM, 0x00, 0x02) }, + { SSAM_SDEV(TMP, KIP, 0x00, 0x02) }, { }, }; MODULE_DEVICE_TABLE(ssam, ssam_temp_match); From ae3b649e724db681a4b29248398426c204b1c8f9 Mon Sep 17 00:00:00 2001 From: Lars Schellhas van Kisfeld Date: Sun, 15 Nov 2026 12:33:06 +0100 Subject: [PATCH 3/5] platform/surface: aggregator_registry: Add base thermal sensors for Surface Book 3 The Surface Book 3 base provides a second set of thermal sensors on the KIP target. Add the node below the base hub, like the other base devices, so that it is removed when the clipboard is detached and added again on attach, and so that surface_temp can bind to it. On Windows, the skin temperature of the base (I_VTS1 on KIP) is the input of the power management loop that limits the dGPU. Tested on a Surface Book 3 (15", i7-1065G7) by registering the same node below the base hub from an out-of-tree module, together with the surface_temp match entry from the previous patch: a second surface_thermal hwmon device appears with the nine base sensors. Both hwmon devices report the same sensor names, as provided by the EC; they can be told apart by their device path. The analysis, the out-of-tree test module and this changelog were prepared with the help of an AI coding assistant (Claude, Anthropic). I reviewed the change and tested it on the device as described above. Link: https://github.com/linux-surface/kernel/issues/117 Signed-off-by: Lars Schellhas van Kisfeld --- drivers/platform/surface/surface_aggregator_registry.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index ce1ffd2838e0c..61c1f649b6729 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -95,6 +95,12 @@ static const struct software_node ssam_node_tmp_sensors = { .parent = &ssam_node_root, }; +/* Thermal sensors of the Surface Book 3 base (KIP). */ +static const struct software_node ssam_node_tmp_sensors_sb3base = { + .name = "ssam:01:03:02:00:02", + .parent = &ssam_node_hub_base, +}; + /* Fan speed function. */ static const struct software_node ssam_node_fan_speed = { .name = "ssam:01:05:01:01:01", @@ -242,6 +248,7 @@ static const struct software_node *ssam_node_group_sb3[] = { &ssam_node_bat_sb3base, &ssam_node_tmp_perf_profile, &ssam_node_tmp_sensors, + &ssam_node_tmp_sensors_sb3base, &ssam_node_fan_speed, &ssam_node_bas_dtx, &ssam_node_hid_base_keyboard, From cba7f47e0b1407755fe69cbe3f74187a8a1f5f2f Mon Sep 17 00:00:00 2001 From: Lars Schellhas van Kisfeld Date: Sun, 15 Nov 2026 13:15:45 +0100 Subject: [PATCH 4/5] hwmon: surface_fan: Add support for the KIP fans The Surface Book 3 base (keyboard and peripheral controller, KIP) has two fans of its own, with the same FAN interface as the fan on the main controller (SAM), on instances 1 and 2. Add match entries for them so that the driver can bind to such nodes. Devices only get FAN nodes on the KIP target if the registry lists them, so this does not change anything for other devices. Tested on a Surface Book 3 (15", i7-1065G7) with the registry nodes from the next patch, registered from an out-of-tree module: the driver binds to both base fans. They report 0 rpm at idle; under dGPU load, the raw EC readings through the SSAM cdev showed both fans at about 2700 rpm after roughly two minutes. The analysis, the out-of-tree test module and this changelog were prepared with the help of an AI coding assistant (Claude, Anthropic). I reviewed the change and tested it on the device as described above. Link: https://github.com/linux-surface/kernel/issues/117 Signed-off-by: Lars Schellhas van Kisfeld --- drivers/hwmon/surface_fan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwmon/surface_fan.c b/drivers/hwmon/surface_fan.c index aafb4ac92e6c6..5fb18ae6c025c 100644 --- a/drivers/hwmon/surface_fan.c +++ b/drivers/hwmon/surface_fan.c @@ -64,6 +64,8 @@ static int surface_fan_probe(struct ssam_device *sdev) static const struct ssam_device_id ssam_fan_match[] = { { SSAM_SDEV(FAN, SAM, 0x01, 0x01) }, + { SSAM_SDEV(FAN, KIP, 0x01, 0x01) }, + { SSAM_SDEV(FAN, KIP, 0x02, 0x01) }, {}, }; MODULE_DEVICE_TABLE(ssam, ssam_fan_match); From fcbb1738d5f366a2a6eb41adf8968506b77ff174 Mon Sep 17 00:00:00 2001 From: Lars Schellhas van Kisfeld Date: Sun, 15 Nov 2026 13:15:46 +0100 Subject: [PATCH 5/5] platform/surface: aggregator_registry: Add base fans for Surface Book 3 The Surface Book 3 base has two fans on the KIP target (instances 1 and 2), which start up under dGPU load. Add their fan speed nodes below the base hub, like the other base devices, so that surface_fan can bind to them. Tested on a Surface Book 3 (15", i7-1065G7) by registering the same nodes below the base hub from an out-of-tree module, together with the surface_fan match entries from the previous patch: two more surface_fan hwmon devices appear for the base fans. The analysis, the out-of-tree test module and this changelog were prepared with the help of an AI coding assistant (Claude, Anthropic). I reviewed the change and tested it on the device as described above. Link: https://github.com/linux-surface/kernel/issues/117 Signed-off-by: Lars Schellhas van Kisfeld --- .../platform/surface/surface_aggregator_registry.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c index 61c1f649b6729..1194ae5f19ff4 100644 --- a/drivers/platform/surface/surface_aggregator_registry.c +++ b/drivers/platform/surface/surface_aggregator_registry.c @@ -107,6 +107,17 @@ static const struct software_node ssam_node_fan_speed = { .parent = &ssam_node_root, }; +/* Fan speed functions of the Surface Book 3 base (KIP, two fans). */ +static const struct software_node ssam_node_fan_speed_sb3base_1 = { + .name = "ssam:01:05:02:01:01", + .parent = &ssam_node_hub_base, +}; + +static const struct software_node ssam_node_fan_speed_sb3base_2 = { + .name = "ssam:01:05:02:02:01", + .parent = &ssam_node_hub_base, +}; + /* Tablet-mode switch via KIP subsystem. */ static const struct software_node ssam_node_kip_tablet_switch = { .name = "ssam:01:0e:01:00:01", @@ -250,6 +261,8 @@ static const struct software_node *ssam_node_group_sb3[] = { &ssam_node_tmp_sensors, &ssam_node_tmp_sensors_sb3base, &ssam_node_fan_speed, + &ssam_node_fan_speed_sb3base_1, + &ssam_node_fan_speed_sb3base_2, &ssam_node_bas_dtx, &ssam_node_hid_base_keyboard, &ssam_node_hid_base_touchpad,