From patchwork Tue Oct 11 00:33:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9370031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5B14560487 for ; Tue, 11 Oct 2016 00:39:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C9F4299AA for ; Tue, 11 Oct 2016 00:39:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40C17299C2; Tue, 11 Oct 2016 00:39:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id BE006299AA for ; Tue, 11 Oct 2016 00:39:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1btl54-0003Qn-4H; Tue, 11 Oct 2016 00:38:06 +0000 Received: from forward16m.cmail.yandex.net ([2a02:6b8:b030::9d]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1btl4v-0003Ag-F4 for linux-arm-kernel@lists.infradead.org; Tue, 11 Oct 2016 00:37:59 +0000 Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::25]) by forward16m.cmail.yandex.net (Yandex) with ESMTP id 5C490210BB; Tue, 11 Oct 2016 03:37:34 +0300 (MSK) Received: from smtp1o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1o.mail.yandex.net (Yandex) with ESMTP id 24BF21300E56; Tue, 11 Oct 2016 03:37:06 +0300 (MSK) Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id SivlLSIFMq-aqtK92hE; Tue, 11 Oct 2016 03:37:05 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1476146226; bh=H+2o5WPPYRfVosrYMrk0cYaP3GLCCjMgw7Kyttq5wQU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=NZZtB9vzKnRPy0l4S3ZLz9apFnLAGTCv1kas9W1K2mvKj6wYtf/9+7hlq7fYVitPq B8IaN14WeR5F1gbK17AY+KuTs9E6tnV5BKphqCo+qtka7FUrFh3iXMIcdj9PUverrc 2UxkFzSDn61wsMPLPijydoKKWXEGclQYPULF/Hao= Authentication-Results: smtp1o.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 1130000036118848 From: Icenowy Zheng To: Dmitry Torokhov , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Hans de Goede , Henrik Rydberg Subject: [PATCH 5/5] ARM: dts: sun6i: enable ili2139 on Colorfly E708 Q1 Date: Tue, 11 Oct 2016 08:33:59 +0800 Message-Id: <20161011003359.26079-5-icenowy@aosc.xyz> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161011003359.26079-1-icenowy@aosc.xyz> References: <20161011003359.26079-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161010_173758_010288_24D3DC8E X-CRM114-Status: GOOD ( 11.42 ) 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: Mark Rutland , Geert Uytterhoeven , Jarkko Sakkinen , linux-sunxi@googlegroups.com, Benjamin Tissoires , Icenowy Zheng , Marek Vasut , Damien Riegel , Russell King , Javier Martinez Canillas , linux-input@vger.kernel.org, Thierry Reding , Rask Ingemann Lambertsen , devicetree@vger.kernel.org, Arnd Bergmann , Michael Welling , linux-arm-kernel@lists.infradead.org, Jeffrey Lin , Siebren Vroegindeweij , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Sangwon Jee , Markus Pargmann , Andrew Morton , Shawn Guo MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Many users report that their Colorfly E708 Q1's come with ili2139 touch IC. This patch adds the device node of this IC. It seems that two devices are attached to I2C bus 1: a ili2139 touch controller at 0x41, and a stil unknown device at 0x38. So make PA2 controlled by a dummy regulator node, rather than a power sequence GPIO for ili2139. There's also some users who report that their tablets come with touch screen with Goodix GT911 touch IC. In the device, the touch IC is connected on the screen rather soldered on the PCB, so the two touch screens may be both acceptable FRUs of the tablet. They have different addresses, and may be runtime detectable. (The Allwinner BSP kernel have such a detection method, however, mainline kernel have no such method now except enable both touch ICs' driver and wait for one driver's failure) Signed-off-by: Icenowy Zheng --- arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts b/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts index 882a4d8..73ac574 100644 --- a/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts +++ b/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts @@ -47,6 +47,38 @@ / { model = "Colorfly E708 Q1 tablet"; compatible = "colorfly,e708-q1", "allwinner,sun6i-a31s"; + + /* This is actually a common reset line for both the + * touchscreen and the accelerometer. + */ + i2c1_on: i2c1_on { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_on_e708_q1>; + + regulator-name = "i2c1_on"; + regulator-min-microvolt = "3000000"; + regulator-max-microvolt = "3000000"; + regulator-always-on; + gpio = <&pio 0 2 GPIO_ACTIVE_HIGH>; /* PA2 */ + enable-active-high; + }; +}; + +&i2c1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + + ctp@41 { + pinctrl-names = "default"; + pinctrl-0 = <&ili2139_int_e708_q1>; + + compatible = "ilitek,ili2139", "ili2139"; + reg = <0x41>; + interrupt-parent = <&pio>; + interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */ + }; }; &lradc { @@ -61,6 +93,22 @@ }; }; +&pio { + i2c1_on_e708_q1: i2c1_on@0 { + allwinner,pins = "PA2"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; + + ili2139_int_e708_q1: ili2139_int@0 { + allwinner,pins = "PA3"; + allwinner,function = "gpio_in"; + allwinner,drive = ; + allwinner,pull = ; + }; +}; + ®_dldo2 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;