Skip to contentSkip to conversation

ACPI: x86: utils: Mark SMO8810 accel on Dell XPS 15 9550 as always present

PATCH Applied Hans de Goede 2 participants 3 messages Apr 6, 2024 – Apr 8, 2024 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ACPI: x86: utils: Mark SMO8810 accel on Dell XPS 15 9550 as always present

The Dell XPS 15 9550 has a SMO8110 accelerometer / HDD freefall sensor which is wrongly marked as not present.

Mark this as always present so that the dell-smo8800 driver can bind to it.

---
 drivers/acpi/x86/utils.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/acpi/x86/utils.c +9 -0
index 90c3d2eab9e9..c7af2d2986fd 100644
@@ -100,6 +100,15 @@ static const struct override_status_id override_status_ids[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7139"),
 	      }),
 
+	/*
+	 * The Dell XPS 15 9550 has a SMO8110 accelerometer /
+	 * HDD freefall sensor which is wrongly marked as not present.
+	 */
+	PRESENT_ENTRY_HID("SMO8810", "1", SKYLAKE, {
+		DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+		DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9550"),
+	      }),
+
 	/*
 	 * The GPD win BIOS dated 20170221 has disabled the accelerometer, the
 	 * drivers sometimes cause crashes under Windows and this is how the
Signature · 1 line
2.44.0
#1 lore raw

PATCH 2/2 ACPI: x86: Add PNP_UART1_SKIP quirk for Lenovo Blade2 tablets

The x86 Android tablets on which quirks to skip looking for a matching UartSerialBus resource and instead unconditionally create a serial bus device (serdev) are necessary there are 2 sorts of serialports:

ACPI enumerated highspeed designware UARTs, these are the ones which typcially need to be skipped since they need a serdev for the attached BT HCI.

A PNP enumerated UART which is part of the PCU. So far the existing quirks have ignored this. But on the Lenovo Yoga Tablet 2 Pro 1380 models this is used for a custom fastcharging protocol. There is a Micro USB switch which can switch the USB data lines to this uart and then a 600 baud protocol is used to configure the charger for a voltage higher then 5V.

Add a new ACPI_QUIRK_PNP_UART1_SKIP quirk type and set this for the existing entry for the Lenovo Yoga Tablet 2 830 / 1050 models. Note this will lead to unnecessarily also creating a serdev for the PCU UART on the 830 / 1050 which don't need this, but the UART is not used otherwise there so that is not a problem.

---
 drivers/acpi/x86/utils.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/acpi/x86/utils.c +13 -7
index c7af2d2986fd..7dca73417e2b 100644
@@ -269,9 +269,10 @@ bool force_storage_d3(void)
 #define ACPI_QUIRK_SKIP_I2C_CLIENTS				BIT(0)
 #define ACPI_QUIRK_UART1_SKIP					BIT(1)
 #define ACPI_QUIRK_UART1_TTY_UART2_SKIP				BIT(2)
-#define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY			BIT(3)
-#define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY			BIT(4)
-#define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS			BIT(5)
+#define ACPI_QUIRK_PNP_UART1_SKIP				BIT(3)
+#define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY			BIT(4)
+#define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY			BIT(5)
+#define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS			BIT(6)
 
 static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
 	/*
@@ -351,6 +352,7 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
 			DMI_MATCH(DMI_BIOS_VERSION, "BLADE_21"),
 		},
 		.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
+					ACPI_QUIRK_PNP_UART1_SKIP |
 					ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
 	},
 	{
@@ -449,14 +451,18 @@ static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bo
 	if (ret)
 		return 0;
 
-	/* to not match on PNP enumerated debug UARTs */
-	if (!dev_is_platform(controller_parent))
-		return 0;
-
 	dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids);
 	if (dmi_id)
 		quirks = (unsigned long)dmi_id->driver_data;
 
+	if (!dev_is_platform(controller_parent)) {
+		/* PNP enumerated UARTs */
+		if ((quirks & ACPI_QUIRK_PNP_UART1_SKIP) && uid == 1)
+			*skip = true;
+
+		return 0;
+	}
+
 	if ((quirks & ACPI_QUIRK_UART1_SKIP) && uid == 1)
 		*skip = true;
 
Signature · 1 line
2.44.0
maintainer Applied
#2 lore raw
In reply to Hans de Goede
Quoted 23 lines · Hans de Goede

The Dell XPS 15 9550 has a SMO8110 accelerometer / HDD freefall sensor which is wrongly marked as not present.

Mark this as always present so that the dell-smo8800 driver can bind to it.

---
 drivers/acpi/x86/utils.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/acpi/x86/utils.c +3 -0
index 90c3d2eab9e9..c7af2d2986fd 100644
@@ -100,6 +100,15 @@ static const struct override_status_id override_status_ids[] = {
                DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7139"),
              }),
 
+       /*
+        * The Dell XPS 15 9550 has a SMO8110 accelerometer /
+        * HDD freefall sensor which is wrongly marked as not present.

drivers/acpi/x86/utils.c static const struct override_status_id override_status_ids[] = {

Quoted 10 lines
drivers/acpi/x86/utils.c +6 -1
+        */
+       PRESENT_ENTRY_HID("SMO8810", "1", SKYLAKE, {
+               DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9550"),
+             }),
+
        /*
         * The GPD win BIOS dated 20170221 has disabled the accelerometer, the
         * drivers sometimes cause crashes under Windows and this is how the
--

Applied as 6.10 material along with the [2/2], thanks!