From nobody Fri Oct 3 21:00:01 2025 Received: from mail.andi.de1.cc (mail.andi.de1.cc [178.238.236.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AEF314B953; Sun, 24 Aug 2025 22:08:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.238.236.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756073286; cv=none; b=W+QwGf9Bu4e9B4hTMDShJSoEZvyobhNoGYbqZ4l2O3aPJEXNLUM1oTWHygME7xMePqDjnSeRLNCSiAhtjvUOukhrQeoUZTBbhS1xvGCtscLfAhUoip+j5Atizg3W0IcCh4pLLHupRLRepS8kFQG6f8TkV8sGASu6WlhmVraxm54= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756073286; c=relaxed/simple; bh=JmWguJqBi+J6UCLRUwSlxPGfZwJVr4FPhT5TyB6Vwek=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=axHEIC1Qov21yU282GEECXPfb1ywISArKB4LAFt3ZMZENlRZjRXoy8WiI6V+LKEtXOVqYjI+zC3h9RMleTqOmsACVDZ2bcoUl+gSSRhUCOE9TK0h5uX46V+i0aMwphMAb4vDtrt2wdEHVdK6ntgCRtMlqZyy21gNqBbzZ7wETnQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info; spf=pass smtp.mailfrom=kemnade.info; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b=T7qrSz04; arc=none smtp.client-ip=178.238.236.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kemnade.info Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="T7qrSz04" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Cc:In-Reply-To:References:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=rKO4zT7vzvCx/0bG5tGPhwMZqbrVhZfe+6sJ40iyBsk=; b=T7qrSz04Htqmiu9gSRkvVIl3e0 GCPQkpB+1w8TcIqtdH1u0X48Q4qr56Jhc2rl/CGGaeZ7Y/sn0rNAyg/Ywak0Guwg2jNeTK32C+0j1 /8mJtiqsS7pYDHzxaqWbuTFdn34HW+a7vsJRqcDS2ran9ReQKw8sg9JCgdadTrKUFp14grr28F9FD eloVf0LXcaO9cbb6UnXmf98pnYHAJlIObSH9oTfQUMYbBptjGWHpzi7iw59TxizLatuhfShnc6m4r C5UA5nv5FFz8mITcvGf38Gkg57NQVyEbzhZSnP15JdE9y2WkP4X+YZXbVcKo8lMLcMbR/VeYEpQJp Y/aasPNQ==; From: Andreas Kemnade Date: Mon, 25 Aug 2025 00:07:28 +0200 Subject: [PATCH RFC 1/3] dt-bindings: input: elan: Introduce Elan eKTP1059 Touchpad Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250825-ektp-submit-v1-1-1dd476c1277b@kemnade.info> References: <20250825-ektp-submit-v1-0-1dd476c1277b@kemnade.info> In-Reply-To: <20250825-ektp-submit-v1-0-1dd476c1277b@kemnade.info> To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , Tony Lindgren , hns@goldelico.com Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Andreas Kemnade X-Mailer: b4 0.15-dev-50721 X-Developer-Signature: v=1; a=openpgp-sha256; l=1548; i=andreas@kemnade.info; h=from:subject:message-id; bh=JmWguJqBi+J6UCLRUwSlxPGfZwJVr4FPhT5TyB6Vwek=; b=owGbwMvMwCEm/rzkS6lq2x3G02pJDBmrey3CC78Xuk9bP4HrXvInHbuvt2XZT33eeVTiacDfr jnSkw6VdJSyMIhxMMiKKbL8slZw+6TyLDd4aoQ9zBxWJpAhDFycAjCRBGWG/3E3alfqR8u+ONu6 LMwn+md8kf1NwfCcAy/OasxSL2x9PIvhf65gdO+Evp4/qRfnZTno3nn05uyPSXVnJF5kcOnxzZ1 mwgYA X-Developer-Key: i=andreas@kemnade.info; a=openpgp; fpr=EEC0DB858E66C0DA70620AC07DBD6AC74DE29324 The Elan eKTP1059 Touchpad is seen in the Epson Moverio BT-200 attached via SPI. Add a binding for this chip. Little is known. Signed-off-by: Andreas Kemnade --- .../devicetree/bindings/input/elan,ektp1059.yaml | 45 ++++++++++++++++++= ++++ 1 file changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/input/elan,ektp1059.yaml b/D= ocumentation/devicetree/bindings/input/elan,ektp1059.yaml new file mode 100644 index 000000000000..a10256a271e0 --- /dev/null +++ b/Documentation/devicetree/bindings/input/elan,ektp1059.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/elan,ektp1059.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Elantech SPI Touchpad + +maintainers: + - Andreas Kemnade + +allOf: + - $ref: touchscreen/touchscreen.yaml# + +properties: + compatible: + const: elan,ektp1059 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + touchpad@0 { + compatible =3D "elan,ektp1059"; + reg =3D <0x0>; + interrupt-parent =3D <&gpio4>; + interrupts =3D <0x0 IRQ_TYPE_LEVEL_LOW>; + }; + }; --=20 2.39.5 From nobody Fri Oct 3 21:00:01 2025 Received: from mail.andi.de1.cc (mail.andi.de1.cc [178.238.236.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AEAA12B93; Sun, 24 Aug 2025 22:08:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.238.236.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756073286; cv=none; b=E0keAxxwkTTl310fAZmTda2+EBtZIDzTj0wMp8KWJKbZRZpqmkxtYGvrCZJAMOHy0tua9+ghXtCTUloL5N5z+fEyICDva49mXCxskChfa402hD36AcStrptIoA7UL8g0jBFO/SxqzYC5Jbl0CEVpWynPrrYicETHONQ0rQr1dlg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756073286; c=relaxed/simple; bh=IjCfZDgBT49pokPk728KamIWhQEnX2ES5NjdbqpPKxM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kolaxda4WRqnk3UDfFceTN/K++qPt5YTryp+etoS7/jcbew1jMLqs8A5eG+2itj9tjT998nbLvScg7Y5g0EGsQMJFlvCuc9W1/IsYaTg8V4F7DUxcigRJUUopP0Jzg+uLS75NueqMvkJc1AhmYwKtei01oRH7785Qqn0ha8h990= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info; spf=pass smtp.mailfrom=kemnade.info; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b=E7Ljjykf; arc=none smtp.client-ip=178.238.236.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kemnade.info Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="E7Ljjykf" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Cc:In-Reply-To:References:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=w017jvPUy/HjQXZT+jTEkkN0IBHkOVQKlXTzTvOdp3s=; b=E7LjjykfIisqPUp0mvAyxJX8KJ VhMFtT0B0IkRoJQ33mVy/H44CajZzrf8c2F2jJYAJuULX+52rxqDMQBiLf5uh5NFN1soQVc+XxSqx AkVaeinPqiUP3XNMZfMGrNcfHrLTocoAppJpNptBzqaYcqlSIEGOO0CKHmVojLFTU+ZdSraYWxvcF N6gtuyao/V5Xi3f9/cq0EhqYx9ScikSNY9GifTYfAbrcnBkZRyhA5xlQwBqhm32etEcPn/jfwHVYV Wy4mFqRNQc/NJpo08MGb5CLOxv8XUXZQfT91DJ+SLIfM6ppbCRWTMxwPtRqxw4D/wfzs3G8+d9oPE s3jguBBw==; From: Andreas Kemnade Date: Mon, 25 Aug 2025 00:07:29 +0200 Subject: [PATCH RFC 2/3] Input: Add driver for Elan eKTP1059 Touchpad Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250825-ektp-submit-v1-2-1dd476c1277b@kemnade.info> References: <20250825-ektp-submit-v1-0-1dd476c1277b@kemnade.info> In-Reply-To: <20250825-ektp-submit-v1-0-1dd476c1277b@kemnade.info> To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , Tony Lindgren , hns@goldelico.com Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Andreas Kemnade X-Mailer: b4 0.15-dev-50721 X-Developer-Signature: v=1; a=openpgp-sha256; l=9434; i=andreas@kemnade.info; h=from:subject:message-id; bh=IjCfZDgBT49pokPk728KamIWhQEnX2ES5NjdbqpPKxM=; b=owGbwMvMwCEm/rzkS6lq2x3G02pJDBmrey22SH8/tdhzm9QsweiZWRPezgmI+Dkr1Tqz9dFbF +3MS4aPOkpZGMQ4GGTFFFl+WSu4fVJ5lhs8NcIeZg4rE8gQBi5OAZhI4WZGhqcGr3/dyNzOlrBY YL980J1FZx9N+72AbYL2tmpxb1HdlYaMDN8LT+RYHn5QbG54U+z4LafeZW+XNs8zKAvYuezHJO7 TzQwA X-Developer-Key: i=andreas@kemnade.info; a=openpgp; fpr=EEC0DB858E66C0DA70620AC07DBD6AC74DE29324 Add driver for Elan eKTP1059 Touchpad connected via SPI. No information found whether it could be alternatively connected via I2C. No details about protocol are known, the only information is found in the vendor kernel of the Epson Moverio BT-200, drivers/input/elan http://epsonservice.goepson.com/downloads/VI-APS/BT200_kernel.tgz Known issues: After some time (minutes) touching it, interrupts stop arriving. Chances are that source of this problem is outside of the driver. Signed-off-by: Andreas Kemnade --- drivers/input/mouse/Kconfig | 10 ++ drivers/input/mouse/Makefile | 1 + drivers/input/mouse/elan_ektp1059.c | 267 ++++++++++++++++++++++++++++++++= ++++ 3 files changed, 278 insertions(+) diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig index 833b643f0616..5b197bd8863b 100644 --- a/drivers/input/mouse/Kconfig +++ b/drivers/input/mouse/Kconfig @@ -300,6 +300,16 @@ config MOUSE_ELAN_I2C_SMBUS =20 If unsure, say Y. =20 +config MOUSE_ELAN_EKTP1059 + tristate "Elan EKTP1059 Touchpad" + depends on SPI + help + Say Y here if you have an Elan ETKP1059 touchpad connected + via SPI. + + To compile this driver as a module, choose M here: the + module will be called elan_ektp1059. + config MOUSE_INPORT tristate "InPort/MS/ATIXL busmouse" depends on ISA diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile index a1336d5bee6f..f6160a4c97c7 100644 --- a/drivers/input/mouse/Makefile +++ b/drivers/input/mouse/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_MOUSE_ATARI) +=3D atarimouse.o obj-$(CONFIG_MOUSE_BCM5974) +=3D bcm5974.o obj-$(CONFIG_MOUSE_CYAPA) +=3D cyapatp.o obj-$(CONFIG_MOUSE_ELAN_I2C) +=3D elan_i2c.o +obj-$(CONFIG_MOUSE_ELAN_EKTP1059) +=3D elan_ektp1059.o obj-$(CONFIG_MOUSE_GPIO) +=3D gpio_mouse.o obj-$(CONFIG_MOUSE_INPORT) +=3D inport.o obj-$(CONFIG_MOUSE_LOGIBM) +=3D logibm.o diff --git a/drivers/input/mouse/elan_ektp1059.c b/drivers/input/mouse/elan= _ektp1059.c new file mode 100644 index 000000000000..a8ed7ba20e64 --- /dev/null +++ b/drivers/input/mouse/elan_ektp1059.c @@ -0,0 +1,267 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Elantech eKTP1059 SPI Touchpad + * Copyright (C) 2025 Andreas Kemnade + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TOUCHPAD_WIDTH 4000 +#define TOUCHPAD_HEIGHT 2426 +#define TOUCH_AREA 20 +#define PRESSURE_MAX 256 + +struct elan_tp_spi { + struct input_dev *input_touch; + struct spi_device *spi; +}; + +static int elan_spi_write(struct elan_tp_spi *elanspi, const void *buf, si= ze_t len) +{ + /* + * running this as single transfer with word_delay set + * results in an irq storm. Epson vendor kernel uses a single spi_sync + * multiple 1 byte transfers. + */ + size_t i; + int err; + + for (i =3D 0 ; i < len; i++) { + err =3D spi_write(elanspi->spi, buf, 1); + if (err) + return err; + + udelay(100); + } + return 0; +} + +static int elan_spi_read(struct elan_tp_spi *elanspi, void *buf, size_t le= n) +{ + /* reads 0x51 on sync */ + struct spi_transfer t =3D { 0 }; + int err; + size_t i; + + for (i =3D 0; i < len; i++) { + u8 dummy =3D 0xff; + + t.len =3D 1; + t.tx_buf =3D &dummy; + t.rx_buf =3D buf + i; + err =3D spi_sync_transfer(elanspi->spi, &t, 1); + if (err) + return err; + + udelay(80); + } + return 0; +} + +static irqreturn_t elan_tp_irq_handler(int irq, void *dev_id) +{ + struct elan_tp_spi *elanspi =3D dev_id; + u8 buf[14]; + int fingercnt =3D 0; + int x, y, pres, width; + + if (elan_spi_read(elanspi, buf, 14)) + return IRQ_HANDLED; + + if (buf[13] !=3D 0x1) + return IRQ_HANDLED; + + fingercnt =3D (buf[1] & 0xC0) >> 6; + input_report_key(elanspi->input_touch, BTN_TOUCH, fingercnt !=3D 0); + input_report_key(elanspi->input_touch, BTN_TOOL_FINGER, fingercnt =3D=3D = 1); + input_report_key(elanspi->input_touch, BTN_TOOL_DOUBLETAP, fingercnt =3D= =3D 2); + input_report_key(elanspi->input_touch, BTN_TOOL_TRIPLETAP, fingercnt =3D= =3D 3); + + x =3D buf[2] & 0xf; + x =3D x << 8; + x |=3D buf[3]; + y =3D buf[5] & 0xf; + y =3D y << 8; + y |=3D buf[6]; + + pres =3D (buf[2] & 0xf0) | ((buf[5] & 0xf0) >> 4); + width =3D ((buf[1] & 0x30) >> 2) | ((buf[4] & 0x30) >> 4); + + input_report_abs(elanspi->input_touch, ABS_PRESSURE, pres); + input_report_abs(elanspi->input_touch, ABS_TOOL_WIDTH, width); + + if (fingercnt !=3D 0) { + input_report_abs(elanspi->input_touch, ABS_X, x); + input_report_abs(elanspi->input_touch, ABS_Y, y); + } + + input_mt_slot(elanspi->input_touch, 0); + input_mt_report_slot_state(elanspi->input_touch, MT_TOOL_FINGER, fingercn= t =3D=3D 1); + + if (fingercnt !=3D 0) { + input_report_abs(elanspi->input_touch, ABS_MT_POSITION_X, x); + input_report_abs(elanspi->input_touch, ABS_MT_POSITION_Y, y); + } + dev_dbg(&elanspi->spi->dev, "1: X: %d Y: %d pres: %d width: %d\n", + x, y, pres, width); + + if (fingercnt >=3D 2) { + x =3D buf[8] & 0xf; + x =3D x << 8; + x |=3D buf[9]; + y =3D buf[11] & 0xf; + y =3D y << 8; + y |=3D buf[12]; + input_mt_slot(elanspi->input_touch, 1); + input_mt_report_slot_state(elanspi->input_touch, MT_TOOL_FINGER, 1); + input_report_abs(elanspi->input_touch, ABS_MT_POSITION_X, x); + input_report_abs(elanspi->input_touch, ABS_MT_POSITION_Y, y); + dev_dbg(&elanspi->spi->dev, "2: X: %d Y: %d\n", x, y); + } else { + input_mt_slot(elanspi->input_touch, 1); + input_mt_report_slot_state(elanspi->input_touch, MT_TOOL_FINGER, 0); + } + + input_sync(elanspi->input_touch); + + return IRQ_HANDLED; +} + +static int handle_hello_package(struct elan_tp_spi *elanspi) +{ + u8 buf_recv[4]; + int rc; + + rc =3D elan_spi_read(elanspi, buf_recv, 4); + if (rc !=3D 0) + return rc; + + /* 0xa0, 0x7, 0x0, 0x0 after boot */ + dev_dbg(&elanspi->spi->dev, + "dump hello packet: %x, %x, %x, %x\n", + buf_recv[0], buf_recv[1], buf_recv[2], buf_recv[3]); + + return 0; +} + +static int init_touchpad(struct elan_tp_spi *elanspi) +{ + u8 buf_cmd[4] =3D {0x5B, 0x10, 0xC, 0x1}; + u8 buf[14]; + int ret; + + ret =3D elan_spi_write(elanspi, buf_cmd, 4); + + if (ret !=3D 0) + return ret; + + msleep(20); + elan_spi_read(elanspi, buf, 14); + + return 0; +} + +static int elan_ektp1059_probe(struct spi_device *spi) +{ + int status =3D 0; + struct elan_tp_spi *elanspi; + struct input_dev *input_touch; + + spi->bits_per_word =3D 8; + status =3D spi_setup(spi); + + elanspi =3D devm_kzalloc(&spi->dev, + sizeof(struct elan_tp_spi), GFP_KERNEL); + if (!elanspi) + return -ENOMEM; + + input_touch =3D devm_input_allocate_device(&spi->dev); + if (!input_touch) + return dev_err_probe(&spi->dev, PTR_ERR(input_touch), + "create input touch device failed\n"); + + elanspi->input_touch =3D input_touch; + + elanspi->spi =3D spi; + spi_set_drvdata(spi, elanspi); + + input_touch->name =3D "elan-touchpad"; + input_set_abs_params(input_touch, ABS_MT_POSITION_X, 0, TOUCHPAD_WIDTH, 0= , 0); + input_set_abs_params(input_touch, ABS_MT_POSITION_Y, 0, TOUCHPAD_HEIGHT, = 0, 0); + input_set_abs_params(input_touch, ABS_MT_PRESSURE, 0, PRESSURE_MAX, 0, 0); + input_set_abs_params(input_touch, ABS_TOOL_WIDTH, 0, TOUCH_AREA, 0, 0); + input_mt_init_slots(input_touch, 3, INPUT_MT_POINTER | INPUT_MT_SEMI_MT); + input_set_drvdata(input_touch, elanspi); + + status =3D input_register_device(input_touch); + if (status < 0) + return dev_err_probe(&elanspi->spi->dev, status, "input_register_device = failed\n"); + + status =3D handle_hello_package(elanspi); + if (status < 0) + return dev_err_probe(&elanspi->spi->dev, status, "handle hello package f= ailed\n"); + + status =3D init_touchpad(elanspi); + if (status < 0) + return dev_err_probe(&spi->dev, status, "init touchpad failed!\n"); + + status =3D devm_request_threaded_irq(&spi->dev, spi->irq, NULL, + elan_tp_irq_handler, IRQF_ONESHOT, + spi->dev.driver->name, elanspi); + if (status < 0) + return dev_err_probe(&spi->dev, status, "request_irq failed\n"); + + return 0; +} + +static int elan_ektp1059_suspend(struct device *dev) +{ + disable_irq(to_spi_device(dev)->irq); + return 0; +} + +static int elan_ektp1059_resume(struct device *dev) +{ + enable_irq(to_spi_device(dev)->irq); + return 0; +} + +static const struct spi_device_id elan_ektp1059_id[] =3D { + { "ektp1059", 0 }, + {}, +}; +MODULE_DEVICE_TABLE(spi, elan_ektp1059_id); + +static const struct of_device_id elan_ektp1059_of_spi_match[] =3D { + { .compatible =3D "elan,ektp1059" }, + { }, +}; +MODULE_DEVICE_TABLE(of, elan_ektp1059_of_spi_match); + +static SIMPLE_DEV_PM_OPS(elan_ektp1059_pm, elan_ektp1059_suspend, elan_ekt= p1059_resume); + +static struct spi_driver elan_ektp1059_driver =3D { + .driver =3D { + .name =3D "elan_ektp1059", + .of_match_table =3D elan_ektp1059_of_spi_match, + .pm =3D pm_ptr(&elan_ektp1059_pm), + }, + .id_table =3D elan_ektp1059_id, + .probe =3D elan_ektp1059_probe, +}; + +module_spi_driver(elan_ektp1059_driver); + +MODULE_DESCRIPTION("Elan eKTP1059 SPI touch pad"); +MODULE_LICENSE("GPL"); --=20 2.39.5 From nobody Fri Oct 3 21:00:01 2025 Received: from mail.andi.de1.cc (mail.andi.de1.cc [178.238.236.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CF5A257836; Sun, 24 Aug 2025 22:08:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.238.236.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756073289; cv=none; b=OtG+HzubagHj4kB3w6Rx2kRlLTkdr4MXzN2bG7TYyXG6Zn/5lR11Klo5L5LcyeDt9io3WN84xtr5Iy0p2QK0+AxtECtrwZF+9tNGrDhFkvUkKfI/yshot9P9k89XqwoSiKibLkcO9hPE1H2uZALq1cz0QrYgrTZTYs2v58pE6mc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756073289; c=relaxed/simple; bh=CUcs35OJOETWZAyV81kcK5XJcR6zEFg5XONEReKO7jk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=istgFYXzjpO3ZsOoWcaguXfoNHSW9MyesN8h4suUcNK8hQUyahs3UwPqFHJdE2AHBlucMm5sdR37kOapWNAPFtOxge/oBuY11KW7cZGAbnTTQu0zNB1jvdoK4WlOpldIkcvtHNA2uA14t5dVMKp3RgfGueD6NWkXY13BH/6ViPI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info; spf=pass smtp.mailfrom=kemnade.info; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b=WNaySMpV; arc=none smtp.client-ip=178.238.236.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kemnade.info Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="WNaySMpV" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Cc:In-Reply-To:References:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=ymOYjpVivlCLXw/DbSukmlKetF/L1S/nZ1r8QgNYs6I=; b=WNaySMpVkPcY22UBeVJVrotvng mWsIhLlkom2bKfVe+ROntXyaINeDU7dbtXR0jfhQeTsYuY7Elt0Isx2nd8UZST6JXA8oN9Vlk0FfL yNMVZZVSnkhW3pe44RSEGq+SNxgG5JmFvPAqhnZCa+X+sitWIaN7/kp6fgtqavKirXC+ort2Rjp8O O1hl7cxeGzdR5M6Uk9XIq0+cQsncRm9yeODhrujWuSN7McxT8J2/EClW2RVmXD5By7xDhuVBbG9Yq kqGZOrHfEHGzbQ5U586uZhrMWr1yy+8bvWDB72EP0i/wL8QZUFTEiqa89kvlxu0R94n2LPX3f6yB4 YdmbK4Ow==; From: Andreas Kemnade Date: Mon, 25 Aug 2025 00:07:30 +0200 Subject: [PATCH RFC 3/3] ARM: dts: ti/omap: epson-bt2ws: add touchpad Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250825-ektp-submit-v1-3-1dd476c1277b@kemnade.info> References: <20250825-ektp-submit-v1-0-1dd476c1277b@kemnade.info> In-Reply-To: <20250825-ektp-submit-v1-0-1dd476c1277b@kemnade.info> To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , Tony Lindgren , hns@goldelico.com Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Andreas Kemnade X-Mailer: b4 0.15-dev-50721 X-Developer-Signature: v=1; a=openpgp-sha256; l=1934; i=andreas@kemnade.info; h=from:subject:message-id; bh=CUcs35OJOETWZAyV81kcK5XJcR6zEFg5XONEReKO7jk=; b=owGbwMvMwCEm/rzkS6lq2x3G02pJDBmrey1V3cImFFwTMHq4oKO/4FLwZuP8gIgk058/jpaGf di3tXR7RykLgxgHg6yYIssvawW3TyrPcoOnRtjDzGFlAhnCwMUpABMJucvwV/pnwtWiWX5e8+PV UhbMXGJjVlJ/fkmTx+pGY3bBWVN3tzP8L7PjYnR456kmz7vgdOfxO97Xd/At2PR6y2Gf8ze+ee3 ZxAsA X-Developer-Key: i=andreas@kemnade.info; a=openpgp; fpr=EEC0DB858E66C0DA70620AC07DBD6AC74DE29324 Add the EKTP1059 based touchpad connected via SPI. Signed-off-by: Andreas Kemnade --- arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts | 32 +++++++++++++++++++= ++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts b/arch/arm/b= oot/dts/ti/omap/omap4-epson-embt2ws.dts index c90f43cc2fae..746ac4761b0d 100644 --- a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts +++ b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts @@ -429,6 +429,23 @@ MATRIX_KEY(1, 1, KEY_VOLUMEDOWN) linux,input-no-autorepeat; }; =20 +&mcspi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&mcspi1_pins>; + + touchpad@0 { + compatible =3D "elan,ektp1059"; + reg =3D <0>; /* cs0 */ + pinctrl-names =3D "default"; + pinctrl-0 =3D <&elan_pins>; + interrupt-parent =3D <&gpio2>; + interrupts =3D <20 IRQ_TYPE_LEVEL_LOW>; + spi-max-frequency =3D <200000>; + spi-cpol; + spi-cpha; + }; +}; + &mcbsp2 { #sound-dai-cells =3D <0>; pinctrl-names =3D "default"; @@ -506,6 +523,12 @@ OMAP4_IOPAD(0x1d4, PIN_OUTPUT | MUX_MODE3) /* gpio191 = */ >; }; =20 + elan_pins: pinmux-elan-pins { + pinctrl-single,pins =3D < + OMAP4_IOPAD(0x78, PIN_INPUT | MUX_MODE3) /* gpio52 */ + >; + }; + gpio_keys_pins: pinmux-gpio-key-pins { pinctrl-single,pins =3D < OMAP4_IOPAD(0x56, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio35 */ @@ -579,6 +602,15 @@ OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE3) /* gpio27 */ >; }; =20 + mcspi1_pins: pinmux-mcspi1-pins { + pinctrl-single,pins =3D < + OMAP4_IOPAD(0x132, PIN_INPUT_PULLUP | MUX_MODE0) + OMAP4_IOPAD(0x134, PIN_INPUT_PULLUP | MUX_MODE0) + OMAP4_IOPAD(0x136, PIN_OUTPUT | MUX_MODE0) + OMAP4_IOPAD(0x138, PIN_OUTPUT | MUX_MODE0) + >; + }; + mcbsp2_pins: pinmux-mcbsp2-pins { pinctrl-single,pins =3D < OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_clkx */ --=20 2.39.5