From patchwork Tue Jun 30 06:54:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanchayan X-Patchwork-Id: 6694171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0FC3FC05AC for ; Tue, 30 Jun 2015 07:01:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7B4D205E8 for ; Tue, 30 Jun 2015 07:01:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E25B8205E5 for ; Tue, 30 Jun 2015 07:00:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9pVH-00051c-Si; Tue, 30 Jun 2015 06:58:47 +0000 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9pUm-0004oI-Qz for linux-arm-kernel@lists.infradead.org; Tue, 30 Jun 2015 06:58:17 +0000 Received: by pabvl15 with SMTP id vl15so712465pab.1 for ; Mon, 29 Jun 2015 23:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=f5fI+Osd0CX5wWWf3bLXXceRnfSlca13aF5z07FqSns=; b=Z5MW9HDAGg8xrOIh/57OlHw0CLiOmwoJ9Qgo7gVhce2dkSPOlNI/0A7d+dRUEQgRV5 +L7tLvMhiyJE8lNZVU7t2XljOLjXjzXB5NFGPco0bBYZRlWRAI6KNGBx3NNGnku+GiSc ddImgdmOcref20rIVyQyatIhCtIn7fZah1/ZAuqYYJ9fDEuomFABvFEjSka3/zZpTA4e iDusGGq6mbS4M0EHqJUc9V/zCdm+I5p30ZMTfChPm+ClD09sAZrdDHCipNSkVK7N+T7f HncDJeLYyAw1TG//QSIPcCE+yT1m8VJaMnJ079Af4rCO6ZKLro0OeMq3SO8/h8ZxZ3Vz IueA== X-Received: by 10.67.8.71 with SMTP id di7mr40758551pad.46.1435647474106; Mon, 29 Jun 2015 23:57:54 -0700 (PDT) Received: from localhost ([115.115.225.206]) by mx.google.com with ESMTPSA id k5sm44427248pda.34.2015.06.29.23.57.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jun 2015 23:57:52 -0700 (PDT) From: Sanchayan Maity To: linux-input@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v1 2/4] ARM: dts: vf500-colibri: Add device tree node for touchscreen support Date: Tue, 30 Jun 2015 12:24:46 +0530 Message-Id: <2fa8c45a15acc7fdcf75611d46530a643858115d.1435646447.git.maitysanchayan@gmail.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150629_235816_972066_372A8B7D X-CRM114-Status: GOOD ( 10.98 ) X-Spam-Score: -2.0 (--) Cc: mark.rutland@arm.com, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, linux-kernel@vger.kernel.org, stefan@agner.ch, Sanchayan Maity , robh+dt@kernel.org, kernel@pengutronix.de, galak@codeaurora.org, shawn.guo@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add device tree node for touchscreen support on Colibri VF50. The touchscreen functionality on VF50 uses the ADC channels of Vybrid and some GPIOs. Also add pinctrl nodes for proper pinmux. Signed-off-by: Sanchayan Maity --- arch/arm/boot/dts/vf500-colibri-eval-v3.dts | 4 +++ arch/arm/boot/dts/vf500-colibri.dtsi | 46 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/arch/arm/boot/dts/vf500-colibri-eval-v3.dts b/arch/arm/boot/dts/vf500-colibri-eval-v3.dts index 7fc782c..c5efb57 100644 --- a/arch/arm/boot/dts/vf500-colibri-eval-v3.dts +++ b/arch/arm/boot/dts/vf500-colibri-eval-v3.dts @@ -15,3 +15,7 @@ model = "Toradex Colibri VF50 on Colibri Evaluation Board"; compatible = "toradex,vf500-colibri_vf50-on-eval", "toradex,vf500-colibri_vf50", "fsl,vf500"; }; + +&touchctrl { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/vf500-colibri.dtsi b/arch/arm/boot/dts/vf500-colibri.dtsi index cee34a3..4807a32 100644 --- a/arch/arm/boot/dts/vf500-colibri.dtsi +++ b/arch/arm/boot/dts/vf500-colibri.dtsi @@ -17,4 +17,50 @@ memory { reg = <0x80000000 0x8000000>; }; + + touchctrl: vf50_touchctrl { + compatible = "toradex,vf50-touchctrl"; + io-channels = <&adc1 0>,<&adc0 0>, + <&adc0 1>,<&adc1 2>; + xp-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + xm-gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>; + yp-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + ym-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; + pen-detect-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; + pen-pullup-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + pinctrl-names = "idle","default","gpios"; + pinctrl-0 = <&pinctrl_touchctrl_idle>; + pinctrl-1 = <&pinctrl_touchctrl_default>; + pinctrl-2 = <&pinctrl_touchctrl_gpios>; + status = "disabled"; + }; +}; + +&iomuxc { + vf610-colibri { + pinctrl_touchctrl_idle: touchctrl_idle { + fsl,pins = < + VF610_PAD_PTA18__GPIO_8 0x206d + VF610_PAD_PTA19__GPIO_9 0x206d + >; + }; + + pinctrl_touchctrl_default: touchctrl_default { + fsl,pins = < + VF610_PAD_PTA18__ADC0_SE0 0x2060 + VF610_PAD_PTA19__ADC0_SE1 0x2060 + VF610_PAD_PTA16__ADC1_SE0 0x2060 + VF610_PAD_PTB2__ADC1_SE2 0x2060 + >; + }; + + pinctrl_touchctrl_gpios: touchctrl_gpios { + fsl,pins = < + VF610_PAD_PTA23__GPIO_13 0x22ed + VF610_PAD_PTB23__GPIO_93 0x22ed + VF610_PAD_PTA22__GPIO_12 0x22ed + VF610_PAD_PTA11__GPIO_4 0x22ed + >; + }; + }; };