Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-11-19 22:04:07 +0100
committerJiri Kosina <jkosina@suse.cz>2017-11-19 22:04:07 +0100
commitc655a63413d5011285b7dc247ceddbccc998f1a3 (patch)
treedee8eefe64b2196266dd4f6b7d943c917475dbd2
parentc05238624339c58035cccc9d74d9abe6298db60f (diff)
parent2e66eedd0a7fa5892058dc59c054bb234784be4e (diff)
Merge remote-tracking branch 'origin/users/tiwai/SLE15/for-next' into SLE15
-rw-r--r--blacklist.conf2
-rw-r--r--config/x86_64/default2
-rw-r--r--patches.drivers/ACPI-PMIC-Add-opregion-driver-for-Intel-Dollar-Cove-200
-rw-r--r--patches.drivers/ACPI-x86-Add-KIOX000A-accelerometer-on-GPD-win-to-al46
-rw-r--r--patches.drivers/ACPI-x86-Allow-matching-always_present_id-array-entr97
-rw-r--r--patches.drivers/ACPI-x86-Extend-KIOX000A-quirk-to-cover-all-affected67
-rw-r--r--patches.drivers/ASoC-rt5645-Add-jack-detection-workaround-for-GPD-Wi71
-rw-r--r--patches.drivers/ASoC-rt5645-add-inv_jd1_1-flag45
-rw-r--r--patches.drivers/ASoC-rt5645-read-jd1_1-status-for-jd-detection75
-rw-r--r--patches.drivers/ASoC-rt5645-rename-jd_invert-flag-in-platform-data72
-rw-r--r--patches.drivers/Bluetooth-hci_bcm-Add-support-for-BCM2E7E28
-rw-r--r--patches.drivers/brcmfmac-Use-separate-firmware-for-revision-0-of-the49
-rw-r--r--patches.drivers/drm-i915-GLK-HuC-Load-HuC-on-GLK61
-rw-r--r--patches.drivers/drm-i915-GuC-GLK-Load-GuC-on-GLK60
-rw-r--r--patches.drivers/drm-i915-gen9-Reintroduce-WaEnableYV12BugFixInHalfSl38
-rw-r--r--patches.drivers/drm-i915-glk-Add-cold-boot-sequence-for-GLK-DSI167
-rw-r--r--patches.drivers/drm-i915-glk-Calculate-high-low-switch-count-for-GLK48
-rw-r--r--patches.drivers/drm-i915-glk-Don-t-allow-12-bpc-when-htotal-is-too-b38
-rw-r--r--patches.drivers/drm-i915-glk-Remove-the-alpha_support-flag31
-rw-r--r--patches.drivers/drm-i915-glk-Split-GLK-DSI-device-ready-functionalit90
-rw-r--r--patches.drivers/drm-i915-glk-limit-pixel-clock-to-99-of-cdclk-workar74
-rw-r--r--patches.drivers/drm-i915-huc-Update-GLK-HuC-version36
-rw-r--r--patches.drivers/mfd-Add-support-for-Cherry-Trail-Dollar-Cove-TI-PMIC250
-rw-r--r--patches.drivers/mmc-sdhci-acpi-Workaround-conflict-with-PCI-wifi-on-143
-rw-r--r--patches.drivers/platform-x86-Add-driver-for-ACPI-INT0002-Virtual-GPI297
-rw-r--r--patches.drivers/video-console-Add-dmi-quirk-table-for-x86-systems-wh226
-rw-r--r--patches.drivers/video-console-Add-new-BIOS-date-for-GPD-pocket-to-dm31
-rw-r--r--patches.drivers/video-console-Update-BIOS-dates-list-for-GPD-win-con34
-rw-r--r--series.conf31
-rw-r--r--supported.conf50
30 files changed, 2448 insertions, 11 deletions
diff --git a/blacklist.conf b/blacklist.conf
index 61457c6fa9..e5a16b5dc9 100644
--- a/blacklist.conf
+++ b/blacklist.conf
@@ -159,3 +159,5 @@ be321a82bf8ee2e59734dd0d1fa1183a55a81d5d # media: already applied
f2c61f98e0b5f8b53b8fb860e5dcdd661bde7d0b # media: already applied
ef6ff8f47263b1a98b7c3a8d7ee30c1d5b0afdfa # media: already applied
f48bed16a756f5bc0244acd581f61968f7d7c2a4 # bcmgenet: not applicable
+9834e586fa664781c22a970d254c60610bd9a1af # bluetooth: reverted at next
+2d13e347498f69b4f4e95830eda88937c72d7ba6 # bluetooth: reverting the above
diff --git a/config/x86_64/default b/config/x86_64/default
index aa93d23769..f5f7a7c68a 100644
--- a/config/x86_64/default
+++ b/config/x86_64/default
@@ -4082,6 +4082,7 @@ CONFIG_LPC_ICH=m
CONFIG_LPC_SCH=m
# CONFIG_INTEL_SOC_PMIC is not set
CONFIG_INTEL_SOC_PMIC_BXTWC=m
+CONFIG_INTEL_SOC_PMIC_CHTDC_TI=m
CONFIG_MFD_INTEL_LPSS=m
CONFIG_MFD_INTEL_LPSS_ACPI=m
CONFIG_MFD_INTEL_LPSS_PCI=m
@@ -6045,6 +6046,7 @@ CONFIG_TOSHIBA_HAPS=m
CONFIG_TOSHIBA_WMI=m
CONFIG_ACPI_CMPC=m
CONFIG_INTEL_CHT_INT33FE=m
+CONFIG_INTEL_INT0002_VGPIO=m
CONFIG_INTEL_HID_EVENT=m
CONFIG_INTEL_VBTN=m
CONFIG_INTEL_IPS=m
diff --git a/patches.drivers/ACPI-PMIC-Add-opregion-driver-for-Intel-Dollar-Cove- b/patches.drivers/ACPI-PMIC-Add-opregion-driver-for-Intel-Dollar-Cove-
new file mode 100644
index 0000000000..050a0e1245
--- /dev/null
+++ b/patches.drivers/ACPI-PMIC-Add-opregion-driver-for-Intel-Dollar-Cove-
@@ -0,0 +1,200 @@
+From 31374972321d1639d1a8bb1213b66688132d103f Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 4 Sep 2017 16:43:40 +0200
+Subject: [PATCH] ACPI / PMIC: Add opregion driver for Intel Dollar Cove TI PMIC
+Git-commit: 31374972321d1639d1a8bb1213b66688132d103f
+Patch-mainline: v4.15-rc1
+References: bsc#1068546
+
+This patch adds the opregion driver for Dollar Cove TI PMIC on Intel
+Cherry Trail devices. The patch is based on the original work by
+Intel, found at:
+ https://github.com/01org/ProductionKernelQuilts
+with many cleanups and rewrites.
+
+The driver is currently provided only as built-in to follow other
+PMIC opregion drivers convention.
+
+The re-enumeration of devices at probe is required for fixing the
+issues on HP x2 210 G2. See bug#195689.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=193891
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195689
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+
+---
+ drivers/acpi/Kconfig | 6 +
+ drivers/acpi/Makefile | 1
+ drivers/acpi/pmic/intel_pmic_chtdc_ti.c | 137 ++++++++++++++++++++++++++++++++
+ 3 files changed, 144 insertions(+)
+ create mode 100644 drivers/acpi/pmic/intel_pmic_chtdc_ti.c
+
+--- a/drivers/acpi/Kconfig
++++ b/drivers/acpi/Kconfig
+@@ -521,6 +521,12 @@ config CHT_WC_PMIC_OPREGION
+ help
+ This config adds ACPI operation region support for CHT Whiskey Cove PMIC.
+
++config CHT_DC_TI_PMIC_OPREGION
++ bool "ACPI operation region support for Dollar Cove TI PMIC"
++ depends on INTEL_SOC_PMIC_CHTDC_TI
++ help
++ This config adds ACPI operation region support for Dollar Cove TI PMIC.
++
+ endif
+
+ config ACPI_CONFIGFS
+--- a/drivers/acpi/Makefile
++++ b/drivers/acpi/Makefile
+@@ -103,6 +103,7 @@ obj-$(CONFIG_CRC_PMIC_OPREGION) += pmic/
+ obj-$(CONFIG_XPOWER_PMIC_OPREGION) += pmic/intel_pmic_xpower.o
+ obj-$(CONFIG_BXT_WC_PMIC_OPREGION) += pmic/intel_pmic_bxtwc.o
+ obj-$(CONFIG_CHT_WC_PMIC_OPREGION) += pmic/intel_pmic_chtwc.o
++obj-$(CONFIG_CHT_DC_TI_PMIC_OPREGION) += pmic/intel_pmic_chtdc_ti.o
+
+ obj-$(CONFIG_ACPI_CONFIGFS) += acpi_configfs.o
+
+--- /dev/null
++++ b/drivers/acpi/pmic/intel_pmic_chtdc_ti.c
+@@ -0,0 +1,137 @@
++/*
++ * Dollar Cove TI PMIC operation region driver
++ * Copyright (C) 2014 Intel Corporation. All rights reserved.
++ *
++ * Rewritten and cleaned up
++ * Copyright (C) 2017 Takashi Iwai <tiwai@suse.de>
++ */
++
++#include <linux/acpi.h>
++#include <linux/init.h>
++#include <linux/mfd/intel_soc_pmic.h>
++#include <linux/platform_device.h>
++#include "intel_pmic.h"
++
++/* registers stored in 16bit BE (high:low, total 10bit) */
++#define CHTDC_TI_VBAT 0x54
++#define CHTDC_TI_DIETEMP 0x56
++#define CHTDC_TI_BPTHERM 0x58
++#define CHTDC_TI_GPADC 0x5a
++
++static struct pmic_table chtdc_ti_power_table[] = {
++ { .address = 0x00, .reg = 0x41 },
++ { .address = 0x04, .reg = 0x42 },
++ { .address = 0x08, .reg = 0x43 },
++ { .address = 0x0c, .reg = 0x45 },
++ { .address = 0x10, .reg = 0x46 },
++ { .address = 0x14, .reg = 0x47 },
++ { .address = 0x18, .reg = 0x48 },
++ { .address = 0x1c, .reg = 0x49 },
++ { .address = 0x20, .reg = 0x4a },
++ { .address = 0x24, .reg = 0x4b },
++ { .address = 0x28, .reg = 0x4c },
++ { .address = 0x2c, .reg = 0x4d },
++ { .address = 0x30, .reg = 0x4e },
++};
++
++static struct pmic_table chtdc_ti_thermal_table[] = {
++ {
++ .address = 0x00,
++ .reg = CHTDC_TI_GPADC
++ },
++ {
++ .address = 0x0c,
++ .reg = CHTDC_TI_GPADC
++ },
++ /* TMP2 -> SYSTEMP */
++ {
++ .address = 0x18,
++ .reg = CHTDC_TI_GPADC
++ },
++ /* TMP3 -> BPTHERM */
++ {
++ .address = 0x24,
++ .reg = CHTDC_TI_BPTHERM
++ },
++ {
++ .address = 0x30,
++ .reg = CHTDC_TI_GPADC
++ },
++ /* TMP5 -> DIETEMP */
++ {
++ .address = 0x3c,
++ .reg = CHTDC_TI_DIETEMP
++ },
++};
++
++static int chtdc_ti_pmic_get_power(struct regmap *regmap, int reg, int bit,
++ u64 *value)
++{
++ int data;
++
++ if (regmap_read(regmap, reg, &data))
++ return -EIO;
++
++ *value = data & 1;
++ return 0;
++}
++
++static int chtdc_ti_pmic_update_power(struct regmap *regmap, int reg, int bit,
++ bool on)
++{
++ return regmap_update_bits(regmap, reg, 1, on);
++}
++
++static int chtdc_ti_pmic_get_raw_temp(struct regmap *regmap, int reg)
++{
++ u8 buf[2];
++
++ if (regmap_bulk_read(regmap, reg, buf, 2))
++ return -EIO;
++
++ /* stored in big-endian */
++ return ((buf[0] & 0x03) << 8) | buf[1];
++}
++
++static struct intel_pmic_opregion_data chtdc_ti_pmic_opregion_data = {
++ .get_power = chtdc_ti_pmic_get_power,
++ .update_power = chtdc_ti_pmic_update_power,
++ .get_raw_temp = chtdc_ti_pmic_get_raw_temp,
++ .power_table = chtdc_ti_power_table,
++ .power_table_count = ARRAY_SIZE(chtdc_ti_power_table),
++ .thermal_table = chtdc_ti_thermal_table,
++ .thermal_table_count = ARRAY_SIZE(chtdc_ti_thermal_table),
++};
++
++static int chtdc_ti_pmic_opregion_probe(struct platform_device *pdev)
++{
++ struct intel_soc_pmic *pmic = dev_get_drvdata(pdev->dev.parent);
++ int err;
++
++ err = intel_pmic_install_opregion_handler(&pdev->dev,
++ ACPI_HANDLE(pdev->dev.parent), pmic->regmap,
++ &chtdc_ti_pmic_opregion_data);
++ if (err < 0)
++ return err;
++
++ /* Re-enumerate devices depending on PMIC */
++ acpi_walk_dep_device_list(ACPI_HANDLE(pdev->dev.parent));
++ return 0;
++}
++
++static const struct platform_device_id chtdc_ti_pmic_opregion_id_table[] = {
++ { .name = "chtdc_ti_region" },
++ {},
++};
++
++static struct platform_driver chtdc_ti_pmic_opregion_driver = {
++ .probe = chtdc_ti_pmic_opregion_probe,
++ .driver = {
++ .name = "cht_dollar_cove_ti_pmic",
++ },
++ .id_table = chtdc_ti_pmic_opregion_id_table,
++};
++module_platform_driver(chtdc_ti_pmic_opregion_driver);
++
++MODULE_DESCRIPTION("Dollar Cove TI PMIC opregion driver");
++MODULE_LICENSE("GPL v2");
diff --git a/patches.drivers/ACPI-x86-Add-KIOX000A-accelerometer-on-GPD-win-to-al b/patches.drivers/ACPI-x86-Add-KIOX000A-accelerometer-on-GPD-win-to-al
new file mode 100644
index 0000000000..8de7aece89
--- /dev/null
+++ b/patches.drivers/ACPI-x86-Add-KIOX000A-accelerometer-on-GPD-win-to-al
@@ -0,0 +1,46 @@
+From 906dc284d00c8aa8e2ad3f71182cf9fa3107e35a Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Sun, 9 Jul 2017 21:05:14 +0200
+Subject: [PATCH] ACPI / x86: Add KIOX000A accelerometer on GPD win to always_present_ids array
+Git-commit: 906dc284d00c8aa8e2ad3f71182cf9fa3107e35a
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+The GPD win BIOS dated 20170320 has disabled the accelerometer, the
+drivers sometimes cause crashes under Windows and this is how the
+manufacturer has solved this :|
+
+I see no other way to keep the accelerometer working under Windows then
+adding it to the always_present_ids array.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/acpi/x86/utils.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/drivers/acpi/x86/utils.c
++++ b/drivers/acpi/x86/utils.c
+@@ -61,6 +61,19 @@ static const struct always_present_id al
+ * on Cherry Trail devices, without it we get nobody cared IRQ msgs.
+ */
+ ENTRY("INT0002", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
++ /*
++ * The GPD win BIOS dated 20170320 has disabled the accelerometer, the
++ * drivers sometimes cause crashes under Windows and this is how the
++ * manufacturer has solved this :| Note that the the DMI data is less
++ * generic then it seems, a board_vendor of "AMI Corporation" is quite
++ * rare and a board_name of "Default String" also is rare.
++ */
++ ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
++ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
++ DMI_MATCH(DMI_BOARD_NAME, "Default string"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
++ DMI_MATCH(DMI_BIOS_DATE, "03/20/2017")
++ }),
+ };
+
+ bool acpi_device_always_present(struct acpi_device *adev)
diff --git a/patches.drivers/ACPI-x86-Allow-matching-always_present_id-array-entr b/patches.drivers/ACPI-x86-Allow-matching-always_present_id-array-entr
new file mode 100644
index 0000000000..61d3ec73dd
--- /dev/null
+++ b/patches.drivers/ACPI-x86-Allow-matching-always_present_id-array-entr
@@ -0,0 +1,97 @@
+From 3b6a70be5ac81673af1ca8b4dae84743cb9fcc87 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Sun, 9 Jul 2017 21:05:12 +0200
+Subject: [PATCH] ACPI / x86: Allow matching always_present_id array entries by DMI
+Git-commit: 3b6a70be5ac81673af1ca8b4dae84743cb9fcc87
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+On some x86 systems the DSDT hides APCI devices to work around Windows
+driver bugs. On one such system the device is even hidden until a certain
+time after _SB.PCI0.GFX0.LCD.LCD1._ON gets called has passed *and*
+_STA has been called at least 3 times since. TL;DR: it is a mess.
+
+Until now the always_present_id matching was used to force status
+for a whole class of devices, e.g. always enable PWM1 on CHerry Trail
+devices.
+
+This commit extends the always_present_id matching code to optionally
+also check for a DMI match so that we can also add system specific
+quirks to the always_present_id array.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/acpi/x86/utils.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+--- a/drivers/acpi/x86/utils.c
++++ b/drivers/acpi/x86/utils.c
+@@ -12,6 +12,7 @@
+ */
+
+ #include <linux/acpi.h>
++#include <linux/dmi.h>
+ #include <asm/cpu_device_id.h>
+ #include <asm/intel-family.h>
+ #include "../internal.h"
+@@ -20,6 +21,10 @@
+ * Some ACPI devices are hidden (status == 0x0) in recent BIOS-es because
+ * some recent Windows drivers bind to one device but poke at multiple
+ * devices at the same time, so the others get hidden.
++ *
++ * Some BIOS-es (temporarily) hide specific APCI devices to work around Windows
++ * driver bugs. We use DMI matching to match known cases of this.
++ *
+ * We work around this by always reporting ACPI_STA_DEFAULT for these
+ * devices. Note this MUST only be done for devices where this is safe.
+ *
+@@ -31,14 +36,16 @@
+ struct always_present_id {
+ struct acpi_device_id hid[2];
+ struct x86_cpu_id cpu_ids[2];
++ struct dmi_system_id dmi_ids[2]; /* Optional */
+ const char *uid;
+ };
+
+ #define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
+
+-#define ENTRY(hid, uid, cpu_models) { \
++#define ENTRY(hid, uid, cpu_models, dmi...) { \
+ { { hid, }, {} }, \
+ { cpu_models, {} }, \
++ { { .matches = dmi }, {} }, \
+ uid, \
+ }
+
+@@ -47,13 +54,13 @@ static const struct always_present_id al
+ * Bay / Cherry Trail PWM directly poked by GPU driver in win10,
+ * but Linux uses a separate PWM driver, harmless if not used.
+ */
+- ENTRY("80860F09", "1", ICPU(INTEL_FAM6_ATOM_SILVERMONT1)),
+- ENTRY("80862288", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT)),
++ ENTRY("80860F09", "1", ICPU(INTEL_FAM6_ATOM_SILVERMONT1), {}),
++ ENTRY("80862288", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
+ /*
+ * The INT0002 device is necessary to clear wakeup interrupt sources
+ * on Cherry Trail devices, without it we get nobody cared IRQ msgs.
+ */
+- ENTRY("INT0002", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT)),
++ ENTRY("INT0002", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
+ };
+
+ bool acpi_device_always_present(struct acpi_device *adev)
+@@ -76,6 +83,10 @@ bool acpi_device_always_present(struct a
+ if (!x86_match_cpu(always_present_ids[i].cpu_ids))
+ continue;
+
++ if (always_present_ids[i].dmi_ids[0].matches[0].slot &&
++ !dmi_check_system(always_present_ids[i].dmi_ids))
++ continue;
++
+ if (old_status != ACPI_STA_DEFAULT) /* Log only once */
+ dev_info(&adev->dev,
+ "Device [%s] is in always present list\n",
diff --git a/patches.drivers/ACPI-x86-Extend-KIOX000A-quirk-to-cover-all-affected b/patches.drivers/ACPI-x86-Extend-KIOX000A-quirk-to-cover-all-affected
new file mode 100644
index 0000000000..0f12c1b92f
--- /dev/null
+++ b/patches.drivers/ACPI-x86-Extend-KIOX000A-quirk-to-cover-all-affected
@@ -0,0 +1,67 @@
+From 1c3b44c0f40d22b43fa58fe7081ca36e38449114 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Thu, 19 Oct 2017 13:23:21 +0200
+Subject: [PATCH] ACPI / x86: Extend KIOX000A quirk to cover all affected BIOS versions
+Git-commit: 1c3b44c0f40d22b43fa58fe7081ca36e38449114
+Patch-mainline: 4.15-rc1
+References: bsc#1068546
+
+Recently produced GPD win devices have a new BIOS, research into the
+changes in this BIOS has found a ChangeLog which shows that the disabling
+of the KIOX000A node has been done starting with the 20170221 version.
+
+Unfortunately the GPD pocket uses the exact same DMI strings as the win
+and its BIOS was copy-pasted from the GPD win, so it has a disabled
+KIOX000A node which we should not enable, so we need to check for the
+exact BIOS date.
+
+This commit adds 2 extra entries to the always_present_ids quirk table
+with bios_date matches for the older also affected and the latest BIOS.
+
+Reported-by: ReddestDream <reddestdream@gmail.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/acpi/x86/utils.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+--- a/drivers/acpi/x86/utils.c
++++ b/drivers/acpi/x86/utils.c
+@@ -62,18 +62,34 @@ static const struct always_present_id al
+ */
+ ENTRY("INT0002", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
+ /*
+- * The GPD win BIOS dated 20170320 has disabled the accelerometer, the
++ * The GPD win BIOS dated 20170221 has disabled the accelerometer, the
+ * drivers sometimes cause crashes under Windows and this is how the
+ * manufacturer has solved this :| Note that the the DMI data is less
+ * generic then it seems, a board_vendor of "AMI Corporation" is quite
+ * rare and a board_name of "Default String" also is rare.
++ *
++ * Unfortunately the GPD pocket also uses these strings and its BIOS
++ * was copy-pasted from the GPD win, so it has a disabled KIOX000A
++ * node which we should not enable, thus we also check the BIOS date.
+ */
+ ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
+ DMI_MATCH(DMI_BOARD_NAME, "Default string"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
++ DMI_MATCH(DMI_BIOS_DATE, "02/21/2017")
++ }),
++ ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
++ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
++ DMI_MATCH(DMI_BOARD_NAME, "Default string"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
+ DMI_MATCH(DMI_BIOS_DATE, "03/20/2017")
+ }),
++ ENTRY("KIOX000A", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
++ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
++ DMI_MATCH(DMI_BOARD_NAME, "Default string"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
++ DMI_MATCH(DMI_BIOS_DATE, "05/25/2017")
++ }),
+ };
+
+ bool acpi_device_always_present(struct acpi_device *adev)
diff --git a/patches.drivers/ASoC-rt5645-Add-jack-detection-workaround-for-GPD-Wi b/patches.drivers/ASoC-rt5645-Add-jack-detection-workaround-for-GPD-Wi
new file mode 100644
index 0000000000..2a13b3f8bd
--- /dev/null
+++ b/patches.drivers/ASoC-rt5645-Add-jack-detection-workaround-for-GPD-Wi
@@ -0,0 +1,71 @@
+From ea2b5a6e3a386b89d7f9148ff8be6c78d13542a0 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 28 Jun 2017 14:49:39 +0200
+Subject: [PATCH] ASoC: rt5645: Add jack detection workaround for GPD Win
+Git-commit: ea2b5a6e3a386b89d7f9148ff8be6c78d13542a0
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+GPD Win requires jd_mode=3 and the inverted flag for making the jack
+detection working. Unfortunately, the BIOS doesn't give a nice way to
+match with DMI strings, and the only working way so far is to match
+with the board vendor/name/version/date to some known patterns.
+
+Hopefully other vendors won't do such a stupid setup, too...
+
+Thanks to Hans de Goede for the DMI matching suggestion.
+
+Suggested-by: Hans de Goede <hdegoede@redhat.com>
+Tested-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+
+---
+ sound/soc/codecs/rt5645.c | 29 +++++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+
+--- a/sound/soc/codecs/rt5645.c
++++ b/sound/soc/codecs/rt5645.c
+@@ -3599,6 +3599,33 @@ static struct dmi_system_id dmi_platform
+ { }
+ };
+
++static struct rt5645_platform_data gpd_win_platform_data = {
++ .jd_mode = 3,
++ .inv_jd1_1 = true,
++};
++
++static const struct dmi_system_id dmi_platform_gpd_win[] = {
++ {
++ /*
++ * Match for the GPDwin which unfortunately uses somewhat
++ * generic dmi strings, which is why we test for 4 strings.
++ * Comparing against 23 other byt/cht boards, board_vendor
++ * and board_name are unique to the GPDwin, where as only one
++ * other board has the same board_serial and 3 others have
++ * the same default product_name. Also the GPDwin is the
++ * only device to have both board_ and product_name not set.
++ */
++ .ident = "GPD Win",
++ .matches = {
++ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
++ DMI_MATCH(DMI_BOARD_NAME, "Default string"),
++ DMI_MATCH(DMI_BOARD_SERIAL, "Default string"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
++ },
++ },
++ {}
++};
++
+ static bool rt5645_check_dp(struct device *dev)
+ {
+ if (device_property_present(dev, "realtek,in2-differential") ||
+@@ -3649,6 +3676,8 @@ static int rt5645_i2c_probe(struct i2c_c
+ rt5645_parse_dt(rt5645, &i2c->dev);
+ else if (dmi_check_system(dmi_platform_intel_braswell))
+ rt5645->pdata = general_platform_data;
++ else if (dmi_check_system(dmi_platform_gpd_win))
++ rt5645->pdata = gpd_win_platform_data;
+
+ rt5645->gpiod_hp_det = devm_gpiod_get_optional(&i2c->dev, "hp-detect",
+ GPIOD_IN);
diff --git a/patches.drivers/ASoC-rt5645-add-inv_jd1_1-flag b/patches.drivers/ASoC-rt5645-add-inv_jd1_1-flag
new file mode 100644
index 0000000000..a4c3d66eb7
--- /dev/null
+++ b/patches.drivers/ASoC-rt5645-add-inv_jd1_1-flag
@@ -0,0 +1,45 @@
+From aea086dda2d5df659a7c5d9efe85721e9442a133 Mon Sep 17 00:00:00 2001
+From: Bard Liao <bardliao@realtek.com>
+Date: Wed, 28 Jun 2017 14:49:38 +0200
+Subject: [PATCH] ASoC: rt5645: add inv_jd1_1 flag
+Git-commit: aea086dda2d5df659a7c5d9efe85721e9442a133
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+The flag will invert jd1_1 status. Which will be used if the jack
+connector is normal closed.
+
+Signed-off-by: Bard Liao <bardliao@realtek.com>
+Tested-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+
+---
+ include/sound/rt5645.h | 2 ++
+ sound/soc/codecs/rt5645.c | 4 ++++
+ 2 files changed, 6 insertions(+)
+
+--- a/include/sound/rt5645.h
++++ b/include/sound/rt5645.h
+@@ -23,6 +23,8 @@ struct rt5645_platform_data {
+ unsigned int jd_mode;
+ /* Use level triggered irq */
+ bool level_trigger_irq;
++ /* Invert JD1_1 status polarity */
++ bool inv_jd1_1;
+ };
+
+ #endif
+--- a/sound/soc/codecs/rt5645.c
++++ b/sound/soc/codecs/rt5645.c
+@@ -3833,6 +3833,10 @@ static int rt5645_i2c_probe(struct i2c_c
+ default:
+ break;
+ }
++ if (rt5645->pdata.inv_jd1_1) {
++ regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
++ RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
++ }
+ }
+
+ regmap_update_bits(rt5645->regmap, RT5645_ADDA_CLK1,
diff --git a/patches.drivers/ASoC-rt5645-read-jd1_1-status-for-jd-detection b/patches.drivers/ASoC-rt5645-read-jd1_1-status-for-jd-detection
new file mode 100644
index 0000000000..9cb6113310
--- /dev/null
+++ b/patches.drivers/ASoC-rt5645-read-jd1_1-status-for-jd-detection
@@ -0,0 +1,75 @@
+From 6b5da66322c50b4fa22f9343dcb968496f831361 Mon Sep 17 00:00:00 2001
+From: Bard Liao <bardliao@realtek.com>
+Date: Wed, 28 Jun 2017 14:49:36 +0200
+Subject: [PATCH] ASoC: rt5645: read jd1_1 status for jd detection
+Git-commit: 6b5da66322c50b4fa22f9343dcb968496f831361
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+Read the jd status after invert control. The benefit is we don't need
+to invert the reading jd status when jd invert is needed.
+
+Signed-off-by: Bard Liao <bardliao@realtek.com>
+Tested-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+
+---
+ sound/soc/codecs/rt5645.c | 31 ++++++++-----------------------
+ 1 file changed, 8 insertions(+), 23 deletions(-)
+
+--- a/sound/soc/codecs/rt5645.c
++++ b/sound/soc/codecs/rt5645.c
+@@ -3238,24 +3238,16 @@ static void rt5645_jack_detect_work(stru
+ snd_soc_jack_report(rt5645->mic_jack,
+ report, SND_JACK_MICROPHONE);
+ return;
+- case 1: /* 2 port */
+- val = snd_soc_read(rt5645->codec, RT5645_A_JD_CTRL1) & 0x0070;
+- break;
+- default: /* 1 port */
+- val = snd_soc_read(rt5645->codec, RT5645_A_JD_CTRL1) & 0x0020;
++ default: /* read rt5645 jd1_1 status */
++ val = snd_soc_read(rt5645->codec, RT5645_INT_IRQ_ST) & 0x1000;
+ break;
+
+ }
+
+- switch (val) {
+- /* jack in */
+- case 0x30: /* 2 port */
+- case 0x0: /* 1 port or 2 port */
+- if (rt5645->jack_type == 0) {
+- report = rt5645_jack_detect(rt5645->codec, 1);
+- /* for push button and jack out */
+- break;
+- }
++ if (!val && (rt5645->jack_type == 0)) { /* jack in */
++ report = rt5645_jack_detect(rt5645->codec, 1);
++ } else if (!val && rt5645->jack_type != 0) {
++ /* for push button and jack out */
+ btn_type = 0;
+ if (snd_soc_read(rt5645->codec, RT5645_INT_IRQ_ST) & 0x4) {
+ /* button pressed */
+@@ -3302,19 +3294,12 @@ static void rt5645_jack_detect_work(stru
+ mod_timer(&rt5645->btn_check_timer,
+ msecs_to_jiffies(100));
+ }
+-
+- break;
+- /* jack out */
+- case 0x70: /* 2 port */
+- case 0x10: /* 2 port */
+- case 0x20: /* 1 port */
++ } else {
++ /* jack out */
+ report = 0;
+ snd_soc_update_bits(rt5645->codec,
+ RT5645_INT_IRQ_ST, 0x1, 0x0);
+ rt5645_jack_detect(rt5645->codec, 0);
+- break;
+- default:
+- break;
+ }
+
+ snd_soc_jack_report(rt5645->hp_jack, report, SND_JACK_HEADPHONE);
diff --git a/patches.drivers/ASoC-rt5645-rename-jd_invert-flag-in-platform-data b/patches.drivers/ASoC-rt5645-rename-jd_invert-flag-in-platform-data
new file mode 100644
index 0000000000..33475e50b4
--- /dev/null
+++ b/patches.drivers/ASoC-rt5645-rename-jd_invert-flag-in-platform-data
@@ -0,0 +1,72 @@
+From 895750228c9d3361ed82e9786322604de3232466 Mon Sep 17 00:00:00 2001
+From: Bard Liao <bardliao@realtek.com>
+Date: Wed, 28 Jun 2017 14:49:37 +0200
+Subject: [PATCH] ASoC: rt5645: rename jd_invert flag in platform data
+Git-commit: 895750228c9d3361ed82e9786322604de3232466
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+The jd_invert flag is actually used for level triggered IRQ. Rename
+it to let code more readable.
+
+Signed-off-by: Bard Liao <bardliao@realtek.com>
+Tested-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+
+---
+ include/sound/rt5645.h | 4 ++--
+ sound/soc/codecs/rt5645.c | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/include/sound/rt5645.h
++++ b/include/sound/rt5645.h
+@@ -21,8 +21,8 @@ struct rt5645_platform_data {
+ /* 0 = IN2P; 1 = GPIO6; 2 = GPIO10; 3 = GPIO12 */
+
+ unsigned int jd_mode;
+- /* Invert JD when jack insert */
+- bool jd_invert;
++ /* Use level triggered irq */
++ bool level_trigger_irq;
+ };
+
+ #endif
+--- a/sound/soc/codecs/rt5645.c
++++ b/sound/soc/codecs/rt5645.c
+@@ -3151,7 +3151,7 @@ static int rt5645_jack_detect(struct snd
+ snd_soc_dapm_sync(dapm);
+ rt5645->jack_type = SND_JACK_HEADPHONE;
+ }
+- if (rt5645->pdata.jd_invert)
++ if (rt5645->pdata.level_trigger_irq)
+ regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
+ RT5645_JD_1_1_MASK, RT5645_JD_1_1_NOR);
+ } else { /* jack out */
+@@ -3172,7 +3172,7 @@ static int rt5645_jack_detect(struct snd
+ snd_soc_dapm_disable_pin(dapm, "LDO2");
+ snd_soc_dapm_disable_pin(dapm, "Mic Det Power");
+ snd_soc_dapm_sync(dapm);
+- if (rt5645->pdata.jd_invert)
++ if (rt5645->pdata.level_trigger_irq)
+ regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
+ RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
+ }
+@@ -3586,7 +3586,7 @@ static struct rt5645_platform_data buddy
+ .dmic1_data_pin = RT5645_DMIC_DATA_GPIO5,
+ .dmic2_data_pin = RT5645_DMIC_DATA_IN2P,
+ .jd_mode = 3,
+- .jd_invert = true,
++ .level_trigger_irq = true,
+ };
+
+ static struct dmi_system_id dmi_platform_intel_broadwell[] = {
+@@ -3838,7 +3838,7 @@ static int rt5645_i2c_probe(struct i2c_c
+ regmap_update_bits(rt5645->regmap, RT5645_ADDA_CLK1,
+ RT5645_I2S_PD1_MASK, RT5645_I2S_PD1_2);
+
+- if (rt5645->pdata.jd_invert) {
++ if (rt5645->pdata.level_trigger_irq) {
+ regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
+ RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
+ }
diff --git a/patches.drivers/Bluetooth-hci_bcm-Add-support-for-BCM2E7E b/patches.drivers/Bluetooth-hci_bcm-Add-support-for-BCM2E7E
new file mode 100644
index 0000000000..e196b38629
--- /dev/null
+++ b/patches.drivers/Bluetooth-hci_bcm-Add-support-for-BCM2E7E
@@ -0,0 +1,28 @@
+From 61d220a6c2c001473011d44f34d6f36f09eb2224 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 13 Oct 2017 17:54:02 +0200
+Subject: [PATCH] Bluetooth: hci_bcm: Add support for BCM2E7E
+Git-commit: 61d220a6c2c001473011d44f34d6f36f09eb2224
+Patch-mainline: 4.15-rc1
+References: bsc#1068546
+
+Tested on a GPD win with a BCM4356 PCI-E wifi/bt combo card.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/bluetooth/hci_bcm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/bluetooth/hci_bcm.c
++++ b/drivers/bluetooth/hci_bcm.c
+@@ -873,6 +873,7 @@ static const struct acpi_device_id bcm_a
+ { "BCM2E71", (kernel_ulong_t)&acpi_bcm_int_last_gpios },
+ { "BCM2E7B", (kernel_ulong_t)&acpi_bcm_int_last_gpios },
+ { "BCM2E7C", (kernel_ulong_t)&acpi_bcm_int_last_gpios },
++ { "BCM2E7E", (kernel_ulong_t)&acpi_bcm_int_first_gpios },
+ { "BCM2E95", (kernel_ulong_t)&acpi_bcm_int_first_gpios },
+ { "BCM2E96", (kernel_ulong_t)&acpi_bcm_int_first_gpios },
+ { },
diff --git a/patches.drivers/brcmfmac-Use-separate-firmware-for-revision-0-of-the b/patches.drivers/brcmfmac-Use-separate-firmware-for-revision-0-of-the
new file mode 100644
index 0000000000..08eb9e9e62
--- /dev/null
+++ b/patches.drivers/brcmfmac-Use-separate-firmware-for-revision-0-of-the
@@ -0,0 +1,49 @@
+From 1278bd149839f2281db45a910082ba143546a148 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 16 Jun 2017 15:14:49 +0200
+Subject: [PATCH] brcmfmac: Use separate firmware for revision 0 of the brcm43430 chip
+Git-commit: 1278bd149839f2281db45a910082ba143546a148
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+The brcm43430 chip needs different firmware files for chip revision 0
+and 1. The file currently in linux-firmware is for revision 1 only.
+
+This commit makes brcmfmac request brcmfmac43430a0-sdio.bin instead
+of brcmfmac43430-sdio.bin for revision 0 chips.
+
+Note that the behavior for revision 1 chips is not changed, ideally those
+would load brcmfmac43430a1-sdio.bin, but that will break existing setups.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+@@ -612,7 +612,9 @@ BRCMF_FW_NVRAM_DEF(43340, "brcmfmac43340
+ BRCMF_FW_NVRAM_DEF(4335, "brcmfmac4335-sdio.bin", "brcmfmac4335-sdio.txt");
+ BRCMF_FW_NVRAM_DEF(43362, "brcmfmac43362-sdio.bin", "brcmfmac43362-sdio.txt");
+ BRCMF_FW_NVRAM_DEF(4339, "brcmfmac4339-sdio.bin", "brcmfmac4339-sdio.txt");
+-BRCMF_FW_NVRAM_DEF(43430, "brcmfmac43430-sdio.bin", "brcmfmac43430-sdio.txt");
++BRCMF_FW_NVRAM_DEF(43430A0, "brcmfmac43430a0-sdio.bin", "brcmfmac43430a0-sdio.txt");
++/* Note the names are not postfixed with a1 for backward compatibility */
++BRCMF_FW_NVRAM_DEF(43430A1, "brcmfmac43430-sdio.bin", "brcmfmac43430-sdio.txt");
+ BRCMF_FW_NVRAM_DEF(43455, "brcmfmac43455-sdio.bin", "brcmfmac43455-sdio.txt");
+ BRCMF_FW_NVRAM_DEF(4354, "brcmfmac4354-sdio.bin", "brcmfmac4354-sdio.txt");
+ BRCMF_FW_NVRAM_DEF(4356, "brcmfmac4356-sdio.bin", "brcmfmac4356-sdio.txt");
+@@ -630,7 +632,8 @@ static struct brcmf_firmware_mapping brc
+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4335_CHIP_ID, 0xFFFFFFFF, 4335),
+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362),
+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339),
+- BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43430_CHIP_ID, 0xFFFFFFFF, 43430),
++ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43430_CHIP_ID, 0x00000001, 43430A0),
++ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43430_CHIP_ID, 0xFFFFFFFE, 43430A1),
+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFFC0, 43455),
+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354),
+ BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356)
diff --git a/patches.drivers/drm-i915-GLK-HuC-Load-HuC-on-GLK b/patches.drivers/drm-i915-GLK-HuC-Load-HuC-on-GLK
new file mode 100644
index 0000000000..767edd8518
--- /dev/null
+++ b/patches.drivers/drm-i915-GLK-HuC-Load-HuC-on-GLK
@@ -0,0 +1,61 @@
+From db5ba0d8931ee0e470805b972a905c869dc793bb Mon Sep 17 00:00:00 2001
+From: Anusha Srivatsa <anusha.srivatsa@intel.com>
+Date: Thu, 30 Mar 2017 13:24:07 -0700
+Subject: [PATCH] drm/i915/GLK/HuC: Load HuC on GLK
+Git-commit: db5ba0d8931ee0e470805b972a905c869dc793bb
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+Load HuC version 1.07.1748 on GLK.
+
+V2: rebased.
+V3: Use name of the right platform(John Spotswood)
+V4: rebased.
+
+Cc: Jeff Mcgee <jeff.mcgee@intel.com>
+Cc: John Spotswood <john.a.spotswood@intel.com>
+Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
+Reviewed-by: John Spotswood <john.a.spotswood@intel.com>
+Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/1490905447-15815-2-git-send-email-anusha.srivatsa@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_huc.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_huc.c
++++ b/drivers/gpu/drm/i915/intel_huc.c
+@@ -52,6 +52,10 @@
+ #define KBL_HUC_FW_MINOR 00
+ #define KBL_BLD_NUM 1810
+
++#define GLK_HUC_FW_MAJOR 01
++#define GLK_HUC_FW_MINOR 07
++#define GLK_BLD_NUM 1748
++
+ #define HUC_FW_PATH(platform, major, minor, bld_num) \
+ "i915/" __stringify(platform) "_huc_ver" __stringify(major) "_" \
+ __stringify(minor) "_" __stringify(bld_num) ".bin"
+@@ -68,6 +72,9 @@ MODULE_FIRMWARE(I915_BXT_HUC_UCODE);
+ KBL_HUC_FW_MINOR, KBL_BLD_NUM)
+ MODULE_FIRMWARE(I915_KBL_HUC_UCODE);
+
++#define I915_GLK_HUC_UCODE HUC_FW_PATH(glk, GLK_HUC_FW_MAJOR, \
++ GLK_HUC_FW_MINOR, GLK_BLD_NUM)
++
+ /**
+ * huc_ucode_xfer() - DMA's the firmware
+ * @dev_priv: the drm_i915_private device
+@@ -169,6 +176,10 @@ void intel_huc_select_fw(struct intel_hu
+ huc->fw.path = I915_KBL_HUC_UCODE;
+ huc->fw.major_ver_wanted = KBL_HUC_FW_MAJOR;
+ huc->fw.minor_ver_wanted = KBL_HUC_FW_MINOR;
++ } else if (IS_GEMINILAKE(dev_priv)) {
++ huc->fw.path = I915_GLK_HUC_UCODE;
++ huc->fw.major_ver_wanted = GLK_HUC_FW_MAJOR;
++ huc->fw.minor_ver_wanted = GLK_HUC_FW_MINOR;
+ } else {
+ DRM_ERROR("No HuC firmware known for platform with HuC!\n");
+ return;
diff --git a/patches.drivers/drm-i915-GuC-GLK-Load-GuC-on-GLK b/patches.drivers/drm-i915-GuC-GLK-Load-GuC-on-GLK
new file mode 100644
index 0000000000..560ee065e6
--- /dev/null
+++ b/patches.drivers/drm-i915-GuC-GLK-Load-GuC-on-GLK
@@ -0,0 +1,60 @@
+From 90f192c8241e431d2c3076e4f2cb99ac25bfb1c5 Mon Sep 17 00:00:00 2001
+From: Anusha Srivatsa <anusha.srivatsa@intel.com>
+Date: Thu, 30 Mar 2017 13:24:06 -0700
+Subject: [PATCH] drm/i915/GuC/GLK: Load GuC on GLK
+Git-commit: 90f192c8241e431d2c3076e4f2cb99ac25bfb1c5
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+Load GuC 10.56 on GLK. Work on firmware is still
+in progress. Testing has not been done yet.
+This patch addresses the initial need to load the GuC
+firmware for HuC authentication
+
+V2: rebased.
+
+Cc: Jeff mcgee <jeff.mcgee@intel.com>
+Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Cc: John Spotswood <john.a.spotswood@intel.com>
+Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
+Reviewed-by: John Spotswood <john.a.spotswood@intel.com>
+Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/1490905447-15815-1-git-send-email-anusha.srivatsa@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_guc_loader.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_guc_loader.c
++++ b/drivers/gpu/drm/i915/intel_guc_loader.c
+@@ -61,6 +61,9 @@
+ #define KBL_FW_MAJOR 9
+ #define KBL_FW_MINOR 14
+
++#define GLK_FW_MAJOR 10
++#define GLK_FW_MINOR 56
++
+ #define GUC_FW_PATH(platform, major, minor) \
+ "i915/" __stringify(platform) "_guc_ver" __stringify(major) "_" __stringify(minor) ".bin"
+
+@@ -73,6 +76,8 @@ MODULE_FIRMWARE(I915_BXT_GUC_UCODE);
+ #define I915_KBL_GUC_UCODE GUC_FW_PATH(kbl, KBL_FW_MAJOR, KBL_FW_MINOR)
+ MODULE_FIRMWARE(I915_KBL_GUC_UCODE);
+
++#define I915_GLK_GUC_UCODE GUC_FW_PATH(glk, GLK_FW_MAJOR, GLK_FW_MINOR)
++
+
+ static u32 get_gttype(struct drm_i915_private *dev_priv)
+ {
+@@ -405,6 +410,10 @@ int intel_guc_select_fw(struct intel_guc
+ guc->fw.path = I915_KBL_GUC_UCODE;
+ guc->fw.major_ver_wanted = KBL_FW_MAJOR;
+ guc->fw.minor_ver_wanted = KBL_FW_MINOR;
++ } else if (IS_GEMINILAKE(dev_priv)) {
++ guc->fw.path = I915_GLK_GUC_UCODE;
++ guc->fw.major_ver_wanted = GLK_FW_MAJOR;
++ guc->fw.minor_ver_wanted = GLK_FW_MINOR;
+ } else {
+ DRM_ERROR("No GuC firmware known for platform with GuC!\n");
+ return -ENOENT;
diff --git a/patches.drivers/drm-i915-gen9-Reintroduce-WaEnableYV12BugFixInHalfSl b/patches.drivers/drm-i915-gen9-Reintroduce-WaEnableYV12BugFixInHalfSl
new file mode 100644
index 0000000000..bda6687b08
--- /dev/null
+++ b/patches.drivers/drm-i915-gen9-Reintroduce-WaEnableYV12BugFixInHalfSl
@@ -0,0 +1,38 @@
+From 0b71cea29fc29bbd8e9dd9c641fee6bd75f68274 Mon Sep 17 00:00:00 2001
+From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
+Date: Fri, 12 May 2017 13:20:15 +0200
+Subject: [PATCH] drm/i915/gen9: Reintroduce WaEnableYV12BugFixInHalfSliceChicken7
+Git-commit: 0b71cea29fc29bbd8e9dd9c641fee6bd75f68274
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+This basically reverts commit 465418c6064c
+("drm/i915/gen9: Remove WaEnableYV12BugFixInHalfSliceChicken7")
+with small addition - marking it as affecting GLK as well.
+
+It was incorrectly considered fixed in production steppings.
+
+References: HSD#2126385, HSD#2131381, HSDES#1504433555, BSID#0764
+Cc: Mika Kuoppala <mika.kuoppala@intel.com>
+Cc: Jeff McGee <jeff.mcgee@intel.com>
+Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
+Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
+[mika: s/KBL/GLK on commit message]
+Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/20170512112015.19082-1-arkadiusz.hiler@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_engine_cs.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/i915/intel_engine_cs.c
++++ b/drivers/gpu/drm/i915/intel_engine_cs.c
+@@ -728,6 +728,7 @@ static int gen9_init_workarounds(struct
+ /* WaEnableYV12BugFixInHalfSliceChicken7:skl,bxt,kbl,glk,cfl */
+ /* WaEnableSamplerGPGPUPreemptionSupport:skl,bxt,kbl,cfl */
+ WA_SET_BIT_MASKED(GEN9_HALF_SLICE_CHICKEN7,
++ GEN9_ENABLE_YV12_BUGFIX |
+ GEN9_ENABLE_GPGPU_PREEMPTION);
+
+ /* Wa4x4STCOptimizationDisable:skl,bxt,kbl,glk,cfl */
diff --git a/patches.drivers/drm-i915-glk-Add-cold-boot-sequence-for-GLK-DSI b/patches.drivers/drm-i915-glk-Add-cold-boot-sequence-for-GLK-DSI
new file mode 100644
index 0000000000..f3073d7de1
--- /dev/null
+++ b/patches.drivers/drm-i915-glk-Add-cold-boot-sequence-for-GLK-DSI
@@ -0,0 +1,167 @@
+From 8a1deb329ffbdb049f6a475cf535644a81e80b55 Mon Sep 17 00:00:00 2001
+From: Madhav Chauhan <madhav.chauhan@intel.com>
+Date: Tue, 13 Jun 2017 13:18:15 +0530
+Subject: [PATCH] drm/i915/glk: Add cold boot sequence for GLK DSI
+Git-commit: 8a1deb329ffbdb049f6a475cf535644a81e80b55
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+As per BSEPC, if device ready bit is '0' in enable IO sequence
+then its a cold boot/reset scenario eg: S3/S4 resume. If cold boot
+scenario detected in enable IO, then prepare port immediately.
+In normal boot scenario, prepare port after glk_dsi_device_ready().
+Without cold boot sequence enabled, features like S3/S4 doesn't work.
+
+Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/1497340095-5877-2-git-send-email-madhav.chauhan@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_dsi.c | 79 +++++++++++++++++++++++++--------------
+ 1 file changed, 51 insertions(+), 28 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_dsi.c
++++ b/drivers/gpu/drm/i915/intel_dsi.c
+@@ -346,12 +346,13 @@ static bool intel_dsi_compute_config(str
+ return true;
+ }
+
+-static void glk_dsi_enable_io(struct intel_encoder *encoder)
++static bool glk_dsi_enable_io(struct intel_encoder *encoder)
+ {
+ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+ struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
+ enum port port;
+ u32 tmp;
++ bool cold_boot = false;
+
+ /* Set the MIPI mode
+ * If MIPI_Mode is off, then writing to LP_Wake bit is not reflecting.
+@@ -370,7 +371,10 @@ static void glk_dsi_enable_io(struct int
+ /* Program LP Wake */
+ for_each_dsi_port(port, intel_dsi->ports) {
+ tmp = I915_READ(MIPI_CTRL(port));
+- tmp |= GLK_LP_WAKE;
++ if (!(I915_READ(MIPI_DEVICE_READY(port)) & DEVICE_READY))
++ tmp &= ~GLK_LP_WAKE;
++ else
++ tmp |= GLK_LP_WAKE;
+ I915_WRITE(MIPI_CTRL(port), tmp);
+ }
+
+@@ -381,6 +385,14 @@ static void glk_dsi_enable_io(struct int
+ GLK_MIPIIO_PORT_POWERED, 20))
+ DRM_ERROR("MIPIO port is powergated\n");
+ }
++
++ /* Check for cold boot scenario */
++ for_each_dsi_port(port, intel_dsi->ports) {
++ cold_boot |= !(I915_READ(MIPI_DEVICE_READY(port)) &
++ DEVICE_READY);
++ }
++
++ return cold_boot;
+ }
+
+ static void glk_dsi_device_ready(struct intel_encoder *encoder)
+@@ -410,34 +422,34 @@ static void glk_dsi_device_ready(struct
+ val |= DEVICE_READY;
+ I915_WRITE(MIPI_DEVICE_READY(port), val);
+ usleep_range(10, 15);
+- }
+-
+- /* Enter ULPS */
+- val = I915_READ(MIPI_DEVICE_READY(port));
+- val &= ~ULPS_STATE_MASK;
+- val |= (ULPS_STATE_ENTER | DEVICE_READY);
+- I915_WRITE(MIPI_DEVICE_READY(port), val);
++ } else {
++ /* Enter ULPS */
++ val = I915_READ(MIPI_DEVICE_READY(port));
++ val &= ~ULPS_STATE_MASK;
++ val |= (ULPS_STATE_ENTER | DEVICE_READY);
++ I915_WRITE(MIPI_DEVICE_READY(port), val);
+
+- /* Wait for ULPS active */
+- if (intel_wait_for_register(dev_priv,
++ /* Wait for ULPS active */
++ if (intel_wait_for_register(dev_priv,
+ MIPI_CTRL(port), GLK_ULPS_NOT_ACTIVE, 0, 20))
+- DRM_ERROR("ULPS not active\n");
++ DRM_ERROR("ULPS not active\n");
+
+- /* Exit ULPS */
+- val = I915_READ(MIPI_DEVICE_READY(port));
+- val &= ~ULPS_STATE_MASK;
+- val |= (ULPS_STATE_EXIT | DEVICE_READY);
+- I915_WRITE(MIPI_DEVICE_READY(port), val);
++ /* Exit ULPS */
++ val = I915_READ(MIPI_DEVICE_READY(port));
++ val &= ~ULPS_STATE_MASK;
++ val |= (ULPS_STATE_EXIT | DEVICE_READY);
++ I915_WRITE(MIPI_DEVICE_READY(port), val);
+
+- /* Enter Normal Mode */
+- val = I915_READ(MIPI_DEVICE_READY(port));
+- val &= ~ULPS_STATE_MASK;
+- val |= (ULPS_STATE_NORMAL_OPERATION | DEVICE_READY);
+- I915_WRITE(MIPI_DEVICE_READY(port), val);
++ /* Enter Normal Mode */
++ val = I915_READ(MIPI_DEVICE_READY(port));
++ val &= ~ULPS_STATE_MASK;
++ val |= (ULPS_STATE_NORMAL_OPERATION | DEVICE_READY);
++ I915_WRITE(MIPI_DEVICE_READY(port), val);
+
+- val = I915_READ(MIPI_CTRL(port));
+- val &= ~GLK_LP_WAKE;
+- I915_WRITE(MIPI_CTRL(port), val);
++ val = I915_READ(MIPI_CTRL(port));
++ val &= ~GLK_LP_WAKE;
++ I915_WRITE(MIPI_CTRL(port), val);
++ }
+ }
+
+ /* Wait for Stop state */
+@@ -778,6 +790,7 @@ static void intel_dsi_pre_enable(struct
+ struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
+ enum port port;
+ u32 val;
++ bool glk_cold_boot = false;
+
+ DRM_DEBUG_KMS("\n");
+
+@@ -808,7 +821,8 @@ static void intel_dsi_pre_enable(struct
+ I915_WRITE(DSPCLK_GATE_D, val);
+ }
+
+- intel_dsi_prepare(encoder, pipe_config);
++ if (!IS_GEMINILAKE(dev_priv))
++ intel_dsi_prepare(encoder, pipe_config);
+
+ /* Power on, try both CRC pmic gpio and VBT */
+ if (intel_dsi->gpio_panel)
+@@ -819,12 +833,21 @@ static void intel_dsi_pre_enable(struct
+ /* Deassert reset */
+ intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
+
+- if (IS_GEMINILAKE(dev_priv))
+- glk_dsi_enable_io(encoder);
++ if (IS_GEMINILAKE(dev_priv)) {
++ glk_cold_boot = glk_dsi_enable_io(encoder);
++
++ /* Prepare port in cold boot(s3/s4) scenario */
++ if (glk_cold_boot)
++ intel_dsi_prepare(encoder, pipe_config);
++ }
+
+ /* Put device in ready state (LP-11) */
+ intel_dsi_device_ready(encoder);
+
++ /* Prepare port in normal boot scenario */
++ if (IS_GEMINILAKE(dev_priv) && !glk_cold_boot)
++ intel_dsi_prepare(encoder, pipe_config);
++
+ /* Send initialization commands in LP mode */
+ intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_INIT_OTP);
+
diff --git a/patches.drivers/drm-i915-glk-Calculate-high-low-switch-count-for-GLK b/patches.drivers/drm-i915-glk-Calculate-high-low-switch-count-for-GLK
new file mode 100644
index 0000000000..79a158b794
--- /dev/null
+++ b/patches.drivers/drm-i915-glk-Calculate-high-low-switch-count-for-GLK
@@ -0,0 +1,48 @@
+From 1fdd783e9ce3a60c99f4da0d844d17b7c3ef8aef Mon Sep 17 00:00:00 2001
+From: Madhav Chauhan <madhav.chauhan@intel.com>
+Date: Tue, 9 May 2017 18:59:24 +0530
+Subject: [PATCH] drm/i915/glk: Calculate high/low switch count for GLK
+Git-commit: 1fdd783e9ce3a60c99f4da0d844d17b7c3ef8aef
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+As per BSPEC, high/low switch count to be programmed in
+terms of byteclock using exit_zero_count and prep_count.
+For Geminilake exit/prep counts are already calculated
+in terms of byteclock. This patch calculates high/low
+switch count using counts value in byteclock, old calculation
+leads to screen flicker/shift issue while resuming from S3/S4.
+
+Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/1494336565-19185-1-git-send-email-madhav.chauhan@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_dsi_vbt.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
++++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
+@@ -694,8 +694,8 @@ bool intel_dsi_vbt_init(struct intel_dsi
+ clk_zero_cnt << 8 | prepare_cnt;
+
+ /*
+- * LP to HS switch count = 4TLPX + PREP_COUNT * 2 + EXIT_ZERO_COUNT * 2
+- * + 10UI + Extra Byte Count
++ * LP to HS switch count = 4TLPX + PREP_COUNT * mul + EXIT_ZERO_COUNT *
++ * mul + 10UI + Extra Byte Count
+ *
+ * HS to LP switch count = THS-TRAIL + 2TLPX + Extra Byte Count
+ * Extra Byte Count is calculated according to number of lanes.
+@@ -708,8 +708,8 @@ bool intel_dsi_vbt_init(struct intel_dsi
+ /* B044 */
+ /* FIXME:
+ * The comment above does not match with the code */
+- lp_to_hs_switch = DIV_ROUND_UP(4 * tlpx_ui + prepare_cnt * 2 +
+- exit_zero_cnt * 2 + 10, 8);
++ lp_to_hs_switch = DIV_ROUND_UP(4 * tlpx_ui + prepare_cnt * mul +
++ exit_zero_cnt * mul + 10, 8);
+
+ hs_to_lp_switch = DIV_ROUND_UP(mipi_config->ths_trail + 2 * tlpx_ui, 8);
+
diff --git a/patches.drivers/drm-i915-glk-Don-t-allow-12-bpc-when-htotal-is-too-b b/patches.drivers/drm-i915-glk-Don-t-allow-12-bpc-when-htotal-is-too-b
new file mode 100644
index 0000000000..eb19dd9b4a
--- /dev/null
+++ b/patches.drivers/drm-i915-glk-Don-t-allow-12-bpc-when-htotal-is-too-b
@@ -0,0 +1,38 @@
+From 46649d8b6cb876e4f823e741d39959cf6e231e85 Mon Sep 17 00:00:00 2001
+From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
+Date: Mon, 24 Apr 2017 13:47:18 +0300
+Subject: [PATCH] drm/i915/glk: Don't allow 12 bpc when htotal is too big
+Git-commit: 46649d8b6cb876e4f823e741d39959cf6e231e85
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+Display workaround #1139 for Geminilake instructs us to restrict HDMI
+to 8 bpc when htotal is greater than 5460. Otherwise, the pipe is unable
+to generate a proper signal and is left in a state where corruption is
+seen with other modes.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100440
+Cc: Shashank Sharma <shashank.sharma@intel.com>
+Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
+Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/20170424104718.26448-1-ander.conselvan.de.oliveira@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_hdmi.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_hdmi.c
++++ b/drivers/gpu/drm/i915/intel_hdmi.c
+@@ -1327,6 +1327,11 @@ static bool hdmi_12bpc_possible(struct i
+ return false;
+ }
+
++ /* Display Wa #1139 */
++ if (IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
++ crtc_state->base.adjusted_mode.htotal > 5460)
++ return false;
++
+ return true;
+ }
+
diff --git a/patches.drivers/drm-i915-glk-Remove-the-alpha_support-flag b/patches.drivers/drm-i915-glk-Remove-the-alpha_support-flag
new file mode 100644
index 0000000000..fb12795ede
--- /dev/null
+++ b/patches.drivers/drm-i915-glk-Remove-the-alpha_support-flag
@@ -0,0 +1,31 @@
+From 07981f2b27a4ff4bdbc4bb6b5ec965f33f4117c3 Mon Sep 17 00:00:00 2001
+From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
+Date: Thu, 8 Jun 2017 14:48:00 +0300
+Subject: [PATCH] drm/i915/glk: Remove the alpha_support flag
+Git-commit: 07981f2b27a4ff4bdbc4bb6b5ec965f33f4117c3
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+Geminilake is now included in CI, making it part of the pre-merge
+criteria. The support should be in good enough shape, so let's remove
+the alpha_support flag.
+
+Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
+Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/20170608114800.17201-1-ander.conselvan.de.oliveira@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/i915_pci.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/i915_pci.c
++++ b/drivers/gpu/drm/i915/i915_pci.c
+@@ -406,7 +406,6 @@ static const struct intel_device_info in
+ static const struct intel_device_info intel_geminilake_info = {
+ GEN9_LP_FEATURES,
+ .platform = INTEL_GEMINILAKE,
+- .is_alpha_support = 1,
+ .ddb_size = 1024,
+ .color = { .degamma_lut_size = 0, .gamma_lut_size = 1024 }
+ };
diff --git a/patches.drivers/drm-i915-glk-Split-GLK-DSI-device-ready-functionalit b/patches.drivers/drm-i915-glk-Split-GLK-DSI-device-ready-functionalit
new file mode 100644
index 0000000000..277b113254
--- /dev/null
+++ b/patches.drivers/drm-i915-glk-Split-GLK-DSI-device-ready-functionalit
@@ -0,0 +1,90 @@
+From 74e4ce6a78751f0a602dcbd00b53f710e312fcc5 Mon Sep 17 00:00:00 2001
+From: Madhav Chauhan <madhav.chauhan@intel.com>
+Date: Tue, 13 Jun 2017 13:18:14 +0530
+Subject: [PATCH] drm/i915/glk: Split GLK DSI device ready functionality
+Git-commit: 74e4ce6a78751f0a602dcbd00b53f710e312fcc5
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+This patch divides glk_dsi_device_ready() function into
+two part. First part will program LP wake and MIPI DSI mode
+to MIPI_CTRL reg using newly defined function glk_dsi_enable_io().
+glk_dsi_enable_io() will be called from intel_dsi_pre_enable.
+Second part will do remaining device ready activities using
+the existing function glk_dsi_device_ready().
+
+Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/1497340095-5877-1-git-send-email-madhav.chauhan@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_dsi.c | 25 ++++++++++++++++++-------
+ 1 file changed, 18 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_dsi.c
++++ b/drivers/gpu/drm/i915/intel_dsi.c
+@@ -346,12 +346,12 @@ static bool intel_dsi_compute_config(str
+ return true;
+ }
+
+-static void glk_dsi_device_ready(struct intel_encoder *encoder)
++static void glk_dsi_enable_io(struct intel_encoder *encoder)
+ {
+ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+ struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
+ enum port port;
+- u32 tmp, val;
++ u32 tmp;
+
+ /* Set the MIPI mode
+ * If MIPI_Mode is off, then writing to LP_Wake bit is not reflecting.
+@@ -381,6 +381,14 @@ static void glk_dsi_device_ready(struct
+ GLK_MIPIIO_PORT_POWERED, 20))
+ DRM_ERROR("MIPIO port is powergated\n");
+ }
++}
++
++static void glk_dsi_device_ready(struct intel_encoder *encoder)
++{
++ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
++ struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
++ enum port port;
++ u32 val;
+
+ /* Wait for MIPI PHY status bit to set */
+ for_each_dsi_port(port, intel_dsi->ports) {
+@@ -391,8 +399,8 @@ static void glk_dsi_device_ready(struct
+ }
+
+ /* Get IO out of reset */
+- tmp = I915_READ(MIPI_CTRL(PORT_A));
+- I915_WRITE(MIPI_CTRL(PORT_A), tmp | GLK_MIPIIO_RESET_RELEASED);
++ val = I915_READ(MIPI_CTRL(PORT_A));
++ I915_WRITE(MIPI_CTRL(PORT_A), val | GLK_MIPIIO_RESET_RELEASED);
+
+ /* Get IO out of Low power state*/
+ for_each_dsi_port(port, intel_dsi->ports) {
+@@ -427,9 +435,9 @@ static void glk_dsi_device_ready(struct
+ val |= (ULPS_STATE_NORMAL_OPERATION | DEVICE_READY);
+ I915_WRITE(MIPI_DEVICE_READY(port), val);
+
+- tmp = I915_READ(MIPI_CTRL(port));
+- tmp &= ~GLK_LP_WAKE;
+- I915_WRITE(MIPI_CTRL(port), tmp);
++ val = I915_READ(MIPI_CTRL(port));
++ val &= ~GLK_LP_WAKE;
++ I915_WRITE(MIPI_CTRL(port), val);
+ }
+
+ /* Wait for Stop state */
+@@ -811,6 +819,9 @@ static void intel_dsi_pre_enable(struct
+ /* Deassert reset */
+ intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
+
++ if (IS_GEMINILAKE(dev_priv))
++ glk_dsi_enable_io(encoder);
++
+ /* Put device in ready state (LP-11) */
+ intel_dsi_device_ready(encoder);
+
diff --git a/patches.drivers/drm-i915-glk-limit-pixel-clock-to-99-of-cdclk-workar b/patches.drivers/drm-i915-glk-limit-pixel-clock-to-99-of-cdclk-workar
new file mode 100644
index 0000000000..76c94adba7
--- /dev/null
+++ b/patches.drivers/drm-i915-glk-limit-pixel-clock-to-99-of-cdclk-workar
@@ -0,0 +1,74 @@
+From 97f55ca5b6625bb4ddeca7b1272b53ca04ab3cf0 Mon Sep 17 00:00:00 2001
+From: Madhav Chauhan <madhav.chauhan@intel.com>
+Date: Wed, 5 Apr 2017 09:04:23 -0400
+Subject: [PATCH] drm/i915/glk: limit pixel clock to 99% of cdclk workaround
+Mime-version: 1.0
+Content-type: text/plain; charset=UTF-8
+Content-transfer-encoding: 8bit
+Git-commit: 97f55ca5b6625bb4ddeca7b1272b53ca04ab3cf0
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+As per BSPEC, valid cdclk values for glk are 79.2, 158.4, 316.8 Mhz.
+Practically we can achive only 99% of these cdclk values (HW team
+checking on this). So cdclk should be calculated for the given pixclk as
+per that otherwise it may lead to screen corruption, explained below:
+1. For DSI AUO panel(1920x1200 @60) required pixclk is 157100 KHZ
+2. glk_calc_cdclk returns 79200 KHZ for this pixclk, For 2PPC it
+ will be 158400 KHZ
+3. Practically 100% of the cdclk can’t be achieved, so 99% of 158400
+ KHZ = 156816 which is less than the desired pixlclk and causes
+ panel corruption.
+
+V2: Rebased to new CDLCK code framework
+V3: Addressed review comments from Ander/Jani - Add comment in code about 99% usage of CDCLK - Calculate max dot clock as well with 99% limit
+v4 by Jani:
+ - drop superfluous whitespace change
+ - rewrite code comments to clarify
+V5: Added details of non-working scenario in commit message
+
+Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
+Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/1491397463-13637-1-git-send-email-madhav.chauhan@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_cdclk.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_cdclk.c
++++ b/drivers/gpu/drm/i915/intel_cdclk.c
+@@ -1091,9 +1091,15 @@ static int bxt_calc_cdclk(int max_pixclk
+
+ static int glk_calc_cdclk(int max_pixclk)
+ {
+- if (max_pixclk > 2 * 158400)
++ /*
++ * FIXME: Avoid using a pixel clock that is more than 99% of the cdclk
++ * as a temporary workaround. Use a higher cdclk instead. (Note that
++ * intel_compute_max_dotclk() limits the max pixel clock to 99% of max
++ * cdclk.)
++ */
++ if (max_pixclk > DIV_ROUND_UP(2 * 158400 * 99, 100))
+ return 316800;
+- else if (max_pixclk > 2 * 79200)
++ else if (max_pixclk > DIV_ROUND_UP(2 * 79200 * 99, 100))
+ return 158400;
+ else
+ return 79200;
+@@ -1994,7 +2000,11 @@ static int intel_compute_max_dotclk(stru
+ int max_cdclk_freq = dev_priv->max_cdclk_freq;
+
+ if (IS_GEMINILAKE(dev_priv))
+- return 2 * max_cdclk_freq;
++ /*
++ * FIXME: Limiting to 99% as a temporary workaround. See
++ * glk_calc_cdclk() for details.
++ */
++ return 2 * max_cdclk_freq * 99 / 100;
+ else if (INTEL_INFO(dev_priv)->gen >= 9 ||
+ IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
+ return max_cdclk_freq;
diff --git a/patches.drivers/drm-i915-huc-Update-GLK-HuC-version b/patches.drivers/drm-i915-huc-Update-GLK-HuC-version
new file mode 100644
index 0000000000..28b809b19c
--- /dev/null
+++ b/patches.drivers/drm-i915-huc-Update-GLK-HuC-version
@@ -0,0 +1,36 @@
+From dbc26ebd97b20e8732309c89bef5d8bfee5c0a3b Mon Sep 17 00:00:00 2001
+From: Anusha Srivatsa <anusha.srivatsa@intel.com>
+Date: Thu, 18 May 2017 10:47:11 -0700
+Subject: [PATCH] drm/i915/huc: Update GLK HuC version
+Git-commit: dbc26ebd97b20e8732309c89bef5d8bfee5c0a3b
+Patch-mainline: 4.13-rc1
+References: bsc#1067957
+
+Update version of HuC from 01.07.1748 to the
+version 02.00.1748
+
+Cc: Ander Conselvan <ander.conselvan.de.oliveira@intel.com>
+Cc: John Spotswood <john.a.spotswood@intel.com>
+Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
+Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
+Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
+Link: http://patchwork.freedesktop.org/patch/msgid/1495129631-2930-1-git-send-email-anusha.srivatsa@intel.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/i915/intel_huc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_huc.c
++++ b/drivers/gpu/drm/i915/intel_huc.c
+@@ -52,8 +52,8 @@
+ #define KBL_HUC_FW_MINOR 00
+ #define KBL_BLD_NUM 1810
+
+-#define GLK_HUC_FW_MAJOR 01
+-#define GLK_HUC_FW_MINOR 07
++#define GLK_HUC_FW_MAJOR 02
++#define GLK_HUC_FW_MINOR 00
+ #define GLK_BLD_NUM 1748
+
+ #define HUC_FW_PATH(platform, major, minor, bld_num) \
diff --git a/patches.drivers/mfd-Add-support-for-Cherry-Trail-Dollar-Cove-TI-PMIC b/patches.drivers/mfd-Add-support-for-Cherry-Trail-Dollar-Cove-TI-PMIC
new file mode 100644
index 0000000000..e7343a5bcf
--- /dev/null
+++ b/patches.drivers/mfd-Add-support-for-Cherry-Trail-Dollar-Cove-TI-PMIC
@@ -0,0 +1,250 @@
+From 6bac0606fdba97a2666bc8f0460a05fb7352b7e2 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 4 Sep 2017 16:43:38 +0200
+Subject: [PATCH] mfd: Add support for Cherry Trail Dollar Cove TI PMIC
+Git-commit: 6bac0606fdba97a2666bc8f0460a05fb7352b7e2
+Patch-mainline: v4.15-rc1
+References: bsc#1068546
+
+This patch adds the MFD driver for Dollar Cove (TI version) PMIC with
+ACPI INT33F5 that is found on some Intel Cherry Trail devices.
+The driver is based on the original work by Intel, found at:
+ https://github.com/01org/ProductionKernelQuilts
+
+This is a minimal version for adding the basic resources. Currently,
+only ACPI PMIC opregion and the external power-button are used.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=193891
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
+Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+
+---
+ drivers/mfd/Kconfig | 13 ++
+ drivers/mfd/Makefile | 1
+ drivers/mfd/intel_soc_pmic_chtdc_ti.c | 184 ++++++++++++++++++++++++++++++++++
+ 3 files changed, 198 insertions(+)
+ create mode 100644 drivers/mfd/intel_soc_pmic_chtdc_ti.c
+
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -470,6 +470,19 @@ config INTEL_SOC_PMIC_BXTWC
+ thermal, charger and related power management functions
+ on these systems.
+
++config INTEL_SOC_PMIC_CHTDC_TI
++ tristate "Support for Intel Cherry Trail Dollar Cove TI PMIC"
++ depends on GPIOLIB
++ depends on I2C
++ depends on ACPI
++ depends on X86
++ select MFD_CORE
++ select REGMAP_I2C
++ select REGMAP_IRQ
++ help
++ Select this option for supporting Dollar Cove (TI version) PMIC
++ device that is found on some Intel Cherry Trail systems.
++
+ config MFD_INTEL_LPSS
+ tristate
+ select COMMON_CLK
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -214,6 +214,7 @@ obj-$(CONFIG_MFD_SKY81452) += sky81452.o
+ intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o
+ obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o
+ obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o
++obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI) += intel_soc_pmic_chtdc_ti.o
+ obj-$(CONFIG_MFD_MT6397) += mt6397-core.o
+
+ obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o
+--- /dev/null
++++ b/drivers/mfd/intel_soc_pmic_chtdc_ti.c
+@@ -0,0 +1,184 @@
++/*
++ * Device access for Dollar Cove TI PMIC
++ *
++ * Copyright (c) 2014, Intel Corporation.
++ * Author: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
++ *
++ * Cleanup and forward-ported
++ * Copyright (c) 2017 Takashi Iwai <tiwai@suse.de>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/acpi.h>
++#include <linux/interrupt.h>
++#include <linux/i2c.h>
++#include <linux/mfd/core.h>
++#include <linux/mfd/intel_soc_pmic.h>
++#include <linux/module.h>
++#include <linux/regmap.h>
++
++#define CHTDC_TI_IRQLVL1 0x01
++#define CHTDC_TI_MASK_IRQLVL1 0x02
++
++/* Level 1 IRQs */
++enum {
++ CHTDC_TI_PWRBTN = 0, /* power button */
++ CHTDC_TI_DIETMPWARN, /* thermal */
++ CHTDC_TI_ADCCMPL, /* ADC */
++ /* No IRQ 3 */
++ CHTDC_TI_VBATLOW = 4, /* battery */
++ CHTDC_TI_VBUSDET, /* power source */
++ /* No IRQ 6 */
++ CHTDC_TI_CCEOCAL = 7, /* battery */
++};
++
++static struct resource power_button_resources[] = {
++ DEFINE_RES_IRQ(CHTDC_TI_PWRBTN),
++};
++
++static struct resource thermal_resources[] = {
++ DEFINE_RES_IRQ(CHTDC_TI_DIETMPWARN),
++};
++
++static struct resource adc_resources[] = {
++ DEFINE_RES_IRQ(CHTDC_TI_ADCCMPL),
++};
++
++static struct resource pwrsrc_resources[] = {
++ DEFINE_RES_IRQ(CHTDC_TI_VBUSDET),
++};
++
++static struct resource battery_resources[] = {
++ DEFINE_RES_IRQ(CHTDC_TI_VBATLOW),
++ DEFINE_RES_IRQ(CHTDC_TI_CCEOCAL),
++};
++
++static struct mfd_cell chtdc_ti_dev[] = {
++ {
++ .name = "chtdc_ti_pwrbtn",
++ .num_resources = ARRAY_SIZE(power_button_resources),
++ .resources = power_button_resources,
++ }, {
++ .name = "chtdc_ti_adc",
++ .num_resources = ARRAY_SIZE(adc_resources),
++ .resources = adc_resources,
++ }, {
++ .name = "chtdc_ti_thermal",
++ .num_resources = ARRAY_SIZE(thermal_resources),
++ .resources = thermal_resources,
++ }, {
++ .name = "chtdc_ti_pwrsrc",
++ .num_resources = ARRAY_SIZE(pwrsrc_resources),
++ .resources = pwrsrc_resources,
++ }, {
++ .name = "chtdc_ti_battery",
++ .num_resources = ARRAY_SIZE(battery_resources),
++ .resources = battery_resources,
++ },
++ { .name = "chtdc_ti_region", },
++};
++
++static const struct regmap_config chtdc_ti_regmap_config = {
++ .reg_bits = 8,
++ .val_bits = 8,
++ .max_register = 128,
++ .cache_type = REGCACHE_NONE,
++};
++
++static const struct regmap_irq chtdc_ti_irqs[] = {
++ REGMAP_IRQ_REG(CHTDC_TI_PWRBTN, 0, BIT(CHTDC_TI_PWRBTN)),
++ REGMAP_IRQ_REG(CHTDC_TI_DIETMPWARN, 0, BIT(CHTDC_TI_DIETMPWARN)),
++ REGMAP_IRQ_REG(CHTDC_TI_ADCCMPL, 0, BIT(CHTDC_TI_ADCCMPL)),
++ REGMAP_IRQ_REG(CHTDC_TI_VBATLOW, 0, BIT(CHTDC_TI_VBATLOW)),
++ REGMAP_IRQ_REG(CHTDC_TI_VBUSDET, 0, BIT(CHTDC_TI_VBUSDET)),
++ REGMAP_IRQ_REG(CHTDC_TI_CCEOCAL, 0, BIT(CHTDC_TI_CCEOCAL)),
++};
++
++static const struct regmap_irq_chip chtdc_ti_irq_chip = {
++ .name = KBUILD_MODNAME,
++ .irqs = chtdc_ti_irqs,
++ .num_irqs = ARRAY_SIZE(chtdc_ti_irqs),
++ .num_regs = 1,
++ .status_base = CHTDC_TI_IRQLVL1,
++ .mask_base = CHTDC_TI_MASK_IRQLVL1,
++ .ack_base = CHTDC_TI_IRQLVL1,
++};
++
++static int chtdc_ti_probe(struct i2c_client *i2c)
++{
++ struct device *dev = &i2c->dev;
++ struct intel_soc_pmic *pmic;
++ int ret;
++
++ pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL);
++ if (!pmic)
++ return -ENOMEM;
++
++ i2c_set_clientdata(i2c, pmic);
++
++ pmic->regmap = devm_regmap_init_i2c(i2c, &chtdc_ti_regmap_config);
++ if (IS_ERR(pmic->regmap))
++ return PTR_ERR(pmic->regmap);
++ pmic->irq = i2c->irq;
++
++ ret = devm_regmap_add_irq_chip(dev, pmic->regmap, pmic->irq,
++ IRQF_ONESHOT, 0,
++ &chtdc_ti_irq_chip,
++ &pmic->irq_chip_data);
++ if (ret)
++ return ret;
++
++ return devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, chtdc_ti_dev,
++ ARRAY_SIZE(chtdc_ti_dev), NULL, 0,
++ regmap_irq_get_domain(pmic->irq_chip_data));
++}
++
++static void chtdc_ti_shutdown(struct i2c_client *i2c)
++{
++ struct intel_soc_pmic *pmic = i2c_get_clientdata(i2c);
++
++ disable_irq(pmic->irq);
++}
++
++static int __maybe_unused chtdc_ti_suspend(struct device *dev)
++{
++ struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
++
++ disable_irq(pmic->irq);
++
++ return 0;
++}
++
++static int __maybe_unused chtdc_ti_resume(struct device *dev)
++{
++ struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
++
++ enable_irq(pmic->irq);
++
++ return 0;
++}
++
++static SIMPLE_DEV_PM_OPS(chtdc_ti_pm_ops, chtdc_ti_suspend, chtdc_ti_resume);
++
++static const struct acpi_device_id chtdc_ti_acpi_ids[] = {
++ { "INT33F5" },
++ { },
++};
++MODULE_DEVICE_TABLE(acpi, chtdc_ti_acpi_ids);
++
++static struct i2c_driver chtdc_ti_i2c_driver = {
++ .driver = {
++ .name = "intel_soc_pmic_chtdc_ti",
++ .pm = &chtdc_ti_pm_ops,
++ .acpi_match_table = chtdc_ti_acpi_ids,
++ },
++ .probe_new = chtdc_ti_probe,
++ .shutdown = chtdc_ti_shutdown,
++};
++module_i2c_driver(chtdc_ti_i2c_driver);
++
++MODULE_DESCRIPTION("I2C driver for Intel SoC Dollar Cove TI PMIC");
++MODULE_LICENSE("GPL v2");
diff --git a/patches.drivers/mmc-sdhci-acpi-Workaround-conflict-with-PCI-wifi-on- b/patches.drivers/mmc-sdhci-acpi-Workaround-conflict-with-PCI-wifi-on-
new file mode 100644
index 0000000000..946ed4a71f
--- /dev/null
+++ b/patches.drivers/mmc-sdhci-acpi-Workaround-conflict-with-PCI-wifi-on-
@@ -0,0 +1,143 @@
+From 17753d16251837125014caa6b49406f52aef8916 Mon Sep 17 00:00:00 2001
+From: Adrian Hunter <adrian.hunter@intel.com>
+Date: Wed, 21 Jun 2017 15:08:39 +0300
+Subject: [PATCH] mmc: sdhci-acpi: Workaround conflict with PCI wifi on GPD Win handheld
+Git-commit: 17753d16251837125014caa6b49406f52aef8916
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+GPDwin uses PCI wifi which conflicts with SDIO's use of
+acpi_device_fix_up_power() on child device nodes. Specifically
+acpi_device_fix_up_power() causes the wifi module to get turned off.
+Identifying GPDwin is problematic, but since SDIO is only used for wifi,
+the presence of the PCI wifi card in the expected slot with an ACPI
+companion node, is used to indicate that acpi_device_fix_up_power() should
+be avoided.
+
+Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
+Acked-by: Hans de Goede <hdegoede@redhat.com>
+Tested-by: Hans de Goede <hdegoede@redhat.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/mmc/host/sdhci-acpi.c | 70 ++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 64 insertions(+), 6 deletions(-)
+
+--- a/drivers/mmc/host/sdhci-acpi.c
++++ b/drivers/mmc/host/sdhci-acpi.c
+@@ -45,6 +45,7 @@
+ #include <asm/cpu_device_id.h>
+ #include <asm/intel-family.h>
+ #include <asm/iosf_mbi.h>
++#include <linux/pci.h>
+ #endif
+
+ #include "sdhci.h"
+@@ -134,6 +135,16 @@ static bool sdhci_acpi_byt(void)
+ return x86_match_cpu(byt);
+ }
+
++static bool sdhci_acpi_cht(void)
++{
++ static const struct x86_cpu_id cht[] = {
++ { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_AIRMONT },
++ {}
++ };
++
++ return x86_match_cpu(cht);
++}
++
+ #define BYT_IOSF_SCCEP 0x63
+ #define BYT_IOSF_OCP_NETCTRL0 0x1078
+ #define BYT_IOSF_OCP_TIMEOUT_BASE GENMASK(10, 8)
+@@ -178,6 +189,45 @@ static bool sdhci_acpi_byt_defer(struct
+ return false;
+ }
+
++static bool sdhci_acpi_cht_pci_wifi(unsigned int vendor, unsigned int device,
++ unsigned int slot, unsigned int parent_slot)
++{
++ struct pci_dev *dev, *parent, *from = NULL;
++
++ while (1) {
++ dev = pci_get_device(vendor, device, from);
++ pci_dev_put(from);
++ if (!dev)
++ break;
++ parent = pci_upstream_bridge(dev);
++ if (ACPI_COMPANION(&dev->dev) && PCI_SLOT(dev->devfn) == slot &&
++ parent && PCI_SLOT(parent->devfn) == parent_slot &&
++ !pci_upstream_bridge(parent)) {
++ pci_dev_put(dev);
++ return true;
++ }
++ from = dev;
++ }
++
++ return false;
++}
++
++/*
++ * GPDwin uses PCI wifi which conflicts with SDIO's use of
++ * acpi_device_fix_up_power() on child device nodes. Identifying GPDwin is
++ * problematic, but since SDIO is only used for wifi, the presence of the PCI
++ * wifi card in the expected slot with an ACPI companion node, is used to
++ * indicate that acpi_device_fix_up_power() should be avoided.
++ */
++static inline bool sdhci_acpi_no_fixup_child_power(const char *hid,
++ const char *uid)
++{
++ return sdhci_acpi_cht() &&
++ !strcmp(hid, "80860F14") &&
++ !strcmp(uid, "2") &&
++ sdhci_acpi_cht_pci_wifi(0x14e4, 0x43ec, 0, 28);
++}
++
+ #else
+
+ static inline void sdhci_acpi_byt_setting(struct device *dev)
+@@ -189,6 +239,12 @@ static inline bool sdhci_acpi_byt_defer(
+ return false;
+ }
+
++static inline bool sdhci_acpi_no_fixup_child_power(const char *hid,
++ const char *uid)
++{
++ return false;
++}
++
+ #endif
+
+ static int bxt_get_cd(struct mmc_host *mmc)
+@@ -390,11 +446,16 @@ static int sdhci_acpi_probe(struct platf
+ if (acpi_bus_get_device(handle, &device))
+ return -ENODEV;
+
++ hid = acpi_device_hid(device);
++ uid = device->pnp.unique_id;
++
+ /* Power on the SDHCI controller and its children */
+ acpi_device_fix_up_power(device);
+- list_for_each_entry(child, &device->children, node)
+- if (child->status.present && child->status.enabled)
+- acpi_device_fix_up_power(child);
++ if (!sdhci_acpi_no_fixup_child_power(hid, uid)) {
++ list_for_each_entry(child, &device->children, node)
++ if (child->status.present && child->status.enabled)
++ acpi_device_fix_up_power(child);
++ }
+
+ if (acpi_bus_get_status(device) || !device->status.present)
+ return -ENODEV;
+@@ -402,9 +463,6 @@ static int sdhci_acpi_probe(struct platf
+ if (sdhci_acpi_byt_defer(dev))
+ return -EPROBE_DEFER;
+
+- hid = acpi_device_hid(device);
+- uid = device->pnp.unique_id;
+-
+ iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!iomem)
+ return -ENOMEM;
diff --git a/patches.drivers/platform-x86-Add-driver-for-ACPI-INT0002-Virtual-GPI b/patches.drivers/platform-x86-Add-driver-for-ACPI-INT0002-Virtual-GPI
new file mode 100644
index 0000000000..8ae0b850e2
--- /dev/null
+++ b/patches.drivers/platform-x86-Add-driver-for-ACPI-INT0002-Virtual-GPI
@@ -0,0 +1,297 @@
+From 63dada87f7ef7d4a536765c816fbbe7c4b9f3c85 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Mon, 12 Jun 2017 22:55:46 +0200
+Subject: [PATCH] platform/x86: Add driver for ACPI INT0002 Virtual GPIO device
+Git-commit: 63dada87f7ef7d4a536765c816fbbe7c4b9f3c85
+Patch-mainline: 4.13-rc1
+References: bsc#1068546
+
+Some peripherals on Bay Trail and Cherry Trail platforms signal a
+Power Management Event (PME) to the Power Management Controller (PMC)
+to wakeup the system. When this happens software needs to explicitly
+clear the PME bus 0 status bit in the GPE0a_STS register to avoid an
+IRQ storm on IRQ 9.
+
+This is modelled in ACPI through the INT0002 ACPI device, which is
+called a "Virtual GPIO controller" in ACPI because it defines the
+event handler to call when the PME triggers through _AEI and _L02
+methods as would be done for a real GPIO interrupt in ACPI.
+
+This commit adds a driver which registers the Virtual GPIOs expected
+by the DSDT on these devices, letting gpiolib-acpi claim the
+virtual GPIO and install a GPIO-interrupt handler which call the _L02
+handler as it would for a real GPIO controller.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/platform/x86/Kconfig | 19 ++
+ drivers/platform/x86/Makefile | 1
+ drivers/platform/x86/intel_int0002_vgpio.c | 219 +++++++++++++++++++++++++++++
+ 3 files changed, 239 insertions(+)
+ create mode 100644 drivers/platform/x86/intel_int0002_vgpio.c
+
+--- a/drivers/platform/x86/Kconfig
++++ b/drivers/platform/x86/Kconfig
+@@ -794,6 +794,25 @@ config INTEL_CHT_INT33FE
+ This driver instantiates i2c-clients for these, so that standard
+ i2c drivers for these chips can bind to the them.
+
++config INTEL_INT0002_VGPIO
++ tristate "Intel ACPI INT0002 Virtual GPIO driver"
++ depends on GPIOLIB && ACPI
++ select GPIOLIB_IRQCHIP
++ ---help---
++ Some peripherals on Bay Trail and Cherry Trail platforms signal a
++ Power Management Event (PME) to the Power Management Controller (PMC)
++ to wakeup the system. When this happens software needs to explicitly
++ clear the PME bus 0 status bit in the GPE0a_STS register to avoid an
++ IRQ storm on IRQ 9.
++
++ This is modelled in ACPI through the INT0002 ACPI device, which is
++ called a "Virtual GPIO controller" in ACPI because it defines the
++ event handler to call when the PME triggers through _AEI and _L02
++ methods as would be done for a real GPIO interrupt in ACPI.
++
++ To compile this driver as a module, choose M here: the module will
++ be called intel_int0002_vgpio.
++
+ config INTEL_HID_EVENT
+ tristate "INTEL HID Event"
+ depends on ACPI
+--- a/drivers/platform/x86/Makefile
++++ b/drivers/platform/x86/Makefile
+@@ -46,6 +46,7 @@ obj-$(CONFIG_TOSHIBA_BT_RFKILL) += toshi
+ obj-$(CONFIG_TOSHIBA_HAPS) += toshiba_haps.o
+ obj-$(CONFIG_TOSHIBA_WMI) += toshiba-wmi.o
+ obj-$(CONFIG_INTEL_CHT_INT33FE) += intel_cht_int33fe.o
++obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
+ obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o
+ obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o
+ obj-$(CONFIG_INTEL_SCU_IPC) += intel_scu_ipc.o
+--- /dev/null
++++ b/drivers/platform/x86/intel_int0002_vgpio.c
+@@ -0,0 +1,219 @@
++/*
++ * Intel INT0002 "Virtual GPIO" driver
++ *
++ * Copyright (C) 2017 Hans de Goede <hdegoede@redhat.com>
++ *
++ * Loosely based on android x86 kernel code which is:
++ *
++ * Copyright (c) 2014, Intel Corporation.
++ *
++ * Author: Dyut Kumar Sil <dyut.k.sil@intel.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Some peripherals on Bay Trail and Cherry Trail platforms signal a Power
++ * Management Event (PME) to the Power Management Controller (PMC) to wakeup
++ * the system. When this happens software needs to clear the PME bus 0 status
++ * bit in the GPE0a_STS register to avoid an IRQ storm on IRQ 9.
++ *
++ * This is modelled in ACPI through the INT0002 ACPI device, which is
++ * called a "Virtual GPIO controller" in ACPI because it defines the event
++ * handler to call when the PME triggers through _AEI and _L02 / _E02
++ * methods as would be done for a real GPIO interrupt in ACPI. Note this
++ * is a hack to define an AML event handler for the PME while using existing
++ * ACPI mechanisms, this is not a real GPIO at all.
++ *
++ * This driver will bind to the INT0002 device, and register as a GPIO
++ * controller, letting gpiolib-acpi.c call the _L02 handler as it would
++ * for a real GPIO controller.
++ */
++
++#include <linux/acpi.h>
++#include <linux/bitmap.h>
++#include <linux/gpio/driver.h>
++#include <linux/interrupt.h>
++#include <linux/io.h>
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/slab.h>
++#include <linux/suspend.h>
++
++#include <asm/cpu_device_id.h>
++#include <asm/intel-family.h>
++
++#define DRV_NAME "INT0002 Virtual GPIO"
++
++/* For some reason the virtual GPIO pin tied to the GPE is numbered pin 2 */
++#define GPE0A_PME_B0_VIRT_GPIO_PIN 2
++
++#define GPE0A_PME_B0_STS_BIT BIT(13)
++#define GPE0A_PME_B0_EN_BIT BIT(13)
++#define GPE0A_STS_PORT 0x420
++#define GPE0A_EN_PORT 0x428
++
++#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
++
++static const struct x86_cpu_id int0002_cpu_ids[] = {
++/*
++ * Limit ourselves to Cherry Trail for now, until testing shows we
++ * need to handle the INT0002 device on Baytrail too.
++ * ICPU(INTEL_FAM6_ATOM_SILVERMONT1), * Valleyview, Bay Trail *
++ */
++ ICPU(INTEL_FAM6_ATOM_AIRMONT), /* Braswell, Cherry Trail */
++ {}
++};
++
++/*
++ * As this is not a real GPIO at all, but just a hack to model an event in
++ * ACPI the get / set functions are dummy functions.
++ */
++
++static int int0002_gpio_get(struct gpio_chip *chip, unsigned int offset)
++{
++ return 0;
++}
++
++static void int0002_gpio_set(struct gpio_chip *chip, unsigned int offset,
++ int value)
++{
++}
++
++static int int0002_gpio_direction_output(struct gpio_chip *chip,
++ unsigned int offset, int value)
++{
++ return 0;
++}
++
++static void int0002_irq_ack(struct irq_data *data)
++{
++ outl(GPE0A_PME_B0_STS_BIT, GPE0A_STS_PORT);
++}
++
++static void int0002_irq_unmask(struct irq_data *data)
++{
++ u32 gpe_en_reg;
++
++ gpe_en_reg = inl(GPE0A_EN_PORT);
++ gpe_en_reg |= GPE0A_PME_B0_EN_BIT;
++ outl(gpe_en_reg, GPE0A_EN_PORT);
++}
++
++static void int0002_irq_mask(struct irq_data *data)
++{
++ u32 gpe_en_reg;
++
++ gpe_en_reg = inl(GPE0A_EN_PORT);
++ gpe_en_reg &= ~GPE0A_PME_B0_EN_BIT;
++ outl(gpe_en_reg, GPE0A_EN_PORT);
++}
++
++static irqreturn_t int0002_irq(int irq, void *data)
++{
++ struct gpio_chip *chip = data;
++ u32 gpe_sts_reg;
++
++ gpe_sts_reg = inl(GPE0A_STS_PORT);
++ if (!(gpe_sts_reg & GPE0A_PME_B0_STS_BIT))
++ return IRQ_NONE;
++
++ generic_handle_irq(irq_find_mapping(chip->irqdomain,
++ GPE0A_PME_B0_VIRT_GPIO_PIN));
++
++ pm_system_wakeup();
++
++ return IRQ_HANDLED;
++}
++
++static struct irq_chip int0002_irqchip = {
++ .name = DRV_NAME,
++ .irq_ack = int0002_irq_ack,
++ .irq_mask = int0002_irq_mask,
++ .irq_unmask = int0002_irq_unmask,
++};
++
++static int int0002_probe(struct platform_device *pdev)
++{
++ struct device *dev = &pdev->dev;
++ const struct x86_cpu_id *cpu_id;
++ struct gpio_chip *chip;
++ int irq, ret;
++
++ /* Menlow has a different INT0002 device? <sigh> */
++ cpu_id = x86_match_cpu(int0002_cpu_ids);
++ if (!cpu_id)
++ return -ENODEV;
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq < 0) {
++ dev_err(dev, "Error getting IRQ: %d\n", irq);
++ return irq;
++ }
++
++ chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
++ if (!chip)
++ return -ENOMEM;
++
++ chip->label = DRV_NAME;
++ chip->parent = dev;
++ chip->owner = THIS_MODULE;
++ chip->get = int0002_gpio_get;
++ chip->set = int0002_gpio_set;
++ chip->direction_input = int0002_gpio_get;
++ chip->direction_output = int0002_gpio_direction_output;
++ chip->base = -1;
++ chip->ngpio = GPE0A_PME_B0_VIRT_GPIO_PIN + 1;
++ chip->irq_need_valid_mask = true;
++
++ ret = devm_gpiochip_add_data(&pdev->dev, chip, NULL);
++ if (ret) {
++ dev_err(dev, "Error adding gpio chip: %d\n", ret);
++ return ret;
++ }
++
++ bitmap_clear(chip->irq_valid_mask, 0, GPE0A_PME_B0_VIRT_GPIO_PIN);
++
++ /*
++ * We manually request the irq here instead of passing a flow-handler
++ * to gpiochip_set_chained_irqchip, because the irq is shared.
++ */
++ ret = devm_request_irq(dev, irq, int0002_irq,
++ IRQF_SHARED | IRQF_NO_THREAD, "INT0002", chip);
++ if (ret) {
++ dev_err(dev, "Error requesting IRQ %d: %d\n", irq, ret);
++ return ret;
++ }
++
++ ret = gpiochip_irqchip_add(chip, &int0002_irqchip, 0, handle_edge_irq,
++ IRQ_TYPE_NONE);
++ if (ret) {
++ dev_err(dev, "Error adding irqchip: %d\n", ret);
++ return ret;
++ }
++
++ gpiochip_set_chained_irqchip(chip, &int0002_irqchip, irq, NULL);
++
++ return 0;
++}
++
++static const struct acpi_device_id int0002_acpi_ids[] = {
++ { "INT0002", 0 },
++ { },
++};
++MODULE_DEVICE_TABLE(acpi, int0002_acpi_ids);
++
++static struct platform_driver int0002_driver = {
++ .driver = {
++ .name = DRV_NAME,
++ .acpi_match_table = int0002_acpi_ids,
++ },
++ .probe = int0002_probe,
++};
++
++module_platform_driver(int0002_driver);
++
++MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
++MODULE_DESCRIPTION("Intel INT0002 Virtual GPIO driver");
++MODULE_LICENSE("GPL");
diff --git a/patches.drivers/video-console-Add-dmi-quirk-table-for-x86-systems-wh b/patches.drivers/video-console-Add-dmi-quirk-table-for-x86-systems-wh
new file mode 100644
index 0000000000..5dac39b331
--- /dev/null
+++ b/patches.drivers/video-console-Add-dmi-quirk-table-for-x86-systems-wh
@@ -0,0 +1,226 @@
+From b0d8e409c3626eae42b59a3d76574804f2cef5ef Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 18 Aug 2017 19:56:39 +0200
+Subject: [PATCH] video/console: Add dmi quirk table for x86 systems which need fbcon rotation
+Git-commit: b0d8e409c3626eae42b59a3d76574804f2cef5ef
+Patch-mainline: 4.14-rc1
+References: bsc#1068546
+
+Some x86 clamshell design devices use portrait tablet screens and a
+display engine which cannot rotate in hardware, so we need to rotate
+the fbcon to compensate.
+
+This commit adds a DMI based quirk table which is initially populated with
+4 such devices: The Asus T100HA, GPD Pocket, the GPD win and the I.T.Works
+TW891, so that the console comes up in the right orientation on these
+devices OOTB.
+
+Unfortunately these (cheap) devices also typically have quite generic DMI
+data, so we match on a combination of DMI data, screen resolution and a
+list of known BIOS dates to avoid false positives.
+
+Suggested-by: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Jean Delvare <jdelvare@suse.de>
+[b.zolnierkie: ported over fbcon changes]
+Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/video/console/Makefile | 1
+ drivers/video/console/fbcon.c | 12 ++
+ drivers/video/console/fbcon.h | 7 +
+ drivers/video/console/fbcon_dmi_quirks.c | 131 +++++++++++++++++++++++++++++++
+ 4 files changed, 147 insertions(+), 4 deletions(-)
+ create mode 100644 drivers/video/fbdev/core/fbcon_dmi_quirks.c
+
+--- a/drivers/video/console/Makefile
++++ b/drivers/video/console/Makefile
+@@ -17,3 +17,4 @@ obj-$(CONFIG_FRAMEBUFFER_CONSOLE) +=
+ endif
+
+ obj-$(CONFIG_FB_STI) += sticore.o
++obj-$(CONFIG_DMI) += fbcon_dmi_quirks.o
+--- a/drivers/video/console/fbcon.c
++++ b/drivers/video/console/fbcon.c
+@@ -135,7 +135,7 @@ static char fontname[40];
+ static int info_idx = -1;
+
+ /* console rotation */
+-static int initial_rotation;
++static int initial_rotation = -1;
+ static int fbcon_has_sysfs;
+
+ static const struct consw fb_con;
+@@ -954,7 +954,10 @@ static const char *fbcon_startup(void)
+ ops->cur_rotate = -1;
+ ops->cur_blink_jiffies = HZ / 5;
+ info->fbcon_par = ops;
+- p->con_rotate = initial_rotation;
++ if (initial_rotation != -1)
++ p->con_rotate = initial_rotation;
++ else
++ p->con_rotate = fbcon_platform_get_rotate(info);
+ set_blitting_type(vc, info);
+
+ if (info->fix.type != FB_TYPE_TEXT) {
+@@ -1091,7 +1094,10 @@ static void fbcon_init(struct vc_data *v
+
+ ops = info->fbcon_par;
+ ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
+- p->con_rotate = initial_rotation;
++ if (initial_rotation != -1)
++ p->con_rotate = initial_rotation;
++ else
++ p->con_rotate = fbcon_platform_get_rotate(info);
+ set_blitting_type(vc, info);
+
+ cols = vc->vc_cols;
+--- a/drivers/video/console/fbcon.h
++++ b/drivers/video/console/fbcon.h
+@@ -261,5 +261,10 @@ extern void fbcon_set_rotate(struct fbco
+ #define fbcon_set_rotate(x) do {} while(0)
+ #endif /* CONFIG_FRAMEBUFFER_CONSOLE_ROTATION */
+
+-#endif /* _VIDEO_FBCON_H */
++#ifdef CONFIG_DMI
++int fbcon_platform_get_rotate(struct fb_info *info);
++#else
++#define fbcon_platform_get_rotate(i) FB_ROTATE_UR
++#endif /* CONFIG_DMI */
+
++#endif /* _VIDEO_FBCON_H */
+--- /dev/null
++++ b/drivers/video/console/fbcon_dmi_quirks.c
+@@ -0,0 +1,131 @@
++/*
++ * fbcon_dmi_quirks.c -- DMI based quirk detection for fbcon
++ *
++ * Copyright (C) 2017 Hans de Goede <hdegoede@redhat.com>
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ */
++
++#include <linux/dmi.h>
++#include <linux/fb.h>
++#include <linux/kernel.h>
++#include "fbcon.h"
++
++/*
++ * Some x86 clamshell design devices use portrait tablet screens and a display
++ * engine which cannot rotate in hardware, so we need to rotate the fbcon to
++ * compensate. Unfortunately these (cheap) devices also typically have quite
++ * generic DMI data, so we match on a combination of DMI data, screen resolution
++ * and a list of known BIOS dates to avoid false positives.
++ */
++
++struct fbcon_dmi_rotate_data {
++ int width;
++ int height;
++ const char * const *bios_dates;
++ int rotate;
++};
++
++static const struct fbcon_dmi_rotate_data rotate_data_asus_t100ha = {
++ .width = 800,
++ .height = 1280,
++ .rotate = FB_ROTATE_CCW,
++};
++
++static const struct fbcon_dmi_rotate_data rotate_data_gpd_pocket = {
++ .width = 1200,
++ .height = 1920,
++ .bios_dates = (const char * const []){ "05/26/2017", "06/28/2017",
++ "07/05/2017", NULL },
++ .rotate = FB_ROTATE_CW,
++};
++
++static const struct fbcon_dmi_rotate_data rotate_data_gpd_win = {
++ .width = 720,
++ .height = 1280,
++ .bios_dates = (const char * const []){
++ "10/25/2016", "11/18/2016", "02/21/2017",
++ "03/20/2017", NULL },
++ .rotate = FB_ROTATE_CW,
++};
++
++static const struct fbcon_dmi_rotate_data rotate_data_itworks_tw891 = {
++ .width = 800,
++ .height = 1280,
++ .bios_dates = (const char * const []){ "10/16/2015", NULL },
++ .rotate = FB_ROTATE_CW,
++};
++
++static const struct dmi_system_id rotate_data[] = {
++ { /* Asus T100HA */
++ .matches = {
++ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
++ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
++ },
++ .driver_data = (void *)&rotate_data_asus_t100ha,
++ }, { /*
++ * GPD Pocket, note that the the DMI data is less generic then
++ * it seems, devices with a board-vendor of "AMI Corporation"
++ * are quite rare, as are devices which have both board- *and*
++ * product-id set to "Default String"
++ */
++ .matches = {
++ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
++ DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
++ DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
++ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
++ },
++ .driver_data = (void *)&rotate_data_gpd_pocket,
++ }, { /* GPD Win (same note on DMI match as GPD Pocket) */
++ .matches = {
++ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
++ DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
++ DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
++ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
++ },
++ .driver_data = (void *)&rotate_data_gpd_win,
++ }, { /* I.T.Works TW891 */
++ .matches = {
++ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
++ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "TW891"),
++ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
++ DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
++ },
++ .driver_data = (void *)&rotate_data_itworks_tw891,
++ },
++ {}
++};
++
++int fbcon_platform_get_rotate(struct fb_info *info)
++{
++ const struct dmi_system_id *match;
++ const struct fbcon_dmi_rotate_data *data;
++ const char *bios_date;
++ int i;
++
++ for (match = dmi_first_match(rotate_data);
++ match;
++ match = dmi_first_match(match + 1)) {
++ data = match->driver_data;
++
++ if (data->width != info->var.xres ||
++ data->height != info->var.yres)
++ continue;
++
++ if (!data->bios_dates)
++ return data->rotate;
++
++ bios_date = dmi_get_system_info(DMI_BIOS_DATE);
++ if (!bios_date)
++ continue;
++
++ for (i = 0; data->bios_dates[i]; i++) {
++ if (!strcmp(data->bios_dates[i], bios_date))
++ return data->rotate;
++ }
++ }
++
++ return FB_ROTATE_UR;
++}
diff --git a/patches.drivers/video-console-Add-new-BIOS-date-for-GPD-pocket-to-dm b/patches.drivers/video-console-Add-new-BIOS-date-for-GPD-pocket-to-dm
new file mode 100644
index 0000000000..1044ef84de
--- /dev/null
+++ b/patches.drivers/video-console-Add-new-BIOS-date-for-GPD-pocket-to-dm
@@ -0,0 +1,31 @@
+From 52a962ee1ca4dca721d44fe59aca1faea9f418cf Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Mon, 4 Sep 2017 16:00:49 +0200
+Subject: [PATCH] video/console: Add new BIOS date for GPD pocket to dmi quirk table
+Git-commit: 52a962ee1ca4dca721d44fe59aca1faea9f418cf
+Patch-mainline: 4.14-rc1
+References: bsc#1068546
+
+GPD has released a new BIOS for the pocket, update the dmi data
+accordingly.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+[b.zolnierkie: ported over fbcon changes]
+Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/video/console/fbcon_dmi_quirks.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/video/console/fbcon_dmi_quirks.c
++++ b/drivers/video/console/fbcon_dmi_quirks.c
+@@ -38,7 +38,7 @@ static const struct fbcon_dmi_rotate_dat
+ .width = 1200,
+ .height = 1920,
+ .bios_dates = (const char * const []){ "05/26/2017", "06/28/2017",
+- "07/05/2017", NULL },
++ "07/05/2017", "08/07/2017", NULL },
+ .rotate = FB_ROTATE_CW,
+ };
+
diff --git a/patches.drivers/video-console-Update-BIOS-dates-list-for-GPD-win-con b/patches.drivers/video-console-Update-BIOS-dates-list-for-GPD-win-con
new file mode 100644
index 0000000000..958bec1c45
--- /dev/null
+++ b/patches.drivers/video-console-Update-BIOS-dates-list-for-GPD-win-con
@@ -0,0 +1,34 @@
+From 23e9f4ef99dd313fc8d19c326f6518459a402d71 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Thu, 7 Sep 2017 13:18:33 +0200
+Subject: [PATCH] video/console: Update BIOS dates list for GPD win console rotation DMI quirk
+Git-commit: 23e9f4ef99dd313fc8d19c326f6518459a402d71
+Patch-mainline: 4.14-rc1
+References: bsc#1068546
+
+Recently produced GPD win devices have a new BIOS, research into the
+changes in this BIOS has found a ChangeLog which also lists 2 previously
+unknown BIOS dates.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+[b.zolnierkie: ported over fbcon changes]
+Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/video/console/fbcon_dmi_quirks.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/video/console/fbcon_dmi_quirks.c
++++ b/drivers/video/console/fbcon_dmi_quirks.c
+@@ -46,8 +46,8 @@ static const struct fbcon_dmi_rotate_dat
+ .width = 720,
+ .height = 1280,
+ .bios_dates = (const char * const []){
+- "10/25/2016", "11/18/2016", "02/21/2017",
+- "03/20/2017", NULL },
++ "10/25/2016", "11/18/2016", "12/23/2016", "12/26/2016",
++ "02/21/2017", "03/20/2017", "05/25/2017", NULL },
+ .rotate = FB_ROTATE_CW,
+ };
+
diff --git a/series.conf b/series.conf
index 776ac24c12..67841174e7 100644
--- a/series.conf
+++ b/series.conf
@@ -1662,6 +1662,10 @@
# bsc#1042420 - EDAC GHES prereqs
patches.drivers/01-acpi-blacklist-add-acpi_match_platform_list.patch
+ patches.drivers/ACPI-x86-Allow-matching-always_present_id-array-entr
+ patches.drivers/ACPI-x86-Add-KIOX000A-accelerometer-on-GPD-win-to-al
+ patches.drivers/ACPI-x86-Extend-KIOX000A-quirk-to-cover-all-affected
+
########################################################
# CPUFREQ
########################################################
@@ -2223,6 +2227,16 @@
patches.drivers/drm-i915-Report-EFAULT-before-pwrite-fast-path-into-
patches.drivers/drm-i915-Use-bdw_ddi_translations_fdi-for-Broadwell
patches.drivers/drm-i915-Hold-rcu_read_lock-when-iterating-over-the-
+ patches.drivers/drm-i915-glk-Remove-the-alpha_support-flag
+ patches.drivers/drm-i915-glk-limit-pixel-clock-to-99-of-cdclk-workar
+ patches.drivers/drm-i915-GuC-GLK-Load-GuC-on-GLK
+ patches.drivers/drm-i915-GLK-HuC-Load-HuC-on-GLK
+ patches.drivers/drm-i915-glk-Don-t-allow-12-bpc-when-htotal-is-too-b
+ patches.drivers/drm-i915-glk-Calculate-high-low-switch-count-for-GLK
+ patches.drivers/drm-i915-gen9-Reintroduce-WaEnableYV12BugFixInHalfSl
+ patches.drivers/drm-i915-huc-Update-GLK-HuC-version
+ patches.drivers/drm-i915-glk-Split-GLK-DSI-device-ready-functionalit
+ patches.drivers/drm-i915-glk-Add-cold-boot-sequence-for-GLK-DSI
patches.drivers/drm-vc4-Fix-leak-of-HDMI-EDID
patches.drivers/drm-vc4-Don-t-disable-DSI-clocks-on-component-unload
@@ -2233,6 +2247,10 @@
patches.drivers/gpu-host1x-Free-the-IOMMU-domain-when-there-is-no-de.patch
patches.drivers/gpu-ipu-v3-add-DRM-dependency.patch
+ patches.drivers/video-console-Add-dmi-quirk-table-for-x86-systems-wh
+ patches.drivers/video-console-Add-new-BIOS-date-for-GPD-pocket-to-dm
+ patches.drivers/video-console-Update-BIOS-dates-list-for-GPD-win-con
+
########################################################
# video4linux
########################################################
@@ -3588,6 +3606,7 @@
patches.drivers/0052-target-fix-return-sense-reason-in-target_scsi3_emulate_pr_out
patches.drivers/0053-target-export-lio-pgr-alua-support-as-device-attr
patches.drivers/0054-tcmu-clean-up-the-code-and-with-one-small-fix
+ patches.drivers/mmc-sdhci-acpi-Workaround-conflict-with-PCI-wifi-on-
patches.drivers/crypto-chcr-Avoid-algo-allocation-in-softirq.patch
patches.drivers/bpf-Implement-show_options.patch
patches.drivers/random-add-wait_for_random_bytes-api
@@ -4905,6 +4924,7 @@
patches.drivers/net_sched-avoid-matching-qdisc-with-zero-handle.patch
patches.drivers/RDMA-nldev-Enforce-device-index-check-for-port-callb.patch
patches.drivers/net-usb-asix-fill-null-ptr-deref-in-asix_suspend.patch
+ patches.drivers/Bluetooth-hci_bcm-Add-support-for-BCM2E7E
# davem/net-next
patches.drivers/s390-qeth-add-basic-VNICC-support.patch
@@ -5075,6 +5095,8 @@
patches.fixes/mac80211-use-constant-time-comparison-with-keys.patch
patches.fixes/mac80211-don-t-compare-TKIP-TX-MIC-key-in-reinstall-.patch
+ patches.drivers/brcmfmac-Use-separate-firmware-for-revision-0-of-the
+
########################################################
# ISDN
########################################################
@@ -5102,6 +5124,8 @@
patches.drivers/pci-pciehp-report-power-fault-only-once-until-we-clear-it
# bsc#1061880
patches.drivers/pci-mark-broadcom-ht2100-root-port-extended-tags-as-broken
+ patches.drivers/mfd-Add-support-for-Cherry-Trail-Dollar-Cove-TI-PMIC
+ patches.drivers/ACPI-PMIC-Add-opregion-driver-for-Intel-Dollar-Cove-
########################################################
# sysfs / driver core
@@ -5243,6 +5267,11 @@
patches.drivers/ALSA-line6-Fix-leftover-URB-at-error-path-during-pro
patches.drivers/ALSA-line6-Fix-missing-initialization-before-error-p
+ patches.drivers/ASoC-rt5645-read-jd1_1-status-for-jd-detection
+ patches.drivers/ASoC-rt5645-rename-jd_invert-flag-in-platform-data
+ patches.drivers/ASoC-rt5645-add-inv_jd1_1-flag
+ patches.drivers/ASoC-rt5645-Add-jack-detection-workaround-for-GPD-Wi
+
########################################################
# Char / serial
########################################################
@@ -5275,6 +5304,8 @@
patches.fixes/nl80211-check-for-the-required-netlink-attributes-pr.patch
patches.fixes/watchdog-revert-itco_wdt-all-versions-count-down-twice
+ patches.drivers/platform-x86-Add-driver-for-ACPI-INT0002-Virtual-GPI
+
########################################################
# Other drivers we have added to the tree
########################################################
diff --git a/supported.conf b/supported.conf
index 19e4d96556..f8dbe700b0 100644
--- a/supported.conf
+++ b/supported.conf
@@ -450,7 +450,10 @@
drivers/edac/xgene_edac
drivers/edac/skx_edac # Skylake EDAC driver
drivers/extcon/extcon # RK3399 bsc#1040903
+- drivers/extcon/extcon-axp288
+ drivers/extcon/extcon-core
- drivers/extcon/extcon-gpio
+- drivers/extcon/extcon-intel-int3496
- drivers/extcon/extcon-sm5502
drivers/firewire/firewire_core
drivers/firewire/firewire_net
@@ -514,6 +517,7 @@
- drivers/gpu/drm/i2c/adv7511
drivers/gpu/drm/i810/i810 # Intel i810
drivers/gpu/drm/i915/i915 # Intel 830M/i915
+ drivers/gpu/drm/i915/gvt/kvmgt
drivers/gpu/drm/mga/mga # Matrox G200/G400
drivers/gpu/drm/mgag200/mgag200 # fate#314425
- drivers/gpu/drm/msm # Qualcomm Snapdragon (phone)
@@ -533,7 +537,7 @@
- drivers/gpu/drm/via/via
+base drivers/gpu/drm/virtio-gpu # fate#319660
drivers/gpu/drm/vmwgfx/vmwgfx # fate#315585 VMware DRM driver for Virtual GPU
-- drivers/gpu/host1x # Tegra is unsupported
+- drivers/gpu/host1x/host1x # Tegra is unsupported
drivers/hid/hid
drivers/hid/hid-a4tech
drivers/hid/hid-apple
@@ -794,6 +798,10 @@
drivers/input/misc/pcspkr
drivers/input/misc/powermate
- drivers/input/misc/regulator-haptic
+- drivers/input/rmi4/rmi_core
+- drivers/input/rmi4/rmi_i2c
+- drivers/input/rmi4/rmi_smbus
+- drivers/input/rmi4/rmi_spi
drivers/input/misc/rotary_encoder
- drivers/input/misc/soc_button_array
drivers/input/misc/uinput # User level driver support for input subsystem
@@ -1044,7 +1052,9 @@
drivers/message/fusion/mptscsih # Fusion MPT SCSI Host driver
+base drivers/message/fusion/mptspi
- drivers/mfd/atmel-hlcdc
+- drivers/mfd/cros_ec_core
- drivers/mfd/cros_ec_i2c
+- drivers/mfd/cros_ec_spi
- drivers/mfd/cros_ec
- drivers/mfd/da9062-core
drivers/mfd/dln2
@@ -1056,6 +1066,8 @@
drivers/mfd/intel-lpss
drivers/mfd/intel-lpss-pci
drivers/mfd/intel_quark_i2c_gpio
+- drivers/mfd/intel_soc_pmic_bxtwc
+- drivers/mfd/intel_soc_pmic_chtdc_ti
- drivers/mfd/menf21bmc
drivers/mfd/mfd-core
- drivers/mfd/qcom_rpm
@@ -1525,17 +1537,19 @@
- drivers/platform/x86/alienware-wmi
- drivers/platform/x86/amilo-rfkill
- drivers/platform/x86/apple-gmux
- drivers/platform/x86/asus-laptop
+- drivers/platform/x86/asus-laptop
- drivers/platform/x86/asus-nb-wmi
- drivers/platform/x86/asus-wmi
+- drivers/platform/x86/asus-wireless
- drivers/platform/x86/classmate-laptop
- drivers/platform/x86/compal-laptop
+- drivers/platform/x86/compal-laptop
drivers/platform/x86/dell-laptop
- drivers/platform/x86/dell-rbtn
- drivers/platform/x86/dell-smo8800
drivers/platform/x86/dell-wmi
- drivers/platform/x86/dell-wmi-aio
- drivers/platform/x86/eeepc-laptop
+- drivers/platform/x86/dell-wmi-led
+- drivers/platform/x86/eeepc-laptop
- drivers/platform/x86/eeepc-wmi
drivers/platform/x86/fujitsu-laptop
- drivers/platform/x86/fujitsu-tablet
@@ -1547,22 +1561,34 @@
- drivers/platform/x86/ideapad-laptop
drivers/platform/x86/intel-rst # Intel Rapid Start Technology (FATE#315713)
drivers/platform/x86/intel-smartconnect # Intel Smart Connect disabling
+- drivers/platform/x86/intel_bxtwc_tmu
+- drivers/platform/x86/intel_cht_int33fe
+- drivers/platform/x86/intel-hid
+- drivers/platform/x86/intel_int0002_vgpio
- drivers/platform/x86/intel_ips
- drivers/platform/x86/intel_menlow
+- drivers/platform/x86/intel_menlow
- drivers/platform/x86/intel_oaktrail
- drivers/platform/x86/intel_pmc_ipc
- drivers/platform/x86/msi-laptop
+- drivers/platform/x86/intel_punit_ipc
+- drivers/platform/x86/intel_telemetry_core
+- drivers/platform/x86/intel_telemetry_debugfs
+- drivers/platform/x86/intel_telemetry_pltdrv
+- drivers/platform/x86/intel-vbtn
+- drivers/platform/x86/msi-laptop
- drivers/platform/x86/msi-wmi
+- drivers/platform/x86/mlxcpld-hotplug
+- drivers/platform/x86/mlx-platform
- drivers/platform/x86/mxm-wmi
- drivers/platform/x86/panasonic-laptop
- drivers/platform/x86/pvpanic
+- drivers/platform/x86/panasonic-laptop
+- drivers/platform/x86/pvpanic
- drivers/platform/x86/samsung-laptop
- drivers/platform/x86/samsung-q10
- drivers/platform/x86/sony-laptop
+- drivers/platform/x86/sony-laptop
+- drivers/platform/x86/surface3_button
- drivers/platform/x86/surfacepro3_button
drivers/platform/x86/thinkpad_acpi
- drivers/platform/x86/topstar-laptop
- drivers/platform/x86/toshiba_acpi
+- drivers/platform/x86/topstar-laptop
+- drivers/platform/x86/toshiba_acpi
- drivers/platform/x86/toshiba_haps
- drivers/platform/x86/toshiba-wmi
- drivers/platform/x86/toshiba_bluetooth
@@ -1817,8 +1843,10 @@
- drivers/thermal/int340x_thermal/int3400_thermal
- drivers/thermal/int340x_thermal/int3402_thermal
- drivers/thermal/int340x_thermal/int3403_thermal
+- drivers/thermal/int340x_thermal/int3406_thermal
- drivers/thermal/int340x_thermal/int340x_thermal_zone
- drivers/thermal/int340x_thermal/processor_thermal_device
+- drivers/thermal/intel_bxt_pmic_thermal
drivers/thermal/intel_powerclamp # fate#315620
- drivers/thermal/intel_soc_dts_iosf
- drivers/thermal/intel_soc_dts_thermal