lg-gram-16z90tp: Phase 4.1-4.3 — I2C-HID touchpad chain (real implementations)
Base submodule bump (452452e4): the I2C transfer chain was stubbed
end-to-end and is now real code — dw-i2c DesignWare engine ported from
Linux 7.1, intel-lpss-i2cd PCI discovery for ARL-H/MTL-P, i2cd provider
routing.
Config fixes for the chain:
- drivers.d spawn paths: six entries pointed at /usr/lib/drivers/ for
binaries staged at /usr/bin/ (i2cd, gpiod, dw-acpi-i2cd, intel-gpiod,
i2c-gpio-expanderd, i2c-hidd) — those drivers would never spawn.
- init services: add 00_intel-lpss-i2cd.service
(type = { scheme = "i2c-lpss" }, absolute cmd path since init PATH
covers only /usr/bin); dw-acpi-i2cd upgraded from oneshot_async to
type = { scheme = "dw-acpi-i2c" } now that it serves a scheme
forever; i2c-hidd requires_weak gains 00_intel-lpss-i2cd.service so
the touchpad adapter exists before HID probing.
Validation: base cooks for x86_64-unknown-redox; staged binary paths
verified against spawn configs; make lint-config clean.
Refs: local/docs/LG-GRAM-16Z90TP-COMPATIBILITY-PLAN.md Phase 4
This commit is contained in:
@@ -235,6 +235,20 @@ cmd = "i2cd"
|
||||
type = { scheme = "i2c" }
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/00_intel-lpss-i2cd.service"
|
||||
data = """
|
||||
[unit]
|
||||
description = "Intel LPSS I2C controller (PCI + ACPI discovery, DesignWare engine)"
|
||||
requires_weak = [
|
||||
"00_i2cd.service",
|
||||
]
|
||||
|
||||
[service]
|
||||
cmd = "/usr/lib/drivers/intel-lpss-i2cd"
|
||||
type = { scheme = "i2c-lpss" }
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/00_i2c-dw-acpi.service"
|
||||
data = """
|
||||
@@ -246,7 +260,7 @@ requires_weak = [
|
||||
|
||||
[service]
|
||||
cmd = "dw-acpi-i2cd"
|
||||
type = "oneshot_async"
|
||||
type = { scheme = "dw-acpi-i2c" }
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
@@ -286,6 +300,7 @@ data = """
|
||||
description = "ACPI I2C HID bring-up daemon"
|
||||
requires_weak = [
|
||||
"00_i2cd.service",
|
||||
"00_intel-lpss-i2cd.service",
|
||||
"00_i2c-dw-acpi.service",
|
||||
"00_intel-gpiod.service",
|
||||
"00_i2c-gpio-expanderd.service",
|
||||
|
||||
@@ -17,4 +17,4 @@ command = ["/usr/lib/drivers/usbhidd"]
|
||||
name = "i2c-hidd"
|
||||
description = "I2C HID touchscreen/trackpad driver"
|
||||
priority = 75
|
||||
command = ["/usr/lib/drivers/i2c-hidd"]
|
||||
command = ["/usr/bin/i2c-hidd"]
|
||||
|
||||
@@ -4,25 +4,25 @@
|
||||
name = "i2cd"
|
||||
description = "I2C host adapter registry"
|
||||
priority = 85
|
||||
command = ["/usr/lib/drivers/i2cd"]
|
||||
command = ["/usr/bin/i2cd"]
|
||||
|
||||
[[driver]]
|
||||
name = "gpiod"
|
||||
description = "GPIO controller registry"
|
||||
priority = 85
|
||||
command = ["/usr/lib/drivers/gpiod"]
|
||||
command = ["/usr/bin/gpiod"]
|
||||
|
||||
[[driver]]
|
||||
name = "dw-acpi-i2cd"
|
||||
description = "DesignWare ACPI I2C controller"
|
||||
priority = 80
|
||||
command = ["/usr/lib/drivers/dw-acpi-i2cd"]
|
||||
command = ["/usr/bin/dw-acpi-i2cd"]
|
||||
|
||||
[[driver]]
|
||||
name = "intel-gpiod"
|
||||
description = "Intel ACPI GPIO registrar"
|
||||
priority = 80
|
||||
command = ["/usr/lib/drivers/intel-gpiod"]
|
||||
command = ["/usr/bin/intel-gpiod"]
|
||||
|
||||
[[driver]]
|
||||
name = "amd-mp2-i2cd"
|
||||
@@ -40,7 +40,7 @@ command = ["/usr/lib/drivers/intel-lpss-i2cd"]
|
||||
name = "i2c-gpio-expanderd"
|
||||
description = "I2C GPIO expander companion bridge"
|
||||
priority = 75
|
||||
command = ["/usr/lib/drivers/i2c-gpio-expanderd"]
|
||||
command = ["/usr/bin/i2c-gpio-expanderd"]
|
||||
|
||||
[[driver]]
|
||||
name = "intel-thc-hidd"
|
||||
|
||||
@@ -202,15 +202,68 @@ whole desktop path (Qt6/KWin) on this machine.**
|
||||
|
||||
### PHASE 4 — Touchpad: I2C-HID chain bring-up (M)
|
||||
|
||||
> **STATUS: 4.1–4.3 COMPLETE (2026-07-20).** The entire I2C transfer chain was
|
||||
> stubbed end-to-end and has been replaced with real implementations (see
|
||||
> "stub sweep" below). 4.4 (multitouch report parsing) and 4.5 (host
|
||||
> validation) remain open and require the running system.
|
||||
|
||||
**Stub sweep (all found during this phase, all replaced with real code):**
|
||||
|
||||
1. **i2cd transfer path was a stub** — `queue_transfer_stub` returned
|
||||
"not implemented yet" for every transfer, and its wire format didn't even
|
||||
match the only in-tree consumer (i2c-hidd sends a bare
|
||||
`I2cTransferRequest`, i2cd expected `I2cControlRequest::Transfer`).
|
||||
→ Real provider routing: adapter resolution by name/alias (exact,
|
||||
normalized, last-component) + forwarding to the provider daemon's
|
||||
`/scheme/<provider>/transfer` endpoint.
|
||||
2. **intel-lpss-i2cd / dw-acpi-i2cd / amd-mp2-i2cd were register-and-park
|
||||
stubs** — they mapped the MMIO, logged register offsets in a debug line,
|
||||
registered an adapter name, and parked forever without initializing the
|
||||
controller or executing a single transfer.
|
||||
→ New shared crate `drivers/i2c/designware` (`dw-i2c`): real DesignWare
|
||||
master engine ported from Linux 7.1 `i2c-designware-master.c`/`common.c`
|
||||
(IC_CON/SCL timing from ic_clk with Linux's exact hcnt/lcnt formulas,
|
||||
SDA hold + RX-hold workaround, polling transfer engine with
|
||||
RESTART/STOP, TX_ABRT decode, 7/10-bit addressing, bounded timeouts) +
|
||||
shared `/scheme/<name>` transfer endpoint with an on-ready callback
|
||||
(register-scheme-then-ready ordering, matching xhcid).
|
||||
3. **intel-lpss-i2cd could never bind on modern hardware** — it matched only
|
||||
legacy ACPI HIDs, but MTL/ARL platforms bind LPSS I2C by PCI ID
|
||||
(Linux `intel-lpss-pci.c` model).
|
||||
→ PCI discovery for ARL-H (0x7750/0x7751, 0x7778–0x777b) and MTL-P
|
||||
(0x7e50/0x7e51, 0x7e78–0x7e7b) with BAR0 from PCI config space
|
||||
(32/64-bit BAR decode), ACPI alias resolution by matching
|
||||
`FixedMemory32 == BAR0` across `/scheme/acpi/resources/`.
|
||||
4. **Six broken spawn paths** — `drivers.d` command paths pointed at
|
||||
`/usr/lib/drivers/` for binaries staged at `/usr/bin/` (i2cd, gpiod,
|
||||
dw-acpi-i2cd, intel-gpiod, i2c-gpio-expanderd, i2c-hidd) → fixed.
|
||||
5. **No init service for intel-lpss-i2cd** → added
|
||||
`00_intel-lpss-i2cd.service` (`type = { scheme = "i2c-lpss" }`, absolute
|
||||
cmd path — init PATH covers only /usr/bin); `dw-acpi-i2cd` service type
|
||||
upgraded from `oneshot_async` to `type = { scheme = "dw-acpi-i2c" }`;
|
||||
i2c-hidd `requires_weak` updated.
|
||||
6. **Boot-order race** — controller daemons could lose registration if i2cd
|
||||
wasn't ready yet → bounded retry (100 × 50 ms) in `register_adapter`.
|
||||
|
||||
| # | Work item | Files | Effort |
|
||||
|---|---|---|---|
|
||||
| 4.1 | Identify actual ACPI `_HID` of the two LPSS I2C controllers on the host (`/sys/bus/acpi/devices/*/hid` under Linux); add to `SUPPORTED_IDS` of the right driver (`intel-lpss-i2cd` or `dw-acpi-i2cd`). If the platform exposes them PCI-only, add PCI-ID (8086:7778/7779) matching as a complement to ACPI-HID matching | `local/sources/base/drivers/i2c/*` | S |
|
||||
| 4.2 | Controller bring-up: BAR/IRQ from `_CRS`, DesignWare init sequence, bus speed from ACPI; validate register-level transactions against Linux `i2c-designware` behavior | same | M |
|
||||
| 4.3 | `i2c-hidd`: probe 04CA:00CC (PNP0C50), `_DSM` HID descriptor, report descriptor fetch; IRQ line via `_CRS` (GPIO/IRQ resource → `/scheme/irq`) | `local/sources/base/drivers/input/i2c-hidd/` | M |
|
||||
| 4.4 | Multitouch digitizer report parsing (ABS_MT_* slots, tracking IDs) + forwarding through inputd → evdevd gesture module | `i2c-hidd/hid.rs`, `evdevd/gesture.rs` | M |
|
||||
| 4.5 | Host validation: pointer, click, two-finger scroll; palm-rejection tuning | — | S |
|
||||
| 4.1 | Identify actual ACPI `_HID` of the two LPSS I2C controllers on the host | — | ✅ DONE — **no `_HID` exists on this platform** (host-verified via sysfs: PCI function 00:15.0/00:15.1 ↔ `\_SB_.PC00.I2C0/I2C1`, DesignWare adapter spawned by intel-lpss MFD with `bxt_i2c_info`, 133 MHz). PCI-ID discovery implemented instead, per Linux's model |
|
||||
| 4.2 | Controller bring-up: BAR/IRQ, DesignWare init sequence, bus speed | `drivers/i2c/designware/`, `intel-lpss-i2cd` | ✅ DONE (polling engine; IRQ-driven completion is a documented IRQ-plan follow-up, not a stub) |
|
||||
| 4.3 | `i2c-hidd`: probe 04CA:00CC (PNP0C50), `_DSM` HID descriptor, report descriptor fetch | `i2c-hidd`, `i2cd`, endpoint chain | ✅ CODE-READY — protocol chain verified end-to-end in code (i2c-hidd's bare `I2cTransferRequest` → i2cd routing → provider endpoint). Runtime proof pending host boot (Phase 1) |
|
||||
| 4.4 | Multitouch digitizer report parsing (ABS_MT_* slots, tracking IDs) + forwarding through inputd → evdevd gesture module | `i2c-hidd/hid.rs`, `evdevd/gesture.rs` | M — OPEN |
|
||||
| 4.5 | Host validation: pointer, click, two-finger scroll; palm-rejection tuning | — | S — OPEN (needs boot) |
|
||||
|
||||
**Gate 4:** Touchpad fully usable on host (pointer + multitouch scroll + click).
|
||||
**Adapter naming chain (documented for future consumers):**
|
||||
touchpad `_CRS` `I2cSerialBus` resource source (e.g. `\_SB_.PC00.I2C0`) →
|
||||
i2c-hidd sends it as `I2cTransferRequest.adapter` → i2cd resolves against
|
||||
registered names + aliases (exact → normalized → last-component) →
|
||||
provider daemon (intel-lpss-i2cd registered alias `PC00.I2C0` discovered by
|
||||
matching `FixedMemory32 == BAR0`) → engine executes on the controller's BAR0.
|
||||
|
||||
**Gate 4 (partial):** base fork cooks for `x86_64-unknown-redox` with the new
|
||||
chain; all unit tests pass (dw-i2c 3, intel-lpss-i2cd 3, others green);
|
||||
binaries staged at verified paths. Full gate (touchpad usable on host) open
|
||||
until Phase 1 boot + 4.4.
|
||||
|
||||
---
|
||||
|
||||
|
||||
+1
-1
Submodule local/sources/base updated: d78fd44a07...452452e453
Reference in New Issue
Block a user