[PATCH] arm64: dts: mediatek: mt8188-geralt: enable touchpad
Icenowy Zheng
zhengxingda at iscas.ac.cn
Mon May 4 06:46:37 PDT 2026
在 2026-05-04一的 17:41 +0800,Chen-Yu Tsai写道:
> On Mon, May 4, 2026 at 3:28 PM Icenowy Zheng
> <zhengxingda at iscas.ac.cn> wrote:
> >
> > Despite the Ciri device's touchpad is on the detachable keyboard,
> > the
> > I2C HID device seen by Linux is emulated by ChromeOS EC and always
> > present regardless of the presence of physical touchpad.
>
> AFAIK it is actually an I2C HID device on the detachable keyboard.
> The I2C bus is "tunneled" across the EC-EC connection. And if you
> detach the keyboard, the I2C device will stop responding.
No, it looks that when the keyboard isn't attached, the I2C HID
descriptor can still be retrieved successfully. Its device ID is even
assigned in the ChromeOS EC device (and a TODO remains there, with a
placeholder 0x5099 gets shipped) [1].
[1]
https://github.com/coreboot/chrome-ec/blob/main/zephyr/program/geralt/i2c.dtsi#L161
>
> We have some downstream trickery to deal with this:
>
> https://crrev.com/c/6040044
> https://crrev.com/c/6040045
>
> It basically involves registering the I2C device when the keyboard is
> attached, and removing it when it is detached. We haven't gotten
> around
> to upstreaming it though. I talked to Krzysztof about this design
> last
> year, and I believe it was at least acceptable from DT point of view.
>
> So this patch is somewhat incorrect, in that the trackpad should be
> disabled by default, and its status should be toggled at runtime
> based
> on the detachable keyboard events.
>
> Otherwise if you boot the system without the keyboard, the driver
> will
> probably fail to read the HID descriptor.
This doesn't happen on my device. When I boot w/o a keyboard attached,
a `hid-over-i2c 18D1:50FF` device still appears, and after I attach the
keyboard it correctly delivers trackpad events.
Thanks,
Icenowy
>
>
> ChenYu
>
> > Enable the device in the device tree.
> >
> > Signed-off-by: Icenowy Zheng <zhengxingda at iscas.ac.cn>
> > ---
> > .../boot/dts/mediatek/mt8188-geralt.dtsi | 20
> > +++++++++++++++++++
> > 1 file changed, 20 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> > b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> > index 8e423504ec052..8f801454bf84c 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> > +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
> > @@ -460,6 +460,18 @@ &i2c4 {
> > pinctrl-0 = <&i2c4_pins>;
> > clock-frequency = <400000>;
> > status = "okay";
> > +
> > + /* The touchpad HID device is emulated by EC so it's always
> > present */
> > + touchpad: touchpad at 56 {
> > + compatible = "hid-over-i2c";
> > + reg = <0x56>;
> > + hid-descr-addr = <0x0001>;
> > + interrupt-parent = <&pio>;
> > + interrupts = <148 IRQ_TYPE_LEVEL_LOW>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&touchpad_int>;
> > + wakeup-source;
> > + };
> > };
> >
> > &i2c5 {
> > @@ -1131,6 +1143,14 @@ pins-bus {
> > };
> > };
> >
> > + touchpad_int: touchpad-int-pins {
> > + pins-ec-ap-touchpad-int-odl {
> > + pinmux = <PINMUX_GPIO148__FUNC_B_GPIO148>;
> > + input-enable;
> > + bias-disable;
> > + };
> > + };
> > +
> > uart0_pins: uart0-pins {
> > pins-bus {
> > pinmux = <PINMUX_GPIO31__FUNC_O_UTXD0>,
> > --
> > 2.52.0
> >
> >
More information about the linux-arm-kernel
mailing list