From patchwork Mon Oct 24 11:10:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 1693832 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4SIzT3QF; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=alistair23.me header.i=@alistair23.me header.a=rsa-sha256 header.s=fm3 header.b=cYSOFk+X; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=oBCu9z2e; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mwsnj5xHsz20S2 for ; Mon, 24 Oct 2022 22:11:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=wKN5ew1grr6dk71VlF4L5A08TybD7ulGNK1Anzw2zOg=; b=4SIzT3QFdjP3DJ rKzMfoDp86/QyrtrXpM2wyiLj0smcb1Fg0VxpPpz8rCbEuXa5AoViBcGmH4aR/N3T7JVhgYo0qGqt 7s6iMbfMWRpaq9qTFO55l7maaBDrmbau8vlYNRvEJmgghB3N9/7dp3VDXIvBOT6Z+l7auHsMd6LSE lDXrMsRlLEm9Uk6GVkrX6j1WuA1nhXfjPhvf6q7EprSAI7xfAkjVF17lwkMKvVImAvh+dCCpFfhVw XeHsmBafgAyvILHVBoOSlNl35NejAPc5siginF6TmFa17jtswP8/Hq9FRwwBS7U10JMK3a2exj4+H J7QDvM5jqbH1Kx4ORWmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omvLp-000uXi-VK; Mon, 24 Oct 2022 11:10:38 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omvLm-000uXB-N3 for linux-arm-kernel@lists.infradead.org; Mon, 24 Oct 2022 11:10:36 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id CFEAE320092A; Mon, 24 Oct 2022 07:10:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 24 Oct 2022 07:10:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm3; t=1666609832; x=1666696232; bh=gb hK/eMcTlKbenVeIyYgpWT6RRs4ePlOWO1qBGWrAKg=; b=cYSOFk+XBLFUytwYYW k8sZ52HdfuVanKe7QeCD11V0YG8oWV+WfXOsh44ndupJIeBsEpMtqt0XzzYRoHkm T6Wh0SUwDOp2toWrUMt23Gkk+hqJ5R7ojdMSmhl2yo5FF1yqlvrxkRafSgtDcgL5 jyJCM5PvGgT5H4NazJ3euvcHzEz5rSVo8kDs2M0V5IawWvjJkRRsQPIT7bas3LjI S69vP85lYZoh8a0n+wMmmgwW5L7qXHqsrVtw8TLpEN7GyOa3lECLrzJo1xbVRkgj VjxODEqZrl4tdd9G2x+t41LjhCuoLO8cg7BBUKJFHSuzgruZPBigvbJUle8a9KX4 jSlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1666609832; x=1666696232; bh=gbhK/eMcTlKbe nVeIyYgpWT6RRs4ePlOWO1qBGWrAKg=; b=oBCu9z2eauloy/0TjSHQq2tIMrAwk 9Km027WomJnOG9tl6XEtM/fi2qp31kT681CfU8Z2UnOeiLORtFbD+tX/0qWmDVek M1emND0dUIJVrmMA3zJ2rmGiD1v26gEtw51M8x9Rzu2270AAeLiDBjyh2f0CQuwv oAKpV7iXFTxpa2GKFLm7X61bHLmINB+fyRn4OXh/fEDDuA4q6Q2vUL6N6gd7fiB7 zQo+VSMi6K5yMp8OeMb0MfYiF07JYcSWedBdhf5NjgJ/Fi1pBG4Ye65oseLRK3yg kglp3mKOJpT5ajccMeWYzUJvr4DRDOxHJuA5JOlSRPJpbTnVZg+n2Ol8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgedtgedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffogggtgfesthekre dtredtjeenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeegtddvffefff ejkeeggfegteffffdtueevkeefvdejveetvdeuuddvvddtiefgleenucffohhmrghinhep lhifnhdrnhgvthdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedr mhgv X-ME-Proxy: Feedback-ID: ifd214418:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Oct 2022 07:10:22 -0400 (EDT) From: Alistair Francis To: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linus.walleij@linaro.org, s.hauer@pengutronix.de, robh+dt@kernel.org, andreas@kemnade.info, krzysztof.kozlowski+dt@linaro.org, alistair23@gmail.com, dmitry.torokhov@gmail.com, rydberg@bitmath.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v9 0/4] Add support for the Cypress cyttsp5 Date: Mon, 24 Oct 2022 21:10:13 +1000 Message-Id: <20221024111017.43859-1-alistair@alistair23.me> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221024_041034_804795_C82AAE33 X-CRM114-Status: GOOD ( 13.86 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This patch series builds on top of [1] and adds support for the cyttsp5 touchscreen controller for the reMarkable 2. I first tried to add an I2C HID device. Although the cyttsp5 has some HID looking aspects it is not HID compatible. Just in trying to probe the device I found: - The HID descriptor has extra padding - [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [64.147.123.25 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [64.147.123.25 listed in wl.mailspike.net] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org This patch series builds on top of [1] and adds support for the cyttsp5 touchscreen controller for the reMarkable 2. I first tried to add an I2C HID device. Although the cyttsp5 has some HID looking aspects it is not HID compatible. Just in trying to probe the device I found: - The HID descriptor has extra padding - The HID descriptor sets the high bytes of the descriptor length - The HID descriptor has extra unrecognised tags - The HID reset command doesn't appear to work I don't think there is a way to use the I2C HID framework with the cyttsp5. For anyone interested you can see the work here [2]. In that branch though I can only obtain a HID descriptor, nothing else works without more core changes. So instead I rebased the series from [1]. Converted to the new yaml DTS documentation, added regulator support and fixed a x/y miscalculation bug. 1: https://lwn.net/ml/linux-kernel/20180703094309.18514-1-mylene.josserand@bootlin.com/ 2: https://github.com/alistair23/linux/commits/rM2-mainline-cyttsp5-hid v9: - Fixup kernel robot failures v8: - Rebase and resend v7: - Fix device tree warnings v6: - Use reg for the button properties v5: - Address review comments from v4 Alistair Francis (4): Input: Add driver for Cypress Generation 5 touchscreen dt-bindings: input: Add Cypress TT2100 touchscreen controller ARM: imx_v6_v7_defconfig: Enable the cyttsp5 touchscreen ARM: dts: imx7d-remarkable2: Enable the cyttsp5 .../input/touchscreen/cypress,tt21000.yaml | 100 ++ arch/arm/boot/dts/imx7d-remarkable2.dts | 100 ++ arch/arm/configs/imx_v6_v7_defconfig | 1 + drivers/input/touchscreen/Kconfig | 16 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/cyttsp5.c | 902 ++++++++++++++++++ 6 files changed, 1120 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml create mode 100644 drivers/input/touchscreen/cyttsp5.c