diff --git a/configs/surface-6.6.config b/configs/surface-6.6.config index 94394029d..fedb251cf 100644 --- a/configs/surface-6.6.config +++ b/configs/surface-6.6.config @@ -19,6 +19,9 @@ CONFIG_SURFACE_KBD=m CONFIG_BATTERY_SURFACE=m CONFIG_CHARGER_SURFACE=m +CONFIG_SENSORS_SURFACE_TEMP=m +CONFIG_SENSORS_SURFACE_FAN=m + ## ## Surface Hotplug ## diff --git a/patches/6.6/0001-surface3-oemb.patch b/patches/6.6/0001-surface3-oemb.patch index ecbd889fd..5fc34305f 100644 --- a/patches/6.6/0001-surface3-oemb.patch +++ b/patches/6.6/0001-surface3-oemb.patch @@ -1,4 +1,4 @@ -From f4d984984f2ae00b30a5e104e5edfaf7e462671e Mon Sep 17 00:00:00 2001 +From d82f678f3ab57bc30a52237389693b1084ac1e49 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 18 Oct 2020 16:42:44 +0900 Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI diff --git a/patches/6.6/0002-mwifiex.patch b/patches/6.6/0002-mwifiex.patch index a37eee84f..a78d1f3ab 100644 --- a/patches/6.6/0002-mwifiex.patch +++ b/patches/6.6/0002-mwifiex.patch @@ -1,4 +1,4 @@ -From 8e709b1c6a7cc946e73b476204f42b7a83f2a643 Mon Sep 17 00:00:00 2001 +From 710646309780d1a59cbeae7e4bfa92068364aa67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Tue, 3 Nov 2020 13:28:04 +0100 Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface @@ -165,7 +165,7 @@ index d6ff964aec5bf..5d30ae39d65ec 100644 -- 2.43.0 -From d1410ffc4af3dcf34174cfddc955dd47a46d95fe Mon Sep 17 00:00:00 2001 +From d10371a089a968b913b9413e1f06bd3d9d154b21 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 4 Oct 2020 00:11:49 +0900 Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+ @@ -320,7 +320,7 @@ index 5d30ae39d65ec..c14eb56eb9118 100644 -- 2.43.0 -From 84a5cae97936af531bddd8f8210077d67f62edbb Mon Sep 17 00:00:00 2001 +From 59d4464c43b8c4090372cbf2632fc116a0ca8b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 25 Mar 2021 11:33:02 +0100 Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell diff --git a/patches/6.6/0003-ath10k.patch b/patches/6.6/0003-ath10k.patch index c0baa7f62..a84802fdf 100644 --- a/patches/6.6/0003-ath10k.patch +++ b/patches/6.6/0003-ath10k.patch @@ -1,4 +1,4 @@ -From 35431c175881cdcd93b0092e446d13ce5d2d6e31 Mon Sep 17 00:00:00 2001 +From d1f0488a3591ea31a8f493ad8cd3feb79e2338b8 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 27 Feb 2021 00:45:52 +0100 Subject: [PATCH] ath10k: Add module parameters to override board files diff --git a/patches/6.6/0004-ipts.patch b/patches/6.6/0004-ipts.patch index 5caaa718d..f0729a1a8 100644 --- a/patches/6.6/0004-ipts.patch +++ b/patches/6.6/0004-ipts.patch @@ -1,4 +1,4 @@ -From c915ce60036274596a32f4cd3b7842f276b77ec8 Mon Sep 17 00:00:00 2001 +From 4a25289e1ff42e22045f484673dd3846af3e0426 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Thu, 30 Jul 2020 13:21:53 +0200 Subject: [PATCH] misc: mei: Add missing IPTS device IDs @@ -36,7 +36,7 @@ index 676d566f38ddf..6b37dd1f8b2a3 100644 -- 2.43.0 -From d22aa15312311f849d4cc293206e582e03e7030e Mon Sep 17 00:00:00 2001 +From b81e81459d4077c94376c5680edd5b2fde70f297 Mon Sep 17 00:00:00 2001 From: Liban Hannan Date: Tue, 12 Apr 2022 23:31:12 +0100 Subject: [PATCH] iommu: ipts: use IOMMU passthrough mode for IPTS @@ -58,7 +58,7 @@ Patchset: ipts 1 file changed, 24 insertions(+) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c -index 4c3707384bd92..65762e0ef3d38 100644 +index 744e4e6b8d72d..0cbe3a5212548 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -38,6 +38,8 @@ @@ -85,7 +85,7 @@ index 4c3707384bd92..65762e0ef3d38 100644 const struct iommu_ops intel_iommu_ops; -@@ -2543,6 +2547,9 @@ static int device_def_domain_type(struct device *dev) +@@ -2545,6 +2549,9 @@ static int device_def_domain_type(struct device *dev) if ((iommu_identity_mapping & IDENTMAP_GFX) && IS_GFX_DEVICE(pdev)) return IOMMU_DOMAIN_IDENTITY; @@ -95,7 +95,7 @@ index 4c3707384bd92..65762e0ef3d38 100644 } return 0; -@@ -2850,6 +2857,9 @@ static int __init init_dmars(void) +@@ -2852,6 +2859,9 @@ static int __init init_dmars(void) if (!dmar_map_gfx) iommu_identity_mapping |= IDENTMAP_GFX; @@ -105,7 +105,7 @@ index 4c3707384bd92..65762e0ef3d38 100644 check_tylersburg_isoch(); ret = si_domain_init(hw_pass_through); -@@ -4829,6 +4839,17 @@ static void quirk_iommu_igfx(struct pci_dev *dev) +@@ -4832,6 +4842,17 @@ static void quirk_iommu_igfx(struct pci_dev *dev) dmar_map_gfx = 0; } @@ -123,7 +123,7 @@ index 4c3707384bd92..65762e0ef3d38 100644 /* G4x/GM45 integrated gfx dmar support is totally busted. */ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_igfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_igfx); -@@ -4864,6 +4885,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx); +@@ -4867,6 +4888,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163A, quirk_iommu_igfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx); @@ -136,7 +136,7 @@ index 4c3707384bd92..65762e0ef3d38 100644 -- 2.43.0 -From 2d75c775ba532f190ed6e6203c5083edbd76b7fc Mon Sep 17 00:00:00 2001 +From a16d734a58c18ef07813a8abe94320e69e0d77a7 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Sun, 11 Dec 2022 12:00:59 +0100 Subject: [PATCH] hid: Add support for Intel Precise Touch and Stylus diff --git a/patches/6.6/0005-ithc.patch b/patches/6.6/0005-ithc.patch index 06cd259aa..746bc94d7 100644 --- a/patches/6.6/0005-ithc.patch +++ b/patches/6.6/0005-ithc.patch @@ -1,4 +1,4 @@ -From a651f51dc9cfd47cf3194408c0d89a642a824de4 Mon Sep 17 00:00:00 2001 +From 7a359e9084a94ddfbacd67ea99c572bdeebb72f3 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Sun, 11 Dec 2022 12:03:38 +0100 Subject: [PATCH] iommu: intel: Disable source id verification for ITHC @@ -39,7 +39,7 @@ index 29b9e55dcf26c..986e91c813ae1 100644 -- 2.43.0 -From e58eead194ca06d74d25e8da0d0388d3bd49e1cc Mon Sep 17 00:00:00 2001 +From f023c8e014f11338ea77f6473152d56b79092e01 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Sun, 11 Dec 2022 12:10:54 +0100 Subject: [PATCH] hid: Add support for Intel Touch Host Controller @@ -1431,7 +1431,7 @@ index 0000000000000..6a9b0d480bc15 -- 2.43.0 -From 4f0092d234edb542342d821e0aed2cd99520fdc6 Mon Sep 17 00:00:00 2001 +From 37dc17be7687c220d8c84f3ed200fa4fedeafb04 Mon Sep 17 00:00:00 2001 From: quo Date: Mon, 23 Oct 2023 10:15:29 +0200 Subject: [PATCH] Update ITHC from module repo diff --git a/patches/6.6/0006-surface-sam.patch b/patches/6.6/0006-surface-sam.patch index fd1846ec9..a538fdb65 100644 --- a/patches/6.6/0006-surface-sam.patch +++ b/patches/6.6/0006-surface-sam.patch @@ -1,4 +1,4 @@ -From 4f3ef38898939d32ff2e0532cec074ae59d8bb2f Mon Sep 17 00:00:00 2001 +From 1336f715db65f12890442d46d85b6afbd28ffa38 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 22 Oct 2023 14:57:11 +0200 Subject: [PATCH] platform/surface: aggregator_registry: Add support for @@ -31,7 +31,7 @@ index 0fe5be5396525..0d8c8395c5886 100644 -- 2.43.0 -From f6bcb568ef471629c8dd4c48a8ddf53d5b422788 Mon Sep 17 00:00:00 2001 +From 04a113aa335b566860380818090ed0ce606377c0 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 20 Nov 2023 19:47:00 +0100 Subject: [PATCH] platform/surface: aggregator_registry: Add support for @@ -101,3 +101,737 @@ index 0d8c8395c5886..530db4db71aba 100644 -- 2.43.0 +From 31253c1714eef54d147ff70886be3e0b86301656 Mon Sep 17 00:00:00 2001 +From: Ivor Wanders +Date: Mon, 18 Dec 2023 19:21:32 -0500 +Subject: [PATCH] platform/surface: aggregator_registry: add entry for fan + speed + +Add an entry for the fan speed function. +Add this new entry to the Surface Pro 9 group. + +Signed-off-by: Ivor Wanders +Link: https://github.com/linux-surface/kernel/pull/144 +Reviewed-by: Maximilian Luz +Patchset: surface-sam +--- + 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 530db4db71aba..b0db25886c996 100644 +--- a/drivers/platform/surface/surface_aggregator_registry.c ++++ b/drivers/platform/surface/surface_aggregator_registry.c +@@ -74,6 +74,12 @@ static const struct software_node ssam_node_tmp_pprof = { + .parent = &ssam_node_root, + }; + ++/* Fan speed function. */ ++static const struct software_node ssam_node_fan_speed = { ++ .name = "ssam:01:05:01:01:01", ++ .parent = &ssam_node_root, ++}; ++ + /* Tablet-mode switch via KIP subsystem. */ + static const struct software_node ssam_node_kip_tablet_switch = { + .name = "ssam:01:0e:01:00:01", +@@ -319,6 +325,7 @@ static const struct software_node *ssam_node_group_sp9[] = { + &ssam_node_bat_ac, + &ssam_node_bat_main, + &ssam_node_tmp_pprof, ++ &ssam_node_fan_speed, + &ssam_node_pos_tablet_switch, + &ssam_node_hid_kip_keyboard, + &ssam_node_hid_kip_penstash, +-- +2.43.0 + +From ba442037211d245c84dcd4cd1ec81a09468305e6 Mon Sep 17 00:00:00 2001 +From: Ivor Wanders +Date: Thu, 30 Nov 2023 20:20:24 -0500 +Subject: [PATCH] hwmon: add fan speed monitoring driver for Surface devices + +Adds a driver that provides read only access to the fan speed for Microsoft +Surface Pro devices. The fan speed is always regulated by the EC and cannot +be influenced directly. + +Signed-off-by: Ivor Wanders +Link: https://github.com/linux-surface/kernel/pull/144 +Patchset: surface-sam +--- + Documentation/hwmon/index.rst | 1 + + Documentation/hwmon/surface_fan.rst | 25 ++++++++ + MAINTAINERS | 8 +++ + drivers/hwmon/Kconfig | 13 ++++ + drivers/hwmon/Makefile | 1 + + drivers/hwmon/surface_fan.c | 93 +++++++++++++++++++++++++++++ + 6 files changed, 141 insertions(+) + create mode 100644 Documentation/hwmon/surface_fan.rst + create mode 100644 drivers/hwmon/surface_fan.c + +diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst +index 88dadea85cfcd..266edff78972d 100644 +--- a/Documentation/hwmon/index.rst ++++ b/Documentation/hwmon/index.rst +@@ -202,6 +202,7 @@ Hardware Monitoring Kernel Drivers + smsc47m1 + sparx5-temp + stpddc60 ++ surface_fan + sy7636a-hwmon + tc654 + tc74 +diff --git a/Documentation/hwmon/surface_fan.rst b/Documentation/hwmon/surface_fan.rst +new file mode 100644 +index 0000000000000..07942574c4f0c +--- /dev/null ++++ b/Documentation/hwmon/surface_fan.rst +@@ -0,0 +1,25 @@ ++.. SPDX-License-Identifier: GPL-2.0-or-later ++ ++Kernel driver surface_fan ++========================= ++ ++Supported Devices: ++ ++ * Microsoft Surface Pro 9 ++ ++Author: Ivor Wanders ++ ++Description ++----------- ++ ++This provides monitoring of the fan found in some Microsoft Surface Pro devices, ++like the Surface Pro 9. The fan is always controlled by the onboard controller. ++ ++Sysfs interface ++--------------- ++ ++======================= ======= ========================================= ++Name Perm Description ++======================= ======= ========================================= ++``fan1_input`` RO Current fan speed in RPM. ++======================= ======= ========================================= +diff --git a/MAINTAINERS b/MAINTAINERS +index dd5de540ec0b5..63c3f93279277 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -14203,6 +14203,14 @@ F: Documentation/driver-api/surface_aggregator/clients/dtx.rst + F: drivers/platform/surface/surface_dtx.c + F: include/uapi/linux/surface_aggregator/dtx.h + ++MICROSOFT SURFACE SENSOR FAN DRIVER ++M: Maximilian Luz ++M: Ivor Wanders ++L: linux-hwmon@vger.kernel.org ++S: Maintained ++F: Documentation/hwmon/surface_fan.rst ++F: drivers/hwmon/surface_fan.c ++ + MICROSOFT SURFACE GPE LID SUPPORT DRIVER + M: Maximilian Luz + L: platform-driver-x86@vger.kernel.org +diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig +index ec38c88921589..b5267a2fbe5f3 100644 +--- a/drivers/hwmon/Kconfig ++++ b/drivers/hwmon/Kconfig +@@ -1961,6 +1961,19 @@ config SENSORS_SFCTEMP + This driver can also be built as a module. If so, the module + will be called sfctemp. + ++config SENSORS_SURFACE_FAN ++ tristate "Surface Fan Driver" ++ depends on SURFACE_AGGREGATOR ++ help ++ Driver that provides monitoring of the fan on Surface Pro devices that ++ have a fan, like the Surface Pro 9. ++ ++ This makes the fan's current speed accessible through the hwmon ++ system. It does not provide control over the fan, the firmware is ++ responsible for that, this driver merely provides monitoring. ++ ++ Select M or Y here, if you want to be able to read the fan's speed. ++ + config SENSORS_ADC128D818 + tristate "Texas Instruments ADC128D818" + depends on I2C +diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile +index 4ac9452b54304..208f7345f296e 100644 +--- a/drivers/hwmon/Makefile ++++ b/drivers/hwmon/Makefile +@@ -198,6 +198,7 @@ obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o + obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o + obj-$(CONFIG_SENSORS_SPARX5) += sparx5-temp.o + obj-$(CONFIG_SENSORS_STTS751) += stts751.o ++obj-$(CONFIG_SENSORS_SURFACE_FAN)+= surface_fan.o + obj-$(CONFIG_SENSORS_SY7636A) += sy7636a-hwmon.o + obj-$(CONFIG_SENSORS_AMC6821) += amc6821.o + obj-$(CONFIG_SENSORS_TC74) += tc74.o +diff --git a/drivers/hwmon/surface_fan.c b/drivers/hwmon/surface_fan.c +new file mode 100644 +index 0000000000000..7c2e3ae3eb40e +--- /dev/null ++++ b/drivers/hwmon/surface_fan.c +@@ -0,0 +1,93 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Surface Fan driver for Surface System Aggregator Module. It provides access ++ * to the fan's rpm through the hwmon system. ++ * ++ * Copyright (C) 2023 Ivor Wanders ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++// SSAM ++SSAM_DEFINE_SYNC_REQUEST_CL_R(__ssam_fan_rpm_get, __le16, { ++ .target_category = SSAM_SSH_TC_FAN, ++ .command_id = 0x01, ++}); ++ ++// hwmon ++umode_t surface_fan_hwmon_is_visible(const void *drvdata, ++ enum hwmon_sensor_types type, u32 attr, ++ int channel) ++{ ++ return 0444; ++} ++ ++static int surface_fan_hwmon_read(struct device *dev, ++ enum hwmon_sensor_types type, u32 attr, ++ int channel, long *val) ++{ ++ struct ssam_device *sdev = dev_get_drvdata(dev); ++ int ret; ++ __le16 value; ++ ++ ret = __ssam_fan_rpm_get(sdev, &value); ++ if (ret) ++ return ret; ++ ++ *val = le16_to_cpu(value); ++ ++ return ret; ++} ++ ++static const struct hwmon_channel_info *const surface_fan_info[] = { ++ HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT), ++ NULL ++}; ++ ++static const struct hwmon_ops surface_fan_hwmon_ops = { ++ .is_visible = surface_fan_hwmon_is_visible, ++ .read = surface_fan_hwmon_read, ++}; ++ ++static const struct hwmon_chip_info surface_fan_chip_info = { ++ .ops = &surface_fan_hwmon_ops, ++ .info = surface_fan_info, ++}; ++ ++static int surface_fan_probe(struct ssam_device *sdev) ++{ ++ struct device *hdev; ++ ++ hdev = devm_hwmon_device_register_with_info(&sdev->dev, ++ "surface_fan", sdev, ++ &surface_fan_chip_info, ++ NULL); ++ if (IS_ERR(hdev)) ++ return PTR_ERR(hdev); ++ ++ return 0; ++} ++ ++static const struct ssam_device_id ssam_fan_match[] = { ++ { SSAM_SDEV(FAN, SAM, 0x01, 0x01) }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(ssam, ssam_fan_match); ++ ++static struct ssam_device_driver surface_fan = { ++ .probe = surface_fan_probe, ++ .match_table = ssam_fan_match, ++ .driver = { ++ .name = "surface_fan", ++ .probe_type = PROBE_PREFER_ASYNCHRONOUS, ++ }, ++}; ++module_ssam_device_driver(surface_fan); ++ ++MODULE_AUTHOR("Ivor Wanders "); ++MODULE_DESCRIPTION("Fan Driver for Surface System Aggregator Module"); ++MODULE_LICENSE("GPL"); +-- +2.43.0 + +From e44dd763f976360449d9f15ed2bb756cc18d843b Mon Sep 17 00:00:00 2001 +From: Maximilian Luz +Date: Sat, 30 Dec 2023 18:07:54 +0100 +Subject: [PATCH] hwmon: Add thermal sensor driver for Surface Aggregator + Module + +Some of the newer Microsoft Surface devices (such as the Surface Book +3 and Pro 9) have thermal sensors connected via the Surface Aggregator +Module (the embedded controller on those devices). Add a basic driver +to read out the temperature values of those sensors. + +Link: https://github.com/linux-surface/surface-aggregator-module/issues/59 +Signed-off-by: Maximilian Luz +Patchset: surface-sam +--- + drivers/hwmon/Kconfig | 10 +++ + drivers/hwmon/Makefile | 1 + + drivers/hwmon/surface_temp.c | 165 +++++++++++++++++++++++++++++++++++ + 3 files changed, 176 insertions(+) + create mode 100644 drivers/hwmon/surface_temp.c + +diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig +index b5267a2fbe5f3..2eedbe85d18ab 100644 +--- a/drivers/hwmon/Kconfig ++++ b/drivers/hwmon/Kconfig +@@ -1974,6 +1974,16 @@ config SENSORS_SURFACE_FAN + + Select M or Y here, if you want to be able to read the fan's speed. + ++config SENSORS_SURFACE_TEMP ++ tristate "Microsoft Surface Thermal Sensor Driver" ++ depends on SURFACE_AGGREGATOR ++ help ++ Driver for monitoring thermal sensors connected via the Surface ++ Aggregator Module (embedded controller) on Microsoft Surface devices. ++ ++ This driver can also be built as a module. If so, the module ++ will be called surface_temp. ++ + config SENSORS_ADC128D818 + tristate "Texas Instruments ADC128D818" + depends on I2C +diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile +index 208f7345f296e..310d7a2e0f069 100644 +--- a/drivers/hwmon/Makefile ++++ b/drivers/hwmon/Makefile +@@ -199,6 +199,7 @@ obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o + obj-$(CONFIG_SENSORS_SPARX5) += sparx5-temp.o + obj-$(CONFIG_SENSORS_STTS751) += stts751.o + obj-$(CONFIG_SENSORS_SURFACE_FAN)+= surface_fan.o ++obj-$(CONFIG_SENSORS_SURFACE_TEMP)+= surface_temp.o + obj-$(CONFIG_SENSORS_SY7636A) += sy7636a-hwmon.o + obj-$(CONFIG_SENSORS_AMC6821) += amc6821.o + obj-$(CONFIG_SENSORS_TC74) += tc74.o +diff --git a/drivers/hwmon/surface_temp.c b/drivers/hwmon/surface_temp.c +new file mode 100644 +index 0000000000000..48c3e826713f6 +--- /dev/null ++++ b/drivers/hwmon/surface_temp.c +@@ -0,0 +1,165 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Thermal sensor subsystem driver for Surface System Aggregator Module (SSAM). ++ * ++ * Copyright (C) 2022-2023 Maximilian Luz ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++ ++/* -- SAM interface. -------------------------------------------------------- */ ++ ++SSAM_DEFINE_SYNC_REQUEST_CL_R(__ssam_tmp_get_available_sensors, __le16, { ++ .target_category = SSAM_SSH_TC_TMP, ++ .command_id = 0x04, ++}); ++ ++SSAM_DEFINE_SYNC_REQUEST_MD_R(__ssam_tmp_get_temperature, __le16, { ++ .target_category = SSAM_SSH_TC_TMP, ++ .command_id = 0x01, ++}); ++ ++static int ssam_tmp_get_available_sensors(struct ssam_device *sdev, s16 *sensors) ++{ ++ __le16 sensors_le; ++ int status; ++ ++ status = __ssam_tmp_get_available_sensors(sdev, &sensors_le); ++ if (status) ++ return status; ++ ++ *sensors = le16_to_cpu(sensors_le); ++ return 0; ++} ++ ++static int ssam_tmp_get_temperature(struct ssam_device *sdev, u8 iid, long *temperature) ++{ ++ __le16 temp_le; ++ int status; ++ ++ status = __ssam_tmp_get_temperature(sdev->ctrl, sdev->uid.target, iid, &temp_le); ++ if (status) ++ return status; ++ ++ /* Convert 1/10 °K to 1/1000 °C */ ++ *temperature = (le16_to_cpu(temp_le) - 2731) * 100L; ++ return 0; ++} ++ ++ ++/* -- Driver.---------------------------------------------------------------- */ ++ ++struct ssam_temp { ++ struct ssam_device *sdev; ++ s16 sensors; ++}; ++ ++static umode_t ssam_temp_hwmon_is_visible(const void *data, ++ enum hwmon_sensor_types type, ++ u32 attr, int channel) ++{ ++ const struct ssam_temp *ssam_temp = data; ++ ++ if (!(ssam_temp->sensors & BIT(channel))) ++ return 0; ++ ++ return 0444; ++} ++ ++static int ssam_temp_hwmon_read(struct device *dev, ++ enum hwmon_sensor_types type, ++ u32 attr, int channel, long *value) ++{ ++ const struct ssam_temp *ssam_temp = dev_get_drvdata(dev); ++ ++ return ssam_tmp_get_temperature(ssam_temp->sdev, channel + 1, value); ++} ++ ++static const struct hwmon_channel_info * const ssam_temp_hwmon_info[] = { ++ HWMON_CHANNEL_INFO(chip, ++ HWMON_C_REGISTER_TZ), ++ /* We have at most 16 thermal sensor channels. */ ++ HWMON_CHANNEL_INFO(temp, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT), ++ NULL ++}; ++ ++static const struct hwmon_ops ssam_temp_hwmon_ops = { ++ .is_visible = ssam_temp_hwmon_is_visible, ++ .read = ssam_temp_hwmon_read, ++}; ++ ++static const struct hwmon_chip_info ssam_temp_hwmon_chip_info = { ++ .ops = &ssam_temp_hwmon_ops, ++ .info = ssam_temp_hwmon_info, ++}; ++ ++static int ssam_temp_probe(struct ssam_device *sdev) ++{ ++ struct ssam_temp *ssam_temp; ++ struct device *hwmon_dev; ++ s16 sensors; ++ int status; ++ ++ status = ssam_tmp_get_available_sensors(sdev, &sensors); ++ if (status) ++ return status; ++ ++ ssam_temp = devm_kzalloc(&sdev->dev, sizeof(*ssam_temp), GFP_KERNEL); ++ if (!ssam_temp) ++ return -ENOMEM; ++ ++ ssam_temp->sdev = sdev; ++ ssam_temp->sensors = sensors; ++ ++ hwmon_dev = devm_hwmon_device_register_with_info(&sdev->dev, ++ "surface_thermal", ssam_temp, &ssam_temp_hwmon_chip_info, ++ NULL); ++ if (IS_ERR(hwmon_dev)) ++ return PTR_ERR(hwmon_dev); ++ ++ return 0; ++} ++ ++static const struct ssam_device_id ssam_temp_match[] = { ++ { SSAM_SDEV(TMP, SAM, 0x00, 0x02) }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(ssam, ssam_temp_match); ++ ++static struct ssam_device_driver ssam_temp = { ++ .probe = ssam_temp_probe, ++ .match_table = ssam_temp_match, ++ .driver = { ++ .name = "surface_temp", ++ .probe_type = PROBE_PREFER_ASYNCHRONOUS, ++ }, ++}; ++module_ssam_device_driver(ssam_temp); ++ ++MODULE_AUTHOR("Maximilian Luz "); ++MODULE_DESCRIPTION("Thermal sensor subsystem driver for Surface System Aggregator Module"); ++MODULE_LICENSE("GPL"); +-- +2.43.0 + +From 41399077b077cff19e9b9133955ed81b6d7aa527 Mon Sep 17 00:00:00 2001 +From: Maximilian Luz +Date: Sat, 30 Dec 2023 18:12:23 +0100 +Subject: [PATCH] hwmon: surface_temp: Add support for sensor names + +The thermal subsystem of the Surface Aggregator Module allows us to +query the names of the respective thermal sensors. Forward those to +userspace. + +Signed-off-by: Ivor Wanders +Co-Developed-by: Maximilian Luz +Signed-off-by: Maximilian Luz +Patchset: surface-sam +--- + drivers/hwmon/surface_temp.c | 113 +++++++++++++++++++++++++++++------ + 1 file changed, 96 insertions(+), 17 deletions(-) + +diff --git a/drivers/hwmon/surface_temp.c b/drivers/hwmon/surface_temp.c +index 48c3e826713f6..4c08926139dbf 100644 +--- a/drivers/hwmon/surface_temp.c ++++ b/drivers/hwmon/surface_temp.c +@@ -17,6 +17,27 @@ + + /* -- SAM interface. -------------------------------------------------------- */ + ++/* ++ * Available sensors are indicated by a 16-bit bitfield, where a 1 marks the ++ * presence of a sensor. So we have at most 16 possible sensors/channels. ++ */ ++#define SSAM_TMP_SENSOR_MAX_COUNT 16 ++ ++/* ++ * All names observed so far are 6 characters long, but there's only ++ * zeros after the name, so perhaps they can be longer. This number reflects ++ * the maximum zero-padded space observed in the returned buffer. ++ */ ++#define SSAM_TMP_SENSOR_NAME_LENGTH 18 ++ ++struct ssam_tmp_get_name_rsp { ++ __le16 unknown1; ++ char unknown2; ++ char name[SSAM_TMP_SENSOR_NAME_LENGTH]; ++} __packed; ++ ++static_assert(sizeof(struct ssam_tmp_get_name_rsp) == 21); ++ + SSAM_DEFINE_SYNC_REQUEST_CL_R(__ssam_tmp_get_available_sensors, __le16, { + .target_category = SSAM_SSH_TC_TMP, + .command_id = 0x04, +@@ -27,6 +48,11 @@ SSAM_DEFINE_SYNC_REQUEST_MD_R(__ssam_tmp_get_temperature, __le16, { + .command_id = 0x01, + }); + ++SSAM_DEFINE_SYNC_REQUEST_MD_R(__ssam_tmp_get_name, struct ssam_tmp_get_name_rsp, { ++ .target_category = SSAM_SSH_TC_TMP, ++ .command_id = 0x0e, ++}); ++ + static int ssam_tmp_get_available_sensors(struct ssam_device *sdev, s16 *sensors) + { + __le16 sensors_le; +@@ -54,12 +80,37 @@ static int ssam_tmp_get_temperature(struct ssam_device *sdev, u8 iid, long *temp + return 0; + } + ++static int ssam_tmp_get_name(struct ssam_device *sdev, u8 iid, char *buf, size_t buf_len) ++{ ++ struct ssam_tmp_get_name_rsp name_rsp; ++ int status; ++ ++ status = __ssam_tmp_get_name(sdev->ctrl, sdev->uid.target, iid, &name_rsp); ++ if (status) ++ return status; ++ ++ /* ++ * This should not fail unless the name in the returned struct is not ++ * null-terminated or someone changed something in the struct ++ * definitions above, since our buffer and struct have the same ++ * capacity by design. So if this fails blow this up with a warning. ++ * Since the more likely cause is that the returned string isn't ++ * null-terminated, we might have received garbage (as opposed to just ++ * an incomplete string), so also fail the function. ++ */ ++ status = strscpy(buf, name_rsp.name, buf_len); ++ WARN_ON(status < 0); ++ ++ return status < 0 ? status : 0; ++} ++ + + /* -- Driver.---------------------------------------------------------------- */ + + struct ssam_temp { + struct ssam_device *sdev; + s16 sensors; ++ char names[SSAM_TMP_SENSOR_MAX_COUNT][SSAM_TMP_SENSOR_NAME_LENGTH]; + }; + + static umode_t ssam_temp_hwmon_is_visible(const void *data, +@@ -83,33 +134,47 @@ static int ssam_temp_hwmon_read(struct device *dev, + return ssam_tmp_get_temperature(ssam_temp->sdev, channel + 1, value); + } + ++static int ssam_temp_hwmon_read_string(struct device *dev, ++ enum hwmon_sensor_types type, ++ u32 attr, int channel, const char **str) ++{ ++ const struct ssam_temp *ssam_temp = dev_get_drvdata(dev); ++ ++ *str = ssam_temp->names[channel]; ++ return 0; ++} ++ + static const struct hwmon_channel_info * const ssam_temp_hwmon_info[] = { + HWMON_CHANNEL_INFO(chip, + HWMON_C_REGISTER_TZ), +- /* We have at most 16 thermal sensor channels. */ ++ /* ++ * We have at most SSAM_TMP_SENSOR_MAX_COUNT = 16 thermal sensor ++ * channels. ++ */ + HWMON_CHANNEL_INFO(temp, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT, +- HWMON_T_INPUT), ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL, ++ HWMON_T_INPUT | HWMON_T_LABEL), + NULL + }; + + static const struct hwmon_ops ssam_temp_hwmon_ops = { + .is_visible = ssam_temp_hwmon_is_visible, + .read = ssam_temp_hwmon_read, ++ .read_string = ssam_temp_hwmon_read_string, + }; + + static const struct hwmon_chip_info ssam_temp_hwmon_chip_info = { +@@ -122,6 +187,7 @@ static int ssam_temp_probe(struct ssam_device *sdev) + struct ssam_temp *ssam_temp; + struct device *hwmon_dev; + s16 sensors; ++ int channel; + int status; + + status = ssam_tmp_get_available_sensors(sdev, &sensors); +@@ -135,6 +201,19 @@ static int ssam_temp_probe(struct ssam_device *sdev) + ssam_temp->sdev = sdev; + ssam_temp->sensors = sensors; + ++ /* Retrieve the name for each available sensor. */ ++ for (channel = 0; channel < SSAM_TMP_SENSOR_MAX_COUNT; channel++) ++ { ++ if (!(sensors & BIT(channel))) ++ continue; ++ ++ status = ssam_tmp_get_name(sdev, channel + 1, ++ ssam_temp->names[channel], ++ SSAM_TMP_SENSOR_NAME_LENGTH); ++ if (status) ++ return status; ++ } ++ + hwmon_dev = devm_hwmon_device_register_with_info(&sdev->dev, + "surface_thermal", ssam_temp, &ssam_temp_hwmon_chip_info, + NULL); +-- +2.43.0 + +From 37894568dd6a0bfb6422ce7c18df757fcb449512 Mon Sep 17 00:00:00 2001 +From: Maximilian Luz +Date: Sat, 30 Dec 2023 18:21:12 +0100 +Subject: [PATCH] platform/surface: aggregator_registry: Add support for + thermal sensors on the Surface Pro 9 + +The Surface Pro 9 has thermal sensors connected via the Surface +Aggregator Module. Add a device node to support those. + +Signed-off-by: Maximilian Luz +Patchset: surface-sam +--- + 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 b0db25886c996..797802d16f319 100644 +--- a/drivers/platform/surface/surface_aggregator_registry.c ++++ b/drivers/platform/surface/surface_aggregator_registry.c +@@ -74,6 +74,12 @@ static const struct software_node ssam_node_tmp_pprof = { + .parent = &ssam_node_root, + }; + ++/* Thermal sensors. */ ++static const struct software_node ssam_node_tmp_sensors = { ++ .name = "ssam:01:03:01:00:02", ++ .parent = &ssam_node_root, ++}; ++ + /* Fan speed function. */ + static const struct software_node ssam_node_fan_speed = { + .name = "ssam:01:05:01:01:01", +@@ -325,6 +331,7 @@ static const struct software_node *ssam_node_group_sp9[] = { + &ssam_node_bat_ac, + &ssam_node_bat_main, + &ssam_node_tmp_pprof, ++ &ssam_node_tmp_sensors, + &ssam_node_fan_speed, + &ssam_node_pos_tablet_switch, + &ssam_node_hid_kip_keyboard, +-- +2.43.0 + diff --git a/patches/6.6/0007-surface-sam-over-hid.patch b/patches/6.6/0007-surface-sam-over-hid.patch index 852fadde0..667c6b3a7 100644 --- a/patches/6.6/0007-surface-sam-over-hid.patch +++ b/patches/6.6/0007-surface-sam-over-hid.patch @@ -1,4 +1,4 @@ -From f400aa0d36c69ae445506c2d54ee68894c73f62f Mon Sep 17 00:00:00 2001 +From ed9c386e94b695909ed806887188e127e99e7140 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 25 Jul 2020 17:19:53 +0200 Subject: [PATCH] i2c: acpi: Implement RawBytes read access @@ -110,7 +110,7 @@ index d6037a3286690..a290ebc77aea2 100644 -- 2.43.0 -From cacbdfac4691df2e933634da722748c07a41f84f Mon Sep 17 00:00:00 2001 +From 09df61b1ed72eb879aeb7b8091606299bc61fdd6 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 13 Feb 2021 16:41:18 +0100 Subject: [PATCH] platform/surface: Add driver for Surface Book 1 dGPU switch diff --git a/patches/6.6/0008-surface-button.patch b/patches/6.6/0008-surface-button.patch index 5d2fc052a..40de3fb34 100644 --- a/patches/6.6/0008-surface-button.patch +++ b/patches/6.6/0008-surface-button.patch @@ -1,4 +1,4 @@ -From 77e585897f5fe7fe129b04b8e83d757fa29b1ea9 Mon Sep 17 00:00:00 2001 +From c57b5f294df0367dd1411c050654e1f03470f776 Mon Sep 17 00:00:00 2001 From: Sachi King Date: Tue, 5 Oct 2021 00:05:09 +1100 Subject: [PATCH] Input: soc_button_array - support AMD variant Surface devices @@ -20,10 +20,10 @@ Patchset: surface-button 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c -index e79f5497948b8..2bddbe6e9ea4d 100644 +index 9116f4248fd09..eba53cb0139e3 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c -@@ -537,8 +537,8 @@ static const struct soc_device_data soc_device_MSHW0028 = { +@@ -542,8 +542,8 @@ static const struct soc_device_data soc_device_MSHW0028 = { * Both, the Surface Pro 4 (surfacepro3_button.c) and the above mentioned * devices use MSHW0040 for power and volume buttons, however the way they * have to be addressed differs. Make sure that we only load this drivers @@ -34,7 +34,7 @@ index e79f5497948b8..2bddbe6e9ea4d 100644 */ #define MSHW0040_DSM_REVISION 0x01 #define MSHW0040_DSM_GET_OMPR 0x02 // get OEM Platform Revision -@@ -549,31 +549,14 @@ static const guid_t MSHW0040_DSM_UUID = +@@ -554,31 +554,14 @@ static const guid_t MSHW0040_DSM_UUID = static int soc_device_check_MSHW0040(struct device *dev) { acpi_handle handle = ACPI_HANDLE(dev); @@ -75,7 +75,7 @@ index e79f5497948b8..2bddbe6e9ea4d 100644 -- 2.43.0 -From ea20dcd3d4a502f1094de446f59ed7493c80ee05 Mon Sep 17 00:00:00 2001 +From 41a632737f84b0404c1faca01edb90aecc9378ee Mon Sep 17 00:00:00 2001 From: Sachi King Date: Tue, 5 Oct 2021 00:22:57 +1100 Subject: [PATCH] platform/surface: surfacepro3_button: don't load on amd diff --git a/patches/6.6/0009-surface-typecover.patch b/patches/6.6/0009-surface-typecover.patch index 73267a126..796699d25 100644 --- a/patches/6.6/0009-surface-typecover.patch +++ b/patches/6.6/0009-surface-typecover.patch @@ -1,4 +1,4 @@ -From 78cdfe56be5f311529c631b30411d43dca0131d8 Mon Sep 17 00:00:00 2001 +From 278a4a551b60ef874cde389c7b83a07655f5cda6 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 18 Feb 2023 01:02:49 +0100 Subject: [PATCH] USB: quirks: Add USB_QUIRK_DELAY_INIT for Surface Go 3 @@ -39,7 +39,7 @@ index 15e9bd180a1d2..0d70461d01e16 100644 -- 2.43.0 -From a09d5f847bbd5c75b3726cd384baa4adbd609685 Mon Sep 17 00:00:00 2001 +From 350edff5f5c90d811ff0686f95dd7f5222ee3d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 5 Nov 2020 13:09:45 +0100 Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when @@ -75,7 +75,7 @@ Patchset: surface-typecover 1 file changed, 98 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c -index 8db4ae05febc8..99a5efef45258 100644 +index 5ec1f174127a3..a7a12b56f79cb 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -34,7 +34,10 @@ @@ -257,7 +257,7 @@ index 8db4ae05febc8..99a5efef45258 100644 del_timer_sync(&td->release_timer); sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group); -@@ -2223,6 +2314,11 @@ static const struct hid_device_id mt_devices[] = { +@@ -2228,6 +2319,11 @@ static const struct hid_device_id mt_devices[] = { MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_CSR2) }, @@ -272,7 +272,7 @@ index 8db4ae05febc8..99a5efef45258 100644 -- 2.43.0 -From 020808468fd5759883cfafb402f473ad7698943a Mon Sep 17 00:00:00 2001 +From 29e073fd0ed75ce3f28b49a4fd34358104a3fd13 Mon Sep 17 00:00:00 2001 From: PJungkamp Date: Fri, 25 Feb 2022 12:04:25 +0100 Subject: [PATCH] hid/multitouch: Add support for surface pro type cover tablet @@ -301,7 +301,7 @@ Patchset: surface-typecover 1 file changed, 122 insertions(+), 26 deletions(-) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c -index 99a5efef45258..6ae43ea90bcd5 100644 +index a7a12b56f79cb..d4ac41f2f9a8a 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -77,6 +77,7 @@ MODULE_LICENSE("GPL"); diff --git a/patches/6.6/0010-surface-shutdown.patch b/patches/6.6/0010-surface-shutdown.patch index aa2e87892..5bdea4577 100644 --- a/patches/6.6/0010-surface-shutdown.patch +++ b/patches/6.6/0010-surface-shutdown.patch @@ -1,4 +1,4 @@ -From 050b554ce290dd17ffff396209b7e0573e500d9f Mon Sep 17 00:00:00 2001 +From b57c1784927f0ef467efdee4cb2a026d7eea3c1c Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 19 Feb 2023 22:12:24 +0100 Subject: [PATCH] PCI: Add quirk to prevent calling shutdown mehtod @@ -81,7 +81,7 @@ index ae95d09507722..036af941b5e6b 100644 +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x466d, quirk_no_shutdown); // Thunderbolt 4 NHI +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x46a8, quirk_no_shutdown); // GPU diff --git a/include/linux/pci.h b/include/linux/pci.h -index b56417276042d..658b3419f86dc 100644 +index 1596b1205b8d8..608ab04a0b6c9 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -465,6 +465,7 @@ struct pci_dev { diff --git a/patches/6.6/0011-surface-gpe.patch b/patches/6.6/0011-surface-gpe.patch index 0ec6e854a..b16db96c8 100644 --- a/patches/6.6/0011-surface-gpe.patch +++ b/patches/6.6/0011-surface-gpe.patch @@ -1,4 +1,4 @@ -From ba0d5f3a5bb0cdec0585ff988c5057a19fd92380 Mon Sep 17 00:00:00 2001 +From 2d4cd827e3fc8aec6dee8da356eda809152d34ce Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 12 Mar 2023 01:41:57 +0100 Subject: [PATCH] platform/surface: gpe: Add support for Surface Pro 9 diff --git a/patches/6.6/0012-cameras.patch b/patches/6.6/0012-cameras.patch index e32909898..ca6d0284f 100644 --- a/patches/6.6/0012-cameras.patch +++ b/patches/6.6/0012-cameras.patch @@ -1,4 +1,4 @@ -From 5fc67a35fb06a027c4ccbbe62e0aafb4272e8747 Mon Sep 17 00:00:00 2001 +From c01ee9d838aff57b20b6fe9d57aaae5439748680 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 10 Oct 2021 20:56:57 +0200 Subject: [PATCH] ACPI: delay enumeration of devices with a _DEP pointing to an @@ -74,7 +74,7 @@ index 1d249d0f61ae4..558cf449a6e2c 100644 -- 2.43.0 -From a0f5584f1e5d9820edf8c4735d0f047ac8f8b895 Mon Sep 17 00:00:00 2001 +From 992be6ed831018a7673a0424adad595c44475de7 Mon Sep 17 00:00:00 2001 From: zouxiaoh Date: Fri, 25 Jun 2021 08:52:59 +0800 Subject: [PATCH] iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs @@ -100,7 +100,7 @@ Patchset: cameras 1 file changed, 30 insertions(+) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c -index 65762e0ef3d38..23e02f12abb4d 100644 +index 0cbe3a5212548..9f3df56628894 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -38,6 +38,12 @@ @@ -131,7 +131,7 @@ index 65762e0ef3d38..23e02f12abb4d 100644 #define IDENTMAP_IPTS 16 const struct iommu_ops intel_iommu_ops; -@@ -2548,6 +2556,9 @@ static int device_def_domain_type(struct device *dev) +@@ -2550,6 +2558,9 @@ static int device_def_domain_type(struct device *dev) if ((iommu_identity_mapping & IDENTMAP_GFX) && IS_GFX_DEVICE(pdev)) return IOMMU_DOMAIN_IDENTITY; @@ -141,7 +141,7 @@ index 65762e0ef3d38..23e02f12abb4d 100644 if ((iommu_identity_mapping & IDENTMAP_IPTS) && IS_IPTS(pdev)) return IOMMU_DOMAIN_IDENTITY; } -@@ -2857,6 +2868,9 @@ static int __init init_dmars(void) +@@ -2859,6 +2870,9 @@ static int __init init_dmars(void) if (!dmar_map_gfx) iommu_identity_mapping |= IDENTMAP_GFX; @@ -151,7 +151,7 @@ index 65762e0ef3d38..23e02f12abb4d 100644 if (!dmar_map_ipts) iommu_identity_mapping |= IDENTMAP_IPTS; -@@ -4839,6 +4853,18 @@ static void quirk_iommu_igfx(struct pci_dev *dev) +@@ -4842,6 +4856,18 @@ static void quirk_iommu_igfx(struct pci_dev *dev) dmar_map_gfx = 0; } @@ -170,7 +170,7 @@ index 65762e0ef3d38..23e02f12abb4d 100644 static void quirk_iommu_ipts(struct pci_dev *dev) { if (!IS_IPTS(dev)) -@@ -4850,6 +4876,7 @@ static void quirk_iommu_ipts(struct pci_dev *dev) +@@ -4853,6 +4879,7 @@ static void quirk_iommu_ipts(struct pci_dev *dev) pci_info(dev, "Passthrough IOMMU for IPTS\n"); dmar_map_ipts = 0; } @@ -178,7 +178,7 @@ index 65762e0ef3d38..23e02f12abb4d 100644 /* G4x/GM45 integrated gfx dmar support is totally busted. */ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_igfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_igfx); -@@ -4885,6 +4912,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx); +@@ -4888,6 +4915,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163A, quirk_iommu_igfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx); @@ -191,7 +191,7 @@ index 65762e0ef3d38..23e02f12abb4d 100644 -- 2.43.0 -From d2550ab9fa9504a4ea38977b3428284e82c01688 Mon Sep 17 00:00:00 2001 +From a3e7ba42e2b2cce37b0d4987fde18c745139c19b Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 10 Oct 2021 20:57:02 +0200 Subject: [PATCH] platform/x86: int3472: Enable I2c daisy chain @@ -228,7 +228,7 @@ index 1e107fd49f828..e3e1696e7f0ee 100644 -- 2.43.0 -From d3a4749fe6501bce7229faf4aff6d18c533aa4f8 Mon Sep 17 00:00:00 2001 +From 9caa85a76f4310dd758c406b7754907ebdbb3931 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 2 Mar 2023 12:59:39 +0000 Subject: [PATCH] platform/x86: int3472: Remap reset GPIO for INT347E @@ -284,7 +284,7 @@ index e33c2d75975cf..c0c90ae66b705 100644 -- 2.43.0 -From fe8ebb9be69bc238a6b202cce188156309685e39 Mon Sep 17 00:00:00 2001 +From 3ede4c09a68bc8ee1820986f865133c3cd188f2e Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Tue, 21 Mar 2023 13:45:26 +0000 Subject: [PATCH] media: i2c: Clarify that gain is Analogue gain in OV7251 @@ -323,7 +323,7 @@ index 675fb37a6feae..43b30db08c9e4 100644 -- 2.43.0 -From a62bfd2bda8ccae6f4eaaed3776cf4739f97e5fe Mon Sep 17 00:00:00 2001 +From 7161e88bfd849eb77ad8dcf5111ebc4a3f8c3fd4 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 22 Mar 2023 11:01:42 +0000 Subject: [PATCH] media: v4l2-core: Acquire privacy led in @@ -374,7 +374,7 @@ index 7f181fbbb1407..1c0347de4e216 100644 -- 2.43.0 -From 3553ed3f540574ed40b60e0892e62649e9219a37 Mon Sep 17 00:00:00 2001 +From aab439d9ca04f9e56b1573fb6fe666acd6ecc0fa Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Tue, 21 Mar 2023 23:37:16 +0800 Subject: [PATCH] platform: x86: int3472: Add MFD cell for tps68470 LED @@ -415,7 +415,7 @@ index e3e1696e7f0ee..423dc555093f7 100644 -- 2.43.0 -From 217b1030fa261aff9cd32603edcd72b26dc9c200 Mon Sep 17 00:00:00 2001 +From 110530f6b622a9f4ae2308d684d7624be69218f9 Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Tue, 21 Mar 2023 23:37:17 +0800 Subject: [PATCH] include: mfd: tps68470: Add masks for LEDA and LEDB @@ -456,7 +456,7 @@ index 7807fa329db00..2d2abb25b944f 100644 -- 2.43.0 -From 9f0505439073e86b98bb3947a4e2f5a8edabc29c Mon Sep 17 00:00:00 2001 +From 9353e9a63ccf0ffca8a097c4ebee7674f8a67d11 Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Tue, 21 Mar 2023 23:37:18 +0800 Subject: [PATCH] leds: tps68470: Add LED control for tps68470 diff --git a/patches/6.6/0013-amd-gpio.patch b/patches/6.6/0013-amd-gpio.patch index 84f670328..5a9e1eef0 100644 --- a/patches/6.6/0013-amd-gpio.patch +++ b/patches/6.6/0013-amd-gpio.patch @@ -1,4 +1,4 @@ -From 80f145abe52096e57945c45c8910d93fd1b2e6cc Mon Sep 17 00:00:00 2001 +From 63ebdc4f3b214e6bc789b55432fa9c5d1dbe916f Mon Sep 17 00:00:00 2001 From: Sachi King Date: Sat, 29 May 2021 17:47:38 +1000 Subject: [PATCH] ACPI: Add quirk for Surface Laptop 4 AMD missing irq 7 @@ -65,7 +65,7 @@ index c55c0ef47a187..f29740cf89ff6 100644 -- 2.43.0 -From b7cad9376fc6575bc8bd7c559009c032d3869295 Mon Sep 17 00:00:00 2001 +From 82d8be77dbf1f5df125c796b7fdc8c60f2139eb8 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 3 Jun 2021 14:04:26 +0200 Subject: [PATCH] ACPI: Add AMD 13" Surface Laptop 4 model to irq 7 override diff --git a/patches/6.6/0014-rtc.patch b/patches/6.6/0014-rtc.patch index a6dcde9af..7d6c49d0d 100644 --- a/patches/6.6/0014-rtc.patch +++ b/patches/6.6/0014-rtc.patch @@ -1,4 +1,4 @@ -From 3e1a851ef0d91645fb3cfbe1cec7f74d2853e165 Mon Sep 17 00:00:00 2001 +From 55aabf536ba74a27665aa48413ff958be42cb8eb Mon Sep 17 00:00:00 2001 From: "Bart Groeneveld | GPX Solutions B.V" Date: Mon, 5 Dec 2022 16:08:46 +0100 Subject: [PATCH] acpi: allow usage of acpi_tad on HW-reduced platforms