From patchwork Thu Jul 16 15:13:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanchayan X-Patchwork-Id: 6807851 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 505959F380 for ; Thu, 16 Jul 2015 15:17:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64FA920534 for ; Thu, 16 Jul 2015 15:17:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FF8F2052A for ; Thu, 16 Jul 2015 15:17:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752325AbbGPPQn (ORCPT ); Thu, 16 Jul 2015 11:16:43 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34293 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755161AbbGPPQl (ORCPT ); Thu, 16 Jul 2015 11:16:41 -0400 Received: by pacan13 with SMTP id an13so44601471pac.1; Thu, 16 Jul 2015 08:16:40 -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=sFXtFHKEtRomUOt0YfgD8V7gjkEPWcOfBQquAXUXLZQ=; b=Kno61MX4W0tXXBZCwL54rslnQD9j/gNEid3cmesH3irJEH+IdVH8OgoYe9mHX06mFr X8pOzJdKWsHe3mzS2YpkYAY50msc4y+KcUhLB2xny9MOc8WyXzGmhNWtLCI9Li6UChjG ReUJ9+CX7hIYv8DrT/FplUHMhJuBjM5u/Cj20UplG/+UizXF4UEZ3rzSBhvhjdGv0sDm Z5WgTdB7h8vkASfUW5SQ2IEMsCNzDS28Lv90YluvACNBIKPRJlmBJHVMFaxY4NRWhHYx 2tfXYgf96MFkwWP8jpAOoAvkfFQKXQK5xsdDvVOxGuQXnIt2I6hSKNPs1QTbTbQQ6+7Q IhtQ== X-Received: by 10.69.12.136 with SMTP id eq8mr19630843pbd.88.1437059800893; Thu, 16 Jul 2015 08:16:40 -0700 (PDT) Received: from localhost ([115.115.225.206]) by smtp.gmail.com with ESMTPSA id v8sm8265672pdm.89.2015.07.16.08.16.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jul 2015 08:16:39 -0700 (PDT) From: Sanchayan Maity To: linux-input@vger.kernel.org, devicetree@vger.kernel.org Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, shawn.guo@linaro.org, kernel@pengutronix.de, stefan@agner.ch, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sanchayan Maity Subject: [PATCH v2 2/4] ARM: dts: vf500-colibri: Add device tree node for touchscreen support Date: Thu, 16 Jul 2015 20:43:20 +0530 Message-Id: <63bed3ee9ee4211df15d11becf1f78824e640a82.1437058481.git.maitysanchayan@gmail.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: References: In-Reply-To: References: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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..7cbe341 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 0x22e9 + VF610_PAD_PTB23__GPIO_93 0x22e9 + VF610_PAD_PTA22__GPIO_12 0x22e9 + VF610_PAD_PTA11__GPIO_4 0x22e9 + >; + }; + }; };