mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rillian Grant <rillian.grant@gmail.com>
To: Lee Jones <lee@kernel.org>, Ruslan Koreev <koreev.r@gmail.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Pavel Machek <pavel@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/4] leds: flash: lm3643: Describe the LED on the Lenovo ThinkPad X9-15 Gen 1
Date: Wed, 04 Nov 2026 17:24:04 +0000	[thread overview]
Message-ID: <IvA-bOWrRpaeGbjjXz1l3w@gmail.com> (raw)
In-Reply-To: <20261021144034.1636708-1-koreev.r@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2954 bytes --]

Hi Ruslan,

On Wednesday, 21 October 2026 15:40:34 GMT Ruslan Koreev wrote:
> Rillian, could you share the relevant SPB trace, including mode, current
> and timeout writes, together with the installed driver version?

Driver versions: the X9-15 Gen 1 values are from the Windows install on
my machine. The X1 Carbon Gen 14 values are from the current package on
Lenovo's support site.

X9-15 Gen 1:
- lm3643.inf/.sys 70.26100.2.18321 (02/20/2025)
- IR sensor: HM1092, hm1092.inf 70.26100.2.18321
- FlashLEDsIntensity = 0x3C64 (lm3643.inf)
- IRFlashLedIntensity = 40 (hm1092.inf)

X1 Carbon Gen 14:
- lm3643.inf 71.26100.10.21060 (08/05/2026) however lm3643.sys contradicts
  with 71.26100.23.21060
- IR sensor: VD55G1, TBE0020A1.inf 71.26100.10.21060
- FlashLEDsIntensity = 0x3C64 (lm3643.inf)
- IRFlashLedIntensity = 30 (TBE0020A1.inf)

Both lm3643.inf files bind ACPI\TXNW3643 and ACPI\INT347D. Apart from
the version, they differ only in where DeviceCharacteristics/Security
are written. The registry on the X9 matches the INF defaults.

Before I submitted the DMI software node patch, I had seen that the
Carbon had a different driver version and a different IRFlashLedIntensity.
That is why I didn't reuse its values for the X9.

I traced Microsoft-Windows-SPB-ClassExtension (analytic) during a
Windows Hello face unlock on the X9. Every write to the LM3643 is
preceded by a read of the same register. Register decodes are from
SNVS967A.

Start of the session (once, after the controller entered D0):
  R 0x0A=00  R 0x0B=00  R 0x01=03  R 0x0C=02
  R 0x07=09 -> W 0x07=09   boost config, POR default (2 MHz, 2.8 A ILIM,
                           short detect on)
  W 0x01=03                standby, LED1+LED2 enable, TX pin enable off
                           (POR is 0x80)
  W 0x08=00                no torch ramp, flash timeout 10 ms

Per pulse (repeats every ~133 ms):
  W 0x01=03                standby
  W 0x08=0F                no torch ramp, flash timeout 400 ms
  W 0x03=99                bit7 = LED2 flash current override (LED2 = LED1),
                           code 0x19 -> 25 x 11.725 + 10.9 = ~304 mA per
                           LED (~608 mA total)
  W 0x01=0F                flash mode (M1,M0=11), LED1+LED2  <- LED on
  ... ~65 ms ...
  W 0x08=00                timeout set to 10 ms while the flash is running
  W 0x01=03                standby                           <- LED off
  R 0x0A=01  R 0x0B=00     Flags1 bit0 = flash time-out flag (0x00 after
                           the first pulse, 0x01 after every later pulse)

This unlock had 6 pulses. The last one was turned off after ~3 ms, once
the face was recognised. The driver never wrote the torch registers
(0x05/0x06) or the LED2 flash register (0x04), and never used IR mode,
STROBE or TX. The only values written to 0x01 were 0x03 and 0x0F.

The LM3643 transactions with timestamps are attached. The raw ETL/XML
trace is available on request.

--
Rillian Grant

[-- Attachment #2: lm3643-trace.txt --]
[-- Type: text/plain, Size: 4514 bytes --]

10:47:24.493347  LM3643 W 0x0A | R 0x00
10:47:24.493427  -- controller 0x3CF250DE2738 D-state 0x1
10:47:24.504454  LM3643 W 0x0B | R 0x00
10:47:24.504748  LM3643 W 0x01 | R 0x03
10:47:24.505018  LM3643 W 0x0C | R 0x02
10:47:24.505315  LM3643 W 0x07 | R 0x09
10:47:24.505564  LM3643 W 0x0709
10:47:24.505741  LM3643 W 0x01 | R 0x03
10:47:24.506021  LM3643 W 0x0103
10:47:24.506229  LM3643 W 0x01 | R 0x03
10:47:24.506479  LM3643 W 0x01 | R 0x03
10:47:24.506736  LM3643 W 0x0103
10:47:24.507080  LM3643 W 0x08 | R 0x00
10:47:24.507317  LM3643 W 0x0800
10:47:24.507537  LM3643 W 0x01 | R 0x03
10:47:24.507777  LM3643 W 0x0103
10:47:24.507935  LM3643 W 0x01 | R 0x03
10:47:24.508181  LM3643 W 0x0103
10:47:24.552953  HM1092(IR) W 0x010000
10:47:24.632548  HM1092(IR) W 0x010001
10:47:24.669203  -- controller 0x3CF250DDE738 D-state 0x1
10:47:24.675057  LM3643 W 0x01 | R 0x03
10:47:24.675520  LM3643 W 0x0103
10:47:24.675806  LM3643 W 0x08 | R 0x00
10:47:24.676278  LM3643 W 0x080F
10:47:24.676575  LM3643 W 0x03 | R 0x99
10:47:24.676857  LM3643 W 0x0399
10:47:24.677059  LM3643 W 0x01 | R 0x03
10:47:24.677316  LM3643 W 0x010F
10:47:24.681780  IMX471(RGB) W 0x010000
10:47:24.741365  LM3643 W 0x08 | R 0x0F
10:47:24.741647  LM3643 W 0x0800
10:47:24.741872  LM3643 W 0x01 | R 0x0F
10:47:24.742178  LM3643 W 0x0103
10:47:24.742372  LM3643 W 0x0A | R 0x00
10:47:24.742621  LM3643 W 0x0B | R 0x00
10:47:24.742969  IMX471(RGB) W 0x010001
10:47:24.807808  LM3643 W 0x01 | R 0x03
10:47:24.808069  LM3643 W 0x0103
10:47:24.808246  LM3643 W 0x08 | R 0x00
10:47:24.808503  LM3643 W 0x080F
10:47:24.808776  LM3643 W 0x03 | R 0x99
10:47:24.809023  LM3643 W 0x0399
10:47:24.809178  LM3643 W 0x01 | R 0x03
10:47:24.809456  LM3643 W 0x010F
10:47:24.874410  LM3643 W 0x08 | R 0x0F
10:47:24.874691  LM3643 W 0x0800
10:47:24.874913  LM3643 W 0x01 | R 0x0F
10:47:24.875165  LM3643 W 0x0103
10:47:24.875371  LM3643 W 0x0A | R 0x01
10:47:24.875619  LM3643 W 0x0B | R 0x00
10:47:24.940847  LM3643 W 0x01 | R 0x03
10:47:24.941139  LM3643 W 0x0103
10:47:24.941306  LM3643 W 0x08 | R 0x00
10:47:24.941552  LM3643 W 0x080F
10:47:24.941768  LM3643 W 0x03 | R 0x99
10:47:24.942104  LM3643 W 0x0399
10:47:24.942271  LM3643 W 0x01 | R 0x03
10:47:24.942513  LM3643 W 0x010F
10:47:25.007386  LM3643 W 0x08 | R 0x0F
10:47:25.007683  LM3643 W 0x0800
10:47:25.007896  LM3643 W 0x01 | R 0x0F
10:47:25.008160  LM3643 W 0x0103
10:47:25.008322  LM3643 W 0x0A | R 0x01
10:47:25.008577  LM3643 W 0x0B | R 0x00
10:47:25.073907  LM3643 W 0x01 | R 0x03
10:47:25.074207  LM3643 W 0x0103
10:47:25.074392  LM3643 W 0x08 | R 0x00
10:47:25.074649  LM3643 W 0x080F
10:47:25.074867  LM3643 W 0x03 | R 0x99
10:47:25.075123  LM3643 W 0x0399
10:47:25.075366  LM3643 W 0x01 | R 0x03
10:47:25.075621  LM3643 W 0x010F
10:47:25.140383  LM3643 W 0x08 | R 0x0F
10:47:25.140639  LM3643 W 0x0800
10:47:25.140858  LM3643 W 0x01 | R 0x0F
10:47:25.141103  LM3643 W 0x0103
10:47:25.141266  LM3643 W 0x0A | R 0x01
10:47:25.141507  LM3643 W 0x0B | R 0x00
10:47:25.206938  LM3643 W 0x01 | R 0x03
10:47:25.207270  LM3643 W 0x0103
10:47:25.207443  LM3643 W 0x08 | R 0x00
10:47:25.207689  LM3643 W 0x080F
10:47:25.207897  LM3643 W 0x03 | R 0x99
10:47:25.208150  LM3643 W 0x0399
10:47:25.208318  LM3643 W 0x01 | R 0x03
10:47:25.208581  LM3643 W 0x010F
10:47:25.273481  LM3643 W 0x08 | R 0x0F
10:47:25.273782  LM3643 W 0x0800
10:47:25.274032  LM3643 W 0x01 | R 0x0F
10:47:25.274303  LM3643 W 0x0103
10:47:25.274485  LM3643 W 0x0A | R 0x01
10:47:25.274721  LM3643 W 0x0B | R 0x00
10:47:25.339949  LM3643 W 0x01 | R 0x03
10:47:25.340239  LM3643 W 0x0103
10:47:25.340418  LM3643 W 0x08 | R 0x00
10:47:25.340684  LM3643 W 0x080F
10:47:25.340932  LM3643 W 0x03 | R 0x99
10:47:25.341210  LM3643 W 0x0399
10:47:25.341406  LM3643 W 0x01 | R 0x03
10:47:25.341660  LM3643 W 0x010F
10:47:25.344654  LM3643 W 0x08 | R 0x0F
10:47:25.344956  LM3643 W 0x0800
10:47:25.345171  LM3643 W 0x01 | R 0x0F
10:47:25.345419  LM3643 W 0x0103
10:47:25.345575  LM3643 W 0x0A | R 0x01
10:47:25.345808  LM3643 W 0x0B | R 0x00
10:47:25.473344  HM1092(IR) W 0x010000
10:47:25.474241  LM3643 W 0x08 | R 0x00
10:47:25.474501  LM3643 W 0x0800
10:47:25.474715  LM3643 W 0x01 | R 0x03
10:47:25.474956  LM3643 W 0x0103
10:47:25.475106  LM3643 W 0x01 | R 0x03
10:47:25.475403  LM3643 W 0x0103
10:47:25.486367  LM3643 W 0x0A | R 0x01
10:47:25.486763  LM3643 W 0x0B | R 0x00
10:47:25.623971  IMX471(RGB) W 0x010000
10:47:27.620034  -- controller 0x3CF250DE2738 D-state 0x4
10:47:28.631808  -- controller 0x3CF250DDE738 D-state 0x4

      reply	other threads:[~2026-11-04 17:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-11 19:09 [PATCH v3 0/4] leds: flash: LM3643 dual LED flash driver Rillian Grant
2026-10-11 19:09 ` [PATCH v3 1/4] dt-bindings: leds: Document TI " Rillian Grant
2026-10-12  9:51   ` Krzysztof Kozlowski
2026-10-11 19:09 ` [PATCH v3 2/4] leds: flash: Add support for the " Rillian Grant
2026-10-11 19:09 ` [PATCH v3 3/4] leds: flash: lm3643: Describe the LED of ACPI boards without LED nodes Rillian Grant
2026-10-20 10:45   ` Lee Jones
2026-10-20 11:19     ` Sakari Ailus
2026-10-21  6:38       ` Andy Shevchenko
2026-10-11 19:09 ` [PATCH v3 4/4] leds: flash: lm3643: Describe the LED on the Lenovo ThinkPad X9-15 Gen 1 Rillian Grant
2026-10-20 10:54   ` Lee Jones
2026-10-21 14:40     ` Ruslan Koreev
2026-11-04 17:24       ` Rillian Grant [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=IvA-bOWrRpaeGbjjXz1l3w@gmail.com \
    --to=rillian.grant@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=koreev.r@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®