From dac297bf1fbdab4ce07677ba6e0f3b1bd9ff7af1 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Tue, 28 Jan 2020 23:12:08 +0100 Subject: [PATCH] Update v5.4 patches --- ...-power.patch => 0001-surface3-power.patch} | 12 ++-- patches/5.4/0002-hid.patch | 27 -------- ...-spi-dma.patch => 0002-surface3-spi.patch} | 6 +- patches/5.4/0003-surface3-oemb.patch | 69 +++++++++++++++++++ ...ioremap_uc.patch => 0004-ioremap_uc.patch} | 6 +- ...face-acpi.patch => 0005-surface-sam.patch} | 37 +++++----- ...rface-lte.patch => 0006-surface-lte.patch} | 6 +- .../5.4/{0006-wifi.patch => 0007-wifi.patch} | 8 +-- 8 files changed, 107 insertions(+), 64 deletions(-) rename patches/5.4/{0004-surface3-power.patch => 0001-surface3-power.patch} (98%) delete mode 100644 patches/5.4/0002-hid.patch rename patches/5.4/{0007-surface3-spi-dma.patch => 0002-surface3-spi.patch} (94%) create mode 100644 patches/5.4/0003-surface3-oemb.patch rename patches/5.4/{0001-ioremap_uc.patch => 0004-ioremap_uc.patch} (96%) rename patches/5.4/{0003-surface-acpi.patch => 0005-surface-sam.patch} (99%) rename patches/5.4/{0005-surface-lte.patch => 0006-surface-lte.patch} (88%) rename patches/5.4/{0006-wifi.patch => 0007-wifi.patch} (97%) diff --git a/patches/5.4/0004-surface3-power.patch b/patches/5.4/0001-surface3-power.patch similarity index 98% rename from patches/5.4/0004-surface3-power.patch rename to patches/5.4/0001-surface3-power.patch index c325bd6ea..97f16248e 100644 --- a/patches/5.4/0004-surface3-power.patch +++ b/patches/5.4/0001-surface3-power.patch @@ -1,7 +1,7 @@ -From bd28b11662cc9fba2f92d69e3d132c5a50b3537a Mon Sep 17 00:00:00 2001 +From fd2d9ca288283c93f4d623bc0d4fdd52e4aaa1c1 Mon Sep 17 00:00:00 2001 From: qzed Date: Tue, 17 Sep 2019 17:17:56 +0200 -Subject: [PATCH 4/7] surface3-power +Subject: [PATCH 1/7] surface3-power --- drivers/platform/x86/Kconfig | 7 + @@ -11,10 +11,10 @@ Subject: [PATCH 4/7] surface3-power create mode 100644 drivers/platform/x86/surface3_power.c diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig -index 675ec12cbc0e..cf709b3dd0cd 100644 +index 1cab99320514..348c795019fa 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig -@@ -1210,6 +1210,13 @@ config SURFACE_3_BUTTON +@@ -1209,6 +1209,13 @@ config SURFACE_3_BUTTON ---help--- This driver handles the power/home/volume buttons on the Microsoft Surface 3 tablet. @@ -29,7 +29,7 @@ index 675ec12cbc0e..cf709b3dd0cd 100644 tristate "Intel P-Unit IPC Driver" ---help--- diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile -index 18f5a4ba7244..19b56f2181eb 100644 +index 415104033060..6dd955ad9bf1 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -85,6 +85,7 @@ obj-$(CONFIG_INTEL_PMC_IPC) += intel_pmc_ipc.o @@ -651,5 +651,5 @@ index 000000000000..e0af01a60302 +MODULE_DESCRIPTION("mshw0011 driver"); +MODULE_LICENSE("GPL v2"); -- -2.24.1 +2.25.0 diff --git a/patches/5.4/0002-hid.patch b/patches/5.4/0002-hid.patch deleted file mode 100644 index 3a914eb71..000000000 --- a/patches/5.4/0002-hid.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4e3ea1440ba9d3b72d7aebdf54221d27dee36793 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= -Date: Wed, 6 Nov 2019 19:43:26 +0900 -Subject: [PATCH 2/7] hid - ---- - drivers/hid/hid-core.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c -index 2fa3587d974f..e0b241bd3070 100644 ---- a/drivers/hid/hid-core.c -+++ b/drivers/hid/hid-core.c -@@ -781,6 +781,10 @@ static void hid_scan_feature_usage(struct hid_parser *parser, u32 usage) - if (usage == 0xff0000c5 && parser->global.report_count == 256 && - parser->global.report_size == 8) - parser->scan_flags |= HID_SCAN_FLAG_MT_WIN_8; -+ -+ if (usage == 0xff0000c6 && parser->global.report_count == 1 && -+ parser->global.report_size == 8) -+ parser->scan_flags |= HID_SCAN_FLAG_MT_WIN_8; - } - - static void hid_scan_collection(struct hid_parser *parser, unsigned type) --- -2.24.1 - diff --git a/patches/5.4/0007-surface3-spi-dma.patch b/patches/5.4/0002-surface3-spi.patch similarity index 94% rename from patches/5.4/0007-surface3-spi-dma.patch rename to patches/5.4/0002-surface3-spi.patch index 651c650ff..c5aa69a15 100644 --- a/patches/5.4/0007-surface3-spi-dma.patch +++ b/patches/5.4/0002-surface3-spi.patch @@ -1,7 +1,7 @@ -From 995dc220a596617eaf5ccd543a9a9b2e3d1e7bf2 Mon Sep 17 00:00:00 2001 +From 6c026612d51eb989199a960a0b473f192665967c Mon Sep 17 00:00:00 2001 From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com> Date: Fri, 6 Dec 2019 23:10:30 +0900 -Subject: [PATCH 7/7] surface3-spi dma +Subject: [PATCH 2/7] surface3-spi --- drivers/input/touchscreen/surface3_spi.c | 26 ++++++++++++++++++++++++ @@ -59,5 +59,5 @@ index ce4828b1415a..63b0b8ddf090 100644 } -- -2.24.1 +2.25.0 diff --git a/patches/5.4/0003-surface3-oemb.patch b/patches/5.4/0003-surface3-oemb.patch new file mode 100644 index 000000000..22f6e6b57 --- /dev/null +++ b/patches/5.4/0003-surface3-oemb.patch @@ -0,0 +1,69 @@ +From 2aec90cef7054c9fefeb9243e1e6f0ce59c6e882 Mon Sep 17 00:00:00 2001 +From: Chih-Wei Huang +Date: Tue, 18 Sep 2018 11:01:37 +0800 +Subject: [PATCH 3/7] surface3-oemb + +--- + drivers/platform/x86/surface3-wmi.c | 7 +++++++ + sound/soc/codecs/rt5645.c | 9 +++++++++ + sound/soc/intel/common/soc-acpi-intel-cht-match.c | 6 ++++++ + 3 files changed, 22 insertions(+) + +diff --git a/drivers/platform/x86/surface3-wmi.c b/drivers/platform/x86/surface3-wmi.c +index 130b6f52a600..801083aa56d6 100644 +--- a/drivers/platform/x86/surface3-wmi.c ++++ b/drivers/platform/x86/surface3-wmi.c +@@ -37,6 +37,13 @@ static const struct dmi_system_id surface3_dmi_table[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), + }, + }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), ++ DMI_MATCH(DMI_SYS_VENDOR, "OEMB"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"), ++ }, ++ }, + #endif + { } + }; +diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c +index 19662ee330d6..dbe70f80d1de 100644 +--- a/sound/soc/codecs/rt5645.c ++++ b/sound/soc/codecs/rt5645.c +@@ -3675,6 +3675,15 @@ static const struct dmi_system_id dmi_platform_data[] = { + }, + .driver_data = (void *)&intel_braswell_platform_data, + }, ++ { ++ .ident = "Microsoft Surface 3", ++ .matches = { ++ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), ++ DMI_MATCH(DMI_SYS_VENDOR, "OEMB"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"), ++ }, ++ .driver_data = (void *)&intel_braswell_platform_data, ++ }, + { + /* + * Match for the GPDwin which unfortunately uses somewhat +diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c +index d0fb43c2b9f6..de2583918afd 100644 +--- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c +@@ -26,6 +26,12 @@ static const struct dmi_system_id cht_table[] = { + DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), + }, ++ .callback = cht_surface_quirk_cb, ++ .matches = { ++ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), ++ DMI_MATCH(DMI_SYS_VENDOR, "OEMB"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"), ++ }, + }, + { } + }; +-- +2.25.0 + diff --git a/patches/5.4/0001-ioremap_uc.patch b/patches/5.4/0004-ioremap_uc.patch similarity index 96% rename from patches/5.4/0001-ioremap_uc.patch rename to patches/5.4/0004-ioremap_uc.patch index da74f8839..af7821f00 100644 --- a/patches/5.4/0001-ioremap_uc.patch +++ b/patches/5.4/0004-ioremap_uc.patch @@ -1,7 +1,7 @@ -From 8b8b25e23cc3501b18674b8ed599ffef33bafa6e Mon Sep 17 00:00:00 2001 +From 5d9684cf5e5ad7441a0d8b11c04e23e44ba57fa1 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Wed, 16 Oct 2019 15:06:28 -0600 -Subject: [PATCH 1/7] ioremap_uc +Subject: [PATCH 4/7] ioremap_uc --- .../driver-api/driver-model/devres.rst | 1 + @@ -93,5 +93,5 @@ index 6a0e9bd6524a..17624d35e82d 100644 * devm_ioremap_nocache - Managed ioremap_nocache() * @dev: Generic device to remap IO address for -- -2.24.1 +2.25.0 diff --git a/patches/5.4/0003-surface-acpi.patch b/patches/5.4/0005-surface-sam.patch similarity index 99% rename from patches/5.4/0003-surface-acpi.patch rename to patches/5.4/0005-surface-sam.patch index 3b89f964d..9da520cce 100644 --- a/patches/5.4/0003-surface-acpi.patch +++ b/patches/5.4/0005-surface-sam.patch @@ -1,14 +1,14 @@ -From e6fa887173e4d0e6477421b9c38072f7f4063ade Mon Sep 17 00:00:00 2001 +From 30399aca12e933c6945ceb241882f80bb40a7931 Mon Sep 17 00:00:00 2001 From: qzed Date: Mon, 26 Aug 2019 01:11:08 +0200 -Subject: [PATCH 3/7] surface-acpi +Subject: [PATCH 5/7] surface-sam --- drivers/acpi/acpica/dsopcode.c | 2 +- drivers/acpi/acpica/exfield.c | 12 +- drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/Makefile | 1 + - drivers/platform/x86/surface_sam/Kconfig | 166 ++ + drivers/platform/x86/surface_sam/Kconfig | 163 ++ drivers/platform/x86/surface_sam/Makefile | 10 + .../x86/surface_sam/surface_sam_dtx.c | 623 ++++++ .../x86/surface_sam/surface_sam_hps.c | 1110 +++++++++++ @@ -23,7 +23,7 @@ Subject: [PATCH 3/7] surface-acpi .../x86/surface_sam/surface_sam_ssh.h | 97 + .../x86/surface_sam/surface_sam_vhf.c | 276 +++ drivers/tty/serdev/core.c | 111 +- - 19 files changed, 7356 insertions(+), 16 deletions(-) + 19 files changed, 7353 insertions(+), 16 deletions(-) create mode 100644 drivers/platform/x86/surface_sam/Kconfig create mode 100644 drivers/platform/x86/surface_sam/Makefile create mode 100644 drivers/platform/x86/surface_sam/surface_sam_dtx.c @@ -85,10 +85,10 @@ index d3d2dbfba680..0b7f617a6e9b 100644 buffer_desc = acpi_ut_create_buffer_object(buffer_length); if (!buffer_desc) { diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig -index ae21d08c65e8..675ec12cbc0e 100644 +index 348c795019fa..d25067a838a3 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig -@@ -1336,6 +1336,7 @@ config PCENGINES_APU2 +@@ -1342,6 +1342,7 @@ config PCENGINES_APU2 will be called pcengines-apuv2. source "drivers/platform/x86/intel_speed_select_if/Kconfig" @@ -97,20 +97,20 @@ index ae21d08c65e8..675ec12cbc0e 100644 endif # X86_PLATFORM_DEVICES diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile -index 415104033060..18f5a4ba7244 100644 +index 6dd955ad9bf1..19b56f2181eb 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile -@@ -100,3 +100,4 @@ obj-$(CONFIG_I2C_MULTI_INSTANTIATE) += i2c-multi-instantiate.o +@@ -101,3 +101,4 @@ obj-$(CONFIG_I2C_MULTI_INSTANTIATE) += i2c-multi-instantiate.o obj-$(CONFIG_INTEL_ATOMISP2_PM) += intel_atomisp2_pm.o obj-$(CONFIG_PCENGINES_APU2) += pcengines-apuv2.o obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += intel_speed_select_if/ +obj-$(CONFIG_SURFACE_SAM) += surface_sam/ diff --git a/drivers/platform/x86/surface_sam/Kconfig b/drivers/platform/x86/surface_sam/Kconfig new file mode 100644 -index 000000000000..4eff58a121cb +index 000000000000..b4513c234c4d --- /dev/null +++ b/drivers/platform/x86/surface_sam/Kconfig -@@ -0,0 +1,166 @@ +@@ -0,0 +1,163 @@ +menuconfig SURFACE_SAM + depends on ACPI + tristate "Microsoft Surface/System Aggregator Module and Platform Drivers" @@ -128,9 +128,6 @@ index 000000000000..4eff58a121cb +config SURFACE_SAM_SSH + tristate "Surface Serial Hub Driver" + depends on SURFACE_SAM -+ depends on X86_INTEL_LPSS -+ depends on SERIAL_8250_DW -+ depends on SERIAL_8250_DMA + depends on SERIAL_DEV_CTRL_TTYPORT + select CRC_CCITT + default m @@ -7435,7 +7432,7 @@ index 000000000000..0ed0ebbdb3cb +MODULE_DESCRIPTION("Virtual HID Framework Driver for 5th Generation Surface Devices"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c -index a0ac16ee6575..226adeec2aed 100644 +index a9719858c950..ce5309d00280 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -552,16 +552,97 @@ static int of_serdev_register_devices(struct serdev_controller *ctrl) @@ -7542,8 +7539,8 @@ index a0ac16ee6575..226adeec2aed 100644 serdev = serdev_device_alloc(ctrl); if (!serdev) { dev_err(&ctrl->dev, "failed to allocate serdev device for %s\n", -@@ -583,7 +664,7 @@ static acpi_status acpi_serdev_register_device(struct serdev_controller *ctrl, - } +@@ -589,7 +670,7 @@ static const struct acpi_device_id serdev_acpi_devices_blacklist[] = { + }; static acpi_status acpi_serdev_add_device(acpi_handle handle, u32 level, - void *data, void **return_value) @@ -7551,13 +7548,17 @@ index a0ac16ee6575..226adeec2aed 100644 { struct serdev_controller *ctrl = data; struct acpi_device *adev; -@@ -591,22 +672,28 @@ static acpi_status acpi_serdev_add_device(acpi_handle handle, u32 level, +@@ -597,26 +678,32 @@ static acpi_status acpi_serdev_add_device(acpi_handle handle, u32 level, if (acpi_bus_get_device(handle, &adev)) return AE_OK; + if (acpi_device_enumerated(adev)) + return AE_OK; + + /* Skip if black listed */ + if (!acpi_match_device_ids(adev, serdev_acpi_devices_blacklist)) + return AE_OK; + + if (acpi_serdev_check_resources(ctrl, adev)) + return AE_OK; + @@ -7586,5 +7587,5 @@ index a0ac16ee6575..226adeec2aed 100644 if (!ctrl->serdev) return -ENODEV; -- -2.24.1 +2.25.0 diff --git a/patches/5.4/0005-surface-lte.patch b/patches/5.4/0006-surface-lte.patch similarity index 88% rename from patches/5.4/0005-surface-lte.patch rename to patches/5.4/0006-surface-lte.patch index 6bfb45b0e..d258ae8f8 100644 --- a/patches/5.4/0005-surface-lte.patch +++ b/patches/5.4/0006-surface-lte.patch @@ -1,7 +1,7 @@ -From 1ac8e97c8765f1e89ede2a981559b10571b5b5a2 Mon Sep 17 00:00:00 2001 +From a47089b3a39a0e257926ab51fa4e62baa12bb40c Mon Sep 17 00:00:00 2001 From: qzed Date: Tue, 17 Sep 2019 17:21:43 +0200 -Subject: [PATCH 5/7] surface-lte +Subject: [PATCH 6/7] surface-lte --- drivers/usb/serial/qcserial.c | 1 + @@ -20,5 +20,5 @@ index 613f91add03d..e1428222dd73 100644 /* Huawei devices */ {DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */ -- -2.24.1 +2.25.0 diff --git a/patches/5.4/0006-wifi.patch b/patches/5.4/0007-wifi.patch similarity index 97% rename from patches/5.4/0006-wifi.patch rename to patches/5.4/0007-wifi.patch index d2e304d5d..4f2b53d33 100644 --- a/patches/5.4/0006-wifi.patch +++ b/patches/5.4/0007-wifi.patch @@ -1,7 +1,7 @@ -From 2bd84c6967b2741d012844717f46f514b2122f4f Mon Sep 17 00:00:00 2001 +From f509c292838bf7823aa360cf8e45f0e89b9fe20d Mon Sep 17 00:00:00 2001 From: sebanc <22224731+sebanc@users.noreply.github.com> Date: Mon, 4 Nov 2019 09:30:57 +0100 -Subject: [PATCH 6/7] wifi +Subject: [PATCH 7/7] wifi --- drivers/net/wireless/marvell/mwifiex/pcie.c | 74 ++++++++++--------- @@ -9,7 +9,7 @@ Subject: [PATCH 6/7] wifi 2 files changed, 41 insertions(+), 48 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c -index eff06d59e9df..eeda5de9173f 100644 +index fc1706d0647d..b3380ed75431 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -149,35 +149,38 @@ static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter) @@ -164,5 +164,5 @@ index 4ed10cf82f9a..013db4386c39 100644 /* Send cmd to FW to enable/disable 11D function */ state_11d = ENABLE_11D; -- -2.24.1 +2.25.0