From patchwork Mon Dec 7 07:26:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priit Laes X-Patchwork-Id: 7781061 Return-Path: X-Original-To: patchwork-linux-arm@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 DECDE9F349 for ; Mon, 7 Dec 2015 07:28:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 037482041A for ; Mon, 7 Dec 2015 07:28:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C58E203E3 for ; Mon, 7 Dec 2015 07:28:47 +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 1a5qC7-0000F1-FU; Mon, 07 Dec 2015 07:26:47 +0000 Received: from plaes.org ([188.166.43.21]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a5qC4-0000E8-7T for linux-arm-kernel@lists.infradead.org; Mon, 07 Dec 2015 07:26:45 +0000 Received: from localhost (unknown [194.204.45.145]) by plaes.org (Postfix) with ESMTPSA id 2B7B5410DF; Mon, 7 Dec 2015 07:26:17 +0000 (UTC) From: Priit Laes To: Maxime Ripard , Chen-Yu Tsai , Dmitry Torokhov , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Subject: [PATCH 1/2] ARM: dts: sun4i: gemei-g9: Add touchscreen (Goodix gt801x2) support Date: Mon, 7 Dec 2015 09:26:00 +0200 Message-Id: <1449473161-3535-2-git-send-email-plaes@plaes.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1449473161-3535-1-git-send-email-plaes@plaes.org> References: <1449473161-3535-1-git-send-email-plaes@plaes.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151206_232644_445963_B94A5DDB X-CRM114-Status: GOOD ( 12.05 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Priit Laes , linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-input@vger.kernel.org, Aleksei Mamlin , linux-arm-kernel@lists.infradead.org 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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 Goodix GT801 2+1 is a touchscreen controller supporting up to 10 touches. Enable pin and wakeup pin support is currently not implemented: - enable pin (PI16, specified in FEX) seems to be wrong - wakeup pin needs some additional reverse engineering work Signed-off-by: Priit Laes --- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts index 1d73a98..52e6275 100644 --- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts +++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts @@ -48,6 +48,7 @@ #include #include #include +#include / { model = "Gemei G9 Tablet"; @@ -65,11 +66,11 @@ /* * TODO: * 2x cameras via CSI - * audio input + * audio input (+ ext. amplifier enable GPIO) * AXP battery management * NAND * OTG - * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 + * Touchscreen enable and wakeup pins */ &codec { status = "okay"; @@ -114,6 +115,27 @@ }; }; +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; + + touchscreen@55 { + compatible = "goodix,gt801_2plus1"; + reg = <0x55>; + + interrupt-parent = <&pio>; + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ + + /* + * TODO - figure out the wakeup pin: + * ctp_wakeup = port:PB13<1><1> + * TODO - find correct GPIO pin, PI16 seems to be incorrect: + * ctp_en = port:PI16<1><0> + */ + }; +}; + &lradc { vref-supply = <®_ldo2>;