From patchwork Tue Aug 30 11:21:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 12959126 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01D12ECAAD4 for ; Tue, 30 Aug 2022 11:23:27 +0000 (UTC) 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=RuUEp1n9qFrskskvmI6R3UjA81uhShAqT+Hs3ued1x0=; b=j87pKUxozWqQRc WQrb19cEG1H79FXlr6BkrcVzeS+5JmscpP7dpzWs56/S9utijsfE8XDAsJffT05likMNY6VHposMQ p5cnH0CvSKYb/7I1KCT4Wx09lyKHsHG4yPjEGwHDoO3foZl5WbACXL6Xp/LP13hUl4jGj81OaCKPX KgKHAkLyk0IhZ5KnIvnrxA43swr662/+vXDSiKtXjzF5yQFN4oFQA2yEr+QJd083Br5WLNy2CYnkG QZhPq9wJAWDiRlNBmUzF5Yuv4bNM3EJckExTH2ut9xWLV8Rk8Ihw71qtwnQOlVHKeDQw11Kp9miyx 9ZsGhxC7JaqaRmb/PD6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSzJU-00GXEa-K0; Tue, 30 Aug 2022 11:21:49 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSzJM-00GX9m-IO for linux-arm-kernel@lists.infradead.org; Tue, 30 Aug 2022 11:21:42 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSzJ7-0000k6-BY; Tue, 30 Aug 2022 13:21:25 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oSzJ5-002rKh-LL; Tue, 30 Aug 2022 13:21:23 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oSzJ5-008dgv-0q; Tue, 30 Aug 2022 13:21:23 +0200 From: Oleksij Rempel To: Shawn Guo , Sascha Hauer , Rob Herring , Krzysztof Kozlowski , =?utf-8?q?S=C3=B8r?= =?utf-8?q?en_Andersen?= , Sam Ravnborg Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , Fabio Estevam Subject: [PATCH v1 1/1] ARM: dts: imx6: skov: migrate to resistive-adc-touch Date: Tue, 30 Aug 2022 13:21:21 +0200 Message-Id: <20220830112121.2059062-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220830_042140_644150_99D57AE8 X-CRM114-Status: GOOD ( 11.38 ) 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Start to use more generic resistive-adc-touch node. ti,tsc2046 is an ADC controller used for resistive touchscreen. So, define it as ADC and attach resistive-adc-touch to it. Signed-off-by: Oleksij Rempel --- arch/arm/boot/dts/imx6qdl-skov-cpu-revc.dtsi | 65 ++++++++++++++------ 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-skov-cpu-revc.dtsi b/arch/arm/boot/dts/imx6qdl-skov-cpu-revc.dtsi index 8254bce1b8a22..b81799d7076aa 100644 --- a/arch/arm/boot/dts/imx6qdl-skov-cpu-revc.dtsi +++ b/arch/arm/boot/dts/imx6qdl-skov-cpu-revc.dtsi @@ -2,35 +2,60 @@ // // Copyright (C) 2020 Pengutronix, Ulrich Oelmann +/ { + touchscreen { + compatible = "resistive-adc-touch"; + io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, <&adc_ts 5>; + io-channel-names = "y", "z1", "z2", "x"; + touchscreen-min-pressure = <65000>; + touchscreen-inverted-y; + touchscreen-swapped-x-y; + touchscreen-x-plate-ohms = <300>; + touchscreen-y-plate-ohms = <800>; + }; +}; + &ecspi4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi4>; cs-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; status = "okay"; - touchscreen@0 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_touch>; - compatible = "ti,tsc2046"; + adc_ts: adc@0 { + compatible = "ti,tsc2046e-adc"; reg = <0>; + pinctrl-0 = <&pinctrl_touch>; + pinctrl-names ="default"; spi-max-frequency = <1000000>; interrupts-extended = <&gpio3 19 IRQ_TYPE_LEVEL_LOW>; - vcc-supply = <®_3v3>; - pendown-gpio = <&gpio3 19 GPIO_ACTIVE_LOW>; - ti,x-plate-ohms = /bits/ 16 <850>; - ti,y-plate-ohms = /bits/ 16 <295>; - ti,pressure-min = /bits/ 16 <2>; - ti,pressure-max = /bits/ 16 <1500>; - ti,vref-mv = /bits/ 16 <3300>; - ti,settle-delay-usec = /bits/ 16 <15>; - ti,vref-delay-usecs = /bits/ 16 <0>; - ti,penirq-recheck-delay-usecs = /bits/ 16 <100>; - ti,debounce-max = /bits/ 16 <100>; - ti,debounce-tol = /bits/ 16 <(~0)>; - ti,debounce-rep = /bits/ 16 <4>; - touchscreen-swapped-x-y; - touchscreen-inverted-y; - wakeup-source; + #io-channel-cells = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <1>; + settling-time-us = <700>; + oversampling-ratio = <5>; + }; + + channel@3 { + reg = <3>; + settling-time-us = <700>; + oversampling-ratio = <5>; + }; + + channel@4 { + reg = <4>; + settling-time-us = <700>; + oversampling-ratio = <5>; + }; + + channel@5 { + reg = <5>; + settling-time-us = <700>; + oversampling-ratio = <5>; + }; }; };