From patchwork Thu Dec 2 12:20:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 1562670 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: bilbo.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=IIxel192; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=alistair23.me header.i=@alistair23.me header.a=rsa-sha256 header.s=fm2 header.b=x0Bb2FkW; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=Mk0lZ9Gd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4Zw45W1Kz9sRN for ; Thu, 2 Dec 2021 23:27:16 +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=kGoirpFF9wbu/c2fd+r+DFPKCqVEJFlPTZnHsg+Sf3E=; b=IIxel192DsWmAS GuelxDoUGrTjRr9berD2NEVp+tyGRcx7zURnfyLf6TKiLBGTjpPtcUf0WipqdvFppE6uklnSTQX2X 1eA2V6YWyoM1XpmkjY0x4jYeluEJ77Vu91fMy1uAaCe9N66SbBsV8TH7WluG2X6S9a1A70cjJjDZ2 8HKCrFh6NSu/CY8snL7A6xwbXkQmUJ4xQzxA9Gb8lM5q2NZBVh2c7gFa2yxKx6F5yK6amO33lbMet ZHhzT6gV1K0rHnHHOgQ4tGk6GXGCJk8AS4CrIG87N+l4SFsnNreOGEfM5aJEDGx/Cvf7gbYy6gr1d rqChOSYt1a5VKWWimN8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mslAc-00CHEG-MW; Thu, 02 Dec 2021 12:26:40 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msl4f-00CFFT-0x for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:20:30 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 3E10558030B; Thu, 2 Dec 2021 07:20:28 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 02 Dec 2021 07:20:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm2; bh=nFpd1cboO2xZsxTL6uy9AKL5Uy 6bj9BzOleJyoKqzCo=; b=x0Bb2FkWXHXVxFIephoeZcZ0kVvUq9EKv8PsZzqTKg 37e9wYLc58oVY2mtNO/5JeVDzVvUatA+WLvBjJz2ZBskee+3fUNVl9bGAngspM1j e2CBN3RQQ7cFMU6dRtA0YDboW7lB2DPYWIjzWRI1upIHvBBA25Y68xQ4cJl0rsE5 ALR0U9NVmx1q/ivoJwJI5rFWExFr7R0Q6ztEye3zKDKEXXibaQFH/UAqLpYJQ/p5 kxLYh1NUXqit2LJQYIqmSMs4TARPnWjd6rv7PwOmWrPQR5lhlN5ASHFkt9i9TmBk rnFLNddLKbe/k+iS5wx8vMg96n5tj7kIAoujsNyGSlqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=nFpd1c boO2xZsxTL6uy9AKL5Uy6bj9BzOleJyoKqzCo=; b=Mk0lZ9Gd2+G4bm/d+6ZNsX uOySrk82VpgDxnrvN/XaTsLIKEWUkg6fSuaaLHmUP0UDzAGGZ6lIetrKjPRtLyPt xVW5MCB6W4BOLCYnYzQiJT6BG79wJberk1B34swKjN44ythE+ZXM3EzhZcP/Hdk4 FwHPp9fiARCiHvQKecej96kJBqnJLBKcUvh0lH89OZwPkrNg1mzW8jUlEUI3dHqI B4OH+BDu+udBg8nJBm2Yjt4OsATm+682Aq8PDaiU4T1a19eeXgpRdTeP82+VhCZR XqIg07tg5wkIufUMZ5hYja81yYsa31+hVRp4GdqSY4hR8ztkM1TW9uBm/Gcg571w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffogggtgfesthhqredtre dtjeenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhr segrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeffledvgeevfeevfe dvvdffieetfefgjeevgeeitefhkeeghfelueekhfejheffgfenucffohhmrghinheplhif nhdrnhgvthdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:20:23 -0500 (EST) From: Alistair Francis To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: robh+dt@kernel.org, andreas@kemnade.info, alistair23@gmail.com, dmitry.torokhov@gmail.com, linus.walleij@linaro.org, rydberg@bitmath.org, Alistair Francis Subject: [PATCH v3 0/4] Add support for the Cypress cyttsp5 Date: Thu, 2 Dec 2021 22:20:17 +1000 Message-Id: <20211202122021.43124-1-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_042029_191389_9FD85AAE X-CRM114-Status: GOOD ( 11.58 ) 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 [66.111.4.224 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 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 Alistair Francis (2): ARM: imx_v6_v7_defconfig: Enable the cyttsp5 touchscreen ARM: dts: imx7d: remarkable2: Enable the cyttsp5 Mylène Josserand (2): Input: Add driver for Cypress Generation 5 touchscreen Documentation: DT: bindings: input: Add documentation for cyttsp5 .../input/touchscreen/cypress,tt21000.yaml | 92 ++ arch/arm/boot/dts/imx7d-remarkable2.dts | 89 ++ arch/arm/configs/imx_v6_v7_defconfig | 1 + drivers/input/touchscreen/Kconfig | 14 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/cyttsp5.c | 1002 +++++++++++++++++ 6 files changed, 1199 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml create mode 100644 drivers/input/touchscreen/cyttsp5.c