From: Icenowy Zheng <zhengxingda@iscas.ac.cn>
To: Chen-Yu Tsai <wenst@chromium.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] arm64: dts: mediatek: mt8188-geralt: enable touchpad
Date: Mon, 04 May 2026 21:46:37 +0800 [thread overview]
Message-ID: <b91f527f5ef7999300dd6f7df36dd2d31aa89bc2.camel@iscas.ac.cn> (raw)
In-Reply-To: <CAGXv+5FvdufzjqBRQnnG3y8FVW9bHL47CVv_=e7GbVv2d3eEuA@mail.gmail.com>
在 2026-05-04一的 17:41 +0800,Chen-Yu Tsai写道:
> On Mon, May 4, 2026 at 3:28 PM Icenowy Zheng
> <zhengxingda@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@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@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
> >
> >
prev parent reply other threads:[~2026-05-04 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 7:28 [PATCH] arm64: dts: mediatek: mt8188-geralt: enable touchpad Icenowy Zheng
2026-05-04 9:41 ` Chen-Yu Tsai
2026-05-04 13:46 ` Icenowy Zheng [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=b91f527f5ef7999300dd6f7df36dd2d31aa89bc2.camel@iscas.ac.cn \
--to=zhengxingda@iscas.ac.cn \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
--cc=wenst@chromium.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