Skip to contentSkip to conversation

i2c: acpi: Add ELAN0662 to i2c_acpi_force_100khz_device_ids

PATCH In review Yuqi Xu 2 participants 4 messages Sep 18 – Oct 5

Subsystems (4)
lore
Share & tools
lore

Yuqi Xu

author
#0 lore raw

PATCH 1/1 i2c: acpi: Add ELAN0662 to i2c_acpi_force_100khz_device_ids

The ELAN0662 touchpad (04F3:317C) in the Lenovo ThinkBook 14 G4+ ARA (21D0) intermittently stutters and drops touches. libinput discards invalid touch coordinates and logs (rate limited to five messages per 24 hours):

libinput error: event6 - ELAN0662:00 04F3:317C Touchpad: kernel
bug: Touch jump detected and discarded.

The ACPI DSDT describes the touchpad's I2cSerialBus resource on an AMDI0010 controller with a connection speed of 0x00061A80 (400 kHz), and the kernel does not lower it for this device, so the touchpad runs at 400 kHz. This is the same issue previously fixed for ELAN06FA and ELAN0678.

Forcing the bus to 100 kHz was tested with a DSDT override on the affected machine, and the kernel confirmed the override:

ACPI: Table Upgrade: override [DSDT-LENOVO-CB-01]

Before the change libinput discarded three touch jumps within about a minute of touchpad use; after the change no touch jumps were logged during more than an hour of normal use. The patch itself was not build tested; the behaviour was validated through the ACPI table override above.

Assisted-by DeepSeek:deepseek-v4.1-flash
---
 drivers/i2c/i2c-core-acpi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/i2c-core-acpi.c +1 -0
index 3af0e0551185..aae4f159955a 100644
@@ -373,6 +373,7 @@ static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = {
 	 */
 	{ "DELL0A86", 0 },
 	{ "DLL0945", 0 },
+	{ "ELAN0662", 0 },
 	{ "ELAN0678", 0 },
 	{ "ELAN06FA", 0 },
 	{ "ELAN1300", 0 },
Signature · 1 line
2.55.0
Acked-by Mika Westerberg (Intel) on v1 1/1
#1 lore raw
Quoted 19 lines · Yuqi Xu

The ELAN0662 touchpad (04F3:317C) in the Lenovo ThinkBook 14 G4+ ARA (21D0) intermittently stutters and drops touches. libinput discards invalid touch coordinates and logs (rate limited to five messages per 24 hours):

libinput error: event6 - ELAN0662:00 04F3:317C Touchpad: kernel
bug: Touch jump detected and discarded.

The ACPI DSDT describes the touchpad's I2cSerialBus resource on an AMDI0010 controller with a connection speed of 0x00061A80 (400 kHz), and the kernel does not lower it for this device, so the touchpad runs at 400 kHz. This is the same issue previously fixed for ELAN06FA and ELAN0678.

Forcing the bus to 100 kHz was tested with a DSDT override on the affected machine, and the kernel confirmed the override:

ACPI: Table Upgrade: override [DSDT-LENOVO-CB-01]

Quoted 8 lines

Before the change libinput discarded three touch jumps within about a minute of touchpad use; after the change no touch jumps were logged during more than an hour of normal use. The patch itself was not build tested; the behaviour was validated through the ACPI table override above.

Assisted-by DeepSeek:deepseek-v4.1-flash
author
#2 lore raw

Hi Andi,

I just wanted to gently ping on this patch. It has been a little over two weeks, and Mika acked it on Sep 18.

Please let me know if there is anything else you would like changed. Otherwise, I would appreciate it if you could take a look when you have a moment.

Thanks for your time,
Yuqi

Quoted 30 lines · Mika Westerberg
Quoted 19 lines · Yuqi Xu

The ELAN0662 touchpad (04F3:317C) in the Lenovo ThinkBook 14 G4+ ARA (21D0) intermittently stutters and drops touches. libinput discards invalid touch coordinates and logs (rate limited to five messages per 24 hours):

libinput error: event6 - ELAN0662:00 04F3:317C Touchpad: kernel
bug: Touch jump detected and discarded.

The ACPI DSDT describes the touchpad's I2cSerialBus resource on an AMDI0010 controller with a connection speed of 0x00061A80 (400 kHz), and the kernel does not lower it for this device, so the touchpad runs at 400 kHz. This is the same issue previously fixed for ELAN06FA and ELAN0678.

Forcing the bus to 100 kHz was tested with a DSDT override on the affected machine, and the kernel confirmed the override:

ACPI: Table Upgrade: override [DSDT-LENOVO-CB-01]

Quoted 8 lines

Before the change libinput discarded three touch jumps within about a minute of touchpad use; after the change no touch jumps were logged during more than an hour of normal use. The patch itself was not build tested; the behaviour was validated through the ACPI table override above.

Assisted-by DeepSeek:deepseek-v4.1-flash
author
#3 lore raw

Hi Andi, Mika,

Please don't apply this patch. I was wrong about the fix, and I'm sorry for the time already spent on it.

I treated this as the same 100 kHz quirk as the other ELAN touchpads. That was a mistake. On this machine, forcing ELAN0662 to 100 kHz does not stop the touch jumps.

The firmware already asks for 400 kHz. \_SB.I2CA (_HID AMDI0010) publishes the timings through _DSM. iasl marks the UUID unknown, and I could not find a public AMD specification for it:

    Method (_DSM, 4, Serialized)
    {
        If ((Arg0 == ToUUID ("d93e4d1c-58bb-493c-a06a-605a717f9e2e")))
        {
            Switch (ToInteger (Arg2))
            {
                Case (Zero)
                {
                    Return (Buffer (One) { 0x03 })
                }
                Case (One)
                {
                    Return (Buffer (0x04) { 0xE5, 0x00, 0x6A, 0x00 })
                }
            }
        }
    }

The same UUID is present on other Lenovo AMD platforms. AMD's amdi2c.sys 1.2.0.126 reads function 1 as two little-endian words, LCNT 0x00E5 (229) and HCNT 0x006A (106), and programs IC_SDA_HOLD with 0x48. I could not find that layout written down anywhere else.

i2c-designware does not evaluate this _DSM. It derives HCNT/LCNT from the 150 MHz input clock and leaves SDA hold at the reset value of 1. The comment above i2c_acpi_force_100khz_device_ids already suspects those default counters, and notes that Windows works at 400 kHz. Forcing 100 kHz only avoids the bad fast-mode counters.

Programming the values from the _DSM changed the result:

100 kHz, SDA hold 45: touch jumps within about a minute 400 kHz, FS HCNT/LCNT 106/229, SDA hold 0x48:

    i2c_designware AMDI0010:00: SDA Hold Time TX:RX = 72:1
    i2c_designware AMDI0010:00: Fast Mode HCNT:LCNT = 106:229
    i2c_designware AMDI0010:00: Bus speed: Fast Mode (400 kHz)

the same use no longer logged "Touch jump detected".

So this entry does not belong in i2c_acpi_force_100khz_device_ids. The follow-up will be a separate i2c-designware patch: in i2c_dw_acpi_configure(), when SSCN/FMCN are absent, take fast-mode HCNT/LCNT from that _DSM and set SDA hold to 0x48, and leave the bus at the firmware speed. Please drop this one.

Thank you for the Ack, Mika, and sorry again.

Yuqi