Linux USB
 help / color / mirror / Atom feed
* [PATCH v2 0/2] usb: typec: ucsi: acpi: Zero version quirk for Lenovo ThinkPad T14 Gen 2a
@ 2026-11-03 16:10 Stanisław Titenko via B4 Relay
  2026-11-03 16:10 ` [PATCH v2 1/2] usb: typec: ucsi: acpi: Rename the Acer zero version quirk Stanisław Titenko via B4 Relay
  2026-11-03 16:10 ` [PATCH v2 2/2] usb: typec: ucsi: acpi: Assume UCSI 1.2 on Lenovo ThinkPad T14 Gen 2a Stanisław Titenko via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Stanisław Titenko via B4 Relay @ 2026-11-03 16:10 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, Guenter Roeck
  Cc: linux-usb, linux-kernel, Mark Pearson, Stanisław Titenko,
	stable, Daniel Dev

The ThinkPad T14 Gen 2a firmware leaves the UCSI VERSION field at zero,
so ucsi_acpi does not register the Type-C ports. Mark Pearson is asking
Lenovo's firmware team to look at it; this quirk is the fallback in case
a firmware fix is not possible.

Patch 1 renames the existing Acer quirk to a neutral name, patch 2 uses
it for the ThinkPad T14 Gen 2a.

Signed-off-by: Stanisław Titenko <kernel@resetko.pl>
---
Changes in v2:
- Reuse the Acer zero version quirk instead of a new Lenovo copy, so the
  assumed version is now 1.2 instead of 1.0 (Mark Pearson).
- Match on DMI_BOARD_NAME 20XK and 20XL instead of the product version
  string (Mark Pearson).
- Link to v1: https://patch.msgid.link/20261031-ucsi-lenovo-t14g2a-v1-1-183751e63c02@resetko.pl

---
Stanisław Titenko (2):
      usb: typec: ucsi: acpi: Rename the Acer zero version quirk
      usb: typec: ucsi: acpi: Assume UCSI 1.2 on Lenovo ThinkPad T14 Gen 2a

 drivers/usb/typec/ucsi/ucsi_acpi.c | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
---
base-commit: e9954f3fbddd25e1a01b7e5a0b72fb8b564204e0
change-id: 20261031-ucsi-lenovo-t14g2a-adae7df7cf98

Best regards,
--  
Stanisław Titenko <kernel@resetko.pl>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] usb: typec: ucsi: acpi: Rename the Acer zero version quirk
  2026-11-03 16:10 [PATCH v2 0/2] usb: typec: ucsi: acpi: Zero version quirk for Lenovo ThinkPad T14 Gen 2a Stanisław Titenko via B4 Relay
@ 2026-11-03 16:10 ` Stanisław Titenko via B4 Relay
  2026-11-03 16:13   ` sashiko-bot
  2026-11-03 16:10 ` [PATCH v2 2/2] usb: typec: ucsi: acpi: Assume UCSI 1.2 on Lenovo ThinkPad T14 Gen 2a Stanisław Titenko via B4 Relay
  1 sibling, 1 reply; 5+ messages in thread
From: Stanisław Titenko via B4 Relay @ 2026-11-03 16:10 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, Guenter Roeck
  Cc: linux-usb, linux-kernel, Mark Pearson, Stanisław Titenko,
	stable

From: Stanisław Titenko <kernel@resetko.pl>

The quirk added for the Acer Nitro ANV15-41 is not specific to that
machine: it substitutes UCSI 1.2 when the firmware reports a zero
version, which other platforms with the same firmware bug need too.

Rename ucsi_acer_read_version() and ucsi_acer_ops to
ucsi_zero_version_read_version() and ucsi_zero_version_ops, so that
they can be shared with other machines.

No functional change.

Cc: stable@vger.kernel.org # needed by the next patch
Assisted-by: pi:claude-opus-5-5
Signed-off-by: Stanisław Titenko <kernel@resetko.pl>
---
 drivers/usb/typec/ucsi/ucsi_acpi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c
index 5697ccc24ec3..47ba0e15b8ba 100644
--- a/drivers/usb/typec/ucsi/ucsi_acpi.c
+++ b/drivers/usb/typec/ucsi/ucsi_acpi.c
@@ -121,7 +121,7 @@ static const struct ucsi_operations ucsi_acpi_ops = {
 	.async_control = ucsi_acpi_async_control
 };
 
-static int ucsi_acer_read_version(struct ucsi *ucsi, u16 *version)
+static int ucsi_zero_version_read_version(struct ucsi *ucsi, u16 *version)
 {
 	struct ucsi_acpi *ua = ucsi_get_drvdata(ucsi);
 	int ret;
@@ -138,8 +138,8 @@ static int ucsi_acer_read_version(struct ucsi *ucsi, u16 *version)
 	return 0;
 }
 
-static const struct ucsi_operations ucsi_acer_ops = {
-	.read_version = ucsi_acer_read_version,
+static const struct ucsi_operations ucsi_zero_version_ops = {
+	.read_version = ucsi_zero_version_read_version,
 	.read_cci = ucsi_acpi_read_cci,
 	.poll_cci = ucsi_acpi_poll_cci,
 	.read_message_in = ucsi_acpi_read_message_in,
@@ -194,7 +194,7 @@ static const struct dmi_system_id ucsi_acpi_quirks[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "Nitro ANV15-41"),
 		},
-		.driver_data = (void *)&ucsi_acer_ops,
+		.driver_data = (void *)&ucsi_zero_version_ops,
 	},
 	{
 		.matches = {

-- 
2.56.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] usb: typec: ucsi: acpi: Assume UCSI 1.2 on Lenovo ThinkPad T14 Gen 2a
  2026-11-03 16:10 [PATCH v2 0/2] usb: typec: ucsi: acpi: Zero version quirk for Lenovo ThinkPad T14 Gen 2a Stanisław Titenko via B4 Relay
  2026-11-03 16:10 ` [PATCH v2 1/2] usb: typec: ucsi: acpi: Rename the Acer zero version quirk Stanisław Titenko via B4 Relay
@ 2026-11-03 16:10 ` Stanisław Titenko via B4 Relay
  2026-11-03 16:14   ` sashiko-bot
  1 sibling, 1 reply; 5+ messages in thread
From: Stanisław Titenko via B4 Relay @ 2026-11-03 16:10 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, Guenter Roeck
  Cc: linux-usb, linux-kernel, Mark Pearson, Stanisław Titenko,
	Daniel Dev, stable

From: Stanisław Titenko <kernel@resetko.pl>

The Lenovo ThinkPad T14 Gen 2a exposes a functional UCSI ACPI PPM but
the firmware leaves the VERSION field of the UCSI mailbox at zero.

ucsi_register() rejects a zero version with -ENODEV, leaving the
system without registered USB Type-C connectors. Without an OPM, the
embedded controller does not complete DisplayPort Alternate Mode setup
when a USB-C dock or monitor that supplies power is connected after
boot, so the display stays dark while USB and charging work.

Use the zero version quirk for the ThinkPad T14 Gen 2a, matching the
two board names of this model (20XK and 20XL).

Tested on a ThinkPad T14 Gen 2a (20XK) with BIOS 1.33 (R1MET63W):
both Type-C connectors register, and plugging and replugging a USB-C
monitor with an integrated hub and power delivery brings up
DisplayPort Alternate Mode each time.

Reported-by: Daniel Dev <daniel.dev@noex.uk>
Closes: https://lore.kernel.org/linux-usb/b1Wn_eFvTFShGbd970WWl4CWhge_6P2x7Wb6rab3QHNlE4OJ4p__O-QN3B6I-308ftr5oV5Zr7vywA0vdvmtNw6E0YJnVM2ek_5DcFnkXB0=@noex.uk/
Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
Cc: stable@vger.kernel.org
Assisted-by: pi:claude-opus-5-5
Signed-off-by: Stanisław Titenko <kernel@resetko.pl>
---
 drivers/usb/typec/ucsi/ucsi_acpi.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c
index 47ba0e15b8ba..d752fc7b61ec 100644
--- a/drivers/usb/typec/ucsi/ucsi_acpi.c
+++ b/drivers/usb/typec/ucsi/ucsi_acpi.c
@@ -196,6 +196,22 @@ static const struct dmi_system_id ucsi_acpi_quirks[] = {
 		},
 		.driver_data = (void *)&ucsi_zero_version_ops,
 	},
+	{
+		/* Lenovo ThinkPad T14 Gen 2a */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_BOARD_NAME, "20XK"),
+		},
+		.driver_data = (void *)&ucsi_zero_version_ops,
+	},
+	{
+		/* Lenovo ThinkPad T14 Gen 2a */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_BOARD_NAME, "20XL"),
+		},
+		.driver_data = (void *)&ucsi_zero_version_ops,
+	},
 	{
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"),

-- 
2.56.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] usb: typec: ucsi: acpi: Rename the Acer zero version quirk
  2026-11-03 16:10 ` [PATCH v2 1/2] usb: typec: ucsi: acpi: Rename the Acer zero version quirk Stanisław Titenko via B4 Relay
@ 2026-11-03 16:13   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-03 16:13 UTC (permalink / raw)
  To: Stanisław Titenko; +Cc: linux-usb

> From: Stanisław Titenko <kernel@resetko.pl>
> 
> The quirk added for the Acer Nitro ANV15-41 is not specific to that
> machine: it substitutes UCSI 1.2 when the firmware reports a zero
> version, which other platforms with the same firmware bug need too.
> 
> Rename ucsi_acer_read_version() and ucsi_acer_ops to
> ucsi_zero_version_read_version() and ucsi_zero_version_ops, so that
> they can be shared with other machines.
> 
> No functional change.
> 
> Cc: stable@vger.kernel.org # needed by the next patch
> Assisted-by: pi:claude-opus-5-5
> Signed-off-by: Stanisław Titenko <kernel@resetko.pl>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-ucsi-lenovo-t14g2a-v2-0-e85c659b56a2@resetko.pl?part=1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/2] usb: typec: ucsi: acpi: Assume UCSI 1.2 on Lenovo ThinkPad T14 Gen 2a
  2026-11-03 16:10 ` [PATCH v2 2/2] usb: typec: ucsi: acpi: Assume UCSI 1.2 on Lenovo ThinkPad T14 Gen 2a Stanisław Titenko via B4 Relay
@ 2026-11-03 16:14   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-03 16:14 UTC (permalink / raw)
  To: Stanisław Titenko; +Cc: linux-usb

> From: Stanisław Titenko <kernel@resetko.pl>
> 
> The Lenovo ThinkPad T14 Gen 2a exposes a functional UCSI ACPI PPM but
> the firmware leaves the VERSION field of the UCSI mailbox at zero.
> 
> ucsi_register() rejects a zero version with -ENODEV, leaving the
> system without registered USB Type-C connectors. Without an OPM, the
> embedded controller does not complete DisplayPort Alternate Mode setup
> when a USB-C dock or monitor that supplies power is connected after
> boot, so the display stays dark while USB and charging work.
> 
> Use the zero version quirk for the ThinkPad T14 Gen 2a, matching the
> two board names of this model (20XK and 20XL).
> 
> Tested on a ThinkPad T14 Gen 2a (20XK) with BIOS 1.33 (R1MET63W):
> both Type-C connectors register, and plugging and replugging a USB-C
> monitor with an integrated hub and power delivery brings up
> DisplayPort Alternate Mode each time.
> 
> Reported-by: Daniel Dev <daniel.dev@noex.uk>
> Closes: https://lore.kernel.org/linux-usb/b1Wn_eFvTFShGbd970WWl4CWhge_6P2x7Wb6rab3QHNlE4OJ4p__O-QN3B6I-308ftr5oV5Zr7vywA0vdvmtNw6E0YJnVM2ek_5DcFnkXB0=@noex.uk/
> Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
> Cc: stable@vger.kernel.org
> Assisted-by: pi:claude-opus-5-5
> Signed-off-by: Stanisław Titenko <kernel@resetko.pl>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-ucsi-lenovo-t14g2a-v2-0-e85c659b56a2@resetko.pl?part=2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-03 16:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 16:10 [PATCH v2 0/2] usb: typec: ucsi: acpi: Zero version quirk for Lenovo ThinkPad T14 Gen 2a Stanisław Titenko via B4 Relay
2026-11-03 16:10 ` [PATCH v2 1/2] usb: typec: ucsi: acpi: Rename the Acer zero version quirk Stanisław Titenko via B4 Relay
2026-11-03 16:13   ` sashiko-bot
2026-11-03 16:10 ` [PATCH v2 2/2] usb: typec: ucsi: acpi: Assume UCSI 1.2 on Lenovo ThinkPad T14 Gen 2a Stanisław Titenko via B4 Relay
2026-11-03 16:14   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox