From patchwork Wed Oct 26 11:49:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 619045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACBF9ECDFA1 for ; Wed, 26 Oct 2022 11:50:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233476AbiJZLuC (ORCPT ); Wed, 26 Oct 2022 07:50:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233378AbiJZLty (ORCPT ); Wed, 26 Oct 2022 07:49:54 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 430B954656; Wed, 26 Oct 2022 04:49:53 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8A4683200920; Wed, 26 Oct 2022 07:49:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 26 Oct 2022 07:49:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1666784991; x= 1666871391; bh=x94I9aHfmLGjXqYb5dRoF5FSksxj73tYDSpz7akLDtk=; b=u 8bjBeOEKF0NjdTyIRK5jloQAvA7PGK9D2SzNLUNxJkTs4gUkMT8jNn94vQvWMGlX qNVeIQVy0G7KzMbPpY1f0v/Arj5oEk8ni45bCrwO93smM2ERhv5QO2zspucSd2XM 8vn3LMF8cEmDW9KzN/J6WwqhNg/dX8s0ZZB8yTccMrdGxs3BijLeMWqJvmKWRoWY +x/VHooDlOPAe9BD1NT0yIb9P3jgo3EuCsCT1FK9u07BCrKRrnYxsBJEh4PpxGnd f1Ed+epu9OVJ+h9DK0uL0g5YBxrqun3pgpWrRlDw35q+4x2vfymmgnwuV8DvItUo RdWgMuaXWzXoMl9scT2Kg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references: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=1666784991; x=1666871391; bh=x94I9aHfmLGjX qYb5dRoF5FSksxj73tYDSpz7akLDtk=; b=jPbxo/K77NBZ+i73snaMWtiOnP9Z7 1g980tfMeZADTmsNX6UdxSJtzvqzS83gyDCfxFOfB6n6H2EMFulq0RBa0zMyDmwh 110f5YnJZGYCLgv3O51bsbP5CnJ4iCf3JoVNr2zTKZf2yD7e/rsYm0XHjBVFrUmq CMeRKRzu0jdWMnd3J7yCh0nXBwJjotFzI2spGQa8n4F9vmDpeSseYpeTlqp9rdPU GriT7535zHBFMpNSocSQiIkmCsnPB0nu/XQLXedpwcJkq/2FA4TnkX0QizG2QB6S DGfskHTCQnq0dHQinJefaKiTN2sTW83Ayb7WOUFKD6sYVOvhby7UdN5rw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrtddvgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhhishht rghirhcuhfhrrghntghishcuoegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg eqnecuggftrfgrthhtvghrnheplefgffeuheevvdekgefghfegueeuteetueekteevgedt ffejvefguedujeeljeevnecuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishht rghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Feedback-ID: ifd214418:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Oct 2022 07:49:42 -0400 (EDT) From: Alistair Francis To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, robh+dt@kernel.org, dmitry.torokhov@gmail.com, shawnguo@kernel.org, rydberg@bitmath.org, alistair23@gmail.com, s.hauer@pengutronix.de, andreas@kemnade.info, Alistair Francis , Rob Herring Subject: [PATCH v10 2/4] dt-bindings: input: Add Cypress TT21000 touchscreen controller Date: Wed, 26 Oct 2022 21:49:06 +1000 Message-Id: <20221026114908.191472-3-alistair@alistair23.me> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221026114908.191472-1-alistair@alistair23.me> References: <20221026114908.191472-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings documentation. It can use I2C or SPI bus. This touchscreen can handle some defined zone that are designed and sent as button. To be able to customize the keycode sent, the "linux,code" property in a "button" sub-node can be used. Signed-off-by: Alistair Francis Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- .../input/touchscreen/cypress,tt21000.yaml | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml diff --git a/Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml b/Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml new file mode 100644 index 000000000000..1959ec394768 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/cypress,tt21000.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cypress TT21000 touchscreen controller + +description: The Cypress TT21000 series (also known as "CYTTSP5" after + the marketing name Cypress TrueTouch Standard Product series 5). + +maintainers: + - Alistair Francis + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + const: cypress,tt21000 + + reg: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + interrupts: + maxItems: 1 + + vdd-supply: + description: Regulator for voltage. + + reset-gpios: + maxItems: 1 + + linux,keycodes: + description: EV_ABS specific event code generated by the axis. + +patternProperties: + "^button@[0-9]+$": + type: object + $ref: ../input.yaml# + properties: + reg: + maxItems: 1 + linux,keycodes: + description: Keycode to emit + + required: + - reg + - linux,keycodes + + additionalProperties: false + +required: + - compatible + - reg + - interrupts + - vdd-supply + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + touchscreen@24 { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "cypress,tt21000"; + reg = <0x24>; + pinctrl-names = "default"; + pinctrl-0 = <&tp_reset_ds203>; + interrupt-parent = <&pio>; + interrupts = <1 5 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; + vdd-supply = <®_touch>; + + button@0 { + reg = <0>; + linux,keycodes = ; + }; + + button@1 { + reg = <1>; + linux,keycodes = ; + }; + + button@2 { + reg = <2>; + linux,keycodes = ; + }; + }; + }; +... From patchwork Wed Oct 26 11:49:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 619044 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3244ECDFA1 for ; Wed, 26 Oct 2022 11:50:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233379AbiJZLui (ORCPT ); Wed, 26 Oct 2022 07:50:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233532AbiJZLuS (ORCPT ); Wed, 26 Oct 2022 07:50:18 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79DDE69F43; Wed, 26 Oct 2022 04:50:17 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id D57123200920; Wed, 26 Oct 2022 07:50:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 26 Oct 2022 07:50:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1666785015; x= 1666871415; bh=1JPk0MpObCRGBh/PsXpo7zlYyOMqvhTBfteOa6rLuqs=; b=j DHHl0rP08l5hV/1B4EVS6p45n/+GQvGNG68mmx8hSDE171K4dxchgvlffkiLAW6A GtlgsX7MuZqnS4bqtONP5455PVs3avCcWWXep4idX4dT7MBMBLL+K+bQYmJjbSoT D2M0tu6lI+80RD+FT9bj66TWV+16QvF+eWmk3SJXzVSZE34PGDe57vANPrPq9BDu acBym+wxgQYIXMDmva2Jq9pOrvA7nRGF0cHYN8ZpwLj5bNuvrW0aoh0pkQpR8V45 0LOL9ZP6kTkTHe9FkCJ+R5NDWhlFteF7WqRxIiG2/Rh10HFVd1GIJxvvxKyj5DJE qnOi2mbEzOMAsCH1ZWatg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references: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=1666785015; x=1666871415; bh=1JPk0MpObCRGB h/PsXpo7zlYyOMqvhTBfteOa6rLuqs=; b=UtTrie9ZUM2X3VisTWV0pnVUQRPGm plFc044JhPC9UER0vioKS4w37iJcal52jU2M+wZc5XFPm1Qk0/nI6z32alVQw3Vx 3c+shG0Xo7mR/dtmfH3Qg/j+rwBXubM9t/5HGWMgHdCDgmT/sacQca/21y359/T3 7o80TorwMg3aHQqY+IEmclwJyjXdCep+G+e7ahKlt9W678+4T1Yggh1zFJ527WIR sXedCpfbJza8iTxsFklOJP6VvUsvSy6IJ7fEQ6wVEcqGjNHylUbsEwFMdl3hzHDi Rmk7YaeRk4o39hNJ1+yHCNf5iY+cQ9ofAMdyW8tE/jmYOBL1pUj9myzOA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrtddvgdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeitdefkeetle dvleevveeuueejffeugfeuvdetkeevjeejueetudeftefhgfehheenucevlhhushhtvghr ufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Feedback-ID: ifd214418:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Oct 2022 07:50:05 -0400 (EDT) From: Alistair Francis To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, robh+dt@kernel.org, dmitry.torokhov@gmail.com, shawnguo@kernel.org, rydberg@bitmath.org, alistair23@gmail.com, s.hauer@pengutronix.de, andreas@kemnade.info, Alistair Francis Subject: [PATCH v10 4/4] ARM: dts: imx7d-remarkable2: Enable the cyttsp5 Date: Wed, 26 Oct 2022 21:49:08 +1000 Message-Id: <20221026114908.191472-5-alistair@alistair23.me> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221026114908.191472-1-alistair@alistair23.me> References: <20221026114908.191472-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add support for the cyttsp5 touchscreen controller for the reMarkable 2. Signed-off-by: Alistair Francis --- arch/arm/boot/dts/imx7d-remarkable2.dts | 100 ++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-remarkable2.dts b/arch/arm/boot/dts/imx7d-remarkable2.dts index a2a91bfdd98e..fea480af8e48 100644 --- a/arch/arm/boot/dts/imx7d-remarkable2.dts +++ b/arch/arm/boot/dts/imx7d-remarkable2.dts @@ -8,6 +8,7 @@ /dts-v1/; #include "imx7d.dtsi" +#include / { model = "reMarkable 2.0"; @@ -47,6 +48,18 @@ reg_digitizer: regulator-digitizer { startup-delay-us = <100000>; /* 100 ms */ }; + reg_touch: regulator-touch { + compatible = "regulator-fixed"; + regulator-name = "VDD_3V3_TOUCH"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pinctrl_touch_reg>; + pinctrl-1 = <&pinctrl_touch_reg>; + gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; @@ -84,6 +97,70 @@ wacom_digitizer: digitizer@9 { }; }; +&i2c3 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3>; + status = "okay"; + + tsc@24 { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "cypress,tt21000"; + reg = <0x24>; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_touch>; + interrupt-parent = <&gpio1>; + interrupts = <14 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + vdd-supply = <®_touch>; + touchscreen-size-x = <880>; + touchscreen-size-y = <1280>; + + button@0 { + reg = <0>; + linux,keycodes = ; + }; + + button@1 { + reg = <1>; + linux,keycodes = ; + }; + + button@2 { + reg = <2>; + linux,keycodes = ; + }; + + button@3 { + reg = <3>; + linux,keycodes = ; + }; + + button@4 { + reg = <4>; + linux,keycodes = ; + }; + + button@5 { + reg = <5>; + linux,keycodes = ; + }; + + button@6 { + reg = <6>; + linux,keycodes = ; + }; + + button@7 { + reg = <7>; + linux,keycodes = ; + }; + }; +}; + &snvs_pwrkey { status = "okay"; }; @@ -177,6 +254,15 @@ MX7D_PAD_SAI1_TX_BCLK__GPIO6_IO13 0x14 >; }; + pinctrl_touch: touchgrp { + fsl,pins = < + /* CYTTSP interrupt */ + MX7D_PAD_GPIO1_IO14__GPIO1_IO14 0x54 + /* CYTTSP reset */ + MX7D_PAD_GPIO1_IO13__GPIO1_IO13 0x04 + >; + }; + pinctrl_i2c1: i2c1grp { fsl,pins = < MX7D_PAD_I2C1_SDA__I2C1_SDA 0x4000007f @@ -184,6 +270,20 @@ MX7D_PAD_I2C1_SCL__I2C1_SCL 0x4000007f >; }; + pinctrl_i2c3: i2c3grp { + fsl,pins = < + MX7D_PAD_I2C3_SDA__I2C3_SDA 0x4000007f + MX7D_PAD_I2C3_SCL__I2C3_SCL 0x4000007f + >; + }; + + pinctrl_touch_reg: touchreggrp { + fsl,pins = < + /* TOUCH_PWR_EN */ + MX7D_PAD_GPIO1_IO11__GPIO1_IO11 0x14 + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79