From patchwork Sun Jan 9 11:53:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 530869 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 E1E15C433EF for ; Sun, 9 Jan 2022 11:53:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235390AbiAILx5 (ORCPT ); Sun, 9 Jan 2022 06:53:57 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:32957 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235374AbiAILxy (ORCPT ); Sun, 9 Jan 2022 06:53:54 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 41C3B58036F; Sun, 9 Jan 2022 06:53:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 09 Jan 2022 06:53:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm3; bh= ogqpXTTRIytQdTC0K2kwz73G1qDnNrXafwRfEMjPnDc=; b=Oa8fijUljMkdYTuo xhRkIuovTDaARQ7upp1IWuE9c7eCzw0zZz4ZniwaduTSpG5sJcKM2Jsiz9JuB1VX 3FG7ej0g5UQWLuhqoYj/sC9eVycKgCeyT4l7j/dFsBjfTNEHxt1llIloyx0GrcH8 1NSNU9JC1QdPDMpSkmEtklgCDCsV7gUCuR43j0dYQCDw3eoBN3TtuK2AquL8V69h e6fnZ4JZHlsj8+Doce3kU5eSUg2v5Y83tRWUkNaEYFlv5zskNB7FVk5rdzie0uJf y21ZhVnarwVoFzX5f2pcIWXWBgTDHOQjVg/oEsrVT4cxK3/8SlSciHlYXiSOIpx1 g4MCpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ogqpXTTRIytQdTC0K2kwz73G1qDnNrXafwRfEMjPn Dc=; b=E9CW/iGFec4xzgAr5iRhzLc/L4dhfRsG1XeFwaeoKUsrY1/bZg7uRTml6 TBWGHZ7LYyicoXf6Xha7mP8yC9hr/1XtSqRi/EX3x8w6npHmVI3SHPMZf5Qtkvi9 KztfXZMHFdubvvemRc3RpaNX/JpazF5gENacT+kl/ozlGWUNRuWKJAJBwIlKEMt5 zD5i/KyiQsJx58kBrzMT2/T+aq2lb/4NrE8Z70e5Hm7YicnC8AOXI76rKw3G92ol yncV7mSOqcsfMG3dtXebnz3RVyQa5DlsLcG4UxumqG1uIHFb1Hsl9udXBNfaOWzL 3OxPWUQdvRHCsrjl8M54dqyoHfc9w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudegkedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheptehlihhs thgrihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmh gvqeenucggtffrrghtthgvrhhnpeefudehhfevgfffleeiffehuddvgedtueeujeeifefh jeejvdeivddugfehfeehjeenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhs thgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Jan 2022 06:53:49 -0500 (EST) From: Alistair Francis To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: dmitry.torokhov@gmail.com, rydberg@bitmath.org, andreas@kemnade.info, linus.walleij@linaro.org, alistair23@gmail.com, robh+dt@kernel.org, =?utf-8?q?Myl=C3=A8ne_Josserand?= , Alistair Francis Subject: [PATCH v5 2/4] dt-bindings: input: Add Cypress TT2100 touchscreen controller Date: Sun, 9 Jan 2022 21:53:29 +1000 Message-Id: <20220109115331.388633-3-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220109115331.388633-1-alistair@alistair23.me> References: <20220109115331.388633-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Mylène Josserand 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: Mylène Josserand Signed-off-by: Alistair Francis --- .../input/touchscreen/cypress,tt21000.yaml | 92 +++++++++++++++++++ 1 file changed, 92 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..acd2d9389f8c --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml @@ -0,0 +1,92 @@ +# 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 TT2100 touchscreen controller + +description: The Cypress TT2100 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 + + interrupts: + maxItems: 1 + + vdd-supply: + description: Regulator for voltage. + + reset-gpios: + maxItems: 1 + + linux,code: + $ref: /schemas/types.yaml#/definitions/uint32 + description: EV_ABS specific event code generated by the axis. + +patternProperties: + "^button-[0-9]+$": + type: object + properties: + linux,code: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Keycode to emit + + required: + - linux,code + + additionalProperties: false + +required: + - compatible + - reg + - interrupts + - vdd-supply + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + touchscreen@24 { + 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 { + linux,code = ; + }; + + button-1 { + linux,code = ; + }; + + button-2 { + linux,code = ; + }; + }; + }; +... From patchwork Sun Jan 9 11:53:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 530868 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 C7A77C433F5 for ; Sun, 9 Jan 2022 11:54:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235384AbiAILyF (ORCPT ); Sun, 9 Jan 2022 06:54:05 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:46453 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235391AbiAILyD (ORCPT ); Sun, 9 Jan 2022 06:54:03 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 3087658036F; Sun, 9 Jan 2022 06:54:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 09 Jan 2022 06:54:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=liWNH9cngrKwH G/iQAoSwWAxTQqxW15kZvnIgwu8SwU=; b=cboZRsWYwKPdbffWxfww33xQDo0vD Ep4ViXirP7xaQDkH6hMOf+YgadAj1oUIIGwibcOpTVB5tXut4W9tapzvaI7dj49G ijWFEjw2Q+AyNJ7mU3f6YnLTDUyFHHmA9u2u0k5WJbJGLROFqleuq0q3VI8Hg2lD LseFGxYBbNFfEZ9esvesz496wZbir/hVRetOhMoq7pqUdzTu6hnx9osyoqLOZ/Fd nBTTUL3WpMFgv8+jVwqSrPhcEgdNa3Yx8OmDoIC3OmyayO789vrR33ciTVKXrYQX EAlsa8wCvA7LNVjjtib+ajgTz/zIQ+YVh03vaE2xaYPBT/jcPsZErqHVQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=liWNH9cngrKwHG/iQAoSwWAxTQqxW15kZvnIgwu8SwU=; b=FDMnC1Tw d2NwocaWEn4wo9nLzLnziQ0cYavgqqafQtRUy7sn58TikzDGxmbDay+HNvbq1Lui HL9NuF8hvNz32bpCqTdQv+kvRdLEqZ+cdHm1C8vksIGt1Zvg0jdmtNm+882yNTz+ aiEW4Xt6RIOjjIOTedPNnTophkxZ9BYDcJUN0Pe4CNTepJ47ZC/+OFrKxltXF9Cu dt5vU2mnDpr9Au23OEQ6ArdWrYwMHiTjpZp5I57oEHKQEnTEimrxWGQiBBym5PXj z+aU5dRO1GYTeb6oOilsxeIPm9+tC2qisp/Yqvm2CZzFyJQ8WXJ+Ftq/8YsXwsun KfupYFfRS0z6Pw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudegkedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Jan 2022 06:53:58 -0500 (EST) From: Alistair Francis To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: dmitry.torokhov@gmail.com, rydberg@bitmath.org, andreas@kemnade.info, linus.walleij@linaro.org, alistair23@gmail.com, robh+dt@kernel.org, Alistair Francis Subject: [PATCH v5 4/4] ARM: dts: imx7d-remarkable2: Enable the cyttsp5 Date: Sun, 9 Jan 2022 21:53:31 +1000 Message-Id: <20220109115331.388633-5-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220109115331.388633-1-alistair@alistair23.me> References: <20220109115331.388633-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 | 89 +++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-remarkable2.dts b/arch/arm/boot/dts/imx7d-remarkable2.dts index 89cbf13097a4..f12d6805b214 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"; @@ -34,6 +35,18 @@ reg_brcm: regulator-brcm { startup-delay-us = <150>; }; + 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"; @@ -51,6 +64,59 @@ &clks { assigned-clock-rates = <0>, <32768>; }; +&i2c3 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3>; + status = "okay"; + + tsc@24 { + 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 { + linux,code = ; + }; + + button-1 { + linux,code = ; + }; + + button-2 { + linux,code = ; + }; + + button-3 { + linux,code = ; + }; + + button-4 { + linux,code = ; + }; + + button-5 { + linux,code = ; + }; + + button-6 { + linux,code = ; + }; + + button-7 { + linux,code = ; + }; + }; +}; + &snvs_pwrkey { status = "okay"; }; @@ -125,6 +191,29 @@ 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_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