[PATCH v2 4/4] leds: flash: lm3643: Describe the LED on the Lenovo ThinkPad X9-15 Gen 1

From: Rillian Grant

Date: Mon Sep 28 2026 - 05:44:41 EST


The ThinkPad X9-15 Gen 1 enumerates the LM3643 through ACPI (HID
TXNW3643) without a _DSD, like the X1 Carbon Gen 14. It drives the
Windows Hello IR flood illuminator with both current sources feeding a
single LED.

The flash limits were obtained from an ETW trace of the SPB class
extension during a Windows Hello unlock. The Windows driver programs
304 mA per current source (code 0x19 with the LED2 override set) and a
400 ms flash timeout.

There is no vendor value for the torch limit, so use the same
conservative limit as the X1 Carbon Gen 14.

Rename the X1 Carbon Gen 14 nodes after the machine now that the table
has a second entry. Sources and root node remain shared.

Signed-off-by: Rillian Grant <rillian.grant@xxxxxxxxx>
---
drivers/leds/flash/leds-lm3643.c | 70 +++++++++++++++++++++++++-------
1 file changed, 55 insertions(+), 15 deletions(-)

diff --git a/drivers/leds/flash/leds-lm3643.c b/drivers/leds/flash/leds-lm3643.c
index 1c0de38ebcdf..b9d167e25375 100644
--- a/drivers/leds/flash/leds-lm3643.c
+++ b/drivers/leds/flash/leds-lm3643.c
@@ -691,16 +691,21 @@ static int lm3643_register_led(struct device *dev, struct lm3643 *chip,
return lm3643_register_v4l2(dev, led, fwnode);
}

-/*
- * Lenovo ThinkPads enumerate the chip through ACPI (HID TXNW3643) without a
- * _DSD, so the LED is not described by firmware. On the boards below it drives
- * the Windows Hello IR flood illuminator, with both current sources feeding a
- * single LED. Describe that with a software node, with torch and flash limits
- * (100 mA and 300 mA per output) well below the chip's maximums.
- */
static const u32 lm3643_ir_flood_sources[] = { 0, 1 };

-static const struct property_entry lm3643_ir_flood_props[] = {
+static const struct software_node lm3643_ir_flood_root = {
+ .name = "lm3643",
+};
+
+/*
+ * The Lenovo ThinkPad X1 Carbon Gen 14 enumerates the chip through ACPI
+ * (HID TXNW3643) without a _DSD, so the LED is not described by firmware.
+ * On the X1 Gen 14 it drives the Windows Hello IR flood illuminator, with
+ * both current sources feeding a single LED. Describe that with a software
+ * node, with torch and flash limits (100 mA and 300 mA per output) well below
+ * the chip's maximums.
+ */
+static const struct property_entry lm3643_x1c14_props[] = {
PROPERTY_ENTRY_U32("reg", 0),
PROPERTY_ENTRY_U32_ARRAY("led-sources", lm3643_ir_flood_sources),
PROPERTY_ENTRY_STRING("function", LED_FUNCTION_FLASH),
@@ -711,19 +716,46 @@ static const struct property_entry lm3643_ir_flood_props[] = {
{ }
};

-static const struct software_node lm3643_ir_flood_root = {
- .name = "lm3643",
+static const struct software_node lm3643_x1c14_led = {
+ .name = "led-0",
+ .parent = &lm3643_ir_flood_root,
+ .properties = lm3643_x1c14_props,
+};
+
+static const struct software_node *lm3643_x1c14_nodes[] = {
+ &lm3643_ir_flood_root,
+ &lm3643_x1c14_led,
+ NULL
};

-static const struct software_node lm3643_ir_flood_led = {
+/*
+ * The Lenovo ThinkPad X9-15 Gen 1 enumerates the chip through ACPI
+ * (HID TXNW3643) without a _DSD. On the X9-15 it drives the Windows Hello IR
+ * flood illuminator, with both current sources feeding a single LED. Flash
+ * maximums were obtained from an SPB class extension ETW trace of the
+ * vendor-supplied Windows driver. The torch limit is a conservative value well
+ * below the chip's maximum.
+ */
+static const struct property_entry lm3643_x9_15_props[] = {
+ PROPERTY_ENTRY_U32("reg", 0),
+ PROPERTY_ENTRY_U32_ARRAY("led-sources", lm3643_ir_flood_sources),
+ PROPERTY_ENTRY_STRING("function", LED_FUNCTION_FLASH),
+ PROPERTY_ENTRY_U32("color", LED_COLOR_ID_IR),
+ PROPERTY_ENTRY_U32("led-max-microamp", 200000),
+ PROPERTY_ENTRY_U32("flash-max-microamp", 608050),
+ PROPERTY_ENTRY_U32("flash-max-timeout-us", 400000),
+ { }
+};
+
+static const struct software_node lm3643_x9_15_led = {
.name = "led-0",
.parent = &lm3643_ir_flood_root,
- .properties = lm3643_ir_flood_props,
+ .properties = lm3643_x9_15_props,
};

-static const struct software_node *lm3643_ir_flood_nodes[] = {
+static const struct software_node *lm3643_x9_15_nodes[] = {
&lm3643_ir_flood_root,
- &lm3643_ir_flood_led,
+ &lm3643_x9_15_led,
NULL
};

@@ -734,7 +766,15 @@ static const struct dmi_system_id lm3643_dmi_leds[] = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X1 Carbon Gen 14"),
},
- .driver_data = (void *)lm3643_ir_flood_nodes,
+ .driver_data = (void *)lm3643_x1c14_nodes,
+ },
+ {
+ /* Lenovo ThinkPad X9-15 Gen 1 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X9-15 Gen 1"),
+ },
+ .driver_data = (void *)lm3643_x9_15_nodes,
},
{ }
};
--
2.55.0