Bug 282389 - [i2c] Dell Precision 5690 touchpad unrecognized
Summary: [i2c] Dell Precision 5690 touchpad unrecognized
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Vladimir Kondratyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-28 17:55 UTC by Austin Shafer
Modified: 2024-11-26 00:26 UTC (History)
2 users (show)

See Also:


Attachments
acpidump -dt (10.41 KB, text/plain)
2024-10-29 19:20 UTC, Austin Shafer
no flags Details
devinfo -rv (32.74 KB, text/plain)
2024-11-07 04:28 UTC, Austin Shafer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Austin Shafer 2024-10-28 17:55:51 UTC
I think we are missing some ids for the i2c touchpad on the Dell Precision 5690, the touchpad is not detected but the touchscreen is. Tested with recent CURRENT.

On ubuntu I see:
Oct 28 17:15:27 ubuntu kernel: input: ELAN900C:00 04F3:40D6 as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN900C:00/0018:04F3:40D6.0001/input/input13
Oct 28 17:15:27 ubuntu kernel: input: ELAN900C:00 04F3:40D6 UNKNOWN as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN900C:00/0018:04F3:40D6.0001/input/input14
Oct 28 17:15:27 ubuntu kernel: input: ELAN900C:00 04F3:40D6 UNKNOWN as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN900C:00/0018:04F3:40D6.0001/input/input15
Oct 28 17:15:27 ubuntu kernel: hid-multitouch 0018:04F3:40D6.0001: input,hidraw0: I2C HID v1.00 Device [ELAN900C:00 04F3:40D6] on i2c-ELAN900C:00
Oct 28 17:15:27 ubuntu kernel: i2c_hid_acpi i2c-ELAN900C:00: i2c_hid_get_input: IRQ triggered but there's no data
Oct 28 17:15:27 ubuntu kernel: input: VEN_27C6:00 27C6:0F60 Mouse as /devices/pci0000:00/0000:00:15.3/i2c_designware.1/i2c-1/i2c-VEN_27C6:00/0018:27C6:0F60.0002/input/input17
Oct 28 17:15:27 ubuntu kernel: input: VEN_27C6:00 27C6:0F60 Touchpad as /devices/pci0000:00/0000:00:15.3/i2c_designware.1/i2c-1/i2c-VEN_27C6:00/0018:27C6:0F60.0002/input/input18
Oct 28 17:15:27 ubuntu kernel: hid-multitouch 0018:27C6:0F60.0002: input,hidraw1: I2C HID v1.00 Mouse [VEN_27C6:00 27C6:0F60] on i2c-VEN_27C6:00

It looks like the id is ELAN900C:00 04F3:40D6. Where would we add this to our id list for iichid/etc? I would have guessed this was covered by iichid.c's iichid_ids[0] IICHID_REG_ELAN detection since this is an elantech touchpad? 

I did try with hw.psm.synaptics_support=1 and hw.psm.elantech_support=1 in loader.conf, also set the psm debug level to 5 but only saw a warning about psm's aux port not functioning (-1).

I'm happy to add ids, I'm more interested in how to add new touchpad ids since I have another laptop with an unrecognized trackpad I'd like to get working as well.
Comment 1 Vladimir Kondratyev freebsd_committer freebsd_triage 2024-10-29 10:17:35 UTC
I2C HID devices are generally detected by CID rather than by HID. The CID must be PNP0C50.

Could you dump DSDT table with acpidump -dt ?
Comment 2 Austin Shafer 2024-10-29 19:20:28 UTC
Created attachment 254622 [details]
acpidump -dt
Comment 3 Austin Shafer 2024-10-29 19:21:15 UTC
acpidump -dt fails with iasl exit status = 65280 for some reason, not sure what's happening there. No relevent logs in dmesg since I don't have the ACPI logging stuff built in this kernel. Attached the output up to that point.
Comment 4 Rodrigo Osorio freebsd_committer freebsd_triage 2024-10-29 21:34:15 UTC
I think this is the same issue I have with my Lenovo ThinkBook G6,
except I have an ELAN06FA touchpad.
Comment 5 Austin Shafer 2024-10-30 20:35:32 UTC
Seems I had to use acpidump -s to get it to work. There are a number of PNP0350 devices.

https://badland.io/static/acpidump.txt

(this is from a different laptop which has the same unrecognized touchpad problem)
Comment 6 Austin Shafer 2024-11-05 02:33:20 UTC
Some progress. The following patch seems to fix my legion 5's touchpad:
https://reviews.freebsd.org/D47448

My Dell laptop still does not work though. Here's the acpidump -s from it:
https://badland.io/static/acpidump_2.txt
Comment 7 Vladimir Kondratyev freebsd_committer freebsd_triage 2024-11-06 16:01:39 UTC
(In reply to Austin Shafer from comment #6)
> My Dell laptop still does not work though.
> Here's the acpidump -s from it: https://badland.io/static/acpidump_2.txt
The file does not contain neither ELAN900C nor VEN_27C6 records.

Ok lets try to get some info in other way. Please post output of next commands:

pciconf -lv
devinfo -rv

acpidump & iasl from acpi-tools may be used too.

You may also try patches from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280290 and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280972. They fixes some known issues.
Comment 8 Austin Shafer 2024-11-07 04:28:50 UTC
Created attachment 254992 [details]
devinfo -rv

Here's the devinfo -rv output. I've tried disabling the touchscreen in the bios to see if that had an effect but it did not. That's why the ELAN900C device wasn't present.


> unknown pnpinfo _HID=VEN_27C6 _UID=0 _CID=PNP0C50 at handle=\_SB_.PC00.I2C3.TPD0
Here's the touchpad being unrecognized.

> unknown pnpinfo vendor=0x8086 device=0x7e7b subvendor=0x1028 subdevice=0x0cc8 class=0x0c8000 at slot=21 function=3 dbsf=pci0:0:21:3 handle=\_SB_.PC00.I2C3
Interestingly here is the i2c bus that holds the touchpad also not getting recognized, which I feel silly for not noticing sooner.

Here's the relevant bit of pciconf -lv:
ig4iic0@pci0:0:21:0:    class=0x0c8000 rev=0x20 hdr=0x00 vendor=0x8086 device=0x7e78 subvendor=0x1028 subdevice=0x0cc8
    vendor     = 'Intel Corporation'
    device     = 'Meteor Lake-P Serial IO I2C Controller'
    class      = serial bus
none8@pci0:0:21:3:      class=0x0c8000 rev=0x20 hdr=0x00 vendor=0x8086 device=0x7e7b subvendor=0x1028 subdevice=0x0cc8
    vendor     = 'Intel Corporation'
    device     = 'Meteor Lake-P Serial IO I2C Controller'
    class      = serial bus

With the following patch my touchpad now works:
diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c
index 138de77c35db..874d6a9abc55 100644
--- a/sys/dev/ichiic/ig4_pci.c
+++ b/sys/dev/ichiic/ig4_pci.c
@@ -172,6 +172,8 @@ static int ig4iic_pci_detach(device_t dev);
 #define PCI_CHIP_METEORLAKE_M_I2C_1    0x7e798086
 #define PCI_CHIP_METEORLAKE_M_I2C_2    0x7e508086
 #define PCI_CHIP_METEORLAKE_M_I2C_3    0x7e518086
+#define PCI_CHIP_METEORLAKE_M_I2C_4    0x7e7a8086
+#define PCI_CHIP_METEORLAKE_M_I2C_5    0x7e7b8086
 
 struct ig4iic_pci_device {
        uint32_t        devid;
@@ -288,6 +290,8 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = {
        { PCI_CHIP_METEORLAKE_M_I2C_1, "Intel Meteor Lake-M I2C Controller-1", IG4_TIGERLAKE},
        { PCI_CHIP_METEORLAKE_M_I2C_2, "Intel Meteor Lake-M I2C Controller-2", IG4_TIGERLAKE},
        { PCI_CHIP_METEORLAKE_M_I2C_3, "Intel Meteor Lake-M I2C Controller-3", IG4_TIGERLAKE},
+       { PCI_CHIP_METEORLAKE_M_I2C_4, "Intel Meteor Lake-M I2C Controller-4", IG4_TIGERLAKE},
+       { PCI_CHIP_METEORLAKE_M_I2C_5, "Intel Meteor Lake-M I2C Controller-5", IG4_TIGERLAKE},
 };

It looks like we are missing other ids in addition to this one. For example I added 0x7e7a in the above although it's not in my machine. Not sure if we want to do a broader investigation and import a bunch of ids that we are missing?
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-11-09 05:12:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=bab5e3d468305928e9e5cf1ca9efcee4c89f6a76

commit bab5e3d468305928e9e5cf1ca9efcee4c89f6a76
Author:     Austin Shafer <ashafer@badland.io>
AuthorDate: 2024-11-09 05:05:34 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2024-11-09 05:11:09 +0000

    ig4(4): Add Meteor Lake PCI IDs

    PR:             282389
    MFC after:      3 days

 sys/dev/ichiic/ig4_pci.c | 4 ++++
 1 file changed, 4 insertions(+)
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-11-12 04:11:26 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5cc7196a81fe6924a2994a1efc31468ad045b0ce

commit 5cc7196a81fe6924a2994a1efc31468ad045b0ce
Author:     Austin Shafer <ashafer@badland.io>
AuthorDate: 2024-11-09 05:05:34 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2024-11-12 04:08:43 +0000

    ig4(4): Add Meteor Lake PCI IDs

    PR:             282389
    MFC after:      3 days

    (cherry picked from commit bab5e3d468305928e9e5cf1ca9efcee4c89f6a76)

 sys/dev/ichiic/ig4_pci.c | 4 ++++
 1 file changed, 4 insertions(+)
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-11-12 23:29:01 UTC
A commit in branch releng/14.2 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=56f0fc0011c2c2f57e0d9382e87cd7ea4e014bcd

commit 56f0fc0011c2c2f57e0d9382e87cd7ea4e014bcd
Author:     Austin Shafer <ashafer@badland.io>
AuthorDate: 2024-11-09 05:05:34 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2024-11-12 23:27:46 +0000

    ig4(4): Add Meteor Lake PCI IDs

    Approved by:    re (cperciva)
    PR:             282389
    MFC after:      3 days

    (cherry picked from commit bab5e3d468305928e9e5cf1ca9efcee4c89f6a76)
    (cherry picked from commit 5cc7196a81fe6924a2994a1efc31468ad045b0ce)

 sys/dev/ichiic/ig4_pci.c | 4 ++++
 1 file changed, 4 insertions(+)