IETP touchpad interrupt failure on Chromebook Edgar

Gabriel Tourillon <[email protected]>
Newsgroups gmane.os.openbsd.bugs
Message-ID <[email protected]>
Hello,


I'm reporting an I2C touchpad problem on a Google Chromebook Edgar running OpenBSD 7.9 amd64.

Hardware:
   
   - Google Chromebook Edgar
   - Intel Celeron N3160
   - 4 GB RAM
   - Coreboot / MrChromebox 2606.1
   - OpenBSD 7.9 amd64

The touchpad is detected, but its interrupt cannot be established:
dwiic1 at acpi0 I2C6 addr 0xfccdc000/0x1000 irq 37
iic1 at dwiic1
ietp0 at iic1 addr 0x15, can't establish interrupt
The touchpad works with an Artix Linux live system on the same hardware, and a USB mouse works normally under OpenBSD.

I investigated the failure through ietp_attach(), iic_intr_establish(), and dwiic_i2c_intr_establish(). The touchpad's ACPI interrupt resource refers to the GPNC GPIO controller.

I found that IETP attempts to establish its interrupt before the GPNC GPIO driver has attached. At that point the ACPI node exists, but its GPIO information has not been initialized.

As an experiment, I modified dwiic to defer IETP discovery if its GPIO provider has not attached yet. After the GPIO driver attaches, I rescan the DWIIC ACPI devices. With this change the ordering becomes:
chvgpio1 at acpi0 GPNC ...
ietp0 at iic1 addr 0x15 gpio 18
and the touchpad works.

I have attached the experimental patch/workaround. This is intended mainly to demonstrate the cause and provide a working test case.

The modified source tree is available here in the branch chromebook-cb3-431 :
 https://github.com/Grabyy/OpenBSD_src_Chromebook-CB3-431_custom/tree/chromebook-cb3-431


If you need any additional information or testing, please let me know. I'm new to OpenBSD kernel development, so I'm happy to provide anything that would be useful.

Thanks,Gabriel.
dwiic-ietp.patch (application/octet-stream, 1.9 KB)
From 2ed935b28bd471a4df1154772c6ae994eaa9f70c Mon Sep 17 00:00:00 2001
From: Gaby <[email protected]>
Date: Mon, 17 Aug 2026 14:18:06 +0200
Subject: [PATCH] dwiic_acpi: defer IETP until GPIO is ready

---
 sys/dev/acpi/dwiic_acpi.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/sys/dev/acpi/dwiic_acpi.c b/sys/dev/acpi/dwiic_acpi.c
index 25343b29e02..e0b77b4ec79 100644
--- a/sys/dev/acpi/dwiic_acpi.c
+++ b/sys/dev/acpi/dwiic_acpi.c
@@ -44,6 +44,7 @@ struct dwiic_crs {
 
 int		dwiic_acpi_match(struct device *, void *, void *);
 void		dwiic_acpi_attach(struct device *, struct device *, void *);
+void		dwiic_acpi_rescan(struct device *);
 
 int		dwiic_acpi_parse_crs(int, union acpi_resource *, void *);
 int		dwiic_acpi_found_ihidev(struct dwiic_softc *,
@@ -272,6 +273,14 @@ dwiic_acpi_attach(struct device *parent, struct device *self, void *aux)
 #endif
 }
 
+void
+dwiic_acpi_rescan(struct device *self)
+{
+	struct dwiic_softc *sc = (struct dwiic_softc *)self;
+
+	aml_find_node(sc->sc_devnode, "_HID", dwiic_acpi_found_hid, sc);
+}
+
 int
 dwiic_acpi_parse_crs(int crsidx, union acpi_resource *crs, void *arg)
 {
@@ -476,8 +485,14 @@ dwiic_acpi_found_hid(struct aml_node *node, void *arg)
 		return dwiic_acpi_found_ihidev(sc, node, dev, crs);
 	else if (dwiic_matchhids(dev, iatp_hids))
 		return dwiic_acpi_found_iatp(sc, node, dev, crs);
-	else if (dwiic_matchhids(dev, ietp_hids) || dwiic_matchhids(cdev, ietp_hids))
+	else if (dwiic_matchhids(dev, ietp_hids) || dwiic_matchhids(cdev, ietp_hids)) {
+		if (crs.gpio_int_node != NULL && crs.gpio_int_node->gpio == NULL) {
+       printf("dwiic: deferring IETP\n");
+       config_defer(&sc->sc_dev, dwiic_acpi_rescan);
+       return 0;
+		}
 		return dwiic_acpi_found_ietp(sc, node, dev, crs);
+	}
 
 	memset(&ia, 0, sizeof(ia));
 	ia.ia_tag = sc->sc_iba.iba_tag;
-- 
2.50.1 (Apple Git-155)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.