From patchwork Mon Oct 24 11:10:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 8348 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp386315wru; Mon, 24 Oct 2022 04:20:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48rshET8rXTwYrtcimh7wkXJrHx+cTT5NKwn9hZqkIdWGBu5f4QlGWkhLO9H+ufuHkR7qc X-Received: by 2002:a17:907:ea7:b0:78f:4ae:965c with SMTP id ho39-20020a1709070ea700b0078f04ae965cmr26850461ejc.127.1666610430552; Mon, 24 Oct 2022 04:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666610430; cv=none; d=google.com; s=arc-20160816; b=mfWv+4mm81VV4PVQejSTYZj3YnTltc8keQ3GikPjR1VhvL7I9/tNBb51ayXUiKNL5m 32XnK33A2KvGCOEc98UCGdc3+EHpiXemssnpLGr1BpSUQk3883CM9qZoT/W2/SfkZ3LD vQaaOxcRgUzSFwRPAA788fCmwdviNj3dEEhHdW8g4ShllimVdxirKWeOmMr3J5iC2mxF NY+5nlEn8UipyTt+mHmXSN8Qs3Rm1NeS9raV7wg0SRUUNbZOnBYhLSYgjTemG6BySiUn Lm3spP5bR/ZYupcGB3EPwot5KtP9OXubDNsalHj/MNYuTTveTlJ86ZVRZITVILB+Y2S4 /aQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=1JPk0MpObCRGBh/PsXpo7zlYyOMqvhTBfteOa6rLuqs=; b=raTKSF8+lGcuJxdnXa++coY9qFQiaCQHuhU6R2gwwuwlexO3CHc0QSQLDnaWw7iuE+ HwCDW5bwTNjaIyh49uGoYXU9e5u6IL8FP75RJi6DC1Iv+4tmtCloG12Uzo4eXTTiHo0a EFt3k+pUq6GXpV1QCkKjy5NsmLoobMyY24F2rlGX0q3DrccMGnCnaHRxM4/sLlkoe7lj Gavfmd1Fd5zQO4ach5uyeb59dabEPAWNR93A89SR0y+Th9pDApZCXkQMMJ/yOzYCRTHs UiDeRsI+P0njnin5BUlS6weqVTpuBy/lE9fmaCSOCPb8MN9cP0Or93VMU8sQjF6CP+m7 hz6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm3 header.b=n1ExDT7A; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=WTxsEIKj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc11-20020a170907168b00b007269ef1872esi31460261ejc.897.2022.10.24.04.20.06; Mon, 24 Oct 2022 04:20:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm3 header.b=n1ExDT7A; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=WTxsEIKj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbiJXLLn (ORCPT + 99 others); Mon, 24 Oct 2022 07:11:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbiJXLLc (ORCPT ); Mon, 24 Oct 2022 07:11:32 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 588D3550B6; Mon, 24 Oct 2022 04:11:22 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C4BF43200583; Mon, 24 Oct 2022 07:11:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 24 Oct 2022 07:11:20 -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=1666609879; x= 1666696279; bh=1JPk0MpObCRGBh/PsXpo7zlYyOMqvhTBfteOa6rLuqs=; b=n 1ExDT7AbB1sMlwh/vTQ0GRv5wykFSDBtoPa3lPVb9vIfmFOJmzg/ELYbOj1yZWLq p9NyrgSJyAWUE8QqadW2NkuIJCF+JaaPRlweBZsXIIDqgiCN7bl0MMjz5H6rTLNa EWlZYhmVq7x26rNiW3qbDuTMAyPjfTTti6l7rLxe16RG5oIOE4EPINILLkxpwNyv DhNPuohviYvAlbvn6FVlbRgrp8WzAiiZbyDoZi+3R00/QNGtliaobPP7TVen+sPI PStZ2dVL8yclTXJpCtsCxajP9RdNykTHy8xmqWsv3lzD+LqanwXz939y0NM1bb5n LAH0X8n00sgTkY68t8hJg== 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=1666609879; x=1666696279; bh=1JPk0MpObCRGB h/PsXpo7zlYyOMqvhTBfteOa6rLuqs=; b=WTxsEIKjLOpy3GwzM/AXaggp+oFpK EvHKkHUv6uKOPdWfzFM79O7KDyJpSDb7ZHCIISSeeG5svrdjdh4ggoeFP9rcVlL8 iXQ40pl/cNZGqK/0oZGFLCzdylPiyAcf2F8PL+rrBH+2sRyCur3yG2NGn7LvqmcM Tl+tG6cvAetMwRHwYqpXnXTwQoVmZ7r+swK8aWhYdEs2cVOQ3AlFMNwWyaoEY7No dPGxkR+oCTJVLWGecJqo52xs7luWwkBTWlBI0uBFG7pOm7mTXEqjhABPypU1Tmmr 8mCsI93CYNcVB/Y33BHMX9KjtHxdPpuHbJLnwdrYtxenEKKCkMfhcx8Pw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgedtgedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishht rghirhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepiedtfeekte elvdelveevueeujeffuefguedvteekveejjeeutedufeethffgheehnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlh hishhtrghirhdvfedrmhgv X-ME-Proxy: Feedback-ID: ifd214418:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Oct 2022 07:11:12 -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 4/4] ARM: dts: imx7d-remarkable2: Enable the cyttsp5 Date: Mon, 24 Oct 2022 21:10:17 +1000 Message-Id: <20221024111017.43859-5-alistair@alistair23.me> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024111017.43859-1-alistair@alistair23.me> References: <20221024111017.43859-1-alistair@alistair23.me> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747567698827994601?= X-GMAIL-MSGID: =?utf-8?q?1747567698827994601?= 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