mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yuqi Xu <xuyuqiabc@gmail.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: westeri@kernel.org, andi.shyti@kernel.org,
	linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: acpi: Add ELAN0662 to i2c_acpi_force_100khz_device_ids
Date: Mon,  5 Oct 2026 11:26:55 +0800	[thread overview]
Message-ID: <20261005032655.12633-1-xuyuqiabc@gmail.com> (raw)
In-Reply-To: <20261005024654.26888-1-xuyuqiabc@gmail.com>

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

      reply	other threads:[~2026-10-05  3:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18  5:41 Yuqi Xu
2026-09-18  5:56 ` Mika Westerberg
2026-10-05  2:46   ` Yuqi Xu
2026-10-05  3:26     ` Yuqi Xu [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=20261005032655.12633-1-xuyuqiabc@gmail.com \
    --to=xuyuqiabc@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=westeri@kernel.org \
    /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®