From patchwork Fri Oct 14 07:53:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 9376149 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 70F8460779 for ; Fri, 14 Oct 2016 07:56:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 663642A4D7 for ; Fri, 14 Oct 2016 07:56:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5969A2A4E6; Fri, 14 Oct 2016 07:56:23 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 313632A4D7 for ; Fri, 14 Oct 2016 07:56:21 +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 1buxJl-0002ER-LR; Fri, 14 Oct 2016 07:54:13 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1buxJe-0002B1-Q8 for linux-arm-kernel@lists.infradead.org; Fri, 14 Oct 2016 07:54:08 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93B73C05A286; Fri, 14 Oct 2016 07:53:49 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-53.ams2.redhat.com [10.36.112.53]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9E7rdoK016706; Fri, 14 Oct 2016 03:53:45 -0400 From: Hans de Goede To: Rob Herring , Mark Rutland , Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH 1/6] dt: bindings: Add Allwinner Q8 tablets hardware manager bindings Date: Fri, 14 Oct 2016 09:53:32 +0200 Message-Id: <20161014075337.10452-2-hdegoede@redhat.com> In-Reply-To: <20161014075337.10452-1-hdegoede@redhat.com> References: <20161014075337.10452-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 14 Oct 2016 07:53:49 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161014_005406_956526_5A72FEA2 X-CRM114-Status: GOOD ( 15.45 ) 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 , Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, Hans de Goede 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 Allwinnner A13 / A23 / A33 based Q8 tablets are popular cheap 7" tablets of which a new batch is produced every few weeks. Each batch uses a different mix of touchscreen, accelerometer and wifi peripherals. Given that each batch is different creating a devicetree for each variant is not desirable, work is being done on a Q8 tablet hardware manager which auto-detects the touchscreen and accelerometer and will update the dt with what it has found, so that a single generic dt can be used for these tablets. This commit adds dt-bindings for this hardware manager. Note the wifi is connected to a discoverable bus (sdio or usb) and will be autodetected by the mmc resp. usb subsystems. Signed-off-by: Hans de Goede --- .../misc/allwinner,sunxi-q8-hardwaremgr.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/allwinner,sunxi-q8-hardwaremgr.txt diff --git a/Documentation/devicetree/bindings/misc/allwinner,sunxi-q8-hardwaremgr.txt b/Documentation/devicetree/bindings/misc/allwinner,sunxi-q8-hardwaremgr.txt new file mode 100644 index 0000000..a81b258 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/allwinner,sunxi-q8-hardwaremgr.txt @@ -0,0 +1,71 @@ +Q8 tablet hardware manager +-------------------------- + +Allwinnner A13 / A23 / A33 based Q8 tablets are popular cheap 7" tablets of +which a new batch is produced every few weeks. Each batch uses a different +mix of touchscreen, accelerometer and wifi peripherals. + +Given that each batch is different creating a devicetree for each variant is +not desirable. The Q8 tablet hardware manager bindings are bindings for an os +module which auto-detects the touchscreen and accelerometer so that a single +generic dts can be used for these tablets. + +The wifi is connected to a discoverable bus and will be autodetected by the os. + +Required properties: + - toplevel / machine compatible, one of: + "allwinner,q8-a13" + "allwinner,q8-a23" + "allwinner,q8-a33" + - touchscreen node : There must be a template touchscreen node named + "touchscreen", this must be a child node of the + touchscreen i2c bus + - accelerometer node : There must be a template accelerometer node named + "accelerometer", this must be a child node of the + accelerometer i2c bus + +touchscreen node required properties: + - interrupt-parent : phandle pointing to the interrupt controller + serving the touchscreen interrupt + - interrupts : interrupt specification for the touchscreen interrupt + - power-gpios : Specification for the pin connected to the touchscreen's + enable / wake pin. This needs to be driven high to + enable the touchscreen controller + +touchscreen node optional properties: + - vddio-supply : regulator phandle for the touchscreen vddio supply + +accelerometer node optional properties: + - interrupt-parent : phandle pointing to the interrupt controller + serving the accelerometer interrupt + - interrupts : interrupt specification for the accelerometer interrupt + +Example: + +/ { + compatible = "allwinner,q8-a23", "allwinner,sun8i-a23"; +}; + +&i2c0 { + touchscreen: touchscreen@0 { + interrupt-parent = <&pio>; + interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */ + power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ + vddio-supply = <®_ldo_io1>; + /* + * Enabled by sunxi-q8-hardwaremgr if it detects a + * known model touchscreen. + */ + status = "disabled"; + }; +}; + +&i2c1 { + accelerometer: accelerometer@0 { + /* + * Enabled by sunxi-q8-hardwaremgr if it detects a + * known model accelerometer. + */ + status = "disabled"; + }; +};